[MM-14093] Rename 'team' to 'server' and 'tab' to 'view' in most cases, some additional cleanup (#2711)
* Rename MattermostTeam -> UniqueServer, MattermostTab -> UniqueView * Rename 'team' to 'server' * Some further cleanup * Rename weirdly named function * Rename 'tab' to 'view' in most instances * Fix i18n * PR feedback
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
export type Tab = {
|
||||
export type View = {
|
||||
name: string;
|
||||
isOpen?: boolean;
|
||||
}
|
||||
|
||||
export type Team = {
|
||||
export type Server = {
|
||||
name: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
export type ConfigTab = Tab & {
|
||||
export type ConfigView = View & {
|
||||
order: number;
|
||||
}
|
||||
|
||||
export type ConfigServer = Team & {
|
||||
export type ConfigServer = Server & {
|
||||
order: number;
|
||||
lastActiveTab?: number;
|
||||
tabs: ConfigTab[];
|
||||
tabs: ConfigView[];
|
||||
}
|
||||
|
||||
export type MattermostTeam = Team & {
|
||||
export type UniqueServer = Server & {
|
||||
id?: string;
|
||||
isPredefined?: boolean;
|
||||
}
|
||||
|
||||
export type MattermostTab = Tab & {
|
||||
export type UniqueView = View & {
|
||||
id?: string;
|
||||
}
|
||||
|
||||
@@ -61,59 +61,49 @@ export type ConfigV3 = {
|
||||
appLanguage?: string;
|
||||
}
|
||||
|
||||
export type ConfigV2 = {
|
||||
version: 2;
|
||||
teams: Array<{
|
||||
name: string;
|
||||
url: string;
|
||||
order: number;
|
||||
}>;
|
||||
showTrayIcon: boolean;
|
||||
trayIconTheme: string;
|
||||
minimizeToTray: boolean;
|
||||
notifications: {
|
||||
flashWindow: number;
|
||||
bounceIcon: boolean;
|
||||
bounceIconType: 'critical' | 'informational';
|
||||
};
|
||||
showUnreadBadge: boolean;
|
||||
useSpellChecker: boolean;
|
||||
enableHardwareAcceleration: boolean;
|
||||
autostart: boolean;
|
||||
spellCheckerLocale: string;
|
||||
spellCheckerURL?: string;
|
||||
darkMode: boolean;
|
||||
downloadLocation?: string;
|
||||
}
|
||||
export type ConfigV2 =
|
||||
Omit<ConfigV3,
|
||||
'version' |
|
||||
'teams' |
|
||||
'hideOnStart' |
|
||||
'spellCheckerLocales' |
|
||||
'lastActiveTeam' |
|
||||
'startInFullscreen' |
|
||||
'autoCheckForUpdates' |
|
||||
'alwaysMinimize' |
|
||||
'alwaysClose' |
|
||||
'logLevel' |
|
||||
'appLanguage'
|
||||
> & {
|
||||
version: 2;
|
||||
teams: Array<{
|
||||
name: string;
|
||||
url: string;
|
||||
order: number;
|
||||
}>;
|
||||
spellCheckerLocale: 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;
|
||||
spellCheckerURL?: string;
|
||||
enableHardwareAcceleration: boolean;
|
||||
autostart: boolean;
|
||||
spellCheckerLocale: string;
|
||||
}
|
||||
export type ConfigV1 =
|
||||
Omit<ConfigV2,
|
||||
'version' |
|
||||
'teams' |
|
||||
'darkMode' |
|
||||
'downloadLocation'
|
||||
> & {
|
||||
version: 1;
|
||||
teams: Array<{
|
||||
name: string;
|
||||
url: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
export type ConfigV0 = {version: 0; url: string};
|
||||
|
||||
export type AnyConfig = ConfigV3 | ConfigV2 | ConfigV1 | ConfigV0;
|
||||
|
||||
export type BuildConfig = {
|
||||
defaultTeams?: Team[];
|
||||
defaultServers?: Server[];
|
||||
helpLink: string;
|
||||
enableServerManagement: boolean;
|
||||
enableAutoUpdater: boolean;
|
||||
@@ -122,12 +112,12 @@ export type BuildConfig = {
|
||||
}
|
||||
|
||||
export type RegistryConfig = {
|
||||
teams: Team[];
|
||||
servers: Server[];
|
||||
enableServerManagement: boolean;
|
||||
enableAutoUpdater: boolean;
|
||||
}
|
||||
|
||||
export type CombinedConfig = Omit<ConfigV3, 'teams'> & Omit<BuildConfig, 'defaultTeams'> & {
|
||||
export type CombinedConfig = Omit<Config, 'teams'> & Omit<BuildConfig, 'defaultServers'> & {
|
||||
appName: string;
|
||||
useNativeWindow: boolean;
|
||||
}
|
||||
|
Reference in New Issue
Block a user