mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add button for removing doc tours
Summary: Document owners can now remove doc tours by pressing the button located to the right of 'Tour of this Document' in the left panel. Test Plan: Browser test. Reviewers: jarek Reviewed By: jarek Subscribers: jarek Differential Revision: https://phab.getgrist.com/D3202
This commit is contained in:
@@ -29,13 +29,12 @@ export function getUserOrgPrefsObs(appModel: AppModel): Observable<UserOrgPrefs>
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an observable that returns a particular preference value from UserOrgPrefs, and which
|
||||
* Creates an observable that returns a particular preference value from `prefsObs`, and which
|
||||
* stores it when set.
|
||||
*/
|
||||
export function getUserOrgPrefObs<Name extends keyof UserOrgPrefs>(
|
||||
appModel: AppModel, prefName: Name
|
||||
prefsObs: Observable<UserOrgPrefs>, prefName: Name
|
||||
): Observable<UserOrgPrefs[Name]> {
|
||||
const prefsObs = getUserOrgPrefsObs(appModel);
|
||||
return Computed.create(null, (use) => use(prefsObs)[prefName])
|
||||
.onWrite(value => prefsObs.set({...prefsObs.get(), [prefName]: value}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user