mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
finished credits and contribute section - with setting to disable contribute link
This commit is contained in:
parent
c829d495de
commit
f0618b073b
@ -52,7 +52,7 @@ class Helpers:
|
||||
logger.error("{} does not exits".format(file))
|
||||
return False
|
||||
|
||||
def get_setting(self, key):
|
||||
def get_setting(self, key, default_return=False):
|
||||
|
||||
try:
|
||||
with open(self.settings_file, "r") as f:
|
||||
@ -64,13 +64,13 @@ class Helpers:
|
||||
else:
|
||||
logger.error("Config File Error: setting {} does not exist".format(key))
|
||||
console.error("Config File Error: setting {} does not exist".format(key))
|
||||
return False
|
||||
return default_return
|
||||
|
||||
except Exception as e:
|
||||
logger.critical("Config File Error: Unable to read {} due to {}".format(self.settings_file, e))
|
||||
console.critical("Config File Error: Unable to read {} due to {}".format(self.settings_file, e))
|
||||
|
||||
return False
|
||||
return default_return
|
||||
|
||||
def get_local_ip(self):
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
|
@ -9,6 +9,7 @@ from app.classes.shared.models import Users, installer
|
||||
from app.classes.web.base_handler import BaseHandler
|
||||
from app.classes.minecraft.controller import controller
|
||||
from app.classes.shared.models import db_helper
|
||||
from app.classes.shared.helpers import helper
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -33,8 +34,8 @@ class PanelHandler(BaseHandler):
|
||||
'stopped': (len(controller.list_defined_servers()) - len(controller.list_running_servers()))
|
||||
},
|
||||
'menu_servers': defined_servers,
|
||||
'hosts_data': db_helper.get_latest_hosts_stats()
|
||||
|
||||
'hosts_data': db_helper.get_latest_hosts_stats(),
|
||||
'show_contribute': helper.get_setting("show_contribute_link", True)
|
||||
}
|
||||
|
||||
# if no servers defined, let's go to the build server area
|
||||
@ -49,6 +50,9 @@ class PanelHandler(BaseHandler):
|
||||
elif page == 'credits':
|
||||
template = "panel/credits.html"
|
||||
|
||||
elif page == 'contribute':
|
||||
template = "panel/contribute.html"
|
||||
|
||||
elif page == 'dashboard':
|
||||
page_data['servers'] = db_helper.get_all_servers_stats()
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"last_refreshed": "08/27/2020, 08:26:57",
|
||||
"last_refreshed": "08/28/2020, 13:57:47",
|
||||
"servers": {
|
||||
"nukkitx": [
|
||||
"1.14"
|
||||
|
BIN
app/frontend/static/assets/images/credits/kevdagoat.jpeg
Normal file
BIN
app/frontend/static/assets/images/credits/kevdagoat.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
BIN
app/frontend/static/assets/images/credits/macgeek_cropped.png
Normal file
BIN
app/frontend/static/assets/images/credits/macgeek_cropped.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 413 KiB |
BIN
app/frontend/static/assets/images/credits/mcgaming.png
Normal file
BIN
app/frontend/static/assets/images/credits/mcgaming.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 106 KiB |
BIN
app/frontend/static/assets/images/credits/ultrablack_cropped.png
Normal file
BIN
app/frontend/static/assets/images/credits/ultrablack_cropped.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
@ -82,12 +82,14 @@
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if data['show_contribute'] %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="pages/samples/widgets.html">
|
||||
<a class="nav-link" href="/panel/contribute">
|
||||
<i class="fas fa-donate"></i>
|
||||
<span class="menu-title">Contribute</span>
|
||||
</a>
|
||||
</li>
|
||||
{% end %}
|
||||
|
||||
|
||||
</ul>
|
||||
|
116
app/frontend/templates/panel/contribute.html
Normal file
116
app/frontend/templates/panel/contribute.html
Normal file
@ -0,0 +1,116 @@
|
||||
{% extends ../base.html %}
|
||||
|
||||
{% block meta %}
|
||||
<!-- <meta http-equiv="refresh" content="60">-->
|
||||
{% end %}
|
||||
|
||||
{% block title %}Crafty Controller - Blank Page{% end %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
||||
<!-- Page Title Header Starts-->
|
||||
<div class="row page-title-header">
|
||||
<div class="col-12">
|
||||
<div class="page-header">
|
||||
<h4 class="page-title">Contribute</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- Page Title Header Ends-->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3 grid-margin">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<h4 class="card-title">Recurring Support</h4>
|
||||
|
||||
<div class="media-body">
|
||||
<p class="card-text">
|
||||
Patrons get access to several perks, such as behind the scenes videos, posts, and updates.
|
||||
Patrons also get access to a Crafty Controller PE (Patreon Edition) with additional functions not in other versions of Crafty.
|
||||
</p>
|
||||
<br />
|
||||
<div class="text-center">
|
||||
<a href="https://www.patreon.com/bePatron?u=27882946" data-patreon-widget-type="become-patron-button">Become a Patron!</a><script async src="https://c6.patreon.com/becomePatronButton.bundle.js"></script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 grid-margin">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<h4 class="card-title">One Time Support</h4>
|
||||
|
||||
<div class="media-body">
|
||||
<p class="card-text">
|
||||
Contribute via Paypal, you can contribute any amount, as often or as little as you want.
|
||||
Please understand that while PayPal calls this a "Donation"; this is not a charitable donation and can not be claimed
|
||||
as a charitable donation for tax purposes
|
||||
</p>
|
||||
<br />
|
||||
<div class="text-center">
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
||||
<input type="hidden" name="cmd" value="_donations" />
|
||||
<input type="hidden" name="business" value="H2HNTLFZAJRXG" />
|
||||
<input type="hidden" name="currency_code" value="USD" />
|
||||
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button" />
|
||||
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 grid-margin">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<h4 class="card-title">Volunteer Time!</h4>
|
||||
|
||||
<div class="media-body">
|
||||
<p class="card-text">
|
||||
Join the discord and volunteer to help others solve issues, write documentation, translate Crafty into a new language.
|
||||
Come for the support, stay for the community. We have a very strong community full of people who are great to be around.
|
||||
</p>
|
||||
<br />
|
||||
<div class="text-center">
|
||||
<a href="https://discord.gg/9VJPhCE" target="_blank" class="btn btn-sm btn-info">Join Discord</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- content-wrapper ends -->
|
||||
|
||||
{% end %}
|
||||
|
||||
{% block js %}
|
||||
<script>
|
||||
|
||||
$( document ).ready(function() {
|
||||
console.log('ready for JS!')
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
{% end %}
|
@ -116,6 +116,94 @@
|
||||
|
||||
</div> <!-- end user row-->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 mb-5">
|
||||
<div class="card rounded shadow-none">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="user-avatar mb-auto">
|
||||
<img src="/static/assets/images/credits/kevdagoat.jpeg"
|
||||
alt="profile image" class="profile-img img-lg rounded-circle">
|
||||
</div>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="wrapper d-flex align-items-center">
|
||||
<h4 class="mb-0 font-weight-medium">Kev Dagoat</h4>
|
||||
</div>
|
||||
|
||||
<div class="wrapper d-flex align-items-center font-weight-medium text-muted">
|
||||
<i class="mdi mdi-map-marker-outline mr-2"></i>
|
||||
<p class="mb-0 text-muted">East Coast, AU</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="wrapper d-flex align-items-start">
|
||||
<span class="btn btn-sm btn-info mr-2">Staff</span>
|
||||
<span class="btn btn-sm btn-primary mr-2">Developer</span>
|
||||
<span class="btn btn-sm btn-inverse-success mr-2">HOD</span>
|
||||
</div>
|
||||
|
||||
<div class="wrapper d-flex align-items-start pt-3">
|
||||
Crafty's Head Of Development<br /><br />
|
||||
His interests include Linux, programming, and goats of course.
|
||||
He enjoys building APIs, K8s, and Geeking over video cards.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6 mb-5">
|
||||
<div class="card rounded shadow-none">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="user-avatar mb-auto">
|
||||
<img src="/static/assets/images/credits/mcgaming.png"
|
||||
alt="profile image" class="profile-img img-lg rounded-circle">
|
||||
</div>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="wrapper d-flex align-items-center">
|
||||
<h4 class="mb-0 font-weight-medium">MC Gaming</h4>
|
||||
</div>
|
||||
|
||||
<div class="wrapper d-flex align-items-center font-weight-medium text-muted">
|
||||
<i class="mdi mdi-map-marker-outline mr-2"></i>
|
||||
<p class="mb-0 text-muted">Central, UK</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="wrapper d-flex align-items-start">
|
||||
<span class="btn btn-sm btn-info mr-2">Staff</span>
|
||||
<span class="btn btn-sm btn-primary mr-2">Developer</span>
|
||||
</div>
|
||||
|
||||
<div class="wrapper d-flex align-items-start pt-3">
|
||||
His interests include learning, Linux, Programming.
|
||||
He loves pentesting apps and gaming.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end user row-->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 mb-5">
|
||||
@ -200,6 +288,92 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end user row-->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 mb-5">
|
||||
<div class="card rounded shadow-none">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="user-avatar mb-auto">
|
||||
<img src="/static/assets/images/credits/ultrablack_cropped.png"
|
||||
alt="profile image" class="profile-img img-lg rounded-circle">
|
||||
</div>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="wrapper d-flex align-items-center">
|
||||
<h4 class="mb-0 font-weight-medium">UltraBlack</h4>
|
||||
</div>
|
||||
|
||||
<div class="wrapper d-flex align-items-center font-weight-medium text-muted">
|
||||
<i class="mdi mdi-map-marker-outline mr-2"></i>
|
||||
<p class="mb-0 text-muted">Somewhere, DE</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="wrapper d-flex align-items-start">
|
||||
<span class="btn btn-sm btn-info mr-2">Staff</span>
|
||||
<span class="btn btn-sm btn-inverse-success mr-2">Idea Manager</span>
|
||||
</div>
|
||||
|
||||
<div class="wrapper d-flex align-items-start pt-3">
|
||||
His interests include Linux, gaming, and helping others.
|
||||
He enjoys learning, and Englisch sprechen
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mb-5">
|
||||
<div class="card rounded shadow-none">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="user-avatar mb-auto">
|
||||
<img src="/static/assets/images/credits/macgeek_cropped.png"
|
||||
alt="profile image" class="profile-img img-lg rounded-circle">
|
||||
</div>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="wrapper d-flex align-items-center">
|
||||
<h4 class="mb-0 font-weight-medium">Mac Geek</h4>
|
||||
</div>
|
||||
|
||||
<div class="wrapper d-flex align-items-center font-weight-medium text-muted">
|
||||
<i class="mdi mdi-map-marker-outline mr-2"></i>
|
||||
<p class="mb-0 text-muted">Eastern, USA</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="wrapper d-flex align-items-start">
|
||||
<span class="btn btn-sm btn-info mr-2">Staff</span>
|
||||
<span class="btn btn-sm btn-primary mr-2">Developer</span>
|
||||
<span class="btn btn-sm btn-inverse-success mr-2">Support Manager</span>
|
||||
</div>
|
||||
|
||||
<div class="wrapper d-flex align-items-start pt-3">
|
||||
His interests include all things Programming, and Pokemon.
|
||||
He enjoys a good tech tangent, gaming and playing on his phone.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end user row-->
|
||||
|
||||
@ -207,6 +381,102 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-6 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Patreon Supporters</h4>
|
||||
<p class="card-description"> A huge <code>thank you</code> to our Patreon supporters </p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Level</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>Richard B</td>
|
||||
<td>
|
||||
<span class="btn btn-sm btn-info mr-2">Substainer</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Josef K</td>
|
||||
<td>
|
||||
<span class="btn btn-sm btn-primary mr-2">Advocate</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>John C</td>
|
||||
<td>
|
||||
<span class="btn btn-sm btn-primary mr-2">Advocate</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Quinn B</td>
|
||||
<td>
|
||||
<span class="btn btn-sm btn-info mr-2">Substainer</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lightkeeper</td>
|
||||
<td>
|
||||
<span class="btn btn-sm btn-info mr-2">Substainer</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 grid-margin stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Language Translation</h4>
|
||||
<p class="card-description"> A huge <code>thank you</code> to our community who translate! </p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>Ultrablack</td>
|
||||
<td>
|
||||
<span class="btn btn-sm btn-inverse-success mr-2">German</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Manu</td>
|
||||
<td>
|
||||
<span class="btn btn-sm btn-inverse-success mr-2">French</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ptarrant</td>
|
||||
<td>
|
||||
<span class="btn btn-sm btn-inverse-success mr-2">Sarcasm</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- content-wrapper ends -->
|
||||
|
||||
|
@ -8,5 +8,6 @@
|
||||
"show_errors": true,
|
||||
"history_max_age": 7,
|
||||
"stats_update_frequency": 5,
|
||||
"delete_default_json": false
|
||||
"delete_default_json": false,
|
||||
"show_contribute_link": true
|
||||
}
|
Loading…
Reference in New Issue
Block a user