forked from Alex/Pterodactyl-Panel
30 lines
552 B
TypeScript
30 lines
552 B
TypeScript
import { action, Action } from 'easy-peasy';
|
|
|
|
export interface SiteSettings {
|
|
name: string;
|
|
locale: string;
|
|
recaptcha: {
|
|
enabled: boolean;
|
|
siteKey: string;
|
|
};
|
|
analytics: string;
|
|
features: {
|
|
pullFiles: boolean;
|
|
};
|
|
}
|
|
|
|
export interface SettingsStore {
|
|
data?: SiteSettings;
|
|
setSettings: Action<SettingsStore, SiteSettings>;
|
|
}
|
|
|
|
const settings: SettingsStore = {
|
|
data: undefined,
|
|
|
|
setSettings: action((state, payload) => {
|
|
state.data = payload;
|
|
}),
|
|
};
|
|
|
|
export default settings;
|