aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/App.vue33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/App.vue b/src/App.vue
index fddc585..440ffa0 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -63,7 +63,7 @@
63 </h2> 63 </h2>
64 <Service 64 <Service
65 v-for="item in group.items" 65 v-for="item in group.items"
66 :key="item.url" 66 :key="item.name"
67 v-bind:item="item" 67 v-bind:item="item"
68 class="column is-one-third-widescreen" 68 class="column is-one-third-widescreen"
69 /> 69 />
@@ -153,19 +153,28 @@ export default {
153 document.title = `${this.config.title} | ${this.config.subtitle}`; 153 document.title = `${this.config.title} | ${this.config.subtitle}`;
154 }, 154 },
155 methods: { 155 methods: {
156 getConfig: function () { 156 getConfig: function (path = "config.yml") {
157 return fetch("config.yml") 157 return fetch(path).then((response) => {
158 .then((response) => { 158 if (!response.ok) {
159 if (!response.ok) { 159 throw Error(response.statusText);
160 throw Error(response.statusText); 160 }
161 } 161
162 return response.text().then((body) => { 162 const that = this;
163 return response
164 .text()
165 .then((body) => {
163 return jsyaml.load(body); 166 return jsyaml.load(body);
167 })
168 .then(function (config) {
169 if (config.externalConfig) {
170 return that.getConfig(config.externalConfig);
171 }
172 return config;
173 })
174 .catch((error) => {
175 return this.handleErrors("⚠️ Error loading configuration", error);
164 }); 176 });
165 }) 177 });
166 .catch((error) => {
167 return this.handleErrors("⚠️ Error loading configuration", error);
168 });
169 }, 178 },
170 matchesFilter: function (item) { 179 matchesFilter: function (item) {
171 return ( 180 return (