aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/App.vue
diff options
context:
space:
mode:
authorluixal <luixal@gmail.com>2021-01-07 09:39:58 +0100
committerluixal <luixal@gmail.com>2021-01-07 09:39:58 +0100
commite3bd2ecc2ca874270282c3c42813b8053d67dcbd (patch)
treea1248fd1c62273e3afd68e2059243e1f091d098a /src/App.vue
parent3786f80dae2df7780d19ba8ffd9374ef3c2fc30f (diff)
downloadhomer-e3bd2ecc2ca874270282c3c42813b8053d67dcbd.tar.gz
homer-e3bd2ecc2ca874270282c3c42813b8053d67dcbd.tar.zst
homer-e3bd2ecc2ca874270282c3c42813b8053d67dcbd.zip
Adds multiple pages based on different config files
Diffstat (limited to 'src/App.vue')
-rw-r--r--src/App.vue9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/App.vue b/src/App.vue
index dc473ca..03970ed 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -13,7 +13,7 @@
13 <section v-if="config.header" class="first-line"> 13 <section v-if="config.header" class="first-line">
14 <div v-cloak class="container"> 14 <div v-cloak class="container">
15 <div class="logo"> 15 <div class="logo">
16 <img v-if="config.logo" :src="config.logo" alt="dashboard logo" /> 16 <a href="/"><img v-if="config.logo" :src="config.logo" alt="dashboard logo" /></a>
17 <i v-if="config.icon" :class="config.icon"></i> 17 <i v-if="config.icon" :class="config.icon"></i>
18 </div> 18 </div>
19 <div class="dashboard-title"> 19 <div class="dashboard-title">
@@ -153,6 +153,13 @@ export default {
153 let config; 153 let config;
154 try { 154 try {
155 config = await this.getConfig(); 155 config = await this.getConfig();
156 const path = (window.location.pathname != '/') ? window.location.pathname : null;
157 if (path) {
158 let pathConfig = await this.getConfig(`assets${path}.yml`); // the slash (/) is included in the pathname
159 for (const prop in pathConfig) config[prop] = pathConfig[prop];
160 }
161 // config = await this.getConfig(path ? `assets/${path}.yml` : null);
162 //config = await (path ? this.getConfig(`assets/${path}.yml`) : this.getConfig())
156 } catch (error) { 163 } catch (error) {
157 console.log(error); 164 console.log(error);
158 config = this.handleErrors("⚠️ Error loading configuration", error); 165 config = this.handleErrors("⚠️ Error loading configuration", error);