Chore: Evaluate WorkspaceView - TypeScript (#4077)
This commit is contained in:
parent
83fb5ce7fb
commit
82bca54575
|
@ -0,0 +1,4 @@
|
|||
export interface IAssetsFavicon512 {
|
||||
url?: string;
|
||||
defaultUrl: string;
|
||||
}
|
|
@ -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;
|
||||
|
|
|
@ -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<IWorkSpaceProp, any> {
|
|||
}
|
||||
}
|
||||
|
||||
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
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue