refactor: simplify agenda icon usage across components
Some checks are pending
E2E / Playwright e2e (push) Waiting to run
Some checks are pending
E2E / Playwright e2e (push) Waiting to run
- Removed dark mode icon references for the agenda in landing-data, favorite-apps, and suite-app-splash files. - Consolidated agenda icon handling in agenda-mark component to use a single light icon, improving code maintainability and reducing redundancy.
This commit is contained in:
parent
efaaf16f60
commit
b61e1a1441
@ -124,7 +124,6 @@ export const LANDING_APPS: LandingApp[] = [
|
|||||||
description:
|
description:
|
||||||
"Calendrier partagé, invitations et disponibilités, connecté au mail et aux contacts.",
|
"Calendrier partagé, invitations et disponibilités, connecté au mail et aux contacts.",
|
||||||
icon: suitePublicAsset("/agenda-mark.svg"),
|
icon: suitePublicAsset("/agenda-mark.svg"),
|
||||||
iconDark: suitePublicAsset("/agenda-mark-dark.svg"),
|
|
||||||
href: "/agenda",
|
href: "/agenda",
|
||||||
productHref: "/suite/ultical",
|
productHref: "/suite/ultical",
|
||||||
accent: "#FBBC04",
|
accent: "#FBBC04",
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
import { suitePublicAsset } from "@/lib/suite/suite-public-asset"
|
import { suitePublicAsset } from "@/lib/suite/suite-public-asset"
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
const AGENDA_MARK_LIGHT = suitePublicAsset("/agenda-mark.svg")
|
const AGENDA_MARK = suitePublicAsset("/agenda-mark.svg")
|
||||||
const AGENDA_MARK_DARK = suitePublicAsset("/agenda-mark-dark.svg")
|
|
||||||
|
|
||||||
export function AgendaMark({
|
export function AgendaMark({
|
||||||
className,
|
className,
|
||||||
@ -12,21 +11,12 @@ export function AgendaMark({
|
|||||||
alt?: string
|
alt?: string
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<img
|
||||||
<img
|
src={AGENDA_MARK}
|
||||||
src={AGENDA_MARK_LIGHT}
|
alt={alt}
|
||||||
alt={alt}
|
className={cn(className)}
|
||||||
className={cn(className, "dark:hidden")}
|
draggable={false}
|
||||||
draggable={false}
|
aria-hidden={alt === ""}
|
||||||
aria-hidden={alt === ""}
|
/>
|
||||||
/>
|
|
||||||
<img
|
|
||||||
src={AGENDA_MARK_DARK}
|
|
||||||
alt={alt}
|
|
||||||
className={cn(className, "hidden dark:block")}
|
|
||||||
draggable={false}
|
|
||||||
aria-hidden={alt === ""}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,6 @@ export const SUITE_FAVORITE_APPS: FavoriteApp[] = [
|
|||||||
{
|
{
|
||||||
name: ULTICAL_APP_NAME,
|
name: ULTICAL_APP_NAME,
|
||||||
icon: suitePublicAsset("/agenda-mark.svg"),
|
icon: suitePublicAsset("/agenda-mark.svg"),
|
||||||
iconDark: suitePublicAsset("/agenda-mark-dark.svg"),
|
|
||||||
href: "/agenda",
|
href: "/agenda",
|
||||||
},
|
},
|
||||||
{ name: "Photos", icon: suitePublicAsset("/photos-mark.svg") },
|
{ name: "Photos", icon: suitePublicAsset("/photos-mark.svg") },
|
||||||
|
|||||||
@ -9,7 +9,6 @@ const LEGACY_MAIL_SPLASH_KEY = "ultimail-splash-seen-v1"
|
|||||||
export type SuiteSplashConfig = {
|
export type SuiteSplashConfig = {
|
||||||
pill: string
|
pill: string
|
||||||
mark: string
|
mark: string
|
||||||
/** UltiCal : variante dark mode. */
|
|
||||||
markDark?: string
|
markDark?: string
|
||||||
subtitle: string
|
subtitle: string
|
||||||
ariaLabel: string
|
ariaLabel: string
|
||||||
@ -33,7 +32,6 @@ export const SUITE_SPLASH_CONFIG: Record<SuiteSplashApp, SuiteSplashConfig> = {
|
|||||||
agenda: {
|
agenda: {
|
||||||
pill: "ULTICAL",
|
pill: "ULTICAL",
|
||||||
mark: "/agenda-mark.svg",
|
mark: "/agenda-mark.svg",
|
||||||
markDark: "/agenda-mark-dark.svg",
|
|
||||||
subtitle: "Chargement de votre agenda...",
|
subtitle: "Chargement de votre agenda...",
|
||||||
ariaLabel: `Chargement d'${ULTICAL_APP_NAME}`,
|
ariaLabel: `Chargement d'${ULTICAL_APP_NAME}`,
|
||||||
spinMark: true,
|
spinMark: true,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user