diff options
Diffstat (limited to 'src/state')
-rw-r--r-- | src/state/models/root-store.ts | 4 | ||||
-rw-r--r-- | src/state/models/shell-ui.ts (renamed from src/state/models/shell.ts) | 25 |
2 files changed, 24 insertions, 5 deletions
diff --git a/src/state/models/root-store.ts b/src/state/models/root-store.ts index da846a3b0..e2a505768 100644 --- a/src/state/models/root-store.ts +++ b/src/state/models/root-store.ts @@ -9,14 +9,14 @@ import {createContext, useContext} from 'react' import {isObj, hasProp} from '../lib/type-guards' import {SessionModel} from './session' import {NavigationModel} from './navigation' -import {ShellModel} from './shell' +import {ShellUiModel} from './shell-ui' import {MeModel} from './me' import {OnboardModel} from './onboard' export class RootStoreModel { session = new SessionModel(this) nav = new NavigationModel() - shell = new ShellModel() + shell = new ShellUiModel() me = new MeModel(this) onboard = new OnboardModel() diff --git a/src/state/models/shell.ts b/src/state/models/shell-ui.ts index bef6ef765..345a6b4a9 100644 --- a/src/state/models/shell.ts +++ b/src/state/models/shell-ui.ts @@ -35,14 +35,27 @@ export class EditProfileModel { } } +export class CreateSceneModel { + name = 'create-scene' + + constructor() { + makeAutoObservable(this) + } +} + export interface ComposerOpts { replyTo?: Post.PostRef onPost?: () => void } -export class ShellModel { +export class ShellUiModel { isModalActive = false - activeModal: LinkActionsModel | SharePostModel | EditProfileModel | undefined + activeModal: + | LinkActionsModel + | SharePostModel + | EditProfileModel + | CreateSceneModel + | undefined isComposerActive = false composerOpts: ComposerOpts | undefined @@ -50,7 +63,13 @@ export class ShellModel { makeAutoObservable(this) } - openModal(modal: LinkActionsModel | SharePostModel | EditProfileModel) { + openModal( + modal: + | LinkActionsModel + | SharePostModel + | EditProfileModel + | CreateSceneModel, + ) { this.isModalActive = true this.activeModal = modal } |