diff --git a/packages/desktop-client/src/components/accounts/Balance.jsx b/packages/desktop-client/src/components/accounts/Balance.jsx index 0a0dc5c73503cbd63ecf4f3140c03208ebaeb013..fadd74d9c23d0d6d95871ff993c3befab782635e 100644 --- a/packages/desktop-client/src/components/accounts/Balance.jsx +++ b/packages/desktop-client/src/components/accounts/Balance.jsx @@ -174,21 +174,19 @@ export function Balances({ > <CellValue binding={{ ...balanceQuery, value: 0 }} type="financial"> {props => ( - <PrivacyFilter blurIntensity={5}> - <CellValueText - {...props} - style={{ - fontSize: 22, - fontWeight: 400, - color: - props.value < 0 - ? theme.errorText - : props.value > 0 - ? theme.noticeTextLight - : theme.pageTextSubdued, - }} - /> - </PrivacyFilter> + <CellValueText + {...props} + style={{ + fontSize: 22, + fontWeight: 400, + color: + props.value < 0 + ? theme.errorText + : props.value > 0 + ? theme.noticeTextLight + : theme.pageTextSubdued, + }} + /> )} </CellValue> diff --git a/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx b/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx index e5a600d7f6a3d6e005df157437c01e5ef2f878ec..bc107376c327b875d6da07c1ce6bdea4ce71d461 100644 --- a/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx +++ b/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx @@ -6,6 +6,8 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { css } from 'glamor'; + import { useFeatureFlag } from '../../hooks/useFeatureFlag'; import { SvgArrowThinRight } from '../../icons/v1'; import { type CSSProperties, theme, styles } from '../../style'; @@ -177,16 +179,18 @@ export function BalanceWithCarryover({ type={type} name={name} value={balanceValue} - style={{ - ...getBalanceStyle(balanceValue), - overflow: 'hidden', - textOverflow: 'ellipsis', - textAlign: 'right', - ...(!disabled && { - cursor: 'pointer', + className={String( + css({ + ...getBalanceStyle(balanceValue), + overflow: 'hidden', + textOverflow: 'ellipsis', + textAlign: 'right', + ...(!disabled && { + cursor: 'pointer', + }), + ':hover': { textDecoration: 'underline' }, }), - ':hover': { textDecoration: 'underline' }, - }} + )} /> </Tooltip> )} diff --git a/packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx b/packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx index 8e940b7ce3bee3f7b4e0c4fa69fb28373993ee3c..68599d33ad6d016d7ae0ce39a64979c989b52d4d 100644 --- a/packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx +++ b/packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx @@ -1,5 +1,7 @@ import React, { type ComponentProps, memo, useRef, useState } from 'react'; +import { css } from 'glamor'; + import { envelopeBudget } from 'loot-core/src/client/queries'; import { evalArithmetic } from 'loot-core/src/shared/arithmetic'; import * as monthUtils from 'loot-core/src/shared/months'; @@ -359,11 +361,13 @@ export const ExpenseCategoryMonth = memo(function ExpenseCategoryMonth({ {props => ( <CellValueText {...props} - style={{ - cursor: 'pointer', - ':hover': { textDecoration: 'underline' }, - ...makeAmountGrey(props.value), - }} + className={String( + css({ + cursor: 'pointer', + ':hover': { textDecoration: 'underline' }, + ...makeAmountGrey(props.value), + }), + )} /> )} </EnvelopeCellValue> @@ -472,10 +476,12 @@ export function IncomeCategoryMonth({ {props => ( <CellValueText {...props} - style={{ - cursor: 'pointer', - ':hover': { textDecoration: 'underline' }, - }} + className={String( + css({ + cursor: 'pointer', + ':hover': { textDecoration: 'underline' }, + }), + )} /> )} </EnvelopeCellValue> diff --git a/packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx b/packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx index 77183251e7b2cc271e13b4fd0201efd559d8fdcb..1093f16c6aa73ddd811ccf52f17fa6a339a9921e 100644 --- a/packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx +++ b/packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx @@ -2,6 +2,8 @@ import React, { type ComponentProps, memo, useRef, useState } from 'react'; import { Trans } from 'react-i18next'; +import { css } from 'glamor'; + import { trackingBudget } from 'loot-core/src/client/queries'; import { evalArithmetic } from 'loot-core/src/shared/arithmetic'; import * as monthUtils from 'loot-core/src/shared/months'; @@ -370,13 +372,15 @@ export const CategoryMonth = memo(function CategoryMonth({ {props => ( <CellValueText {...props} - style={{ - cursor: 'pointer', - ':hover': { - textDecoration: 'underline', - }, - ...makeAmountGrey(props.value), - }} + className={String( + css({ + cursor: 'pointer', + ':hover': { + textDecoration: 'underline', + }, + ...makeAmountGrey(props.value), + }), + )} /> )} </TrackingCellValue> diff --git a/packages/desktop-client/src/components/spreadsheet/CellValue.tsx b/packages/desktop-client/src/components/spreadsheet/CellValue.tsx index ab9380a31543301d0fe2ff63874a9376e7051d46..6274c89bb95e18432b8c0b2ef51792f95c4e1215 100644 --- a/packages/desktop-client/src/components/spreadsheet/CellValue.tsx +++ b/packages/desktop-client/src/components/spreadsheet/CellValue.tsx @@ -3,6 +3,7 @@ import React, { type ComponentPropsWithoutRef, type ReactNode } from 'react'; import { type CSSProperties, styles } from '../../style'; import { Text } from '../common/Text'; +import { PrivacyFilter } from '../PrivacyFilter'; import { type FormatType, useFormat } from './useFormat'; import { useSheetName } from './useSheetName'; @@ -51,6 +52,8 @@ export function CellValue< ); } +const PRIVACY_FILTER_TYPES = ['financial', 'financial-with-sign']; + type CellValueTextProps< SheetName extends SheetNames, FieldName extends SheetFields<SheetName>, @@ -87,7 +90,9 @@ export function CellValueText< data-cellname={name} {...props} > - {formatter ? formatter(value, type) : format(value, type)} + <PrivacyFilter activationFilters={[PRIVACY_FILTER_TYPES.includes(type)]}> + {formatter ? formatter(value, type) : format(value, type)} + </PrivacyFilter> </Text> ); } diff --git a/upcoming-release-notes/3472.md b/upcoming-release-notes/3472.md new file mode 100644 index 0000000000000000000000000000000000000000..6aa81cf1542f1d0e3b35eea4742f8a40317767e2 --- /dev/null +++ b/upcoming-release-notes/3472.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [joel-jeremy] +--- + +Fix privacy filters not activating