diff --git a/app/classes/shared/helpers.py b/app/classes/shared/helpers.py index e010df81..4a1bc4ed 100644 --- a/app/classes/shared/helpers.py +++ b/app/classes/shared/helpers.py @@ -43,6 +43,7 @@ class Helpers: self.ensure_dir_exists(os.path.join(self.root_dir, 'app', 'config', 'db')) self.db_path = os.path.join(self.root_dir, 'app', 'config', 'db', 'crafty.sqlite') self.serverjar_cache = os.path.join(self.config_dir, 'serverjars.json') + self.credits_cache = os.path.join(self.config_dir, 'credits.json') self.passhasher = PasswordHasher() self.exiting = False diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index 8241c7f3..66a266fd 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -61,6 +61,11 @@ class PanelHandler(BaseHandler): template = "public/error.html" elif page == 'credits': + with open(helper.credits_cache) as republic_credits_will_do: + credits = json.load(republic_credits_will_do) + page_data["patreons"] = credits["patreons"] + page_data["staff"] = credits["staff"] + page_data["translations"] = credits["translations"] template = "panel/credits.html" elif page == 'contribute': @@ -324,7 +329,7 @@ class PanelHandler(BaseHandler): user_data = json.loads(self.get_secure_cookie("user_data")) exec_user = db_helper.get_user(user_data['user_id']) - if not exec_user.superuser: + if not exec_user['superuser']: self.redirect("/panel/error?error=Unauthorized access: not superuser") return False elif server_id is None: @@ -569,4 +574,4 @@ class PanelHandler(BaseHandler): "Edited role {} (RID:{}) with servers {}".format(role_name, role_id, servers), server_id=0, source_ip=self.get_remote_ip()) - self.redirect("/panel/panel_config") \ No newline at end of file + self.redirect("/panel/panel_config") diff --git a/app/frontend/static/assets/images/credits/isilverfyre.png b/app/frontend/static/assets/images/credits/isilverfyre.png new file mode 100644 index 00000000..75270faf Binary files /dev/null and b/app/frontend/static/assets/images/credits/isilverfyre.png differ diff --git a/app/frontend/static/assets/images/credits/qub3d.png b/app/frontend/static/assets/images/credits/qub3d.png new file mode 100644 index 00000000..2ebaee66 Binary files /dev/null and b/app/frontend/static/assets/images/credits/qub3d.png differ diff --git a/app/frontend/static/assets/images/credits/silversthorn.png b/app/frontend/static/assets/images/credits/silversthorn.png new file mode 100644 index 00000000..1970f613 Binary files /dev/null and b/app/frontend/static/assets/images/credits/silversthorn.png differ diff --git a/app/frontend/templates/panel/credits.html b/app/frontend/templates/panel/credits.html index cc82155f..484193ca 100644 --- a/app/frontend/templates/panel/credits.html +++ b/app/frontend/templates/panel/credits.html @@ -27,9 +27,74 @@
+
+

 Development Team

+
+
+ {% for person in data['staff']['development'] %} +
+
+
+ +
+
+ +
+ profile image +
+ +
+
+

{{ person['name'] }}

+
+ +
+ +

{{ person['loc'] }}

+
+
+
+ +
+
+ {% if person['tags'][0] %} + {{ person['tags'][0] }} + {% end %} + {% if person['tags'][1] %} + {{ person['tags'][1] }} + {% end %} + {% if person['tags'][2] %} + {% if type(person['tags'][2]) is list %} + {{ person['tags'][2][0] }} + {% else %} + {{ person['tags'][2] }} + {% end %} + {% end %} +
+ +
+ {% if person['title'] %} + Crafty's {{ person['title'] }}

+ {% end %} + {{ person['blurb'] }} +
+
+
+ +
+
+
+ {% end %} + +
+ +
+

 Support and Documentation Team

+
- + {% for person in data['staff']['support'] %}
@@ -38,74 +103,44 @@
- profile image
-

Phillip Tarrant

+

{{ person['name'] }}

-

Atlanta, GA

+

{{ person['loc'] }}

- Staff - Developer - BDFL + {% if person['tags'][0] %} + {{ person['tags'][0] }} + {% end %} + {% if person['tags'][1] %} + {{ person['tags'][1] }} + {% end %} + {% if person['tags'][2] %} + {% if type(person['tags'][2]) is list %} + {{ person['tags'][2][0] }} + {% else %} + {{ person['tags'][2] }} + {% end %} + {% end %}
- Crafty's Benevolent Dictator for Life.

