From 25e707070541b5e181fda4109211ec51e08a856f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 25 Nov 2022 14:08:34 -0600 Subject: [PATCH 1/5] SidebarNavigation: move Dashboard to top-level --- app/soapbox/components/sidebar-navigation.tsx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/app/soapbox/components/sidebar-navigation.tsx b/app/soapbox/components/sidebar-navigation.tsx index 18c104b16b..b4e8941e7c 100644 --- a/app/soapbox/components/sidebar-navigation.tsx +++ b/app/soapbox/components/sidebar-navigation.tsx @@ -16,7 +16,6 @@ const messages = defineMessages({ bookmarks: { id: 'column.bookmarks', defaultMessage: 'Bookmarks' }, lists: { id: 'column.lists', defaultMessage: 'Lists' }, developers: { id: 'navigation.developers', defaultMessage: 'Developers' }, - dashboard: { id: 'tabs_bar.dashboard', defaultMessage: 'Dashboard' }, all: { id: 'tabs_bar.all', defaultMessage: 'All' }, fediverse: { id: 'tabs_bar.fediverse', defaultMessage: 'Fediverse' }, }); @@ -72,15 +71,6 @@ const SidebarNavigation = () => { }); } - if (account.staff) { - menu.push({ - to: '/soapbox/admin', - icon: require('@tabler/icons/dashboard.svg'), - text: intl.formatMessage(messages.dashboard), - count: dashboardCount, - }); - } - if (features.publicTimeline) { menu.push(null); } @@ -170,6 +160,15 @@ const SidebarNavigation = () => { icon={require('@tabler/icons/settings.svg')} text={} /> + + {account.staff && ( + } + /> + )} )} From c7e04a682635ed26f9b8736cc37d2c7bf07e2835 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 25 Nov 2022 14:38:09 -0600 Subject: [PATCH 2/5] SidebarNavigation: move local and fediverse tabs to top-level Fixes https://gitlab.com/soapbox-pub/soapbox/-/issues/1091 --- .../components/sidebar-navigation-link.tsx | 2 +- app/soapbox/components/sidebar-navigation.tsx | 40 +++++++++---------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/app/soapbox/components/sidebar-navigation-link.tsx b/app/soapbox/components/sidebar-navigation-link.tsx index 5c9100f851..25d3a75eee 100644 --- a/app/soapbox/components/sidebar-navigation-link.tsx +++ b/app/soapbox/components/sidebar-navigation-link.tsx @@ -10,7 +10,7 @@ interface ISidebarNavigationLink { /** URL to an SVG icon. */ icon: string, /** Link label. */ - text: React.ReactElement, + text: React.ReactNode, /** Route to an internal page. */ to?: string, /** Callback when the link is clicked. */ diff --git a/app/soapbox/components/sidebar-navigation.tsx b/app/soapbox/components/sidebar-navigation.tsx index b4e8941e7c..a21475c3b5 100644 --- a/app/soapbox/components/sidebar-navigation.tsx +++ b/app/soapbox/components/sidebar-navigation.tsx @@ -16,8 +16,6 @@ const messages = defineMessages({ bookmarks: { id: 'column.bookmarks', defaultMessage: 'Bookmarks' }, lists: { id: 'column.lists', defaultMessage: 'Lists' }, developers: { id: 'navigation.developers', defaultMessage: 'Developers' }, - all: { id: 'tabs_bar.all', defaultMessage: 'All' }, - fediverse: { id: 'tabs_bar.fediverse', defaultMessage: 'Fediverse' }, }); /** Desktop sidebar with links to different views in the app. */ @@ -70,26 +68,6 @@ const SidebarNavigation = () => { text: intl.formatMessage(messages.developers), }); } - - if (features.publicTimeline) { - menu.push(null); - } - } - - if (features.publicTimeline) { - menu.push({ - to: '/timeline/local', - icon: features.federating ? require('@tabler/icons/users.svg') : require('@tabler/icons/world.svg'), - text: features.federating ? instance.title : intl.formatMessage(messages.all), - }); - } - - if (features.publicTimeline && features.federating) { - menu.push({ - to: '/timeline/fediverse', - icon: require('assets/icons/fediverse.svg'), - text: intl.formatMessage(messages.fediverse), - }); } return menu; @@ -172,6 +150,24 @@ const SidebarNavigation = () => { )} + {features.publicTimeline && ( + <> + } + /> + + {features.federating && ( + } + /> + )} + + )} + {menu.length > 0 && ( Date: Fri, 25 Nov 2022 14:40:57 -0600 Subject: [PATCH 3/5] SidebarNavigation: remove dashboardCount from "more" button, whoops --- app/soapbox/components/sidebar-navigation.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/app/soapbox/components/sidebar-navigation.tsx b/app/soapbox/components/sidebar-navigation.tsx index a21475c3b5..ab1b042411 100644 --- a/app/soapbox/components/sidebar-navigation.tsx +++ b/app/soapbox/components/sidebar-navigation.tsx @@ -172,7 +172,6 @@ const SidebarNavigation = () => { } /> From 631f3c37e382112e2261c7d77888b3612c2b9537 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 25 Nov 2022 14:42:11 -0600 Subject: [PATCH 4/5] Settings: put account move above account deletion --- app/soapbox/features/settings/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/soapbox/features/settings/index.tsx b/app/soapbox/features/settings/index.tsx index b8a7a33ec7..17c488a8b1 100644 --- a/app/soapbox/features/settings/index.tsx +++ b/app/soapbox/features/settings/index.tsx @@ -116,14 +116,15 @@ const Settings = () => { - {features.security && ( - - )} {features.federating && (features.accountMoving ? ( ) : features.accountAliases && ( ))} + + {features.security && ( + + )} From 0b191a3b9fb1df27e2c1fe8f552bc8ad67590396 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 25 Nov 2022 15:01:49 -0600 Subject: [PATCH 5/5] SoapboxConfig: fix selecting an SVG logo (but the backend errors) --- app/soapbox/features/soapbox-config/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/features/soapbox-config/index.tsx b/app/soapbox/features/soapbox-config/index.tsx index 72cd1de7d8..c651af4b36 100644 --- a/app/soapbox/features/soapbox-config/index.tsx +++ b/app/soapbox/features/soapbox-config/index.tsx @@ -202,7 +202,7 @@ const SoapboxConfig: React.FC = () => { >