diff --git a/.eslintrc.js b/.eslintrc.js index 06c284f01a91d04da43d34d8d727f499e9b2fd2b..85e9ec47f585a88b0ebf653300986e34866dade7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -299,6 +299,7 @@ module.exports = { './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/transactions/TransactionsTable.*', './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/accounts/Balance.js b/packages/desktop-client/src/components/accounts/Balance.js index 52971b66e353b680a40c2344b4b9ed1190fbbd53..23f99530b8abb35d87f643974a3b64eddc5cd495 100644 --- a/packages/desktop-client/src/components/accounts/Balance.js +++ b/packages/desktop-client/src/components/accounts/Balance.js @@ -159,7 +159,7 @@ export function Balances({ ? theme.errorText : value > 0 ? theme.noticeText - : theme.tableTextInactive, + : theme.pageTextSubdued, })} privacyFilter={{ blurIntensity: 5, diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.js b/packages/desktop-client/src/components/transactions/TransactionsTable.js index c068ab9fb1fd5dcc291197f072243a3ad22a3d79..d13bdef7b90dc8a7eaca4e9f7272f47cca96ac42 100644 --- a/packages/desktop-client/src/components/transactions/TransactionsTable.js +++ b/packages/desktop-client/src/components/transactions/TransactionsTable.js @@ -53,7 +53,7 @@ import CheveronDown from '../../icons/v1/CheveronDown'; import ArrowsSynchronize from '../../icons/v2/ArrowsSynchronize'; import CalendarIcon from '../../icons/v2/Calendar'; import Hyperlink2 from '../../icons/v2/Hyperlink2'; -import { styles, theme } from '../../style'; +import { colors, styles, theme } from '../../style'; import AccountAutocomplete from '../autocomplete/AccountAutocomplete'; import CategoryAutocomplete from '../autocomplete/CategorySelect'; import PayeeAutocomplete from '../autocomplete/PayeeAutocomplete'; @@ -414,6 +414,17 @@ function StatusCell({ let isClearedField = status === 'cleared' || status == null; let statusProps = getStatusProps(status); + let statusColor = + status === 'cleared' + ? colors.g5 + : status === 'missed' + ? colors.r6 + : status === 'due' + ? colors.y5 + : selected + ? colors.b7 + : colors.n7; + function onSelect() { if (isClearedField) { onUpdate('cleared', !(status === 'cleared')); @@ -451,7 +462,7 @@ function StatusCell({ style: { width: 13, height: 13, - color: statusProps.color, + color: statusColor, marginTop: status === 'due' ? -1 : 0, }, })} @@ -806,7 +817,6 @@ const Transaction = memo(function Transaction(props) { let backgroundFocus = focusedField === 'select'; let amountStyle = hideFraction ? { letterSpacing: -0.5 } : null; - let statusProps = getStatusProps(notes); let runningBalance = !isTemporaryId(id) ? balance : balance + (_inverse ? -1 : 1) * amount; @@ -822,7 +832,7 @@ const Transaction = memo(function Transaction(props) { : theme.tableBackground, }, { - ':hover': { + ':hover': !(backgroundFocus || selected) && { backgroundColor: theme.tableRowBackgroundHover, }, }, @@ -832,6 +842,7 @@ const Transaction = memo(function Transaction(props) { style, isPreview && { color: theme.tableTextInactive, + backgroundColor: '#fcfcfc', fontStyle: 'italic', }, _unmatched && { opacity: 0.5 }, @@ -1026,8 +1037,22 @@ const Transaction = memo(function Transaction(props) { {() => ( <View style={{ - color: statusProps.color, - backgroundColor: statusProps.backgroundColor, + color: + notes === 'missed' + ? colors.r6 + : notes === 'due' + ? colors.y4 + : selected + ? colors.b5 + : colors.n6, + backgroundColor: + notes === 'missed' + ? colors.r10 + : notes === 'due' + ? colors.y9 + : selected + ? colors.b8 + : colors.n10, margin: '0 5px', padding: '3px 7px', borderRadius: 4, diff --git a/packages/desktop-client/src/style/themes/light.ts b/packages/desktop-client/src/style/themes/light.ts index 19a8662673914a2643e27c4d11282f3bea026b8e..af72c18fedb573a9be7bb900f4fe991b9949d170 100644 --- a/packages/desktop-client/src/style/themes/light.ts +++ b/packages/desktop-client/src/style/themes/light.ts @@ -29,7 +29,7 @@ export const tableTextSelected = colorPalette.navy700; export const tableTextHover = colorPalette.navy900; export const tableTextEditing = colorPalette.navy50; export const tableTextEditingBackground = colorPalette.blue500; -export const tableTextInactive = colorPalette.navy200; +export const tableTextInactive = colorPalette.navy500; export const tableHeaderText = colorPalette.navy600; export const tableHeaderBackground = colorPalette.white; export const tableBorder = colorPalette.navy100; diff --git a/upcoming-release-notes/1533.md b/upcoming-release-notes/1533.md new file mode 100644 index 0000000000000000000000000000000000000000..67302f9f9499e03cd8b16deb2cbd39e299ccd74a --- /dev/null +++ b/upcoming-release-notes/1533.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [MatissJanis] +--- + +Fix schedule colors in transaction table