You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gristlabs_grist-core/app/common/Prefs.ts

29 lines
861 B

import {StringUnion} from 'app/common/StringUnion';
export const SortPref = StringUnion("name", "date");
export type SortPref = typeof SortPref.type;
export const ViewPref = StringUnion("list", "icons");
export type ViewPref = typeof ViewPref.type;
// A collection of preferences related to a user or org (or combination).
export interface Prefs {
// TODO replace this with real preferences.
placeholder?: string;
}
export type UserPrefs = Prefs;
export interface UserOrgPrefs extends Prefs {
docMenuSort?: SortPref;
docMenuView?: ViewPref;
// List of example docs that the user has seen and dismissed the welcome card for.
// The numbers are the `id` from IExampleInfo in app/client/ui/ExampleInfo.
// By living in UserOrgPrefs, this applies only to the examples-containing org.
seenExamples?: number[];
}
export type OrgPrefs = Prefs;