mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-13 02:19:46 +01:00
Update backups config page to use backupPathEnvSet returned from endpoint, remove from ServerConfig
This commit is contained in:
@@ -171,7 +171,7 @@ export default {
|
||||
this.$axios
|
||||
.$get('/api/backups')
|
||||
.then((data) => {
|
||||
this.$emit('loaded', data.backupLocation)
|
||||
this.$emit('loaded', data)
|
||||
this.setBackups(data.backups || [])
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
@@ -92,6 +92,7 @@ export default {
|
||||
newServerSettings: {},
|
||||
showCronBuilder: false,
|
||||
showEditBackupPath: false,
|
||||
backupPathEnvSet: false,
|
||||
backupLocation: '',
|
||||
newBackupLocation: '',
|
||||
savingBackupPath: false
|
||||
@@ -116,8 +117,8 @@ export default {
|
||||
return this.serverSettings.timeFormat
|
||||
},
|
||||
canEditBackup() {
|
||||
// Prevent editing of backup path if an environement variable is set
|
||||
return !this.serverSettings.backupPathEnvSet
|
||||
// Prevent editing of backup path if an environment variable is set
|
||||
return !this.backupPathEnvSet
|
||||
},
|
||||
scheduleDescription() {
|
||||
if (!this.cronExpression) return ''
|
||||
@@ -131,9 +132,10 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
backupsLoaded(backupLocation) {
|
||||
this.backupLocation = backupLocation
|
||||
this.newBackupLocation = backupLocation
|
||||
backupsLoaded(data) {
|
||||
this.backupLocation = data.backupLocation
|
||||
this.newBackupLocation = data.backupLocation
|
||||
this.backupPathEnvSet = data.backupPathEnvSet
|
||||
},
|
||||
cancelEditBackupPath() {
|
||||
this.newBackupLocation = this.backupLocation
|
||||
|
||||
Reference in New Issue
Block a user