diff --git a/src/app.jsx b/src/app.jsx index 7021c1b9e0..b57b15b6ce 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -603,7 +603,8 @@ function SecondaryRoutes({ isLoggedIn }) { } /> } /> - } /> + } /> + } /> } /> } /> diff --git a/src/components/ICONS.jsx b/src/components/ICONS.jsx index ffff4f5270..c3f91d65ec 100644 --- a/src/components/ICONS.jsx +++ b/src/components/ICONS.jsx @@ -187,4 +187,5 @@ export const ICONS = { edit: () => import('@iconify-icons/mingcute/edit-4-line'), 'zoom-in': () => import('@iconify-icons/mingcute/zoom-in-line'), 'zoom-out': () => import('@iconify-icons/mingcute/zoom-out-line'), + star2: () => import('@iconify-icons/mingcute/star-2-line'), }; diff --git a/src/components/nav-menu.jsx b/src/components/nav-menu.jsx index 934ce5ec24..16afd998bb 100644 --- a/src/components/nav-menu.jsx +++ b/src/components/nav-menu.jsx @@ -349,6 +349,15 @@ function NavMenu(props) { Local + {(supports('@chuckya/bubble-timeline') || + supports('@akkoma/bubble-timeline')) && ( + + {' '} + + Bubble + + + )} {' '} diff --git a/src/components/shortcuts-settings.jsx b/src/components/shortcuts-settings.jsx index a7e6e48bd9..944aae8b64 100644 --- a/src/components/shortcuts-settings.jsx +++ b/src/components/shortcuts-settings.jsx @@ -48,7 +48,7 @@ const TYPE_TEXT = { following: msg`Home / Following`, notifications: msg`Notifications`, list: msg`Lists`, - public: msg`Public (Local / Federated)`, + public: msg`Local / Bubble / Federated`, search: msg`Search`, 'account-statuses': msg`Account`, bookmarks: msg`Bookmarks`, @@ -67,9 +67,23 @@ const TYPE_PARAMS = { ], public: [ { - text: msg`Local only`, - name: 'local', - type: 'checkbox', + text: msg`Type`, + name: 'variant', + type: 'select', + values: [ + { + name: msg`Local`, + value: 'local', + }, + { + name: msg`Bubble`, + value: 'bubble', + }, + { + name: msg`Federated`, + value: 'federated', + }, + ], }, { text: msg`Instance`, @@ -162,10 +176,27 @@ export const SHORTCUTS_META = { }, public: { id: 'public', - title: ({ local }) => (local ? t`Local` : t`Federated`), + title: ({ variant }) => + ({ + local: t`Local`, + bubble: t`Bubble`, + federated: t`Federated`, + })[variant], subtitle: ({ instance }) => instance || api().instance, - path: ({ local, instance }) => `/${instance}/p${local ? '/l' : ''}`, - icon: ({ local }) => (local ? 'building' : 'earth'), + path: ({ variant, instance }) => { + const suffix = { + local: '/l', + bubble: '/b', + federated: '', + }[variant]; + return `/${instance}/p${suffix}`; + }, + icon: ({ variant }) => + ({ + local: 'building', + bubble: 'star2', + federated: 'earth', + })[variant], }, trending: { id: 'trending', @@ -640,7 +671,15 @@ function ShortcutForm({

{TYPE_PARAMS[currentType]?.map?.( - ({ text, name, type, placeholder, pattern, notRequired }) => { + ({ + text, + name, + type, + placeholder, + pattern, + notRequired, + values, + }) => { if (currentType === 'list') { return (

@@ -663,6 +702,28 @@ function ShortcutForm({

); + } else if (type === 'select') { + let options = values.map(({ name, value }) => ( + + )); + + return ( +

+ +

+ ); } return ( @@ -893,7 +954,7 @@ function ImportExport({ shortcuts, onClose }) { shortcut[name] ? ( <>