mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
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:
@@ -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>`,
|
||||
],
|
||||
[
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user