mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-23 05:03:36 +03:00
wip ref(core/profiles.service): add methods to manage ProfileGroup collapse state
This commit is contained in:
parent
c1e03ed532
commit
5763919d85
@ -323,4 +323,13 @@ export class ProfilesService {
|
||||
return groups
|
||||
}
|
||||
|
||||
/**
|
||||
* Save ProfileGroup collapse state in localStorage
|
||||
*/
|
||||
saveProfileGroupCollapse(group: PartialProfileGroup<ProfileGroup>) {
|
||||
const profileGroupCollapsed = JSON.parse(window.localStorage.profileGroupCollapsed ?? '{}')
|
||||
profileGroupCollapsed[group.id] = group.collapsed
|
||||
window.localStorage.profileGroupCollapsed = JSON.stringify(profileGroupCollapsed)
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user