misc_pterodactyl-panel/resources/scripts/state/admin/index.ts

39 lines
1.1 KiB
TypeScript
Raw Normal View History

import { createContextStore } from 'easy-peasy';
import { composeWithDevTools } from 'redux-devtools-extension';
import databases, { AdminDatabaseStore } from '@/state/admin/databases';
import locations, { AdminLocationStore } from '@/state/admin/locations';
import mounts, { AdminMountStore } from '@/state/admin/mounts';
2021-01-01 00:27:16 +00:00
import nests, { AdminNestStore } from '@/state/admin/nests';
import nodes, { AdminNodeStore } from '@/state/admin/nodes';
import roles, { AdminRoleStore } from '@/state/admin/roles';
import servers, { AdminServerStore } from '@/state/admin/servers';
2021-01-04 19:44:44 +00:00
import users, { AdminUserStore } from '@/state/admin/users';
interface AdminStore {
databases: AdminDatabaseStore;
locations: AdminLocationStore;
mounts: AdminMountStore;
2021-01-04 19:44:44 +00:00
nests: AdminNestStore;
nodes: AdminNodeStore;
roles: AdminRoleStore;
servers: AdminServerStore;
2021-01-04 19:44:44 +00:00
users: AdminUserStore;
}
export const AdminContext = createContextStore<AdminStore>({
databases,
locations,
mounts,
2021-01-01 00:27:16 +00:00
nests,
nodes,
roles,
servers,
2021-01-04 19:44:44 +00:00
users,
}, {
compose: composeWithDevTools({
name: 'AdminStore',
trace: true,
}),
});