[UI] The main module should load the config dir and main file paths at startup.

This commit is contained in:
Fabio Manganiello 2024-09-05 01:17:35 +02:00
parent 9ec21fe10d
commit bbc70fe6e6
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -49,6 +49,8 @@ export default {
data() { data() {
return { return {
config: {}, config: {},
configDir: null,
configFile: null,
userAuthenticated: false, userAuthenticated: false,
connected: false, connected: false,
pwaInstallEvent: null, pwaInstallEvent: null,
@ -85,7 +87,11 @@ export default {
}, },
async initConfig() { async initConfig() {
this.config = await this.request('config.get', {}, 60000, false) this.config = await this.request('config.get', {}, 60000, false);
[this.configDir, this.configFile] = await Promise.all([
this.request('config.get_config_dir'),
this.request('config.get_config_file'),
])
this.userAuthenticated = true this.userAuthenticated = true
}, },