1
1
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:
Clem Fern 2023-07-22 22:13:43 +02:00
parent c1e03ed532
commit 5763919d85

View File

@ -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)
}
}