diff options
| author | Shyam Sunder | 2018-06-25 10:47:20 -0400 |
|---|---|---|
| committer | Marcin Kurczewski | 2018-06-27 21:20:03 +0200 |
| commit | 3972b902d840e54bd4f8dd47a9d13bc20ee22c65 (patch) | |
| tree | 22a2d05fdc2a89a6c6595ef2a56d0747d761dc2a /client/js/models/top_navigation.js | |
| parent | 2bf361c64a46d575533f68f8ced88e037f887335 (diff) | |
client: fetch configurations from server at runtime
Permissions, regex filters, app title, email info,
and safety now fetched using server's Info API
Diffstat (limited to 'client/js/models/top_navigation.js')
| -rw-r--r-- | client/js/models/top_navigation.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/client/js/models/top_navigation.js b/client/js/models/top_navigation.js index ebb3753..a7c726d 100644 --- a/client/js/models/top_navigation.js +++ b/client/js/models/top_navigation.js @@ -1,7 +1,7 @@ 'use strict'; -const config = require('../config.js'); const events = require('../events.js'); +const api = require('../api.js'); class TopNavigationItem { constructor(accessKey, title, url, available, imageUrl) { @@ -53,8 +53,10 @@ class TopNavigation extends events.EventTarget { } setTitle(title) { - document.oldTitle = null; - document.title = config.name + (title ? (' – ' + title) : ''); + api.fetchConfig().then(() => { + document.oldTitle = null; + document.title = api.getName() + (title ? (' – ' + title) : ''); + }); } showAll() { |