chore: optimized style (#4098)

This commit is contained in:
JimmFly
2023-09-02 03:28:16 +08:00
committed by GitHub
parent 189e91e6ca
commit 8845bb9b4b
9 changed files with 70 additions and 26 deletions

View File

@@ -102,6 +102,9 @@ const BlockSuiteEditorImpl = (props: EditorProps): ReactElement => {
}, [editor]);
useEffect(() => {
if (page.meta.trash) {
return;
}
editor
.createBlockHub()
.then(blockHub => {
@@ -122,7 +125,7 @@ const BlockSuiteEditorImpl = (props: EditorProps): ReactElement => {
}
blockHubRef.current?.remove();
};
}, [editor, page.awarenessStore, setBlockHub]);
}, [editor, page.awarenessStore, page.meta.trash, setBlockHub]);
// issue: https://github.com/toeverything/AFFiNE/issues/2004
const className = `editor-wrapper ${editor.mode}-mode ${

View File

@@ -43,6 +43,7 @@ const ConfirmModal = ({
content={t['will be moved to Trash']({
title: title || 'Untitled',
})}
confirmButtonTestId="confirm-delete-page"
confirmText={t.Delete()}
confirmType="error"
{...confirmModalProps}

View File

@@ -86,6 +86,8 @@ export const radioButtonContent = style({
export const radioUncheckedButton = style([
radioButtonContent,
{
color: 'var(--affine-text-secondary-color)',
filter: 'none',
selectors: {
'[data-state="checked"] > &': {
display: 'none',