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') + }); + } +}); 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/public/style.css b/php/public/style.css index f34b20bf..b9418737 100644 --- a/php/public/style.css +++ b/php/public/style.css @@ -6,6 +6,7 @@ html, body { a { text-decoration: none; + color: #0082c9; } .button { @@ -197,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 */ 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 4249cb2e..fd750256 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -20,6 +20,12 @@ {# Add 2nd tab warning #} + + {# Add domain-prefill #} + + + {# timezone-prefill #} + {% set isAnyRunning = false %} {% set isAnyRestarting = false %} @@ -100,7 +106,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 %}
- + @@ -130,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

@@ -146,14 +152,14 @@ {% 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.


{% endif %} - Choose the backup that you want to restore and click on the button below to restore the selected backup. This will restore the whole AIO instance from backup. Please note that the current AIO password will be kept and the previous AIO password will not be restored from backup!

+ Choose the backup that you want to restore and click on the button below to restore the selected backup. This will restore the whole AIO instance from backup. Please note that the current AIO passphrase will be kept and the previous AIO passphrase will not be restored from backup!

@@ -168,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 %} @@ -230,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.

@@ -422,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

@@ -525,18 +531,18 @@ {% if is_backup_container_running == false %} {% if isApacheStarting == false %} -

AIO password change

+

AIO passphrase change

- Click here to change your AIO password
- You can change your AIO password below:

+ Click here to change your AIO passphrase
+ You can change your AIO passphrase below:

- - + + - +
- The new password needs to be at least 24 characters long. Allowed characters are the latin characters a-z, A-Z, 0-9 and spaces.
+ The new passphrase needs to be at least 24 characters long. Allowed characters are the latin characters a-z, A-Z, 0-9 and spaces.
{% endif %} {% endif %} @@ -644,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:

- + diff --git a/php/templates/login.twig b/php/templates/login.twig index 4ddd1257..a1864ef8 100644 --- a/php/templates/login.twig +++ b/php/templates/login.twig @@ -6,7 +6,7 @@

Nextcloud AIO Login

{% if is_login_allowed == true %} -

Log in using your Nextcloud AIO password:

+

Log in using your Nextcloud AIO passphrase:

diff --git a/php/templates/setup.twig b/php/templates/setup.twig index 7783830c..7e0aa61d 100644 --- a/php/templates/setup.twig +++ b/php/templates/setup.twig @@ -4,10 +4,10 @@