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-12-14 15:35:15 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-12-14 15:35:15 -0600
commit4966b2152eb213bac34cbcb0ff01c246b7746f5c (patch)
tree5cc90408631c984018f1b5a4b06f428d3d31d4a5 /src/state/models/shell-ui.ts
parent345ec83f26e209929ca86b3885227e8508fb2cb8 (diff)
downloadvoidsky-4966b2152eb213bac34cbcb0ff01c246b7746f5c.tar.zst
Add post embeds (images and external links)
Diffstat (limited to 'src/state/models/shell-ui.ts')
-rw-r--r--src/state/models/shell-ui.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/state/models/shell-ui.ts b/src/state/models/shell-ui.ts
index 01e1cacad..90c6ef475 100644
--- a/src/state/models/shell-ui.ts
+++ b/src/state/models/shell-ui.ts
@@ -58,6 +58,13 @@ export class ProfileImageLightbox {
   }
 }
 
+export class ImageLightbox {
+  name = 'image'
+  constructor(public uri: string) {
+    makeAutoObservable(this)
+  }
+}
+
 export interface ComposerOptsPostRef {
   uri: string
   cid: string
@@ -84,7 +91,7 @@ export class ShellUiModel {
     | ServerInputModal
     | undefined
   isLightboxActive = false
-  activeLightbox: ProfileImageLightbox | undefined
+  activeLightbox: ProfileImageLightbox | ImageLightbox | undefined
   isComposerActive = false
   composerOpts: ComposerOpts | undefined
 
@@ -116,7 +123,7 @@ export class ShellUiModel {
     this.activeModal = undefined
   }
 
-  openLightbox(lightbox: ProfileImageLightbox) {
+  openLightbox(lightbox: ProfileImageLightbox | ImageLightbox) {
     this.isLightboxActive = true
     this.activeLightbox = lightbox
   }