fix(editor): fix color of the circle on loading icon (#12092)

* Unified loading icon
* Removed loading icon on image block
* Fixed color of circle on loading icon

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Icons in image fallback and loading states now automatically adapt to the current theme (light or dark mode) for a more consistent visual experience.

- **Style**
  - Updated loading, success, and error icons to support theming and improved their color assignments for better visibility in different themes.

- **Refactor**
  - Replaced static icon usage across several components with dynamic, theme-aware icons to ensure consistent appearance throughout the app.
  - Removed static SVG icon exports and replaced them with theme-aware icon functions for improved maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
fundon
2025-04-30 10:21:28 +00:00
parent bcb0e80a75
commit 8938da4c24
9 changed files with 38 additions and 96 deletions

View File

@@ -1,4 +1,4 @@
import { LoadingIcon } from '@blocksuite/affine/blocks/image';
import { LightLoadingIcon } from '@blocksuite/affine/components/icons';
import { css, html, LitElement, nothing } from 'lit';
import { property } from 'lit/decorators.js';
import { choose } from 'lit/directives/choose.js';
@@ -35,7 +35,7 @@ export class ChatImage extends LitElement {
() =>
html`<image-placeholder
.text=${'Loading image'}
.icon=${LoadingIcon}
.icon=${LightLoadingIcon}
></image-placeholder>`,
],
[

View File

@@ -1,4 +1,4 @@
import { LoadingIcon } from '@blocksuite/affine/blocks/image';
import { LightLoadingIcon } from '@blocksuite/affine/components/icons';
import { WarningIcon } from '@blocksuite/icons/lit';
import { type TemplateResult } from 'lit';
@@ -41,7 +41,7 @@ export function getChipIcon(
return WarningIcon();
}
if (isLoading) {
return LoadingIcon;
return LightLoadingIcon;
}
return icon;
}