diff options
Diffstat (limited to 'ui/src/interfaces.ts')
-rw-r--r-- | ui/src/interfaces.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/ui/src/interfaces.ts b/ui/src/interfaces.ts index 59f4ba1c..ebd42340 100644 --- a/ui/src/interfaces.ts +++ b/ui/src/interfaces.ts @@ -1,5 +1,5 @@ export enum UserOperation { - Login, Register, CreateCommunity, CreatePost, ListCommunities, ListCategories, GetPost, GetCommunity, CreateComment, EditComment, SaveComment, CreateCommentLike, GetPosts, CreatePostLike, EditPost, SavePost, EditCommunity, FollowCommunity, GetFollowedCommunities, GetUserDetails, GetReplies, GetModlog, BanFromCommunity, AddModToCommunity, CreateSite, EditSite, GetSite, AddAdmin, BanUser, Search, MarkAllAsRead + Login, Register, CreateCommunity, CreatePost, ListCommunities, ListCategories, GetPost, GetCommunity, CreateComment, EditComment, SaveComment, CreateCommentLike, GetPosts, CreatePostLike, EditPost, SavePost, EditCommunity, FollowCommunity, GetFollowedCommunities, GetUserDetails, GetReplies, GetModlog, BanFromCommunity, AddModToCommunity, CreateSite, EditSite, GetSite, AddAdmin, BanUser, Search, MarkAllAsRead, SaveUserSettings } export enum CommentSortType { @@ -22,6 +22,7 @@ export interface User { id: number; iss: string; username: string; + show_nsfw: boolean; } export interface UserView { @@ -53,6 +54,7 @@ export interface Community { creator_id: number; removed: boolean; deleted: boolean; + nsfw: boolean; published: string; updated?: string; creator_name: string; @@ -74,11 +76,14 @@ export interface Post { removed: boolean; deleted: boolean; locked: boolean; + nsfw: boolean; published: string; updated?: string; creator_name: string; community_name: string; community_removed: boolean; + community_deleted: boolean; + community_nsfw: boolean; number_of_comments: number; score: number; upvotes: number; @@ -334,6 +339,7 @@ export interface RegisterForm { password: string; password_verify: string; admin: boolean; + show_nsfw: boolean; } export interface LoginResponse { @@ -341,7 +347,10 @@ export interface LoginResponse { jwt: string; } - +export interface UserSettingsForm { + show_nsfw: boolean; + auth: string; +} export interface CommunityForm { name: string; @@ -351,6 +360,7 @@ export interface CommunityForm { edit_id?: number; removed?: boolean; deleted?: boolean; + nsfw: boolean; reason?: string; expires?: number; auth?: string; @@ -396,6 +406,7 @@ export interface PostForm { creator_id: number; removed?: boolean; deleted?: boolean; + nsfw: boolean; locked?: boolean; reason?: string; auth: string; |