Developer Sidebar: Make pinned objects persistent (#3164)

Make pinned objects persistent within the browser session, so they don't
disappear when closing / reopening the developer sidebar, or when
switching to Help tab and back.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
pull/3170/head
jimtng 2025-04-29 03:48:40 +10:00 committed by GitHub
parent 67409fe3e4
commit 7c0e759b04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -445,7 +445,7 @@ export default {
transformations: [],
persistenceConfigs: []
},
pinnedObjects: {
pinnedObjects: this.$f7.data.pinnedObjects || {
items: [],
things: [],
rules: [],
@ -490,6 +490,7 @@ export default {
beforeDestroy () {
this.stopEventSource()
if (this.addThingAutocomplete) this.addThingAutocomplete.destroy()
this.$f7.data.pinnedObjects = this.pinnedObjects
},
methods: {
addItemsFromModel (value) {