Centralize default user and team preferences. (#5172
Passing the fallback at each callpoint was dumb
This commit is contained in:
@@ -1,3 +1,24 @@
|
||||
import {
|
||||
TeamPreference,
|
||||
TeamPreferences,
|
||||
UserPreference,
|
||||
UserPreferences,
|
||||
} from "./types";
|
||||
|
||||
export const USER_PRESENCE_INTERVAL = 5000;
|
||||
|
||||
export const MAX_AVATAR_DISPLAY = 6;
|
||||
|
||||
export const TeamPreferenceDefaults: TeamPreferences = {
|
||||
[TeamPreference.SeamlessEdit]: true,
|
||||
[TeamPreference.ViewersCanExport]: true,
|
||||
[TeamPreference.PublicBranding]: false,
|
||||
[TeamPreference.Commenting]: false,
|
||||
[TeamPreference.CustomTheme]: undefined,
|
||||
};
|
||||
|
||||
export const UserPreferenceDefaults: UserPreferences = {
|
||||
[UserPreference.RememberLastPath]: true,
|
||||
[UserPreference.UseCursorPointer]: true,
|
||||
[UserPreference.CodeBlockLineNumers]: true,
|
||||
};
|
||||
|
||||
@@ -107,6 +107,7 @@ export enum UserPreference {
|
||||
RememberLastPath = "rememberLastPath",
|
||||
/** If web-style hand pointer should be used on interactive elements. */
|
||||
UseCursorPointer = "useCursorPointer",
|
||||
/** Whether code blocks should show line numbers. */
|
||||
CodeBlockLineNumers = "codeBlockLineNumbers",
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user