diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-09-07 16:00:25 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-09-07 16:00:25 -0500 |
commit | 9010078489eae77c620a3bf4802ff6b417ea31f9 (patch) | |
tree | 11c5c03099a5cda82161d077efd3d50525dd8487 /src/state/models/shell.ts | |
parent | 5ae39612d7e8484ffc5be6c7c5dc0f878985c676 (diff) | |
download | voidsky-9010078489eae77c620a3bf4802ff6b417ea31f9.tar.zst |
Add EditProfile modal
Diffstat (limited to 'src/state/models/shell.ts')
-rw-r--r-- | src/state/models/shell.ts | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/state/models/shell.ts b/src/state/models/shell.ts index c67b474b7..2dddb9a33 100644 --- a/src/state/models/shell.ts +++ b/src/state/models/shell.ts @@ -1,4 +1,5 @@ import {makeAutoObservable} from 'mobx' +import {ProfileViewModel} from './profile-view' export class LinkActionsModel { name = 'link-actions' @@ -24,15 +25,34 @@ export class ComposePostModel { } } +export class EditProfileModel { + name = 'edit-profile' + + constructor(public profileView: ProfileViewModel) { + makeAutoObservable(this) + } +} + export class ShellModel { isModalActive = false - activeModal: LinkActionsModel | SharePostModel | ComposePostModel | undefined + activeModal: + | LinkActionsModel + | SharePostModel + | ComposePostModel + | EditProfileModel + | undefined constructor() { makeAutoObservable(this) } - openModal(modal: LinkActionsModel | SharePostModel | ComposePostModel) { + openModal( + modal: + | LinkActionsModel + | SharePostModel + | ComposePostModel + | EditProfileModel, + ) { this.isModalActive = true this.activeModal = modal } |