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.png new file mode 100644 index 000000000..344bec7a0 Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/background/no_match_record_bg.png differ diff --git a/packages/twenty-front/public/images/placeholders/dark-background/404_bg.png b/packages/twenty-front/public/images/placeholders/dark-background/404_bg.png new file mode 100644 index 000000000..f29437c86 Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/404_bg.png differ diff --git a/packages/twenty-front/public/images/placeholders/dark-background/500_bg.png b/packages/twenty-front/public/images/placeholders/dark-background/500_bg.png new file mode 100644 index 000000000..9f353ecc7 Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/500_bg.png differ diff --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.png new file mode 100644 index 000000000..5f680bc41 Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/empty_inbox_bg.png differ diff --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.png new file mode 100644 index 000000000..90d2bf5ab Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/empty_timeline_bg.png differ diff --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.png new file mode 100644 index 000000000..79d119b36 Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/error_index_bg.png differ diff --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.png new file mode 100644 index 000000000..71e62236c Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/no_file_bg.png differ diff --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.png new file mode 100644 index 000000000..da554e159 Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/no_match_record_bg.png differ diff --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.png new file mode 100644 index 000000000..31e067553 Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/no_note_bg.png differ diff --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.png new file mode 100644 index 000000000..e68793922 Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/no_record_bg.png differ diff --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.png new file mode 100644 index 000000000..89f1f183a Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-background/no_task_bg.png differ diff --git a/packages/twenty-front/public/images/placeholders/dark-moving-image/404.png b/packages/twenty-front/public/images/placeholders/dark-moving-image/404.png new file mode 100644 index 000000000..52070a50c Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/404.png differ diff --git a/packages/twenty-front/public/images/placeholders/dark-moving-image/500.png b/packages/twenty-front/public/images/placeholders/dark-moving-image/500.png new file mode 100644 index 000000000..053d7bf3b Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/500.png differ diff --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.png new file mode 100644 index 000000000..d66231182 Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/empty_inbox.png differ diff --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.png new file mode 100644 index 000000000..7d28b7a3f Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/empty_timeline.png differ diff --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.png new file mode 100644 index 000000000..eff835bed Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/error_index.png differ diff --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.png new file mode 100644 index 000000000..cdcb7f644 Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_file.png differ diff --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.png new file mode 100644 index 000000000..178059bc5 Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_match_record.png differ diff --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.png new file mode 100644 index 000000000..0917eea67 Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_note.png differ diff --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.png new file mode 100644 index 000000000..06324972d Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_record.png differ diff --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.png new file mode 100644 index 000000000..c185fe6f2 Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/dark-moving-image/no_task.png differ diff --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.png new file mode 100644 index 000000000..f6e84a9d5 Binary files /dev/null and b/packages/twenty-front/public/images/placeholders/moving-image/no_match_record.png differ diff --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.tsx index 6bb58a61c..b343e44ab 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 ( = { 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 = { 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 = { error404: '/images/placeholders/moving-image/404.png', error500: '/images/placeholders/moving-image/500.png', }; + +export const DarkBackground: Record = { + 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 = { + 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', +};