A local-first personal finance app
move “Find schedules” to a button on the Schedules page
Jed Fox3bda11600e67
diff --git a/packages/desktop-client/src/components/schedules/index.js b/packages/desktop-client/src/components/schedules/index.jsindex 96fdf05b6f..415d7c727b 100644--- a/packages/desktop-client/src/components/schedules/index.js+++ b/packages/desktop-client/src/components/schedules/index.js@@ -27,6 +27,10 @@ export default function Schedules() {history.push(`/schedule/edit`, { locationPtr: history.location });}+ function onDiscover() {+ history.push(`/schedule/discover`, { locationPtr: history.location });+ }+async function onAction(name, id) {switch (name) {case 'post-transaction':@@ -70,7 +74,15 @@ export default function Schedules() {/></View>- <View style={{ alignItems: 'flex-end', margin: '20px 0', flexShrink: 0 }}>+ <View+ style={{+ flexDirection: 'row',+ justifyContent: 'space-between',+ margin: '20px 0',+ flexShrink: 0+ }}+ >+ <Button onClick={onDiscover}>Find schedules…</Button><Button primary onClick={onAdd}>Add new schedule</Button>diff --git a/packages/loot-design/src/components/sidebar.js b/packages/loot-design/src/components/sidebar.jsindex a5f0218c0d..c8acde3749 100644--- a/packages/loot-design/src/components/sidebar.js+++ b/packages/loot-design/src/components/sidebar.js@@ -439,7 +439,6 @@ function Tools() {let items = [{ name: 'payees', text: 'Payees' },{ name: 'rules', text: 'Rules' },- { name: 'find-schedules', text: 'Find schedules' },{ name: 'repair-splits', text: 'Repair split transactions' }];@@ -452,9 +451,6 @@ function Tools() {case 'rules':history.push('/rules');break;- case 'find-schedules':- history.push('/schedule/discover');- break;case 'repair-splits':history.push('/tools/fix-splits', { locationPtr: history.location });break;@@ -474,12 +470,9 @@ function Tools() {onClick={onToggle}style={{ pointerEvents: isOpen ? 'none' : 'auto' }}forceHover={isOpen}- forceActive={[- '/payees',- '/rules',- '/tools',- '/schedule/discover'- ].some(route => location.pathname.startsWith(route))}+ forceActive={['/payees', '/rules', '/tools'].some(route =>+ location.pathname.startsWith(route)+ )}button={<ChevronRightwidth={12}