Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Crazypkr1099 authored Sep 9, 2023
2 parents ab31fd2 + 8ff89a5 commit 1a70e62
Show file tree
Hide file tree
Showing 26 changed files with 225 additions and 162 deletions.
58 changes: 21 additions & 37 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,28 @@ module.exports = {
parserOptions: { project: [path.join(__dirname, './tsconfig.json')] },
reportUnusedDisableDirectives: true,
rules: {
'prettier/prettier': 'error',
'prettier/prettier': 'warn',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
'warn',
{
args: 'none',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],

curly: ['error', 'multi-line', 'consistent'],
curly: ['warn', 'multi-line', 'consistent'],

'no-restricted-globals': ['error'].concat(
'no-restricted-globals': ['warn'].concat(
require('confusing-browser-globals').filter(g => g !== 'self'),
),

'react/jsx-no-useless-fragment': 'error',
'react/self-closing-comp': 'error',
'react/jsx-no-useless-fragment': 'warn',
'react/self-closing-comp': 'warn',

'rulesdir/typography': 'error',
'rulesdir/prefer-if-statement': 'error',
'rulesdir/typography': 'warn',
'rulesdir/prefer-if-statement': 'warn',

// https://github.com/eslint/eslint/issues/16954
// https://github.com/eslint/eslint/issues/16953
Expand All @@ -80,24 +80,24 @@ module.exports = {
'react/display-name': 'off',
'react/react-in-jsx-scope': 'off',
// 'react-hooks/exhaustive-deps': [
// 'error',
// 'warn',
// {
// additionalHooks: 'useLiveQuery',
// },
// ],

'import/extensions': [
'error',
'warn',
'never',
{
json: 'always',
},
],
'import/no-useless-path-segments': 'error',
'import/no-duplicates': ['error', { 'prefer-inline': true }],
'import/no-unused-modules': ['error', { unusedExports: true }],
'import/no-useless-path-segments': 'warn',
'import/no-duplicates': ['warn', { 'prefer-inline': true }],
'import/no-unused-modules': ['warn', { unusedExports: true }],
'import/order': [
'error',
'warn',
{
alphabetize: {
caseInsensitive: true,
Expand Down Expand Up @@ -126,7 +126,7 @@ module.exports = {
],

'no-restricted-syntax': [
'error',
'warn',
{
// forbid React.* as they are legacy https://twitter.com/dan_abramov/status/1308739731551858689
selector:
Expand All @@ -142,7 +142,7 @@ module.exports = {
},
],
'no-restricted-imports': [
'error',
'warn',
{ patterns: [...restrictedImportPatterns, ...restrictedImportColors] },
],

Expand All @@ -167,14 +167,14 @@ module.exports = {
],
rules: {
// enforce type over interface
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/consistent-type-definitions': ['warn', 'type'],
// enforce import type
'@typescript-eslint/consistent-type-imports': [
'error',
'warn',
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
],
'@typescript-eslint/ban-types': [
'error',
'warn',
{
types: {
// forbid FC as superflous
Expand All @@ -190,7 +190,7 @@ module.exports = {
files: ['./packages/loot-core/src/**/*'],
rules: {
'no-restricted-imports': [
'error',
'warn',
{
patterns: [
...restrictedImportPatterns,
Expand Down Expand Up @@ -225,7 +225,6 @@ module.exports = {
'./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/accounts/Header.*',
Expand Down Expand Up @@ -261,11 +260,6 @@ module.exports = {
'./packages/desktop-client/src/components/manager/ImportYNAB4.*',
'./packages/desktop-client/src/components/manager/ImportYNAB5.*',
'./packages/desktop-client/src/components/manager/WelcomeScreen.*',
'./packages/desktop-client/src/components/manager/subscribe/Bootstrap.*',
'./packages/desktop-client/src/components/manager/subscribe/ChangePassword.*',
'./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.*',
Expand All @@ -274,8 +268,8 @@ module.exports = {
'./packages/desktop-client/src/components/modals/GoCardlessExternalMsg.*',
'./packages/desktop-client/src/components/modals/ImportTransactions.*',
'./packages/desktop-client/src/components/modals/LoadBackup.*',
'./packages/desktop-client/src/components/modals/MergeUnusedPayees.*',
'./packages/desktop-client/src/components/modals/PlaidExternalMsg.*',
'./packages/desktop-client/src/components/modals/SelectLinkedAccounts.*',
'./packages/desktop-client/src/components/payees/index.*',
'./packages/desktop-client/src/components/reports/CashFlow.*',
'./packages/desktop-client/src/components/reports/Change.*',
Expand All @@ -287,23 +281,13 @@ module.exports = {
'./packages/desktop-client/src/components/reports/chart-theme.*',
'./packages/desktop-client/src/components/reports/graphs/CashFlowGraph.*',
'./packages/desktop-client/src/components/reports/graphs/NetWorthGraph.*',
'./packages/desktop-client/src/components/schedules/DiscoverSchedules.*',
'./packages/desktop-client/src/components/schedules/EditSchedule.*',
'./packages/desktop-client/src/components/schedules/LinkSchedule.*',
'./packages/desktop-client/src/components/schedules/PostsOfflineNotification.*',
'./packages/desktop-client/src/components/schedules/SchedulesTable.*',
'./packages/desktop-client/src/components/schedules/StatusBadge.*',
'./packages/desktop-client/src/components/schedules/index.*',
'./packages/desktop-client/src/components/select/DateSelect.*',
'./packages/desktop-client/src/components/select/RecurringSchedulePicker.*',
'./packages/desktop-client/src/components/settings/Encryption.*',
'./packages/desktop-client/src/components/settings/Experimental.*',
'./packages/desktop-client/src/components/settings/FixSplits.*',
'./packages/desktop-client/src/components/settings/Format.*',
'./packages/desktop-client/src/components/settings/Global.*',
'./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/transactions/TransactionsTable.*',
'./packages/desktop-client/src/components/util/AmountInput.*',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createBudget } from 'loot-core/src/client/actions/budgets';
import { loggedIn } from 'loot-core/src/client/actions/user';
import { send } from 'loot-core/src/platform/client/fetch';

import { colors } from '../../../style';
import { theme } from '../../../style';
import Button from '../../common/Button';
import ExternalLink from '../../common/ExternalLink';
import Paragraph from '../../common/Paragraph';
Expand Down Expand Up @@ -56,12 +56,12 @@ export default function Bootstrap() {
return (
<View style={{ maxWidth: 450, marginTop: -30 }}>
<Title text="Welcome to Actual!" />
<Paragraph style={{ fontSize: 16, color: colors.n2 }}>
<Paragraph style={{ fontSize: 16, color: theme.pageTextDark }}>
Actual is a super fast privacy-focused app for managing your finances.
To secure your data, you’ll need to set a password for your server.
</Paragraph>

<Paragraph isLast style={{ fontSize: 16, color: colors.n2 }}>
<Paragraph isLast style={{ fontSize: 16, color: theme.pageTextDark }}>
Consider opening{' '}
<ExternalLink to="https://actualbudget.org/docs/tour/">
our tour
Expand All @@ -74,7 +74,7 @@ export default function Bootstrap() {
<Text
style={{
marginTop: 20,
color: colors.r4,
color: theme.errorText,
borderRadius: 4,
fontSize: 15,
}}
Expand All @@ -87,7 +87,7 @@ export default function Bootstrap() {
buttons={
<Button
type="bare"
style={{ fontSize: 15, color: colors.b4, marginRight: 15 }}
style={{ fontSize: 15, color: theme.pageTextLink, marginRight: 15 }}
onClick={onDemo}
>
Try Demo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useNavigate } from 'react-router-dom';

import { send } from 'loot-core/src/platform/client/fetch';

import { colors } from '../../../style';
import { theme } from '../../../style';
import Button from '../../common/Button';
import Text from '../../common/Text';
import View from '../../common/View';
Expand Down Expand Up @@ -48,7 +48,7 @@ export default function ChangePassword() {
<Text
style={{
fontSize: 16,
color: colors.n2,
color: theme.pageTextDark,
lineHeight: 1.4,
}}
>
Expand All @@ -60,7 +60,7 @@ export default function ChangePassword() {
<Text
style={{
marginTop: 20,
color: colors.r4,
color: theme.errorText,
borderRadius: 4,
fontSize: 15,
}}
Expand All @@ -73,7 +73,7 @@ export default function ChangePassword() {
<Text
style={{
marginTop: 20,
color: colors.g4,
color: theme.noticeText,
borderRadius: 4,
fontSize: 15,
}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useNavigate, useLocation } from 'react-router-dom';

import { colors } from '../../../style';
import { theme } from '../../../style';
import Button from '../../common/Button';
import Text from '../../common/Text';
import View from '../../common/View';
Expand All @@ -25,11 +25,11 @@ export default function Error() {
}

return (
<View style={{ alignItems: 'center' }}>
<View style={{ alignItems: 'center', color: theme.pageText }}>
<Text
style={{
fontSize: 16,
color: colors.n2,
color: theme.pageTextDark,
lineHeight: 1.4,
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createBudget } from 'loot-core/src/client/actions/budgets';
import { loggedIn } from 'loot-core/src/client/actions/user';
import { send } from 'loot-core/src/platform/client/fetch';

import { colors } from '../../../style';
import { theme } from '../../../style';
import Button, { ButtonWithLoading } from '../../common/Button';
import { BigInput } from '../../common/Input';
import Text from '../../common/Text';
Expand Down Expand Up @@ -59,12 +59,12 @@ export default function Login() {
}

return (
<View style={{ maxWidth: 450, marginTop: -30 }}>
<View style={{ maxWidth: 450, marginTop: -30, color: theme.pageText }}>
<Title text="Sign in to this Actual instance" />
<Text
style={{
fontSize: 16,
color: colors.n2,
color: theme.pageTextDark,
lineHeight: 1.4,
}}
>
Expand All @@ -76,7 +76,7 @@ export default function Login() {
<Text
style={{
marginTop: 20,
color: colors.r4,
color: theme.errorText,
borderRadius: 4,
fontSize: 15,
}}
Expand Down Expand Up @@ -115,7 +115,7 @@ export default function Login() {
>
<Button
type="bare"
style={{ fontSize: 15, color: colors.b4, marginLeft: 10 }}
style={{ fontSize: 15, color: theme.pageTextLink, marginLeft: 10 }}
onClick={onDemo}
>
Try Demo &rarr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useNavigate, useLocation } from 'react-router-dom';

import { send } from 'loot-core/src/platform/client/fetch';

import { colors } from '../../../style';
import { theme } from '../../../style';
import { useSetServerURL } from '../../ServerContext';

// There are two URLs that dance with each other: `/login` and
Expand Down Expand Up @@ -78,7 +78,7 @@ export function Title({ text }: TitleProps) {
style={{
fontSize: 40,
fontWeight: 700,
color: colors.p3,
color: theme.pageTextPositive,
marginBottom: 20,
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { useDispatch, useSelector } from 'react-redux';
import { replaceModal } from 'loot-core/src/client/actions/modals';
import { send } from 'loot-core/src/platform/client/fetch';

import { colors } from '../../style';
import { theme } from '../../style';
import { Information } from '../alerts';
import Button from '../common/Button';
import Modal, { ModalButtons } from '../common/Modal';
import Paragraph from '../common/Paragraph';
import Text from '../common/Text';
import View from '../common/View';

let highlightStyle = { color: colors.p5 };
let highlightStyle = { color: theme.pageTextPositive };

export default function MergeUnusedPayees({
modalProps,
Expand Down Expand Up @@ -141,7 +141,7 @@ export default function MergeUnusedPayees({
style={{
fontSize: 13,
marginTop: 10,
color: colors.n4,
color: theme.pageTextLight,
userSelect: 'none',
display: 'flex',
alignItems: 'center',
Expand Down
Loading

0 comments on commit 1a70e62

Please sign in to comment.