diff --git a/app/definitions/IAssetsFavicon512.ts b/app/definitions/IAssetsFavicon512.ts new file mode 100644 index 000000000..553160ecd --- /dev/null +++ b/app/definitions/IAssetsFavicon512.ts @@ -0,0 +1,4 @@ +export interface IAssetsFavicon512 { + url?: string; + defaultUrl: string; +} diff --git a/app/reducers/settings.ts b/app/reducers/settings.ts index a8ea96a9d..087c49f5a 100644 --- a/app/reducers/settings.ts +++ b/app/reducers/settings.ts @@ -1,9 +1,10 @@ import { IActionSettings } from '../actions/settings'; import { SETTINGS } from '../actions/actionsTypes'; import { defaultSettings } from '../lib/constants'; +import { IAssetsFavicon512 } from '../definitions/IAssetsFavicon512'; export type TSupportedSettings = keyof typeof defaultSettings; -export type TSettingsValues = string | number | boolean | string[]; +export type TSettingsValues = string | number | boolean | string[] | IAssetsFavicon512; export type TSettingsState = { [K in TSupportedSettings]?: TSettingsValues; diff --git a/app/views/WorkspaceView/index.tsx b/app/views/WorkspaceView/index.tsx index 452a85f06..17bea8725 100644 --- a/app/views/WorkspaceView/index.tsx +++ b/app/views/WorkspaceView/index.tsx @@ -10,6 +10,8 @@ import Button from '../../containers/Button'; import { themes } from '../../lib/constants'; import { TSupportedThemes, withTheme } from '../../theme'; import FormContainer, { FormContainerInner } from '../../containers/FormContainer'; +import { IApplicationState } from '../../definitions'; +import { IAssetsFavicon512 } from '../../definitions/IAssetsFavicon512'; import { getShowLoginButton } from '../../selectors/login'; import ServerAvatar from './ServerAvatar'; import styles from './styles'; @@ -23,10 +25,7 @@ interface IWorkSpaceProp { Site_Name: string; Site_Url: string; server: string; - Assets_favicon_512: { - url?: string; - defaultUrl: string; - }; + Assets_favicon_512: IAssetsFavicon512; registrationForm: string; registrationText: string; showLoginButton: boolean; @@ -102,14 +101,14 @@ class WorkspaceView extends React.Component { } } -const mapStateToProps = (state: any) => ({ +const mapStateToProps = (state: IApplicationState) => ({ server: state.server.server, - Site_Name: state.settings.Site_Name, - Site_Url: state.settings.Site_Url, - Assets_favicon_512: state.settings.Assets_favicon_512, - registrationForm: state.settings.Accounts_RegistrationForm, - registrationText: state.settings.Accounts_RegistrationForm_LinkReplacementText, - Accounts_iframe_enabled: state.settings.Accounts_iframe_enabled, + Site_Name: state.settings.Site_Name as string, + Site_Url: state.settings.Site_Url as string, + Assets_favicon_512: state.settings.Assets_favicon_512 as IAssetsFavicon512, + registrationForm: state.settings.Accounts_RegistrationForm as string, + registrationText: state.settings.Accounts_RegistrationForm_LinkReplacementText as string, + Accounts_iframe_enabled: state.settings.Accounts_iframe_enabled as boolean, showLoginButton: getShowLoginButton(state), inviteLinkToken: state.inviteLinks.token });