From 4d24817ced6b30d52b38be2a27ff7191330dc189 Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Fri, 5 Jul 2024 17:44:49 +0000 Subject: [PATCH] Prevent editing backup path in web interface when env variable set --- client/pages/config/backups.vue | 10 +++++++--- client/strings/en-us.json | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/client/pages/config/backups.vue b/client/pages/config/backups.vue index dc14e4e1..578ae6bd 100644 --- a/client/pages/config/backups.vue +++ b/client/pages/config/backups.vue @@ -16,11 +16,11 @@
- - {{ $strings.ButtonSave }} + + {{ $strings.ButtonSave }} {{ $strings.ButtonCancel }} -

{{ $strings.MessageBackupsLocationEditNote }}

+

{{ canEditBackup ? $strings.MessageBackupsLocationEditNote : $strings.MessageBackupsLocationNoEditNote }}

@@ -115,6 +115,10 @@ export default { timeFormat() { return this.serverSettings.timeFormat }, + canEditBackup() { + // Prevent editing of backup path if an environement variable is set + return !this.serverSettings.backupPathEnvSet + }, scheduleDescription() { if (!this.cronExpression) return '' const parsed = this.$parseCronExpression(this.cronExpression) diff --git a/client/strings/en-us.json b/client/strings/en-us.json index 74064ad5..b9b9b5de 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -605,6 +605,7 @@ "MessageAppriseDescription": "To use this feature you will need to have an instance of Apprise API running or an api that will handle those same requests.
The Apprise API Url should be the full URL path to send the notification, e.g., if your API instance is served at http://192.168.1.1:8337 then you would put http://192.168.1.1:8337/notify.", "MessageBackupsDescription": "Backups include users, user progress, library item details, server settings, and images stored in /metadata/items & /metadata/authors. Backups do not include any files stored in your library folders.", "MessageBackupsLocationEditNote": "Note: Updating the backup location will not move or modify existing backups", + "MessageBackupsLocationNoEditNote": "Note: The backup location is set through an environment variable and cannot be changed here.", "MessageBackupsLocationPathEmpty": "Backup location path cannot be empty", "MessageBatchQuickMatchDescription": "Quick Match will attempt to add missing covers and metadata for the selected items. Enable the options below to allow Quick Match to overwrite existing covers and/or metadata.", "MessageBookshelfNoCollections": "You haven't made any collections yet",