2021-06-28 06:51:23 -07:00
|
|
|
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
|
|
|
// See LICENSE.txt for license information.
|
|
|
|
|
2021-07-20 06:05:53 -07:00
|
|
|
export type Tab = {
|
2021-06-28 06:51:23 -07:00
|
|
|
name: string;
|
|
|
|
order: number;
|
2021-09-16 10:35:07 -07:00
|
|
|
isOpen?: boolean;
|
2021-06-28 06:51:23 -07:00
|
|
|
}
|
|
|
|
|
2021-09-01 09:45:37 -07:00
|
|
|
export type Team = {
|
|
|
|
name: string;
|
|
|
|
order: number;
|
2021-07-20 06:05:53 -07:00
|
|
|
url: string;
|
|
|
|
lastActiveTab?: number;
|
|
|
|
}
|
|
|
|
|
2021-06-28 06:51:23 -07:00
|
|
|
export type TeamWithIndex = Team & {index: number};
|
2021-07-20 06:05:53 -07:00
|
|
|
export type TeamWithTabs = Team & {tabs: Tab[]};
|
2021-06-28 06:51:23 -07:00
|
|
|
|
2021-07-20 06:05:53 -07:00
|
|
|
export type Config = ConfigV3;
|
|
|
|
|
|
|
|
export type ConfigV3 = {
|
|
|
|
version: 3;
|
|
|
|
teams: TeamWithTabs[];
|
|
|
|
showTrayIcon: boolean;
|
|
|
|
trayIconTheme: string;
|
|
|
|
minimizeToTray: boolean;
|
|
|
|
notifications: {
|
|
|
|
flashWindow: number;
|
|
|
|
bounceIcon: boolean;
|
|
|
|
bounceIconType: 'critical' | 'informational';
|
|
|
|
};
|
|
|
|
showUnreadBadge: boolean;
|
|
|
|
useSpellChecker: boolean;
|
|
|
|
enableHardwareAcceleration: boolean;
|
|
|
|
autostart: boolean;
|
2021-12-13 06:19:59 -08:00
|
|
|
hideOnStart: boolean;
|
2021-09-20 11:10:01 -07:00
|
|
|
spellCheckerLocales: string[];
|
2021-07-20 06:05:53 -07:00
|
|
|
darkMode: boolean;
|
|
|
|
downloadLocation: string;
|
2021-07-26 06:28:49 -07:00
|
|
|
spellCheckerURL?: string;
|
2021-09-10 07:48:00 -07:00
|
|
|
lastActiveTeam?: number;
|
2022-03-28 14:22:08 -07:00
|
|
|
startInFullscreen?: boolean;
|
2022-03-08 08:38:38 -08:00
|
|
|
autoCheckForUpdates?: boolean;
|
2022-03-01 09:35:27 -08:00
|
|
|
alwaysMinimize?: boolean;
|
|
|
|
alwaysClose?: boolean;
|
2022-03-31 13:46:57 -07:00
|
|
|
logLevel?: string;
|
2021-07-20 06:05:53 -07:00
|
|
|
}
|
2021-06-28 06:51:23 -07:00
|
|
|
|
|
|
|
export type ConfigV2 = {
|
|
|
|
version: 2;
|
2021-07-20 06:05:53 -07:00
|
|
|
teams: Array<{
|
|
|
|
name: string;
|
|
|
|
url: string;
|
|
|
|
order: number;
|
|
|
|
}>;
|
2021-06-28 06:51:23 -07:00
|
|
|
showTrayIcon: boolean;
|
|
|
|
trayIconTheme: string;
|
|
|
|
minimizeToTray: boolean;
|
|
|
|
notifications: {
|
|
|
|
flashWindow: number;
|
|
|
|
bounceIcon: boolean;
|
|
|
|
bounceIconType: 'critical' | 'informational';
|
|
|
|
};
|
|
|
|
showUnreadBadge: boolean;
|
|
|
|
useSpellChecker: boolean;
|
|
|
|
enableHardwareAcceleration: boolean;
|
|
|
|
autostart: boolean;
|
|
|
|
spellCheckerLocale: string;
|
2021-07-26 06:28:49 -07:00
|
|
|
spellCheckerURL?: string;
|
2021-06-28 06:51:23 -07:00
|
|
|
darkMode: boolean;
|
|
|
|
downloadLocation: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type ConfigV1 = {
|
|
|
|
version: 1;
|
|
|
|
teams: Array<{
|
|
|
|
name: string;
|
|
|
|
url: string;
|
|
|
|
}>;
|
|
|
|
showTrayIcon: boolean;
|
|
|
|
trayIconTheme: string;
|
|
|
|
minimizeToTray: boolean;
|
|
|
|
notifications: {
|
|
|
|
flashWindow: number;
|
|
|
|
bounceIcon: boolean;
|
|
|
|
bounceIconType: 'critical' | 'informational';
|
|
|
|
};
|
|
|
|
showUnreadBadge: boolean;
|
|
|
|
useSpellChecker: boolean;
|
2021-07-26 06:28:49 -07:00
|
|
|
spellCheckerURL?: string;
|
2021-06-28 06:51:23 -07:00
|
|
|
enableHardwareAcceleration: boolean;
|
|
|
|
autostart: boolean;
|
|
|
|
spellCheckerLocale: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type ConfigV0 = {version: 0; url: string};
|
|
|
|
|
2021-07-20 06:05:53 -07:00
|
|
|
export type AnyConfig = ConfigV3 | ConfigV2 | ConfigV1 | ConfigV0;
|
2021-06-28 06:51:23 -07:00
|
|
|
|
|
|
|
export type BuildConfig = {
|
|
|
|
defaultTeams?: Team[];
|
|
|
|
helpLink: string;
|
|
|
|
enableServerManagement: boolean;
|
|
|
|
enableAutoUpdater: boolean;
|
|
|
|
managedResources: string[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export type RegistryConfig = {
|
|
|
|
teams: Team[];
|
|
|
|
enableServerManagement: boolean;
|
|
|
|
enableAutoUpdater: boolean;
|
|
|
|
}
|
|
|
|
|
2021-07-20 06:05:53 -07:00
|
|
|
export type CombinedConfig = ConfigV3 & BuildConfig & {
|
2021-06-28 06:51:23 -07:00
|
|
|
registryTeams: Team[];
|
|
|
|
appName: string;
|
2021-07-23 07:07:48 -07:00
|
|
|
useNativeWindow: boolean;
|
|
|
|
|
2021-06-28 06:51:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export type LocalConfiguration = Config & {
|
|
|
|
appName: string;
|
|
|
|
enableServerManagement: boolean;
|
2022-03-08 08:38:38 -08:00
|
|
|
canUpgrade: boolean;
|
2021-06-28 06:51:23 -07:00
|
|
|
}
|
2022-01-04 12:00:56 -08:00
|
|
|
|
|
|
|
export type MigrationInfo = {
|
|
|
|
updateTrayIconWin32: boolean;
|
2022-03-28 08:06:00 -07:00
|
|
|
masConfigs: boolean;
|
2022-01-04 12:00:56 -08:00
|
|
|
}
|