Fix recaptcha on login forms

This commit is contained in:
Dane Everitt 2019-12-15 18:05:44 -08:00
parent f864b72e0a
commit 66410a35f1
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
10 changed files with 188 additions and 77 deletions

View file

@ -2,17 +2,20 @@ import { createStore } from 'easy-peasy';
import flashes, { FlashStore } from '@/state/flashes';
import user, { UserStore } from '@/state/user';
import permissions, { GloablPermissionsStore } from '@/state/permissions';
import settings, { SettingsStore } from '@/state/settings';
export interface ApplicationStore {
permissions: GloablPermissionsStore;
flashes: FlashStore;
user: UserStore;
settings: SettingsStore;
}
const state: ApplicationStore = {
permissions,
flashes,
user,
settings,
};
export const store = createStore(state);

View file

@ -0,0 +1,25 @@
import { action, Action } from 'easy-peasy';
export interface SiteSettings {
name: string;
locale: string;
recaptcha: {
enabled: boolean;
siteKey: string;
};
}
export interface SettingsStore {
data?: SiteSettings;
setSettings: Action<SettingsStore, SiteSettings>;
}
const settings: SettingsStore = {
data: undefined,
setSettings: action((state, payload) => {
state.data = payload;
}),
};
export default settings;