diff options
author | Ansh <anshnanda10@gmail.com> | 2023-03-02 16:09:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-02 18:09:48 -0600 |
commit | 75174a6c37a01282b8bd1389fee3fb00488dcf0d (patch) | |
tree | 6ced8feb720a2ccd4c3978740f22ce2ec7e59ccc /src/state/models/shell-ui.ts | |
parent | f539659ac8eb0857e888ea2a972f78305a42e201 (diff) | |
download | voidsky-75174a6c37a01282b8bd1389fee3fb00488dcf0d.tar.zst |
73-post-embeds (#253)
* update api to 0.1.3 * add repost modal with reposting functionality * add quote post UI * allow creation and view of quote posts * Validate the post record before rendering a quote post * Use createdAt in quote posts for now * add web modal support * Tune the quote post rendering * Make did and declarationCid optional in postmeta * Make did and declarationCid optional in postmeta * dont allow image or link preview if quote post * Handle no-text quote posts * Tune the repost modal * Tweak composer post text * Fix lint --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/state/models/shell-ui.ts')
-rw-r--r-- | src/state/models/shell-ui.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/state/models/shell-ui.ts b/src/state/models/shell-ui.ts index 640bed0b3..1b0e350a2 100644 --- a/src/state/models/shell-ui.ts +++ b/src/state/models/shell-ui.ts @@ -44,6 +44,13 @@ export interface DeleteAccountModal { name: 'delete-account' } +export interface RepostModal { + name: 'repost' + onRepost: () => void + onQuote: () => void + isReposted: boolean +} + export type Modal = | ConfirmModal | EditProfileModal @@ -52,6 +59,7 @@ export type Modal = | ReportAccountModal | CropImageModal | DeleteAccountModal + | RepostModal interface LightboxModel {} @@ -82,10 +90,22 @@ export interface ComposerOptsPostRef { avatar?: string } } +export interface ComposerOptsQuote { + uri: string + cid: string + text: string + indexedAt: string + author: { + handle: string + displayName?: string + avatar?: string + } +} export interface ComposerOpts { imagesOpen?: boolean replyTo?: ComposerOptsPostRef onPost?: () => void + quote?: ComposerOptsQuote } export class ShellUiModel { |