From f587ccc6ee7b81658cc00fee98fbd2ccb8c160c6 Mon Sep 17 00:00:00 2001 From: Mike <142341848+mike-kiss@users.noreply.github.com> Date: Mon, 22 Apr 2024 16:00:09 -0400 Subject: [PATCH] refactor: initial theme refactor #2445 (#2446) --- .../ChangeUsername.component.tsx | 2 +- .../UsernameChanged.component.tsx | 2 +- .../components/Channel/ChannelComponent.tsx | 2 +- .../CreateChannel/CreateChannelComponent.tsx | 2 +- .../DeleteChannel/DeleteChannel.test.tsx | 6 +- .../File/FileComponent/FileComponent.tsx | 4 +- .../File/UploadedImage/UploadedImage.test.tsx | 4 +- .../UploadedImagePlaceholder.test.tsx | 10 +-- .../UploadedImagePlaceholder.tsx | 6 +- .../Channel/File/UploadingPreview.tsx | 4 +- .../ChannelCreationModal.test.tsx | 2 +- .../ContextMenu/ContextMenu.component.tsx | 12 +-- .../UserProfileContextMenu.container.tsx | 8 +- .../PerformCommunityActionComponent.tsx | 2 +- .../CreateUsernameComponent.tsx | 2 +- .../UsernameCreated/UsernameCreated.test.tsx | 2 +- .../JoiningPanelComponent.test.tsx | 4 +- .../LoadingPanel/JoiningPanelComponent.tsx | 2 +- .../StartingPanelComponent.test.tsx | 2 +- .../LoadingPanel/StartingPanelComponent.tsx | 2 +- .../SearchModal/SearchModal.test.tsx | 6 +- .../SearchModal/SearchModelComponent.tsx | 6 +- .../components/Settings/SettingsComponent.tsx | 4 +- .../Tabs/Invite/Invite.component.test.tsx | 8 +- .../LeaveCommunity/LeaveCommunity.test.tsx | 6 +- .../Tabs/Notifications/Notifications.test.tsx | 14 +-- .../ChannelsPanel/ChannelsPanel.test.tsx | 24 ++--- .../IdentityPanel/IdentityPanel.test.tsx | 6 +- .../src/renderer/components/Titlebar.tsx | 3 +- .../ui/ErrorModal/ErrorModal.test.tsx | 8 +- .../ui/ErrorModal/ErrorModalComponent.tsx | 2 +- .../ui/LoadingButton/LoadingButton.test.tsx | 2 +- .../renderer/components/ui/Modal/Modal.tsx | 10 +-- .../ui/OpenlinkModal/OpenlinkModal.test.tsx | 10 +-- .../ui/OpenlinkModal/OpenlinkModal.tsx | 4 +- .../renderer/components/ui/Page/Page.test.tsx | 2 +- .../components/ui/Page/PageHeader.test.tsx | 2 +- .../components/ui/Page/PageHeader.tsx | 2 +- .../ui/PopupMenu/PopupMenu.test.tsx | 8 +- .../ui/ProgressFab/ProgressFab.test.tsx | 10 +-- .../ui/QuitApp/QuitAppDialog.test.tsx | 2 +- .../components/ui/QuitApp/QuitAppDialog.tsx | 4 +- .../components/ui/Slider/Slider.test.tsx | 6 +- .../components/ui/Spinner/SpinnerLoader.tsx | 2 +- .../components/widgets/MessagesDivider.tsx | 2 +- .../WarningModal/WarningModal.test.tsx | 4 +- .../widgets/channels/BasicMessage.test.tsx | 8 +- .../widgets/channels/BasicMessage.tsx | 6 +- .../widgets/channels/ChannelHeader.test.tsx | 4 +- .../widgets/channels/ChannelHeader.tsx | 6 +- .../ChannelInput/ChannelInput.test.tsx | 4 +- .../channels/ChannelInput/ChannelInput.tsx | 6 +- .../ChannelInput/MentionElement.test.tsx | 4 +- .../channels/ChannelInput/MentionElement.tsx | 2 +- .../ChannelInput/MentionPoper.test.tsx | 2 +- .../widgets/channels/ChannelMessages.test.tsx | 4 +- .../widgets/channels/ChannelMessages.tsx | 2 +- .../channels/NestedMessageContent.test.tsx | 4 +- .../widgets/channels/TextMessage.tsx | 6 +- .../widgets/channels/WelcomeMessage.test.tsx | 2 +- .../widgets/channels/WelcomeMessage.tsx | 2 +- .../PossibleImpersonationAttackModal.test.tsx | 2 +- .../sentryWarning/SentryWarningComponent.tsx | 2 +- .../components/widgets/update/UpdateModal.tsx | 2 +- .../update/UpdateModalComponent.test.tsx | 4 +- .../widgets/update/UpdateModalComponent.tsx | 2 +- .../duplicate/DuplicateModal.test.tsx | 2 +- .../unregistered/UnregisteredModal.test.tsx | 4 +- .../components/windows/Index.test.tsx | 12 +-- .../components/windows/Loading.test.tsx | 6 +- .../renderer/components/windows/Main.test.tsx | 6 +- packages/desktop/src/renderer/theme.ts | 90 +++++++++++-------- 72 files changed, 226 insertions(+), 205 deletions(-) diff --git a/packages/desktop/src/renderer/components/ChangeUsername/ChangeUsername.component.tsx b/packages/desktop/src/renderer/components/ChangeUsername/ChangeUsername.component.tsx index 6235c69744..55bda3ff9b 100644 --- a/packages/desktop/src/renderer/components/ChangeUsername/ChangeUsername.component.tsx +++ b/packages/desktop/src/renderer/components/ChangeUsername/ChangeUsername.component.tsx @@ -38,7 +38,7 @@ const classes = { } const StyledGrid = styled(Grid)(({ theme }) => ({ - backgroundColor: theme.palette.colors.white, + backgroundColor: theme.palette.background.default, padding: '0px 32px', [`& .${classes.focus}`]: { diff --git a/packages/desktop/src/renderer/components/ChangeUsername/UsernameChanged/UsernameChanged.component.tsx b/packages/desktop/src/renderer/components/ChangeUsername/UsernameChanged/UsernameChanged.component.tsx index dac4a0f8e7..a3332cdf01 100644 --- a/packages/desktop/src/renderer/components/ChangeUsername/UsernameChanged/UsernameChanged.component.tsx +++ b/packages/desktop/src/renderer/components/ChangeUsername/UsernameChanged/UsernameChanged.component.tsx @@ -16,7 +16,7 @@ const classes = { } const StyledGrid = styled(Grid)(({ theme }) => ({ - backgroundColor: theme.palette.colors.white, + backgroundColor: theme.palette.background.default, padding: '0px 32px', [`& .${classes.button}`]: { diff --git a/packages/desktop/src/renderer/components/Channel/ChannelComponent.tsx b/packages/desktop/src/renderer/components/Channel/ChannelComponent.tsx index a74d127d53..752a06f0e1 100644 --- a/packages/desktop/src/renderer/components/Channel/ChannelComponent.tsx +++ b/packages/desktop/src/renderer/components/Channel/ChannelComponent.tsx @@ -30,7 +30,7 @@ import { HandleOpenModalType } from '../widgets/userLabel/UserLabel.types' const ChannelMessagesWrapperStyled = styled(Grid)(({ theme }) => ({ position: 'relative', height: 0, - backgroundColor: theme.palette.colors.white, + backgroundColor: theme.palette.background.default, })) export interface ChannelComponentProps { diff --git a/packages/desktop/src/renderer/components/Channel/CreateChannel/CreateChannelComponent.tsx b/packages/desktop/src/renderer/components/Channel/CreateChannel/CreateChannelComponent.tsx index cd576d6583..51197f2a59 100644 --- a/packages/desktop/src/renderer/components/Channel/CreateChannel/CreateChannelComponent.tsx +++ b/packages/desktop/src/renderer/components/Channel/CreateChannel/CreateChannelComponent.tsx @@ -30,7 +30,7 @@ const classes = { } const StyledModalContent = styled(Grid)(({ theme }) => ({ - backgroundColor: theme.palette.colors.white, + backgroundColor: theme.palette.background.default, padding: '0px 32px', [`& .${classes.fullContainer}`]: { diff --git a/packages/desktop/src/renderer/components/Channel/DeleteChannel/DeleteChannel.test.tsx b/packages/desktop/src/renderer/components/Channel/DeleteChannel/DeleteChannel.test.tsx index 61eb7e67cf..54c839013f 100644 --- a/packages/desktop/src/renderer/components/Channel/DeleteChannel/DeleteChannel.test.tsx +++ b/packages/desktop/src/renderer/components/Channel/DeleteChannel/DeleteChannel.test.tsx @@ -21,7 +21,7 @@ describe('LeaveCommunity', () => { aria-hidden="true" />