diff --git a/lib/www/client/source/src/components/footer.vue b/lib/www/client/source/src/components/footer.vue
index e2fc699..93d806a 100644
--- a/lib/www/client/source/src/components/footer.vue
+++ b/lib/www/client/source/src/components/footer.vue
@@ -9,8 +9,14 @@
- mdi-lan-connect
- mdi-lan-disconnect
+
+ mdi-cloud-outline
+ mdi-cloud-off
+
+
+ mdi-lan-connect
+ mdi-lan-disconnect
+
@@ -57,7 +63,10 @@ export default {
return date.getUTCFullYear();
},
- ...mapState({serverConnected: state => state.notify.serverConnected})
+ ...mapState({
+ serverConnected: state => state.notify.serverConnected,
+ isFrontendRemote: state => state.api.serverInfo?.["remote-frontend"] ?? false
+ })
}
};
diff --git a/lib/www/client/source/src/store/modules/api/actions.js b/lib/www/client/source/src/store/modules/api/actions.js
index b291805..4fbe17d 100644
--- a/lib/www/client/source/src/store/modules/api/actions.js
+++ b/lib/www/client/source/src/store/modules/api/actions.js
@@ -79,6 +79,26 @@ async function api ({state, getters, commit, dispatch}, [resource, init = {}, cb
await cb(null, res.clone());
}
+ if (res.headers.has("x-dougal-server")) {
+ const header = res.headers.get("x-dougal-server")
+ const entries = header
+ .split(";")
+ .map(part => part.trim())
+ .filter(part => part.length > 0)
+ .map(part => {
+ const idx = part.indexOf('=');
+ if (idx === -1) {
+ return [part, true];
+ }
+ const key = part.slice(0, idx).trim();
+ const value = part.slice(idx + 1).trim();
+ return [key, value];
+ });
+ state.serverInfo = entries.length ? Object.fromEntries(entries) : {};
+ console.log("ENTRIES", entries);
+ console.log("SERVER INFO", state.serverInfo);
+ }
+
if (res.ok) {
if (!isCached) {
diff --git a/lib/www/client/source/src/store/modules/api/state.js b/lib/www/client/source/src/store/modules/api/state.js
index ba5c8bc..c12faee 100644
--- a/lib/www/client/source/src/store/modules/api/state.js
+++ b/lib/www/client/source/src/store/modules/api/state.js
@@ -1,7 +1,8 @@
const state = () => ({
apiUrl: "/api",
requestsCount: 0,
- maxConcurrent: 15
+ maxConcurrent: 15,
+ serverInfo: {} // Contents of the last received X-Dougal-Server HTTP header
});
export default state;