Files
Go-To-bed/Client/src/app/store/gotobed.state.ts
2022-01-02 05:45:05 +01:00

28 lines
712 B
TypeScript

import { addressStorageKey, portStorageKey, protocolStorageKey } from '../gotobed.models';
export const storeName = 'Gotobed';
export interface GotobedState {
command: string;
isLoading: boolean;
protocol: string;
port: string;
address: string;
isConnected: boolean;
}
export const initialGotoBedState: GotobedState = {
command: '',
isLoading: false,
protocol: localStorage.getItem(protocolStorageKey) ?? 'http',
port: localStorage.getItem(portStorageKey) ?? '3000',
address: localStorage.getItem(addressStorageKey) ?? 'localhost:8080',
isConnected: false,
};
export interface LoadSettingsState {
protocol: string;
port: string;
address: string;
}