From 7c72dfc241aba6724c8501a7a15f74550e8e6812 Mon Sep 17 00:00:00 2001 From: amcmanu3 Date: Sat, 3 Jun 2023 12:21:23 -0400 Subject: [PATCH] Add webhook front end --- .../panel/parts/m_server_controls_list.html | 3 + .../panel/parts/server_controls_list.html | 6 + .../templates/panel/server_webhooks.html | 280 ++++++++++++++++++ 3 files changed, 289 insertions(+) create mode 100644 app/frontend/templates/panel/server_webhooks.html diff --git a/app/frontend/templates/panel/parts/m_server_controls_list.html b/app/frontend/templates/panel/parts/m_server_controls_list.html index 63c6b98a..6c645881 100644 --- a/app/frontend/templates/panel/parts/m_server_controls_list.html +++ b/app/frontend/templates/panel/parts/m_server_controls_list.html @@ -31,6 +31,9 @@ {{ translate('serverDetails', 'playerControls', data['lang']) }} {% end %} {{ translate('serverDetails', 'metrics', data['lang']) }} + {% if data['permissions']['Config'] in data['user_permissions'] %} + Webhooks + {% end %} \ No newline at end of file diff --git a/app/frontend/templates/panel/parts/server_controls_list.html b/app/frontend/templates/panel/parts/server_controls_list.html index 4f5bb6b5..09c9b213 100644 --- a/app/frontend/templates/panel/parts/server_controls_list.html +++ b/app/frontend/templates/panel/parts/server_controls_list.html @@ -53,4 +53,10 @@ {{ translate('serverDetails', 'metrics', data['lang']) }} + {% if data['permissions']['Webhooks'] in data['user_permissions'] %} + + {% end %} \ No newline at end of file diff --git a/app/frontend/templates/panel/server_webhooks.html b/app/frontend/templates/panel/server_webhooks.html new file mode 100644 index 00000000..b8552401 --- /dev/null +++ b/app/frontend/templates/panel/server_webhooks.html @@ -0,0 +1,280 @@ +{% extends ../base.html %} + +{% block meta %} +{% end %} + +{% block title %}Crafty Controller - {{ translate('serverDetails', 'serverDetails', data['lang']) }}{% end %} + +{% block content %} + +
+ + +
+
+ +
+ +
+ + + {% include "parts/details_stats.html" %} + +
+ +
+
+
+ + + {% include "parts/server_controls_list.html" %} + + + {% include "parts/m_server_controls_list.html" %} + + +
+
+
+
+

{{ translate('serverSchedules', + 'scheduledTasks', data['lang']) }}

+ {% if data['user_data']['hints'] %} + + {% end %} +
+
+
+
+
+
+
+ +
+
+
+
+ + + + +
+ + + +{% end %} + +{% block js %} + + + +{% end %} \ No newline at end of file