diff --git a/blocksuite/affine/blocks/surface-ref/src/components/placeholder.ts b/blocksuite/affine/blocks/surface-ref/src/components/placeholder.ts index 9ebea549d1..d5a4110033 100644 --- a/blocksuite/affine/blocks/surface-ref/src/components/placeholder.ts +++ b/blocksuite/affine/blocks/surface-ref/src/components/placeholder.ts @@ -1,3 +1,4 @@ +import { ColorScheme } from '@blocksuite/affine-model'; import { unsafeCSSVarV2 } from '@blocksuite/affine-shared/theme'; import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit'; import { DeleteIcon } from '@blocksuite/icons/lit'; @@ -7,7 +8,7 @@ import { css, html, nothing } from 'lit'; import { property } from 'lit/decorators.js'; import { classMap } from 'lit/directives/class-map.js'; -import { SurfaceRefNotFoundBackground } from '../icons'; +import { DarkDeletedSmallBanner, LightDeletedSmallBanner } from '../icons'; import { getReferenceModelTitle, TYPE_ICON_MAP } from '../utils'; export class SurfaceRefPlaceHolder extends SignalWatcher( @@ -70,6 +71,9 @@ export class SurfaceRefPlaceHolder extends SignalWatcher( @property({ attribute: false }) accessor inEdgeless = false; + @property({ attribute: false }) + accessor theme: ColorScheme = ColorScheme.Light; + override render() { const { referenceModel, refFlavour, inEdgeless } = this; @@ -83,6 +87,11 @@ export class SurfaceRefPlaceHolder extends SignalWatcher( (referenceModel && getReferenceModelTitle(referenceModel)) ?? matchedType.name; + const notFoundBackground = + this.theme === ColorScheme.Light + ? LightDeletedSmallBanner + : DarkDeletedSmallBanner; + return html`
${modelNotFound ? html`
- ${SurfaceRefNotFoundBackground} + ${notFoundBackground}
` : nothing}
diff --git a/blocksuite/affine/blocks/surface-ref/src/icons.ts b/blocksuite/affine/blocks/surface-ref/src/icons.ts index 63ea88b29a..9cf04a946b 100644 --- a/blocksuite/affine/blocks/surface-ref/src/icons.ts +++ b/blocksuite/affine/blocks/surface-ref/src/icons.ts @@ -1,105 +1,211 @@ import { html } from 'lit'; -export const SurfaceRefNotFoundBackground = html` - - - - - - - - - - + + + - - - - - - - - - - - - - - -`; + + + + + + + + + + + + + + + + + + + `; + +export const DarkDeletedSmallBanner = html` + + + + + + + + + + + + + + + + + + + + + + + `; diff --git a/blocksuite/affine/blocks/surface-ref/src/surface-ref-block.ts b/blocksuite/affine/blocks/surface-ref/src/surface-ref-block.ts index 6414768721..18840341e4 100644 --- a/blocksuite/affine/blocks/surface-ref/src/surface-ref-block.ts +++ b/blocksuite/affine/blocks/surface-ref/src/surface-ref-block.ts @@ -374,6 +374,7 @@ export class SurfaceRefBlockComponent extends BlockComponent
${guard(this._previewDoc, () => { return this._previewDoc @@ -440,13 +442,14 @@ export class SurfaceRefBlockComponent extends BlockComponent` : this._renderRefContent(); - const edgelessTheme = this.std.get(ThemeProvider).edgeless$.value; return html`
${content}