diff options
author | Ollie Hsieh <renahlee@outlook.com> | 2023-04-21 14:20:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-21 16:20:06 -0500 |
commit | f0706dbe9ffb758d2aa1f75c51cfa0c61cc84482 (patch) | |
tree | 40c644c4c256154660be85c9c583028ebaaedaef /src/state/models/ui | |
parent | 0f5735b616e3565c1c739e4c8007f4ea4aedba92 (diff) | |
download | voidsky-f0706dbe9ffb758d2aa1f75c51cfa0c61cc84482.tar.zst |
Add alt text support and rework image layout (#503)
* Add alt text support and rework image layout * Add additional BottomSheet implementation to account for nested Composer modal * Use mobile gallery layout on mobile web * Missing key * Fix lint * Move altimage modal into the standard modal system * Fix overflow wrapping of images * Fixes to the alt-image modal * Remove unnecessary switch * Restore old imagelayoutgrid code --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/state/models/ui')
-rw-r--r-- | src/state/models/ui/shell.ts | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/src/state/models/ui/shell.ts b/src/state/models/ui/shell.ts index 47cc0aa82..b717fe05c 100644 --- a/src/state/models/ui/shell.ts +++ b/src/state/models/ui/shell.ts @@ -3,7 +3,7 @@ import {RootStoreModel} from '../root-store' import {makeAutoObservable} from 'mobx' import {ProfileModel} from '../content/profile' import {isObj, hasProp} from 'lib/type-guards' -import {Image} from 'lib/media/types' +import {Image as RNImage} from 'react-native-image-crop-picker' export interface ConfirmModal { name: 'confirm' @@ -38,7 +38,12 @@ export interface ReportAccountModal { export interface CropImageModal { name: 'crop-image' uri: string - onSelect: (img?: Image) => void + onSelect: (img?: RNImage) => void +} + +export interface AltTextImageModal { + name: 'alt-text-image' + onAltTextSet: (altText?: string) => void } export interface DeleteAccountModal { @@ -70,18 +75,30 @@ export interface ContentFilteringSettingsModal { } export type Modal = - | ConfirmModal + // Account + | ChangeHandleModal + | DeleteAccountModal | EditProfileModal - | ServerInputModal - | ReportPostModal + + // Curation + | ContentFilteringSettingsModal + + // Reporting | ReportAccountModal + | ReportPostModal + + // Posting + | AltTextImageModal | CropImageModal - | DeleteAccountModal + | ServerInputModal | RepostModal - | ChangeHandleModal + + // Bluesky access | WaitlistModal | InviteCodesModal - | ContentFilteringSettingsModal + + // Generic + | ConfirmModal interface LightboxModel {} |