Merge branch 'canary' into stable

This commit is contained in:
李华桥
2023-12-01 16:12:17 +08:00
147 changed files with 1775 additions and 1993 deletions
@@ -9,7 +9,7 @@ previewBlockIdAtom.onMount = set => {
if (target?.tagName === 'IMG') {
const imageBlock = target.closest('affine-image');
if (imageBlock) {
const blockId = imageBlock.getAttribute('data-block-id');
const blockId = imageBlock.dataset.blockId;
if (!blockId) return;
set(blockId);
}
@@ -143,7 +143,7 @@ const ImagePreviewModalImpl = (
if (
page
.getPreviousSiblings(block)
.findLast(
.some(
(block): block is ImageBlockModel =>
block.flavour === 'affine:image'
)
@@ -160,7 +160,7 @@ const ImagePreviewModalImpl = (
} else if (
page
.getNextSiblings(block)
.find(
.some(
(block): block is ImageBlockModel =>
block.flavour === 'affine:image'
)
@@ -231,9 +231,9 @@ const ImagePreviewModalImpl = (
const a = document.createElement('a');
a.href = downloadUrl;
a.download = block.id ?? 'image';
document.body.appendChild(a);
document.body.append(a);
a.click();
document.body.removeChild(a);
a.remove();
}
},
[props.pageId, props.workspace]
+1 -1
View File
@@ -40,7 +40,7 @@ const Outline = () => {
ref={useCallback((container: HTMLDivElement | null) => {
if (container) {
assertExists(tocPanelRef.current);
container.appendChild(tocPanelRef.current);
container.append(tocPanelRef.current);
}
}, [])}
/>