feat(interconnect): display active node name in travel mode & update changelog
- Persist active interconnect node name in localStorage via api - Pass node name on MasterList and NodeSwitcher when traveling - Display current node name on the 'Return to Master' floating button in App.vue - Update CHANGELOG.md, README.md and docs with v1.1.17 release notes highlighting interconnect features
This commit is contained in:
@@ -66,15 +66,22 @@ export interface MonitorStats {
|
||||
}
|
||||
}
|
||||
export let activeInterconnectNodeId = localStorage.getItem('activeInterconnectNodeId') || ''
|
||||
export let activeInterconnectNodeName = localStorage.getItem('activeInterconnectNodeName') || ''
|
||||
|
||||
export function setActiveInterconnectNodeId(id: string) {
|
||||
export function setActiveInterconnectNodeId(id: string, name?: string) {
|
||||
activeInterconnectNodeId = id
|
||||
if (name !== undefined) {
|
||||
activeInterconnectNodeName = name
|
||||
}
|
||||
localStorage.removeItem('site_settings_cache')
|
||||
if (id) {
|
||||
localStorage.setItem('activeInterconnectNodeId', id)
|
||||
if (name) localStorage.setItem('activeInterconnectNodeName', name)
|
||||
document.cookie = `active_interconnect_node_id=${id}; path=/; max-age=${7 * 24 * 3600}`
|
||||
} else {
|
||||
localStorage.removeItem('activeInterconnectNodeId')
|
||||
localStorage.removeItem('activeInterconnectNodeName')
|
||||
activeInterconnectNodeName = ''
|
||||
document.cookie = `active_interconnect_node_id=; path=/; expires=Thu, 01 Jan 1970 00:00:00 UTC`
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user