From 5711c3bef9c77b47ea4b91ed226b1d18a8f91725 Mon Sep 17 00:00:00 2001 From: Corban-Lee Jones Date: Wed, 14 Aug 2024 22:43:42 +0100 Subject: [PATCH] settings modal --- apps/static/js/home/settings.js | 11 +++++++++- .../home/includes/settingsmodal.html | 20 +++++++++++++++++++ apps/templates/home/index.html | 12 +++++++---- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 apps/templates/home/includes/settingsmodal.html diff --git a/apps/static/js/home/settings.js b/apps/static/js/home/settings.js index 64b95ac..7503987 100644 --- a/apps/static/js/home/settings.js +++ b/apps/static/js/home/settings.js @@ -14,7 +14,16 @@ $(document).on("selectedServerChange", async function() { updateColourInput("defaultEmbedColour", "#" + server.default_embed_colour); }); +$("#serverSettingsBtn").on("click", async function() { + await showServerSettingsModal(); +}); + +async function showServerSettingsModal() { + const server = getCurrentlyActiveServer(); + $("#serverSettingsModal").modal("show"); +} + $("#serverSettingsForm").on("submit", function(e) { e.preventDefault(); alert("not implemented"); -}) \ No newline at end of file +}) diff --git a/apps/templates/home/includes/settingsmodal.html b/apps/templates/home/includes/settingsmodal.html new file mode 100644 index 0000000..b123974 --- /dev/null +++ b/apps/templates/home/includes/settingsmodal.html @@ -0,0 +1,20 @@ + \ No newline at end of file diff --git a/apps/templates/home/index.html b/apps/templates/home/index.html index 7c6cc10..acc7eac 100644 --- a/apps/templates/home/index.html +++ b/apps/templates/home/index.html @@ -49,7 +49,10 @@
- + -
@@ -93,7 +96,7 @@
-
{% include "home/includes/settingstab.html" %}
+ @@ -104,6 +107,7 @@ {% include "home/includes/submodal.html" %} {% include "home/includes/filtermodal.html" %} {% include "home/includes/deletemodal.html" %} +{% include "home/includes/settingsmodal.html" %} {% endblock content %} {% block javascript %}