fix(editor): ui bugs in linked document embed view (#10105)

Co-authored-by: Mirone <Saul-Mirone@outlook.com>
This commit is contained in:
Oleg
2025-02-18 16:29:58 +01:00
committed by GitHub
parent dc7e7cfc75
commit b20d316d60
4 changed files with 4 additions and 11 deletions

View File

@@ -164,7 +164,7 @@ export class EmbedEdgelessSyncedDocBlockComponent extends toEdgelessEmbedBlock(
this.cardStyleMap = { this.cardStyleMap = {
display: 'block', display: 'block',
width: `${EMBED_CARD_WIDTH[style]}px`, width: `${EMBED_CARD_WIDTH[style]}px`,
height: `${EMBED_CARD_WIDTH[style]}px`, height: `${EMBED_CARD_HEIGHT[style]}px`,
transform: `scale(${bound.w / EMBED_CARD_WIDTH[style]}, ${bound.h / EMBED_CARD_HEIGHT[style]})`, transform: `scale(${bound.w / EMBED_CARD_WIDTH[style]}, ${bound.h / EMBED_CARD_HEIGHT[style]})`,
transformOrigin: '0 0', transformOrigin: '0 0',
}; };

View File

@@ -57,6 +57,7 @@ export const blockStyles = css`
} }
.affine-embed-synced-doc-container { .affine-embed-synced-doc-container {
border: 1px solid var(--affine-border-color);
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
} }
@@ -69,12 +70,6 @@ export const blockStyles = css`
width: 100%; width: 100%;
height: calc(${EMBED_CARD_HEIGHT.syncedDoc}px + 36px); height: calc(${EMBED_CARD_HEIGHT.syncedDoc}px + 36px);
} }
.affine-embed-synced-doc-container:hover.light {
box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.08);
}
.affine-embed-synced-doc-container:hover.dark {
box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 0.14);
}
.affine-embed-synced-doc-header-wrapper { .affine-embed-synced-doc-header-wrapper {
position: absolute; position: absolute;
top: 0; top: 0;
@@ -127,9 +122,6 @@ export const blockStyles = css`
z-index: 1; z-index: 1;
cursor: pointer; cursor: pointer;
} }
.affine-embed-synced-doc-editor-overlay:hover {
background: var(--affine-hover-color);
}
.affine-embed-synced-doc-editor-empty { .affine-embed-synced-doc-editor-empty {
display: flex; display: flex;

View File

@@ -29,7 +29,7 @@ export const EMBED_CARD_WIDTH: Record<EmbedCardStyle, number> = {
video: 752, video: 752,
figma: 752, figma: 752,
html: 752, html: 752,
syncedDoc: 752, syncedDoc: 800,
pdf: 537 + 24 + 2, pdf: 537 + 24 + 2,
}; };

View File

@@ -7,6 +7,7 @@ export class PreviewRootBlockComponent extends BlockComponent {
static override styles = css` static override styles = css`
affine-preview-root { affine-preview-root {
display: block; display: block;
padding: 0 24px;
} }
`; `;