From d0f3dcf765c6a64d4a1a56c00d6a50dd78eaeb5b Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 6 Apr 2024 04:40:45 +0200 Subject: [PATCH] better js for approving apps --- files/assets/js/admin/apps.js | 11 +++++++++++ files/templates/admin/apps.html | 5 ++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/files/assets/js/admin/apps.js b/files/assets/js/admin/apps.js index d4a9b7771..95c3e8efc 100644 --- a/files/assets/js/admin/apps.js +++ b/files/assets/js/admin/apps.js @@ -6,3 +6,14 @@ function remove_app(t, url) { } ); } + +function approve_app(t, url) { + postToast(t, url, + {}, + () => { + t.nextElementSibling.classList.remove('d-none') + t.previousElementSibling.remove() + t.remove() + } + ); +} diff --git a/files/templates/admin/apps.html b/files/templates/admin/apps.html index be7797ae0..e59d59fa1 100644 --- a/files/templates/admin/apps.html +++ b/files/templates/admin/apps.html @@ -33,10 +33,9 @@
{% if not app.client_id %} - - {% else %} - + {% endif %} +