fix(chat): show unlock dialog over image viewer
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
.overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 75;
|
||||
z-index: 200;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
@@ -39,22 +39,36 @@ export function ChatImageViewerScreen({
|
||||
router.push(getChatPaywallNavigationUrl(authState.loginStatus));
|
||||
};
|
||||
|
||||
const historyUnlockDialog = (
|
||||
<HistoryUnlockDialog
|
||||
open={chatState.unlockHistoryPromptVisible}
|
||||
lockedCount={chatState.lockedHistoryCount}
|
||||
isLoading={chatState.isUnlockingHistory}
|
||||
errorMessage={chatState.unlockHistoryError}
|
||||
onClose={() => chatDispatch({ type: "ChatUnlockHistoryDismissed" })}
|
||||
onConfirm={() => chatDispatch({ type: "ChatUnlockHistoryConfirmed" })}
|
||||
/>
|
||||
);
|
||||
|
||||
if (!message) {
|
||||
return (
|
||||
<MobileShell background="#0d0b14">
|
||||
<main className={styles.emptyScreen}>
|
||||
<button
|
||||
type="button"
|
||||
className={styles.backButton}
|
||||
onClick={handleClose}
|
||||
>
|
||||
Back to chat
|
||||
</button>
|
||||
<p className={styles.emptyText}>
|
||||
{chatState.historyLoaded ? "Image not found." : "Loading image..."}
|
||||
</p>
|
||||
</main>
|
||||
</MobileShell>
|
||||
<>
|
||||
<MobileShell background="#0d0b14">
|
||||
<main className={styles.emptyScreen}>
|
||||
<button
|
||||
type="button"
|
||||
className={styles.backButton}
|
||||
onClick={handleClose}
|
||||
>
|
||||
Back to chat
|
||||
</button>
|
||||
<p className={styles.emptyText}>
|
||||
{chatState.historyLoaded ? "Image not found." : "Loading image..."}
|
||||
</p>
|
||||
</main>
|
||||
</MobileShell>
|
||||
{historyUnlockDialog}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -68,14 +82,7 @@ export function ChatImageViewerScreen({
|
||||
onClose={handleClose}
|
||||
/>
|
||||
</MobileShell>
|
||||
<HistoryUnlockDialog
|
||||
open={chatState.unlockHistoryPromptVisible}
|
||||
lockedCount={chatState.lockedHistoryCount}
|
||||
isLoading={chatState.isUnlockingHistory}
|
||||
errorMessage={chatState.unlockHistoryError}
|
||||
onClose={() => chatDispatch({ type: "ChatUnlockHistoryDismissed" })}
|
||||
onConfirm={() => chatDispatch({ type: "ChatUnlockHistoryConfirmed" })}
|
||||
/>
|
||||
{historyUnlockDialog}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user