Pterodactyl-Panel/resources/scripts/state/settings.ts

27 lines
501 B
TypeScript
Raw Permalink Normal View History

2019-12-16 03:05:44 +01:00
import { action, Action } from 'easy-peasy';
export interface SiteSettings {
name: string;
locale: string;
recaptcha: {
enabled: boolean;
siteKey: string;
};
analytics: string;
2019-12-16 03:05:44 +01:00
}
export interface SettingsStore {
data?: SiteSettings;
setSettings: Action<SettingsStore, SiteSettings>;
}
const settings: SettingsStore = {
data: undefined,
setSettings: action((state, payload) => {
state.data = payload;
}),
};
export default settings;