Path: blob/master/src/packages/frontend/admin/users/store.ts
1496 views
/*1* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { List } from "immutable";67import { Store, TypedMap, redux } from "../../app-framework";8import { User as UserInterface } from "../../frame-editors/generic/client";910export type User = TypedMap<UserInterface>;1112export interface StoreState {13view?: boolean; // if true, open for viewing/editing1415state: "edit" | "running";16status: string;17query: string;18limit: number;19result: List<User>;20}2122export const initial_state: StoreState = {23view: false,24state: "edit",25status: "",26query: "",27limit: 25,28result: List([]),29};3031export class AdminUsersStore extends Store<StoreState> {}3233export const store = redux.createStore(34"admin-users",35AdminUsersStore,36initial_state,37);383940