diff --git a/frontend/src/common/config.js b/frontend/src/common/config.js index 0f4d0d9b2..312406ef7 100644 --- a/frontend/src/common/config.js +++ b/frontend/src/common/config.js @@ -77,12 +77,12 @@ export default class Config { } } - ready() { - return this.values.mode && this.values.mode !== "public"; + loading() { + return !this.values.mode || this.values.mode === "public"; } - wait() { - if (!this.ready()) { + load() { + if (this.loading()) { return this.update(); } diff --git a/frontend/src/pages/library/import.vue b/frontend/src/pages/library/import.vue index ee78f575a..caf06159e 100644 --- a/frontend/src/pages/library/import.vue +++ b/frontend/src/pages/library/import.vue @@ -106,7 +106,7 @@ export default { const root = {"path": "/", "name": this.$gettext("All files from import folder")}; return { - ready: this.$config.ready(), + ready: !this.$config.loading(), settings: new Settings(this.$config.settings()), started: false, busy: false, @@ -128,7 +128,7 @@ export default { }, methods: { load() { - this.$config.wait().then(() => { + this.$config.load().then(() => { this.settings.setValues(this.$config.settings()); this.dirs = [this.root]; diff --git a/frontend/src/pages/library/index.vue b/frontend/src/pages/library/index.vue index c7d50520f..106abfa1d 100644 --- a/frontend/src/pages/library/index.vue +++ b/frontend/src/pages/library/index.vue @@ -101,7 +101,7 @@ export default { const root = {"path": "/", "name": this.$gettext("All originals")} return { - ready: this.$config.ready(), + ready: !this.$config.loading(), settings: new Settings(this.$config.settings()), readonly: this.$config.get("readonly"), config: this.$config.values, @@ -119,7 +119,7 @@ export default { }, methods: { load() { - this.$config.wait().then(() => { + this.$config.load().then(() => { this.settings.setValues(this.$config.settings()); this.dirs = [this.root]; diff --git a/frontend/src/pages/settings/general.vue b/frontend/src/pages/settings/general.vue index 86bca06f2..6936bc268 100644 --- a/frontend/src/pages/settings/general.vue +++ b/frontend/src/pages/settings/general.vue @@ -289,7 +289,7 @@ export default { config: this.$config.values, settings: new Settings(this.$config.settings()), options: options, - busy: this.$config.ready(), + busy: this.$config.loading(), subscriptions: [], }; }, @@ -304,7 +304,7 @@ export default { }, methods: { load() { - this.$config.wait().then(() => { + this.$config.load().then(() => { this.settings.setValues(this.$config.settings()); this.busy = false; }) diff --git a/frontend/src/pages/settings/library.vue b/frontend/src/pages/settings/library.vue index 21ae0cdd0..f62ed375a 100644 --- a/frontend/src/pages/settings/library.vue +++ b/frontend/src/pages/settings/library.vue @@ -141,7 +141,7 @@ export default { config: this.$config.values, settings: new Settings(this.$config.settings()), options: options, - busy: this.$config.ready(), + busy: this.$config.loading(), subscriptions: [], }; }, @@ -156,7 +156,7 @@ export default { }, methods: { load() { - this.$config.wait().then(() => { + this.$config.load().then(() => { this.settings.setValues(this.$config.settings()); this.busy = false; })