Add web linking and proper share controls

This commit is contained in:
Paul Frazee 2022-11-21 16:07:26 -06:00
parent 39058cd36a
commit ed146a582c
15 changed files with 50 additions and 243 deletions

View file

@ -2,23 +2,6 @@ import {makeAutoObservable} from 'mobx'
import {ProfileViewModel} from './profile-view'
import * as Post from '../../third-party/api/src/client/types/app/bsky/feed/post'
export interface LinkActionsModelOpts {
newTab?: boolean
}
export class LinkActionsModel {
name = 'link-actions'
newTab: boolean
constructor(
public href: string,
public title: string,
opts?: LinkActionsModelOpts,
) {
makeAutoObservable(this)
this.newTab = typeof opts?.newTab === 'boolean' ? opts.newTab : true
}
}
export class ConfirmModel {
name = 'confirm'
@ -31,14 +14,6 @@ export class ConfirmModel {
}
}
export class SharePostModel {
name = 'share-post'
constructor(public href: string) {
makeAutoObservable(this)
}
}
export class EditProfileModel {
name = 'edit-profile'
@ -85,9 +60,7 @@ export interface ComposerOpts {
export class ShellUiModel {
isModalActive = false
activeModal:
| LinkActionsModel
| ConfirmModel
| SharePostModel
| EditProfileModel
| CreateSceneModel
| ServerInputModel
@ -101,9 +74,7 @@ export class ShellUiModel {
openModal(
modal:
| LinkActionsModel
| ConfirmModel
| SharePostModel
| EditProfileModel
| CreateSceneModel
| ServerInputModel,