mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
fix plugins + refactor menu
This commit is contained in:
parent
e54ae6d73f
commit
af69796df3
3 changed files with 6 additions and 9 deletions
|
|
@ -994,12 +994,11 @@ def configs():
|
|||
@login_required
|
||||
def plugins():
|
||||
tmp_ui_path = Path(sep, "var", "tmp", "bunkerweb", "ui")
|
||||
|
||||
if request.method == "POST":
|
||||
error = 0
|
||||
|
||||
is_request_params(["operation"], "plugins", True)
|
||||
# Delete plugin
|
||||
if request.form["operation"] == "delete":
|
||||
if "operation" in request.form and request.form["operation"] == "delete":
|
||||
|
||||
is_request_params(["type"], "plugins", True)
|
||||
|
||||
|
|
@ -2014,4 +2013,4 @@ def check_reloading():
|
|||
def logout():
|
||||
session.clear()
|
||||
logout_user()
|
||||
return redirect(url_for("login"))
|
||||
return redirect(url_for("login"))
|
||||
|
|
|
|||
7
src/ui/templates/menu.html
vendored
7
src/ui/templates/menu.html
vendored
|
|
@ -97,14 +97,13 @@
|
|||
</svg>
|
||||
{% endif %}
|
||||
{% if path == "services" %}
|
||||
<svg class="stroke-blue-500 h-6 w-6 relative"
|
||||
<svg class="stroke-orange-500 h-6 w-6 relative"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M21.75 17.25v-.228a4.5 4.5 0 00-.12-1.03l-2.268-9.64a3.375 3.375 0 00-3.285-2.602H7.923a3.375 3.375 0 00-3.285 2.602l-2.268 9.64a4.5 4.5 0 00-.12 1.03v.228m19.5 0a3 3 0 01-3 3H5.25a3 3 0 01-3-3m19.5 0a3 3 0 00-3-3H5.25a3 3 0 00-3 3m16.5 0h.008v.008h-.008v-.008zm-3 0h.008v.008h-.008v-.008z" />
|
||||
</svg>
|
||||
{% endif %}
|
||||
{% if path == "configs" %}
|
||||
|
|
@ -218,7 +217,7 @@
|
|||
<a class="dark:hover:bg-primary/20 hover:bg-primary/5 hover:rounded-lg dark:text-white dark:opacity-80 py-1 text-sm ease-nav-brand my-0 mx-2 flex items-center whitespace-nowrap px-4 transition"
|
||||
href="{{ request.url_root }}plugins/{{ plugin['id'] }}">
|
||||
<div class="mr-2 flex items-center justify-center rounded-lg bg-center stroke-0 text-center p-1 xl:p-1.5">
|
||||
<svg class="fill-amber-500 h-5 w-5 relative"
|
||||
<svg class="fill-gray-500 h-5 w-5 relative"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 384 512">
|
||||
<path d="M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128z" />
|
||||
|
|
|
|||
1
src/ui/templates/plugins_modal.html
vendored
1
src/ui/templates/plugins_modal.html
vendored
|
|
@ -23,7 +23,6 @@
|
|||
class="w-full h-full flex flex-col justify-between"
|
||||
id="form-delete-plugin"
|
||||
method="POST">
|
||||
<input type="hidden" name="type" id="type" />
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="hidden" value="name" name="name" id="name" />
|
||||
<input type="hidden" value="external" name="type" id="type" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue