From bb287cbd076940bd09f6afb61b642370d020f91e Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 10 Apr 2020 16:55:57 -0400 Subject: Adding an admin settings page. - Fixes #620 - Adding a UserListing component. Fixes #627 --- ui/src/interfaces.ts | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'ui/src/interfaces.ts') diff --git a/ui/src/interfaces.ts b/ui/src/interfaces.ts index 0eeeac06..b77ccac6 100644 --- a/ui/src/interfaces.ts +++ b/ui/src/interfaces.ts @@ -43,6 +43,8 @@ export enum UserOperation { GetPrivateMessages, UserJoin, GetComments, + GetSiteConfig, + SaveSiteConfig, } export enum CommentSortType { @@ -102,7 +104,6 @@ export interface UserView { avatar?: string; email?: string; matrix_user_id?: string; - fedi_name: string; published: string; number_of_posts: number; post_score: number; @@ -699,6 +700,19 @@ export interface SiteForm { auth?: string; } +export interface GetSiteConfig { + auth?: string; +} + +export interface GetSiteConfigResponse { + config_hjson: string; +} + +export interface SiteConfigForm { + config_hjson: string; + auth?: string; +} + export interface GetSiteResponse { site: Site; admins: Array; @@ -846,7 +860,8 @@ export type MessageType = | PasswordChangeForm | PrivateMessageForm | EditPrivateMessageForm - | GetPrivateMessagesForm; + | GetPrivateMessagesForm + | SiteConfigForm; type ResponseType = | SiteResponse @@ -868,7 +883,8 @@ type ResponseType = | BanUserResponse | AddAdminResponse | PrivateMessageResponse - | PrivateMessagesResponse; + | PrivateMessagesResponse + | GetSiteConfigResponse; export interface WebSocketResponse { op: UserOperation; -- cgit v1.2.3