From 9347144a1951407b6f8ee038de92c96a76b50270 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Fri, 26 Apr 2024 12:02:03 +0200 Subject: [PATCH 01/12] improve UX and UI Signed-off-by: Simon L --- php/public/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/php/public/style.css b/php/public/style.css index f34b20bf..7f86decb 100644 --- a/php/public/style.css +++ b/php/public/style.css @@ -6,6 +6,7 @@ html, body { a { text-decoration: none; + color: #0082c9; } .button { From 46b6992b52a24ea5ef3f2370f1a9a9afff8556d0 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Wed, 15 May 2024 17:44:30 +0200 Subject: [PATCH 02/12] pre-fill the domain Signed-off-by: Simon L --- php/public/domain-prefill.js | 7 +++++++ php/templates/containers.twig | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 php/public/domain-prefill.js diff --git a/php/public/domain-prefill.js b/php/public/domain-prefill.js new file mode 100644 index 00000000..c81f2231 --- /dev/null +++ b/php/public/domain-prefill.js @@ -0,0 +1,7 @@ +document.addEventListener("DOMContentLoaded", function(event) { + // domain + let domain = document.getElementById("domain_input"); + if (domain) { + domain.value = window.location.host + } +}); diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 4249cb2e..a885646f 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -20,6 +20,9 @@ {# Add 2nd tab warning #} + + {# Add domain-prefill #} + {% set isAnyRunning = false %} {% set isAnyRestarting = false %} @@ -100,7 +103,7 @@ Please note: The domain validation is disabled so any domain will be accepted here! So make sure that you do not make a typo here as you will not be able to change it afterwards!

{% endif %}
- + From 99567d687201229eb38a33209f6e0fd95d26998a Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Wed, 15 May 2024 17:48:03 +0200 Subject: [PATCH 03/12] change `Nextcloud AIO setup` to `All-in-One setup` Signed-off-by: Simon L --- php/templates/setup.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/setup.twig b/php/templates/setup.twig index 7783830c..4bd623a4 100644 --- a/php/templates/setup.twig +++ b/php/templates/setup.twig @@ -4,7 +4,7 @@ From 560dce906eecac422cbad61e8f7304d44d9b9aa8 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Wed, 15 May 2024 18:01:20 +0200 Subject: [PATCH 06/12] adjust loader color to match nextcloud blue Signed-off-by: Simon L --- php/public/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/public/style.css b/php/public/style.css index 7f86decb..b9418737 100644 --- a/php/public/style.css +++ b/php/public/style.css @@ -198,7 +198,7 @@ header { .loader { border: 16px solid #f3f3f3; border-radius: 50%; - border-top: 16px solid #3498db; + border-top: 16px solid #0082c9; width: 120px; height: 120px; -webkit-animation: spin 2s linear infinite; /* Safari */ From 26c042fd28fee57d18fbc13494b1f0936fd98e7a Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Wed, 15 May 2024 18:11:13 +0200 Subject: [PATCH 07/12] pre-fill the timezone Signed-off-by: Simon L --- php/public/timezone.js | 7 +++++++ php/templates/containers.twig | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 php/public/timezone.js diff --git a/php/public/timezone.js b/php/public/timezone.js new file mode 100644 index 00000000..b43bdfe7 --- /dev/null +++ b/php/public/timezone.js @@ -0,0 +1,7 @@ +document.addEventListener("DOMContentLoaded", function(event) { + // timezone + let timezone = document.getElementById("timezone"); + if (timezone) { + timezone.value = Intl.DateTimeFormat().resolvedOptions().timeZone + } +}); diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 5f9869bd..477e718f 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -24,6 +24,9 @@ {# Add domain-prefill #} + {# timezone-prefill #} + + {% set isAnyRunning = false %} {% set isAnyRestarting = false %} {% set isWatchtowerRunning = false %} @@ -647,7 +650,7 @@ In order to get the correct time values for certain Nextcloud features, it makes sense to set the timezone for Nextcloud to the one that your users mainly use. Please note that this setting does not apply to the mastercontainer and any backup option.

You can configure the timezone for Nextcloud below:

- + From 5a826222d4a3de6c706b6f78413f06f13398e675 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Wed, 15 May 2024 18:15:34 +0200 Subject: [PATCH 08/12] try to fix glitchy buttons Signed-off-by: Simon L --- php/public/automatic_reload.js | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/php/public/automatic_reload.js b/php/public/automatic_reload.js index 2fef31a6..7b14a3c4 100644 --- a/php/public/automatic_reload.js +++ b/php/public/automatic_reload.js @@ -1,17 +1,19 @@ -if (document.hasFocus()) { - // hide reload button if the site reloads automatically - let list = document.getElementsByClassName("reload button"); - for (let i = 0; i < list.length; i++) { - // list[i] is a node with the desired class name - list[i].style.display = 'none'; - } +document.addEventListener("DOMContentLoaded", function(event) { + if (document.hasFocus()) { + // hide reload button if the site reloads automatically + let list = document.getElementsByClassName("reload button"); + for (let i = 0; i < list.length; i++) { + // list[i] is a node with the desired class name + list[i].style.display = 'none'; + } - // set timeout for reload - setTimeout(function(){ - window.location.reload(1); - }, 5000); -} else { - window.addEventListener("beforeunload", function() { - document.getElementById('overlay').classList.add('loading') - }); -} \ No newline at end of file + // set timeout for reload + setTimeout(function(){ + window.location.reload(1); + }, 5000); + } else { + window.addEventListener("beforeunload", function() { + document.getElementById('overlay').classList.add('loading') + }); + } +}); From 63c667cac347619e2703d2cb301df84a6ad0c186 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Wed, 15 May 2024 18:17:56 +0200 Subject: [PATCH 09/12] add instructions how to inspect container logs Signed-off-by: Simon L --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 477e718f..262f3715 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -236,7 +236,7 @@ {% endif %} {% else %} {% if isAnyRestarting == false %} - Containers are currently starting.

+ Containers are currently starting. You might inspect the container logs by clicking on
Starting
next to each container for further details.

Reload ↻

{% else %} It seems like at least one container is currently restarting which means it is not able to start correctly.

From 000d881fc2ad1ece6a7dd0222e66e4e05be63c73 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Wed, 15 May 2024 18:25:39 +0200 Subject: [PATCH 10/12] change wording Signed-off-by: Simon L --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 262f3715..2e59cfbf 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -428,7 +428,7 @@

Backup information

This is your encryption password for backups: {{ borgbackup_password }}

Please save it at a safe place since you won't be able to restore from backup if you lose this password!

- Backed up will get all important data of your Nextcloud AIO instance like the database, your files and configuration files of the mastercontainer and else.

+ All important data of your Nextcloud AIO instance will get backed up like the database, your files and configuration files of the mastercontainer and else.

The backup itself uses a tool that is called BorgBackup which is a well-known server backup tool that efficiently backs up your files and encrypts them on the fly.

By using this tool, backups are incremental, differential, compressed and encrypted – so only the first backup will take a while. Further backups should be fast as only changes are taken into account.

Backups get created in the following directory on the host: {{ borg_backup_host_location }}/borg

From 14153b424b11e52e376049724a498593d586b77a Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Wed, 15 May 2024 18:26:54 +0200 Subject: [PATCH 11/12] adjust wording Signed-off-by: Simon L --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 2e59cfbf..eebab725 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -152,7 +152,7 @@ {% elseif backup_exit_code == 0 %} Last {{ borg_backup_mode }} successful! (Logs)

{% if borg_backup_mode == 'test' %} - Feel free to check the integrity of the backup archive below before starting the restore process in order to make double-sure that the restore will work. This can take a long time though depending on the size of the backup archive and is thus not required.

+ Feel free to check the integrity of the backup archive below before starting the restore process in order to make ensure that the restore will work. This can take a long time though depending on the size of the backup archive and is thus not required.

From e78de8a113e04c4fe1e7ddf6a7d623486a375577 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Thu, 16 May 2024 10:55:53 +0200 Subject: [PATCH 12/12] rename password to encryption password Signed-off-by: Simon L --- php/templates/containers.twig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index eebab725..fd750256 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -136,7 +136,7 @@ {% if backup_exit_code > 0 %} Last {{ borg_backup_mode }} failed! (Logs)

{% if borg_backup_mode == 'test' %} - Please adjust the path and/or the password in order to make it work!

+ Please adjust the path and/or the encryption password in order to make it work!

{% elseif borg_backup_mode == 'check' %} The backup archive seems to be corrupt. Please try to use a different intact backup archive or try to fix it by following this documentation

@@ -174,29 +174,29 @@ {% elseif borg_backup_mode == 'restore' %} {% if backup_exit_code > 0 %} Last restore failed! (Logs)

- Somehow the restore failed which is unexpected! Please adjust the path and password, test it and try to restore again! + Somehow the restore failed which is unexpected! Please adjust the path and encryption password, test it and try to restore again! {% endif %} {% endif %} {% endif %} {% if borg_backup_host_location == '' or borg_restore_password == '' or borg_backup_mode not in ['test', 'check', ''] or backup_exit_code > 0 %} - Please enter the location of the backup archive on your host and the password of the backup archive below:

+ Please enter the location of the backup archive on your host and the encryption password of the backup archive below:

- + - + {{ include('includes/backup-dirs.twig') }} ⚠️ Please note that the backup archive must be located in a subfolder of the folder that you enter here and the subfolder which contains the archive must be named 'borg'. Otherwise will the backup container not find the backup archive!

{% endif %} {% else %} - Everything set! Click on the button below to test the path and password:

+ Everything set! Click on the button below to test the path and encryption password:

-
+
{% endif %} {% endif %}