- His interests include Linux, cybersecurity, hacking, and gaming. - He enjoys downtime with the family, and playing with his chickens. -
-
-
- -
-
-
- -
-
-
- -
-
- -
- profile image -
- -
-
-

Pita Bread

-
- -
- -

Midwest, USA

-
-
-
- -
-
- Staff - Community Leader -
- -
- His interests include bread, Linux, and networking. - He enjoys pumpkins, organizing, and long-winded emails, but hates wifi. + {% if person['title'] %} + Crafty's {{ person['title'] }}

+ {% end %} + {{ person['blurb'] }}
@@ -113,99 +148,17 @@
+ {% end %}
-
- -
-
-
- -
-
- -
- profile image -
- -
-
-

Kev Dagoat

-
- -
- -

East Coast, AU

-
-
-
- -
-
- Staff - Developer - HOD -
- -
- Crafty's Head Of Development

- His interests include Linux, programming, and goats of course. - He enjoys building APIs, K8s, and Geeking over video cards. -
-
-
- -
-
-
- - -
-
-
- -
-
- -
- profile image -
- -
-
-

MC Gaming

-
- -
- -

Central, UK

-
-
-
- -
-
- Staff - Developer -
- -
- His interests include learning, Linux, programming. - He loves pentesting apps and gaming. -
-
-
- -
-
-
-
+
+

 Retired Staff

+
+ {% for person in data['staff']['retired'] %}
@@ -214,200 +167,44 @@
- profile image
-

Andrew Redacted

+

{{ person['name'] }}

-

East Coast, USA

+

{{ person['loc'] }}

- Staff - Support Manager + {% if person['tags'][0] %} + {{ person['tags'][0] }} + {% end %} + {% if person['tags'][1] %} + {{ person['tags'][1] }} + {% end %} + {% if person['tags'][2] %} + {% if type(person['tags'][2]) is list %} + {{ person['tags'][2][0] }} + {% else %} + {{ person['tags'][2] }} + {% end %} + {% end %}
- His interests include Linux, gaming, and helping others. When he's able to - unplug he enjoys biking, hiking, and playing soccer. -
-
-
- -
-
-
- -
-
-
- -
-
- -
- profile image -
- -
-
-

Manu Redacted

-
- -
- -

Eastern, CA

-
-
-
- -
-
- Staff - Developer - Project Manager -
- -
- His interests include learning, Linux, and programming. - He enjoys speaking French, doing 6 things at once, and testing software. -
-
-
- -
-
-
-
- -
- -
-
-
- -
-
- -
- profile image -
- -
-
-

UltraBlack

-
- -
- -

Bavaria, DE

-
-
-
- -
-
- Staff - Idea Manager -
- -
- Hi, my name is Tim, and I'm a huge fan of linux. - I'm often gaming and occasionally coding. -
-
-
- -
-
-
- -
-
-
- -
-
- -
- profile image -
- -
-
-

Mac Geek

-
- -
- -

Eastern, USA

-
-
-
- -
-
- Staff - Developer - Support Manager -
- -
- His interests include all things programming, and Pokemon. - He enjoys a good tech tangent, gaming, and playing on his phone. -
-
-
- -
-
-
- -
-
-
- -
-
- -
- profile image -
- -
-
-

ThatOneLukas

-
- -
- -

Helsinki, FI

-
-
-
- -
-
- Staff - Developer -
- -
- His interests include programming, gaming, and electronics. - He likes gaming, programming, messing around with electronics, and time with his family. + {% if person['title'] %} + Crafty's {{ person['title'] }}

+ {% end %} + {{ person['blurb'] }}
@@ -415,9 +212,9 @@
+ {% end %}
-
@@ -438,31 +235,22 @@ - + {% for pat in data["patreons"] %} - Richard B + {{ pat["name"] }} + {% if pat["level"] == "substainer" %} Substainer - - - - John C - + {% elif pat["level"] == "advocate" %} Advocate + {% elif pat["level"] == "supporter" %} + Supporter + {% else %} + Other + {% end %} - - Nicolas T - - Substainer - - - - Lightkeeper - - Substainer - - + {% end %} @@ -483,27 +271,16 @@ - + {% for person in data['translations'] %} - Ultrablack + {{ person }} - German + {% for language in data['translations'][person] %} + {{ language }} + {% end %} - - Manu - - French - - - - ptarrant - - Sarcasm - - - - + {% end %}