From 94ea0bbd355a66bf3452301c23a7ef4e44e0d2f1 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Mon, 29 Sep 2025 11:04:44 +0200 Subject: [PATCH] Added a warning if javascript is disabled on login/signin pages --- Duplicati/Server/webroot/login.html | 18 ++++++++++++------ Duplicati/Server/webroot/login/login.css | 15 +++++++++++++++ Duplicati/Server/webroot/login/login.js | 2 ++ Duplicati/Server/webroot/signin.html | 18 ++++++++++++------ Duplicati/Server/webroot/signin/signin.css | 14 ++++++++++++++ Duplicati/Server/webroot/signin/signin.js | 2 ++ 6 files changed, 57 insertions(+), 12 deletions(-) diff --git a/Duplicati/Server/webroot/login.html b/Duplicati/Server/webroot/login.html index 6ed8dba81..b972db456 100644 --- a/Duplicati/Server/webroot/login.html +++ b/Duplicati/Server/webroot/login.html @@ -39,12 +39,18 @@

- Password missing or lost? +
+ Password missing or lost? +
+
+ You need Javascript enabled to use this page, or copy in the token from + the URL +
diff --git a/Duplicati/Server/webroot/login/login.css b/Duplicati/Server/webroot/login/login.css index edf45e726..3b02c9736 100644 --- a/Duplicati/Server/webroot/login/login.css +++ b/Duplicati/Server/webroot/login/login.css @@ -83,3 +83,18 @@ input { margin-left: 16px; color: #777; } + +#login div.nojs { + margin-top: 16px; + margin-left: 16px; + color: red; + opacity: 0; + animation: showafter2s 0s forwards; + animation-delay: 2s; +} + +@keyframes showafter2s { + to { + opacity: 1; + } +} diff --git a/Duplicati/Server/webroot/login/login.js b/Duplicati/Server/webroot/login/login.js index 2a924cb9a..207639211 100644 --- a/Duplicati/Server/webroot/login/login.js +++ b/Duplicati/Server/webroot/login/login.js @@ -1,5 +1,7 @@ $(document).ready(function() { var processing = false; + + document.getElementById('no-js-warning').style.display = 'none'; $('#login-form').on('submit', function() { diff --git a/Duplicati/Server/webroot/signin.html b/Duplicati/Server/webroot/signin.html index 9a6b79579..2f84bc6f0 100644 --- a/Duplicati/Server/webroot/signin.html +++ b/Duplicati/Server/webroot/signin.html @@ -29,12 +29,18 @@

- Need help locating the signin token? +
+ Need help locating the signin token? +
+
+ You need Javascript enabled to use this page, or copy in the token from + the URL +
diff --git a/Duplicati/Server/webroot/signin/signin.css b/Duplicati/Server/webroot/signin/signin.css index 3151103b2..3ce6ada88 100644 --- a/Duplicati/Server/webroot/signin/signin.css +++ b/Duplicati/Server/webroot/signin/signin.css @@ -82,4 +82,18 @@ input { margin-top: 16px; margin-left: 16px; color: #777; +} +#signin div.nojs { + margin-top: 16px; + margin-left: 16px; + color: red; + opacity: 0; + animation: showafter2s 0s forwards; + animation-delay: 2s; +} + +@keyframes showafter2s { + to { + opacity: 1; + } } \ No newline at end of file diff --git a/Duplicati/Server/webroot/signin/signin.js b/Duplicati/Server/webroot/signin/signin.js index f7805cbf3..8d7210441 100644 --- a/Duplicati/Server/webroot/signin/signin.js +++ b/Duplicati/Server/webroot/signin/signin.js @@ -1,5 +1,7 @@ $(document).ready(function() { var processing = false; + + document.getElementById('no-js-warning').style.display = 'none'; function getQueryParam(name) { var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search);