Skip to content

Commit

Permalink
fix(blocks): fix title and icon display issue in embed synced doc blo…
Browse files Browse the repository at this point in the history
…ck (#9031)

### Before
<img width="859" alt="Screenshot 2024-12-19 at 19 24 54" src="https://github.com/user-attachments/assets/d7171168-7090-469c-9022-3339f3cb88a7" />

### After
<img width="855" alt="Screenshot 2024-12-19 at 19 25 26" src="https://github.com/user-attachments/assets/f6ea0f68-25db-40e3-ac01-69fc4cc4c6d2" />
  • Loading branch information
fundon committed Dec 19, 2024
1 parent df17751 commit 08a9d51
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import {
EmbedEdgelessIcon,
EmbedPageIcon,
} from '@blocksuite/affine-components/icons';
import { Peekable } from '@blocksuite/affine-components/peek';
import {
REFERENCE_NODE,
Expand Down Expand Up @@ -206,8 +202,6 @@ export class EmbedSyncedDocBlockComponent extends EmbedBlockComponent<EmbedSynce
]);
};

const icon = isPageMode ? EmbedPageIcon : EmbedEdgelessIcon;

return this.renderEmbed(
() => html`
<div
Expand Down Expand Up @@ -240,10 +234,10 @@ export class EmbedSyncedDocBlockComponent extends EmbedBlockComponent<EmbedSynce
})}
>
<div class="affine-embed-synced-doc-header">
<span class="affine-embed-synced-doc-icon">${icon}</span>
<span class="affine-embed-synced-doc-title">
${this.docTitle}
</span>
<span class="affine-embed-synced-doc-icon"
>${this.icon$.value}</span
>
<span class="affine-embed-synced-doc-title">${this.title$}</span>
</div>
</div>
</div>
Expand Down

0 comments on commit 08a9d51

Please sign in to comment.