about summary refs log tree commit diff
path: root/src/state/models/shell-ui.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-10 16:30:14 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-10 16:30:14 -0600
commitd3707f30e30bb717e95b27cc83a1121815b475b5 (patch)
tree57fcb61e9e937949526713a778e171a6676c9acf /src/state/models/shell-ui.ts
parentecf56729b0da535f1d0b794268c7856836e76bd6 (diff)
downloadvoidsky-d3707f30e30bb717e95b27cc83a1121815b475b5.tar.zst
Implement scene invitation and membership controls
Diffstat (limited to 'src/state/models/shell-ui.ts')
-rw-r--r--src/state/models/shell-ui.ts22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/state/models/shell-ui.ts b/src/state/models/shell-ui.ts
index 345a6b4a9..8eefc711c 100644
--- a/src/state/models/shell-ui.ts
+++ b/src/state/models/shell-ui.ts
@@ -19,6 +19,18 @@ export class LinkActionsModel {
   }
 }
 
+export class ConfirmModel {
+  name = 'confirm'
+
+  constructor(
+    public title: string,
+    public message: string | (() => JSX.Element),
+    public onPressConfirm: () => void | Promise<void>,
+  ) {
+    makeAutoObservable(this)
+  }
+}
+
 export class SharePostModel {
   name = 'share-post'
 
@@ -43,6 +55,14 @@ export class CreateSceneModel {
   }
 }
 
+export class InviteToSceneModel {
+  name = 'invite-to-scene'
+
+  constructor(public profileView: ProfileViewModel) {
+    makeAutoObservable(this)
+  }
+}
+
 export interface ComposerOpts {
   replyTo?: Post.PostRef
   onPost?: () => void
@@ -52,6 +72,7 @@ export class ShellUiModel {
   isModalActive = false
   activeModal:
     | LinkActionsModel
+    | ConfirmModel
     | SharePostModel
     | EditProfileModel
     | CreateSceneModel
@@ -66,6 +87,7 @@ export class ShellUiModel {
   openModal(
     modal:
       | LinkActionsModel
+      | ConfirmModel
       | SharePostModel
       | EditProfileModel
       | CreateSceneModel,