Skip to content

Commit

Permalink
Merge branch 'actualbudget:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Crazypkr1099 authored Oct 11, 2023
2 parents 7975ddb + 4cacc84 commit 007f1a0
Show file tree
Hide file tree
Showing 170 changed files with 2,400 additions and 1,552 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Funding policies: https://actualbudget.org/docs/contributing/leadership/funding
open_collective: actual
github: actualbudget
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions packages/desktop-client/e2e/schedules.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,15 @@ test.describe('Schedules', () => {
'Show completed schedules',
);
await expect(page).toHaveScreenshot(screenshotConfig(page));

// Schedules search shouldn't shrink with many schedules
for (let i = 0; i < 15; i++) {
await schedulesPage.addNewSchedule({
payee: 'Home Depot',
account: 'HSBC',
amount: 0,
});
}
await expect(page).toHaveScreenshot(screenshotConfig(page));
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions packages/desktop-client/globals.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Allow images to be imported
declare module '*.png';
3 changes: 2 additions & 1 deletion packages/desktop-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@actual-app/web",
"version": "23.9.0",
"version": "23.10.0",
"license": "MIT",
"files": [
"build"
Expand Down Expand Up @@ -56,6 +56,7 @@
"react-simple-pull-to-refresh": "^1.3.3",
"react-spring": "^9.7.1",
"react-virtualized-auto-sizer": "^1.0.2",
"recharts": "^2.8.0",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"remark-gfm": "^3.0.1",
Expand Down
25 changes: 25 additions & 0 deletions packages/desktop-client/src/components/Modals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import ManageRulesModal from './modals/ManageRulesModal';
import MergeUnusedPayees from './modals/MergeUnusedPayees';
import PlaidExternalMsg from './modals/PlaidExternalMsg';
import SelectLinkedAccounts from './modals/SelectLinkedAccounts';
import SingleInput from './modals/SingleInput';
import DiscoverSchedules from './schedules/DiscoverSchedules';
import ScheduleDetails from './schedules/EditSchedule';
import ScheduleLink from './schedules/LinkSchedule';
Expand Down Expand Up @@ -222,6 +223,30 @@ export default function Modals() {
/>
);

case 'new-category':
return (
<SingleInput
modalProps={modalProps}
title="New Category"
inputPlaceholder="Name"
buttonText="Add"
onValidate={options.onValidate}
onSubmit={options.onSubmit}
/>
);

case 'new-category-group':
return (
<SingleInput
modalProps={modalProps}
title="New Category Group"
inputPlaceholder="Name"
buttonText="Add"
onValidate={options.onValidate}
onSubmit={options.onSubmit}
/>
);

case 'budget-summary':
return (
<BudgetSummary
Expand Down
8 changes: 4 additions & 4 deletions packages/desktop-client/src/components/Notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function Notification({
style={{
marginTop: 10,
color: positive
? theme.alt4NoticeText
? theme.noticeText
: error
? theme.alt3ErrorText
: theme.alt4WarningText,
Expand All @@ -121,13 +121,13 @@ function Notification({
padding: '14px 14px',
fontSize: 14,
backgroundColor: positive
? theme.alt2NoticeBackground
? theme.noticeBackgroundLight
: error
? theme.errorBackground
: theme.alt2WarningBackground,
borderTop: `3px solid ${
positive
? theme.altNoticeAccent
? theme.noticeBorder
: error
? theme.altErrorAccent
: theme.altWarningAccent
Expand Down Expand Up @@ -173,7 +173,7 @@ function Notification({
backgroundColor: 'transparent',
border: `1px solid ${
positive
? theme.altNoticeAccent
? theme.noticeBorder
: error
? theme.altErrorAccent
: theme.altWarningAccent
Expand Down
59 changes: 35 additions & 24 deletions packages/desktop-client/src/components/Titlebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import Link from './common/Link';
import Paragraph from './common/Paragraph';
import Text from './common/Text';
import View from './common/View';
import { KeyHandlers } from './KeyHandlers';
import LoggedInUser from './LoggedInUser';
import { useServerURL } from './ServerContext';
import { useSidebar } from './sidebar';
Expand Down Expand Up @@ -173,30 +174,40 @@ export function SyncButton({ style, isMobile = false }: SyncButtonProps) {
: {};

return (
<Button
type="bare"
style={{
...style,
WebkitAppRegion: 'none',
color: isMobile ? mobileColor : desktopColor,
}}
hoveredStyle={activeStyle}
activeStyle={activeStyle}
onClick={sync}
>
{syncState === 'error' ? (
<AlertTriangle width={13} />
) : (
<AnimatedRefresh animating={syncing} />
)}
<Text style={{ marginLeft: 3 }}>
{syncState === 'disabled'
? 'Disabled'
: syncState === 'offline'
? 'Offline'
: 'Sync'}
</Text>
</Button>
<>
<KeyHandlers
keys={{
'ctrl+s, cmd+s': () => {
sync();
},
}}
/>

<Button
type="bare"
style={{
...style,
WebkitAppRegion: 'none',
color: isMobile ? mobileColor : desktopColor,
}}
hoveredStyle={activeStyle}
activeStyle={activeStyle}
onClick={sync}
>
{syncState === 'error' ? (
<AlertTriangle width={13} />
) : (
<AnimatedRefresh animating={syncing} />
)}
<Text style={{ marginLeft: 3 }}>
{syncState === 'disabled'
? 'Disabled'
: syncState === 'offline'
? 'Offline'
: 'Sync'}
</Text>
</Button>
</>
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/accounts/Balance.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export function Balances({
value < 0
? theme.errorText
: value > 0
? theme.noticeText
? theme.noticeTextLight
: theme.pageTextSubdued,
})}
privacyFilter={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function AccountCard({ account, updated, getBalanceQuery, onSelect }) {
{account.bankId && (
<View
style={{
backgroundColor: theme.noticeText,
backgroundColor: theme.noticeBackgroundDark,
marginLeft: '-23px',
width: 8,
height: 8,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function ReconcilingMessage({
{targetDiff === 0 ? (
<View
style={{
color: theme.noticeText,
color: theme.noticeTextLight,
flex: 1,
flexDirection: 'row',
alignItems: 'center',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ type SingleAutocompleteProps = {
openOnFocus?: boolean;
getHighlightedIndex?: (suggestions) => number | null;
highlightFirst?: boolean;
onUpdate: (id: unknown, value: string) => void;
onUpdate?: (id: unknown, value: string) => void;
strict?: boolean;
onSelect: (id: unknown, value: string) => void;
tableBehavior?: boolean;
Expand Down Expand Up @@ -398,7 +398,7 @@ function SingleAutocomplete({
},
onBlur: e => {
// Should this be e.nativeEvent
e.preventDownshiftDefault = true;
e['preventDownshiftDefault'] = true;
inputProps.onBlur?.(e);

if (!closeOnBlur) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function CategoryList({
alignItems: 'center',
fontSize: 11,
fontWeight: 500,
color: theme.noticeAccent,
color: theme.noticeTextMenu,
padding: '6px 8px',
':active': {
backgroundColor: 'rgba(100, 100, 100, .25)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function PayeeList({
<View
style={{
display: 'block',
color: theme.noticeAccent,
color: theme.noticeTextMenu,
borderRadius: 4,
fontSize: isNarrowWidth ? 'inherit' : 11,
fontWeight: 500,
Expand Down
6 changes: 3 additions & 3 deletions packages/desktop-client/src/components/budget/BudgetTotals.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const BudgetTotals = memo(function BudgetTotals({
>
<Menu
onMenuSelect={type => {
if (type === 'toggleVisibility') {
if (type === 'toggle-visibility') {
toggleHiddenCategories();
} else if (type === 'expandAllCategories') {
expandAllCategories();
Expand All @@ -80,8 +80,8 @@ const BudgetTotals = memo(function BudgetTotals({
}}
items={[
{
name: 'toggleVisibility',
text: 'Toggle hidden',
name: 'toggle-visibility',
text: 'Toggle hidden categories',
},
{
name: 'expandAllCategories',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ import { Row } from '../table';
import RenderMonths from './RenderMonths';
import SidebarGroup from './SidebarGroup';

type IncomeGroupProps = {
group: {
id: string;
hidden: number;
categories: object[];
is_income: number;
name: string;
sort_order: number;
tombstone: number;
};
editingCell: { id: string; cell: string } | null;
collapsed: boolean;
MonthComponent: () => JSX.Element;
onEditName: (id: string) => void;
onSave: (group: object) => Promise<void>;
onToggleCollapse: (id: string) => void;
onShowNewCategory: (groupId: string) => void;
};

function IncomeGroup({
group,
editingCell,
Expand All @@ -15,7 +34,7 @@ function IncomeGroup({
onSave,
onToggleCollapse,
onShowNewCategory,
}) {
}: IncomeGroupProps) {
return (
<Row
collapsed={true}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { type ReactNode } from 'react';
import React from 'react';

import Button from '../common/Button';
import View from '../common/View';

import RenderMonths from './RenderMonths';

type IncomeHeaderProps = {
MonthComponent?: ReactNode;
MonthComponent?: () => JSX.Element;
onShowNewGroup: () => void;
};

Expand All @@ -27,8 +27,6 @@ function IncomeHeader({ MonthComponent, onShowNewGroup }: IncomeHeaderProps) {
<RenderMonths
component={MonthComponent}
style={{ border: 0, justifyContent: 'flex-end' }}
editingIndex={undefined}
args={undefined}
/>
</View>
);
Expand Down
Loading

0 comments on commit 007f1a0

Please sign in to comment.