From 2c754c75ce7db0490a4bb041d4913cbfd527364e Mon Sep 17 00:00:00 2001 From: Krateng Date: Wed, 29 Jul 2020 17:04:38 +0200 Subject: [PATCH] Updated admin panel and issues page --- maloja/web/jinja/issues.jinja | 89 +++++++++++++++++++++++++++++++++++ maloja/web/pyhp/admin.pyhp | 24 ++-------- 2 files changed, 92 insertions(+), 21 deletions(-) create mode 100644 maloja/web/jinja/issues.jinja diff --git a/maloja/web/jinja/issues.jinja b/maloja/web/jinja/issues.jinja new file mode 100644 index 0000000..b1672e4 --- /dev/null +++ b/maloja/web/jinja/issues.jinja @@ -0,0 +1,89 @@ +{% extends "base.jinja" %} +{% block title %}Maloja - Issues{% endblock %} + + +{% block scripts %} + + +{% endblock %} + +{% set issuedata = dbp.issues() %} + +{% block content %} + + + + + + +
+
+
+

Possible Issues


+ with your library + + +

Maloja can identify possible problems with consistency or redundancy in your library. After making any changes, you should rebuild your library.

+
+ + + +{% if issuedata.inconsistent %} + + + + +{% endif %} + +{% for issue in issuedata.duplicates %} + + + + + +{% endfor %} + +{% for issue in issuedata.combined %} + + + + +{% endfor %} + +{% for issue in issuedata.newartists %} + + + + +{% endfor %} + +
The current database wasn't built with all current rules in effect. Any problem below might be a false alarm and fixing it could create redundant rules.
Rebuild the database
{{ htmlgenerators.artistLink(issue[0]) }} is a possible duplicate of {{ htmlgenerators.artistLink(issue[1]) }}
{{ issue[1] }} is correct
{{ issue[0] }} is correct
{{ artistLink(issue[0]) }} sounds like the combination of {{ len(issue[1]) }} artists: + {{ issue[1]|join(", ") }} +
Fix it
Is '{{ issue[0] }}' in '{{ htmlgenerators.artistLink(issue[1]) }}' an artist?
Yes
+ +{% endblock %} diff --git a/maloja/web/pyhp/admin.pyhp b/maloja/web/pyhp/admin.pyhp index 61ff121..8b00718 100644 --- a/maloja/web/pyhp/admin.pyhp +++ b/maloja/web/pyhp/admin.pyhp @@ -53,22 +53,6 @@ window.location.reload(true); } - function buttonlock() { - button = document.getElementById("adminmodebutton") - if (apikeycorrect) { - button.classList.remove("locked"); - if (button.innerHTML == "Activate") { button.onclick = activate; } - else { button.onclick = deactivate; } - // ugh - } - else { - button.classList.add("locked"); - button.onclick = null; - } - } - - window.addEventListener("load",function(){checkAPIkey(buttonlock)}); - // we do this twice, but this one ensures that the button is correctly locked / unlocked after the api key has been checked @@ -83,9 +67,7 @@
-

Admin Panel


-

- API Key:

+

Admin Panel

@@ -101,8 +83,8 @@

Admin Mode

Admin Mode allows you to manually scrobble from various places on the web interface instead of just the dedicated page.

- Deactivate - Activate + Deactivate + Activate

Links