mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix: temp fix for showing peek view modal for edgeless (#7155)
workaround for AFF-1200
This commit is contained in:
@@ -63,9 +63,11 @@ export const PeekViewModalContainer = ({
|
||||
target,
|
||||
controls,
|
||||
children,
|
||||
hideOnEntering,
|
||||
onAnimateEnd,
|
||||
}: PropsWithChildren<{
|
||||
open: boolean;
|
||||
hideOnEntering?: boolean;
|
||||
target?: HTMLElement;
|
||||
onOpenChange: (open: boolean) => void;
|
||||
controls: React.ReactNode;
|
||||
@@ -113,7 +115,7 @@ export const PeekViewModalContainer = ({
|
||||
className={styles.modalContent}
|
||||
data-state={status}
|
||||
>
|
||||
{children}
|
||||
{hideOnEntering && status === 'entering' ? null : children}
|
||||
</Dialog.Content>
|
||||
<div data-state={status} className={styles.modalControls}>
|
||||
{controls}
|
||||
|
||||
@@ -49,6 +49,8 @@ export const PeekViewManagerModal = () => {
|
||||
: undefined
|
||||
}
|
||||
controls={controls}
|
||||
// there is a bug for edgeless mode when showing the peek view during start up animation
|
||||
hideOnEntering={activePeekView?.info.mode === 'edgeless'}
|
||||
onOpenChange={open => {
|
||||
if (!open) {
|
||||
peekViewEntity.close();
|
||||
|
||||
Reference in New Issue
Block a user