Skip to content

Commit 595ae67

Browse files
authored
style: add dark drop shadow to images (#912)
* style: add dark drop shadow to images * docs: add release note * style: add dark * style: remove dark
1 parent 5c76c92 commit 595ae67

File tree

13 files changed

+28
-16
lines changed

13 files changed

+28
-16
lines changed

docs/content.en/docs/release-notes/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ fix: automatic update of service list #913
2222
### ✈️ Improvements
2323

2424
refactor: improve sorting logic of search results #910
25+
style: add dark drop shadow to images #912
2526

2627
## 0.8.0 (2025-09-28)
2728

src/components/Assistant/ServerList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,11 @@ export function ServerList({ clearChat }: ServerListProps) {
232232
: "hover:bg-gray-50 dark:hover:bg-gray-800/50"
233233
}`}
234234
>
235-
<div className="flex items-center gap-2 overflow-hidden min-w-0">
235+
<div className="flex items-center gap-2 min-w-0">
236236
<img
237237
src={server?.provider?.icon || logoImg}
238238
alt={server.name}
239-
className="w-6 h-6 rounded-full bg-gray-100 dark:bg-gray-800"
239+
className="w-6 h-6 rounded-full bg-gray-100 dark:bg-gray-800 dark:drop-shadow-[0_0_6px_rgb(255,255,255)]"
240240
onError={(e) => {
241241
const target = e.target as HTMLImageElement;
242242
target.src = logoImg;

src/components/Assistant/Splash.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ const Splash = ({ assistantIDs = [], startPage }: SplashProps) => {
7272
setSettings(response);
7373
};
7474

75-
console.log("currentService", currentService);
76-
7775
useEffect(() => {
7876
getSettings();
7977
fetchData();

src/components/Cloud/DataSourceItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function DataSourceItem({ name, icon, connector }: DataSourceItemProps) {
5959
{icon?.startsWith("font_") ? (
6060
<FontIcon name={icon} className="size-6" />
6161
) : (
62-
<img src={getTypeIcon()} alt={name} className="size-6" />
62+
<img src={getTypeIcon()} alt={name} className="size-6 dark:drop-shadow-[0_0_6px_rgb(255,255,255)]" />
6363
)}
6464

6565
<span className="font-medium text-gray-900 dark:text-white">

src/components/Cloud/ServiceAuth.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ const LoadingState: FC<LoadingStateProps> = memo((props) => {
182182
const { t } = useTranslation();
183183

184184
return (
185-
<div className="flex items-center space-x-2">
185+
<div className="flex items-center space-x-2 mb-3">
186186
<button
187-
className="px-6 py-2 text-white bg-red-500 rounded-md hover:bg-red-600 transition-colors mb-3"
187+
className="px-6 py-2 text-white bg-red-500 rounded-md hover:bg-red-600 transition-colors"
188188
onClick={onCancel}
189189
>
190190
{t("cloud.cancel")}

src/components/Cloud/Sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const Sidebar = forwardRef<{ refreshData: () => void }, SidebarProps>(
5353
<img
5454
src={item?.provider?.icon || cocoLogoImg}
5555
alt={`${item.name} logo`}
56-
className="w-5 h-5 flex-shrink-0"
56+
className="w-5 h-5 flex-shrink-0 dark:drop-shadow-[0_0_6px_rgb(255,255,255)]"
5757
onError={(e) => {
5858
const target = e.target as HTMLImageElement;
5959
target.src = cocoLogoImg;

src/components/Cloud/UserProfile.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ export function UserProfile({ server, userInfo, onLogout }: UserProfileProps) {
2424
<img
2525
src={userInfo?.avatar}
2626
alt=""
27-
className="w-6 h-6"
27+
className="w-6 h-6 dark:drop-shadow-[0_0_6px_rgb(255,255,255)]"
2828
onError={() => {
2929
setImageLoadError(true);
3030
}}
3131
/>
3232
) : (
33-
<User className="w-6 h-6 text-gray-500 dark:text-gray-400" />
33+
<User className="w-6 h-6 text-gray-500 dark:text-gray-400 dark:drop-shadow-[0_0_6px_rgb(255,255,255)]" />
3434
)}
3535
</div>
3636
<div className="flex-1">

src/components/Common/Icons/FontIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface FontIconProps {
88

99
const FontIcon: FC<FontIconProps> = ({ name, className, style, ...rest }) => {
1010
return (
11-
<svg className={`icon ${className || ""}`} style={style} {...rest}>
11+
<svg className={`icon dark:drop-shadow-[0_0_6px_rgb(255,255,255)] ${className || ""}`} style={style} {...rest}>
1212
<use xlinkHref={`#${name}`} />
1313
</svg>
1414
);

src/components/Common/Icons/ThemedIcon.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ function ThemedIcon({ component: Component, className = "" }: ThemedIconProps) {
2424
return () => observer.disconnect();
2525
}, []);
2626

27-
return <Component className={className} color={color} />;
27+
return (
28+
<Component
29+
className={`dark:drop-shadow-[0_0_6px_rgb(255,255,255)] ${className}`}
30+
color={color}
31+
/>
32+
);
2833
}
2934

3035
export default ThemedIcon;

src/components/Common/Icons/UniversalIcon.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ function UniversalIcon({
4949

5050
// Render image type icon
5151
const renderImageIcon = (src: string) => {
52-
const img = <img className={className} src={src} alt="icon" />;
52+
const img = (
53+
<img
54+
className={`dark:drop-shadow-[0_0_6px_rgb(255,255,255)] ${className}`}
55+
src={src}
56+
alt="icon"
57+
/>
58+
);
5359
return wrapWithIconWrapper ? (
5460
<IconWrapper className={className} onClick={onClick}>
5561
{img}
@@ -63,7 +69,7 @@ function UniversalIcon({
6369
const renderAppIcon = (src: string) => {
6470
const img = (
6571
<img
66-
className={className}
72+
className={`dark:drop-shadow-[0_0_6px_rgb(255,255,255)] ${className}`}
6773
src={platformAdapter.convertFileSrc(src)}
6874
alt="icon"
6975
/>

0 commit comments

Comments
 (0)