diff options
author | Ollie H <renahlee@outlook.com> | 2023-05-02 14:27:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 16:27:00 -0500 |
commit | bd80db619b5a8c35171a8c70bdbab33d53a81371 (patch) | |
tree | 34201d185662952f1413230e766b72a8389cf217 /src/lib | |
parent | 74fbb4797922cfba654ad597803dfdd57598ae8d (diff) | |
download | voidsky-bd80db619b5a8c35171a8c70bdbab33d53a81371.tar.zst |
Pre-web image changes refactor (#560)
* Pre-web image changes refactor * Remove unneeded async behavior
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/media/alt-text.ts | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/lib/media/alt-text.ts b/src/lib/media/alt-text.ts index 77b0be446..4109f667a 100644 --- a/src/lib/media/alt-text.ts +++ b/src/lib/media/alt-text.ts @@ -1,20 +1,12 @@ import {RootStoreModel} from 'state/index' +import {ImageModel} from 'state/models/media/image' export async function openAltTextModal( store: RootStoreModel, - prevAltText: string, -): Promise<string> { - return new Promise((resolve, reject) => { - store.shell.openModal({ - name: 'alt-text-image', - prevAltText, - onAltTextSet: (altText?: string) => { - if (altText) { - resolve(altText) - } else { - reject(new Error('Canceled')) - } - }, - }) + image: ImageModel, +) { + store.shell.openModal({ + name: 'alt-text-image', + image, }) } |