diff --git a/web/types/nav-types.js b/web/types/nav-types.js index 04401dca6..c40ff88dc 100644 --- a/web/types/nav-types.js +++ b/web/types/nav-types.js @@ -1,60 +1,60 @@ // @flow import type { TInterface } from 'tcomb'; import t from 'tcomb'; import { threadInfoValidator } from 'lib/permissions/minimally-encoded-thread-permissions-validators.js'; import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; import { type BaseNavInfo } from 'lib/types/nav-types.js'; import { type AccountUserInfo, accountUserInfoValidator, } from 'lib/types/user-types.js'; import { tID, tShape } from 'lib/utils/validation-utils.js'; export type WebNavigationTab = 'calendar' | 'chat' | 'settings'; const webNavigationTabValidator = t.enums.of(['calendar', 'chat', 'settings']); -export type LoginMethod = 'form' | 'qr-code'; -const loginMethodValidator = t.enums.of(['form', 'qr-code']); +export type WebLoginMethod = 'form' | 'qr-code'; +const webLoginMethodValidator = t.enums.of(['form', 'qr-code']); export type NavigationSettingsSection = | 'account' | 'friend-list' | 'block-list' | 'keyservers' | 'danger-zone'; const navigationSettingsSectionValidator = t.enums.of([ 'account', 'friend-list', 'block-list', 'keyservers', 'danger-zone', ]); export type NavigationChatMode = 'view' | 'create'; const navigationChatModeValidator = t.enums.of(['view', 'create']); export type NavInfo = { ...$Exact, +tab: WebNavigationTab, +activeChatThreadID: ?string, +pendingThread?: ThreadInfo, +settingsSection?: NavigationSettingsSection, +selectedUserList?: $ReadOnlyArray, +chatMode?: NavigationChatMode, +inviteSecret?: ?string, - +loginMethod?: LoginMethod, + +loginMethod?: WebLoginMethod, }; export const navInfoValidator: TInterface = tShape<$Exact>({ startDate: t.String, endDate: t.String, tab: webNavigationTabValidator, activeChatThreadID: t.maybe(tID), pendingThread: t.maybe(threadInfoValidator), settingsSection: t.maybe(navigationSettingsSectionValidator), selectedUserList: t.maybe(t.list(accountUserInfoValidator)), chatMode: t.maybe(navigationChatModeValidator), inviteSecret: t.maybe(t.String), - loginMethod: t.maybe(loginMethodValidator), + loginMethod: t.maybe(webLoginMethodValidator), });