From 2f246f4a4094ae50a3e59271ee4d8c016846342e Mon Sep 17 00:00:00 2001 From: carkom Date: Fri, 11 Aug 2023 13:35:50 +0100 Subject: [PATCH 01/10] Notes file Co-Authored-By: biohzrddd <10577752+biohzrddd@users.noreply.github.com> --- upcoming-release-notes/placeholder.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 upcoming-release-notes/placeholder.md diff --git a/upcoming-release-notes/placeholder.md b/upcoming-release-notes/placeholder.md new file mode 100644 index 00000000000..4731ee4093a --- /dev/null +++ b/upcoming-release-notes/placeholder.md @@ -0,0 +1,5 @@ +--- +category: Enhancements +authors: [biohzrddd, carkom] +--- +Last phase of dark theme, to include budget and global files \ No newline at end of file From 30cf1d914edd34c77741934458d232cb17abfa94 Mon Sep 17 00:00:00 2001 From: carkom Date: Fri, 11 Aug 2023 23:07:28 +0100 Subject: [PATCH 02/10] Main Import of preivous code. Co-Authored-By: biohzrddd <10577752+biohzrddd@users.noreply.github.com> --- .eslintrc.js | 19 ---- .../src/components/LoggedInUser.js | 4 +- .../src/components/MobileWebMessage.js | 6 +- .../src/components/NotesButton.tsx | 8 +- .../src/components/Notifications.tsx | 34 ++++-- .../desktop-client/src/components/Page.tsx | 6 +- .../desktop-client/src/components/Titlebar.js | 16 +-- .../src/components/UpdateNotification.js | 17 +-- .../src/components/budget/MobileBudget.js | 6 +- .../components/budget/MobileBudgetTable.js | 61 ++++++---- .../src/components/budget/MobileTable.js | 4 +- .../components/budget/MonthCountSelector.js | 4 +- .../src/components/budget/MonthPicker.js | 14 ++- .../src/components/budget/constants.js | 1 - .../src/components/budget/misc.js | 65 ++++++----- .../budget/rollover/BudgetSummary.tsx | 29 ++--- .../budget/rollover/rollover-components.tsx | 59 +++++----- .../src/components/budget/util.js | 13 ++- .../src/components/mobile/MobileForms.js | 9 +- .../src/components/modals/BudgetSummary.js | 6 +- .../transactions/MobileTransaction.js | 104 ++++++++++-------- packages/desktop-client/src/style/styles.ts | 1 + .../{placeholder.md => 1513.md} | 0 23 files changed, 264 insertions(+), 222 deletions(-) rename upcoming-release-notes/{placeholder.md => 1513.md} (100%) diff --git a/.eslintrc.js b/.eslintrc.js index 7cc4060ebb2..9b156974f18 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -210,27 +210,10 @@ module.exports = { files: [ './packages/desktop-client/public/index.html', './packages/desktop-client/src/components/BankSyncStatus.*', - './packages/desktop-client/src/components/LoggedInUser.*', - './packages/desktop-client/src/components/MobileWebMessage.*', - './packages/desktop-client/src/components/NotesButton.*', - './packages/desktop-client/src/components/Notifications.*', - './packages/desktop-client/src/components/Page.*', './packages/desktop-client/src/components/SidebarWithData.*', - './packages/desktop-client/src/components/Titlebar.*', - './packages/desktop-client/src/components/UpdateNotification.*', './packages/desktop-client/src/components/alerts.*', - './packages/desktop-client/src/components/budget/MobileBudget.*', - './packages/desktop-client/src/components/budget/MobileBudgetTable.*', - './packages/desktop-client/src/components/budget/MobileTable.*', - './packages/desktop-client/src/components/budget/MonthCountSelector.*', - './packages/desktop-client/src/components/budget/MonthPicker.*', - './packages/desktop-client/src/components/budget/constants.*', - './packages/desktop-client/src/components/budget/misc.*', './packages/desktop-client/src/components/budget/report/BudgetSummary.*', './packages/desktop-client/src/components/budget/report/components.*', - './packages/desktop-client/src/components/budget/rollover/BudgetSummary.*', - './packages/desktop-client/src/components/budget/rollover/rollover-components.*', - './packages/desktop-client/src/components/budget/util.*', './packages/desktop-client/src/components/common.*', './packages/desktop-client/src/components/common/Card.*', './packages/desktop-client/src/components/common/Label.*', @@ -249,7 +232,6 @@ module.exports = { './packages/desktop-client/src/components/manager/subscribe/Error.*', './packages/desktop-client/src/components/manager/subscribe/Login.*', './packages/desktop-client/src/components/manager/subscribe/common.*', - './packages/desktop-client/src/components/modals/BudgetSummary.*', './packages/desktop-client/src/components/modals/ConfirmCategoryDelete.*', './packages/desktop-client/src/components/modals/CreateEncryptionKey.*', './packages/desktop-client/src/components/modals/EditField.*', @@ -287,7 +269,6 @@ module.exports = { './packages/desktop-client/src/components/settings/UI.*', './packages/desktop-client/src/components/settings/index.*', './packages/desktop-client/src/components/sidebar.*', - './packages/desktop-client/src/components/transactions/MobileTransaction.*', './packages/desktop-client/src/components/util/AmountInput.*', './packages/desktop-client/src/components/util/DisplayId.*', './packages/desktop-client/src/components/util/LoadComponent.*', diff --git a/packages/desktop-client/src/components/LoggedInUser.js b/packages/desktop-client/src/components/LoggedInUser.js index 65e5460e1a4..89f7a647bcf 100644 --- a/packages/desktop-client/src/components/LoggedInUser.js +++ b/packages/desktop-client/src/components/LoggedInUser.js @@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'; import { useSelector } from 'react-redux'; import { useActions } from '../hooks/useActions'; -import { colors, styles } from '../style'; +import { theme, styles } from '../style'; import Button from './common/Button'; import Menu from './common/Menu'; @@ -70,7 +70,7 @@ export default function LoggedInUser({ hideIfNoServer, style, color }) { diff --git a/packages/desktop-client/src/components/Notifications.tsx b/packages/desktop-client/src/components/Notifications.tsx index 02ff9c8fad2..3e7d55948f9 100644 --- a/packages/desktop-client/src/components/Notifications.tsx +++ b/packages/desktop-client/src/components/Notifications.tsx @@ -13,7 +13,7 @@ import type { NotificationWithId } from 'loot-core/src/client/state-types/notifi import { useActions } from '../hooks/useActions'; import AnimatedLoading from '../icons/AnimatedLoading'; import Delete from '../icons/v0/Delete'; -import { styles, colors } from '../style'; +import { styles, theme } from '../style'; import Button, { ButtonWithLoading } from './common/Button'; import ExternalLink from './common/ExternalLink'; @@ -108,7 +108,11 @@ function Notification({ @@ -202,7 +214,7 @@ function Notification({ left: 0, right: 0, bottom: 0, - backgroundColor: 'rgba(250, 250, 250, .75)', + backgroundColor: theme.tableBackground, alignItems: 'center', justifyContent: 'center', }} diff --git a/packages/desktop-client/src/components/Page.tsx b/packages/desktop-client/src/components/Page.tsx index 8a2068bfc9a..d7d5ea81e9d 100644 --- a/packages/desktop-client/src/components/Page.tsx +++ b/packages/desktop-client/src/components/Page.tsx @@ -3,7 +3,7 @@ import React, { type ReactNode } from 'react'; import { type CSSProperties } from 'glamor'; import { useResponsive } from '../ResponsiveProvider'; -import { colors, styles } from '../style'; +import { theme, styles } from '../style'; import Text from './common/Text'; import View from './common/View'; @@ -23,8 +23,8 @@ function PageTitle({ style={[ { alignItems: 'center', - backgroundColor: colors.b2, - color: 'white', + backgroundColor: theme.sidebarBackground, + color: theme.mobileModalText, flexDirection: 'row', flex: '1 0 auto', fontSize: 18, diff --git a/packages/desktop-client/src/components/Titlebar.js b/packages/desktop-client/src/components/Titlebar.js index 779e8ee669e..29c91f132ff 100644 --- a/packages/desktop-client/src/components/Titlebar.js +++ b/packages/desktop-client/src/components/Titlebar.js @@ -22,7 +22,7 @@ import SvgEye from '../icons/v2/Eye'; import SvgEyeSlashed from '../icons/v2/EyeSlashed'; import NavigationMenu from '../icons/v2/NavigationMenu'; import { useResponsive } from '../ResponsiveProvider'; -import { colors } from '../style'; +import { theme } from '../style'; import tokens from '../tokens'; import AccountSyncCheck from './accounts/AccountSyncCheck'; @@ -71,7 +71,9 @@ function UncategorizedButton() { {count} uncategorized {count === 1 ? 'transaction' : 'transactions'} @@ -150,21 +152,21 @@ export function SyncButton({ style }) { WebkitAppRegion: 'none', color: syncState === 'error' - ? colors.r7 + ? theme.errorText : syncState === 'disabled' || syncState === 'offline' || syncState === 'local' - ? colors.n9 + ? theme.tableTextInactive : null, }, media(`(min-width: ${tokens.breakpoint_small})`, { color: syncState === 'error' - ? colors.r4 + ? theme.errorText : syncState === 'disabled' || syncState === 'offline' || syncState === 'local' - ? colors.n6 + ? theme.pageTextSubdued : null, }), )} @@ -329,7 +331,7 @@ export default function Titlebar({ style }) { > )} diff --git a/packages/desktop-client/src/components/UpdateNotification.js b/packages/desktop-client/src/components/UpdateNotification.js index df42cc420b5..5c286817565 100644 --- a/packages/desktop-client/src/components/UpdateNotification.js +++ b/packages/desktop-client/src/components/UpdateNotification.js @@ -3,7 +3,7 @@ import { useSelector } from 'react-redux'; import { useActions } from '../hooks/useActions'; import Close from '../icons/v1/Close'; -import { colors } from '../style'; +import { theme } from '../style'; import Button from './common/Button'; import LinkButton from './common/LinkButton'; @@ -36,8 +36,8 @@ export default function UpdateNotification() { bottom: 0, right: 0, margin: '15px 17px', - backgroundColor: colors.p6, - color: 'white', + backgroundColor: theme.pageTextPositive, + color: theme.tableBackground, padding: '7px 10px', borderRadius: 4, zIndex: 10000, @@ -51,15 +51,8 @@ export default function UpdateNotification() { + Restart ( - Restart - {' '} - ( - window.Actual.openURLInBrowser( 'https://actualbudget.org/docs/releases', @@ -74,7 +67,7 @@ export default function UpdateNotification() { style={{ display: 'inline', padding: '1px 7px 2px 7px' }} onClick={() => closeNotification(setAppState)} > - + diff --git a/packages/desktop-client/src/components/budget/MobileBudget.js b/packages/desktop-client/src/components/budget/MobileBudget.js index 52b2912bef2..75d21fa9217 100644 --- a/packages/desktop-client/src/components/budget/MobileBudget.js +++ b/packages/desktop-client/src/components/budget/MobileBudget.js @@ -13,7 +13,7 @@ import * as monthUtils from 'loot-core/src/shared/months'; import { useActions } from '../../hooks/useActions'; import { useSetThemeColor } from '../../hooks/useSetThemeColor'; import AnimatedLoading from '../../icons/AnimatedLoading'; -import { colors } from '../../style'; +import { theme } from '../../style'; import View from '../common/View'; import SyncRefresh from '../SyncRefresh'; @@ -248,7 +248,7 @@ class Budget extends Component {