The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Added the dark mode version of empty states (#3906)
Jeet Desaib286232ea76c
diff --git a/packages/twenty-front/public/images/placeholders/background/no_match_record_bg.png b/packages/twenty-front/public/images/placeholders/background/no_match_record_bg.pngnew file mode 100644index 00000000000..344bec7a0c7Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/background/no_match_record_bg.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-background/404_bg.png b/packages/twenty-front/public/images/placeholders/dark-background/404_bg.pngnew file mode 100644index 00000000000..f29437c8646Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/404_bg.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-background/500_bg.png b/packages/twenty-front/public/images/placeholders/dark-background/500_bg.pngnew file mode 100644index 00000000000..9f353ecc748Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/500_bg.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-background/empty_inbox_bg.png b/packages/twenty-front/public/images/placeholders/dark-background/empty_inbox_bg.pngnew file mode 100644index 00000000000..5f680bc413eBinary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/empty_inbox_bg.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-background/empty_timeline_bg.png b/packages/twenty-front/public/images/placeholders/dark-background/empty_timeline_bg.pngnew file mode 100644index 00000000000..90d2bf5ab8eBinary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/empty_timeline_bg.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-background/error_index_bg.png b/packages/twenty-front/public/images/placeholders/dark-background/error_index_bg.pngnew file mode 100644index 00000000000..79d119b363eBinary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/error_index_bg.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-background/no_file_bg.png b/packages/twenty-front/public/images/placeholders/dark-background/no_file_bg.pngnew file mode 100644index 00000000000..71e62236cd9Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/no_file_bg.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-background/no_match_record_bg.png b/packages/twenty-front/public/images/placeholders/dark-background/no_match_record_bg.pngnew file mode 100644index 00000000000..da554e159f2Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/no_match_record_bg.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-background/no_note_bg.png b/packages/twenty-front/public/images/placeholders/dark-background/no_note_bg.pngnew file mode 100644index 00000000000..31e067553c5Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/no_note_bg.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-background/no_record_bg.png b/packages/twenty-front/public/images/placeholders/dark-background/no_record_bg.pngnew file mode 100644index 00000000000..e68793922b4Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/no_record_bg.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-background/no_task_bg.png b/packages/twenty-front/public/images/placeholders/dark-background/no_task_bg.pngnew file mode 100644index 00000000000..89f1f183a35Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/no_task_bg.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-moving-image/404.png b/packages/twenty-front/public/images/placeholders/dark-moving-image/404.pngnew file mode 100644index 00000000000..52070a50c6fBinary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/404.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-moving-image/500.png b/packages/twenty-front/public/images/placeholders/dark-moving-image/500.pngnew file mode 100644index 00000000000..053d7bf3b85Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/500.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-moving-image/empty_inbox.png b/packages/twenty-front/public/images/placeholders/dark-moving-image/empty_inbox.pngnew file mode 100644index 00000000000..d6623118223Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/empty_inbox.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-moving-image/empty_timeline.png b/packages/twenty-front/public/images/placeholders/dark-moving-image/empty_timeline.pngnew file mode 100644index 00000000000..7d28b7a3fc0Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/empty_timeline.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-moving-image/error_index.png b/packages/twenty-front/public/images/placeholders/dark-moving-image/error_index.pngnew file mode 100644index 00000000000..eff835bed3cBinary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/error_index.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-moving-image/no_file.png b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_file.pngnew file mode 100644index 00000000000..cdcb7f644c3Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_file.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-moving-image/no_match_record.png b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_match_record.pngnew file mode 100644index 00000000000..178059bc52bBinary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_match_record.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-moving-image/no_note.png b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_note.pngnew file mode 100644index 00000000000..0917eea67d9Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_note.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-moving-image/no_record.png b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_record.pngnew file mode 100644index 00000000000..06324972d4cBinary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_record.png differdiff --git a/packages/twenty-front/public/images/placeholders/dark-moving-image/no_task.png b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_task.pngnew file mode 100644index 00000000000..c185fe6f216Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_task.png differdiff --git a/packages/twenty-front/public/images/placeholders/moving-image/no_match_record.png b/packages/twenty-front/public/images/placeholders/moving-image/no_match_record.pngnew file mode 100644index 00000000000..f6e84a9d520Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/moving-image/no_match_record.png differdiff --git a/packages/twenty-front/src/modules/ui/layout/animated-placeholder/components/AnimatedPlaceholder.tsx b/packages/twenty-front/src/modules/ui/layout/animated-placeholder/components/AnimatedPlaceholder.tsxindex 6bb58a61c70..b343e44abd3 100644--- a/packages/twenty-front/src/modules/ui/layout/animated-placeholder/components/AnimatedPlaceholder.tsx+++ b/packages/twenty-front/src/modules/ui/layout/animated-placeholder/components/AnimatedPlaceholder.tsx@@ -1,10 +1,13 @@import { useEffect } from 'react';+import { useTheme } from '@emotion/react';import styled from '@emotion/styled';import { motion, useMotionValue, useTransform } from 'framer-motion';import { animate } from 'framer-motion';import {Background,+ DarkBackground,+ DarkMovingImage,MovingImage,} from '@/ui/layout/animated-placeholder/constants/AnimatedImages';@@ -40,6 +43,8 @@ interface AnimatedPlaceholderProps {}const AnimatedPlaceholder = ({ type }: AnimatedPlaceholderProps) => {+ const theme = useTheme();+const x = useMotionValue(window.innerWidth / 2);const y = useMotionValue(window.innerHeight / 2);@@ -84,12 +89,12 @@ const AnimatedPlaceholder = ({ type }: AnimatedPlaceholderProps) => {return (<StyledContainer><StyledBackgroundImage- src={Background[type]}+ src={theme.name === 'dark' ? DarkBackground[type] : Background[type]}alt="Background"type={type}/><StyledMovingImage- src={MovingImage[type]}+ src={theme.name === 'dark' ? DarkMovingImage[type] : MovingImage[type]}alt="Moving"style={{ translateX, translateY }}transition={{ type: 'spring', stiffness: 100, damping: 10 }}diff --git a/packages/twenty-front/src/modules/ui/layout/animated-placeholder/constants/AnimatedImages.ts b/packages/twenty-front/src/modules/ui/layout/animated-placeholder/constants/AnimatedImages.tsindex a24b4670205..4a028be52eb 100644--- a/packages/twenty-front/src/modules/ui/layout/animated-placeholder/constants/AnimatedImages.ts+++ b/packages/twenty-front/src/modules/ui/layout/animated-placeholder/constants/AnimatedImages.ts@@ -2,6 +2,7 @@ export const Background: Record<string, string> = {noFile: '/images/placeholders/background/no_file_bg.png',noNote: '/images/placeholders/background/no_note_bg.png',noRecord: '/images/placeholders/background/no_record_bg.png',+ noMatchRecord: '/images/placeholders/background/no_match_record_bg.png',noTask: '/images/placeholders/background/no_task_bg.png',errorIndex: '/images/placeholders/background/error_index_bg.png',emptyTimeline: '/images/placeholders/background/empty_timeline_bg.png',@@ -16,6 +17,7 @@ export const MovingImage: Record<string, string> = {noFile: '/images/placeholders/moving-image/no_file.png',noNote: '/images/placeholders/moving-image/no_note.png',noRecord: '/images/placeholders/moving-image/no_record.png',+ noMatchRecord: '/images/placeholders/moving-image/no_match_record.png',noTask: '/images/placeholders/moving-image/no_task.png',errorIndex: '/images/placeholders/moving-image/error_index.png',emptyTimeline: '/images/placeholders/moving-image/empty_timeline.png',@@ -25,3 +27,33 @@ export const MovingImage: Record<string, string> = {error404: '/images/placeholders/moving-image/404.png',error500: '/images/placeholders/moving-image/500.png',};++export const DarkBackground: Record<string, string> = {+ noFile: '/images/placeholders/dark-background/no_file_bg.png',+ noNote: '/images/placeholders/dark-background/no_note_bg.png',+ noRecord: '/images/placeholders/dark-background/no_record_bg.png',+ noMatchRecord: '/images/placeholders/dark-background/no_match_record_bg.png',+ noTask: '/images/placeholders/dark-background/no_task_bg.png',+ errorIndex: '/images/placeholders/dark-background/error_index_bg.png',+ emptyTimeline: '/images/placeholders/dark-background/empty_timeline_bg.png',+ emptyInbox: '/images/placeholders/dark-background/empty_inbox_bg.png',+ error404: '/images/placeholders/dark-background/404_bg.png',+ error500: '/images/placeholders/dark-background/500_bg.png',+ loadingMessages: '/images/placeholders/background/loading_messages_bg.png',+ loadingAccounts: '/images/placeholders/background/loading_accounts_bg.png',+};++export const DarkMovingImage: Record<string, string> = {+ noFile: '/images/placeholders/dark-moving-image/no_file.png',+ noNote: '/images/placeholders/dark-moving-image/no_note.png',+ noRecord: '/images/placeholders/dark-moving-image/no_record.png',+ noMatchRecord: '/images/placeholders/dark-moving-image/no_match_record.png',+ noTask: '/images/placeholders/dark-moving-image/no_task.png',+ errorIndex: '/images/placeholders/dark-moving-image/error_index.png',+ emptyTimeline: '/images/placeholders/dark-moving-image/empty_timeline.png',+ emptyInbox: '/images/placeholders/dark-moving-image/empty_inbox.png',+ error404: '/images/placeholders/dark-moving-image/404.png',+ error500: '/images/placeholders/dark-moving-image/500.png',+ loadingMessages: '/images/placeholders/moving-image/loading_messages.png',+ loadingAccounts: '/images/placeholders/moving-image/loading_accounts.png',+};