From dffd344deb2cb57e888f676bc9082920b1755f27 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Thu, 6 Apr 2023 01:23:56 +0800 Subject: [PATCH] Allow Trending to be added to Shortcuts --- src/components/shortcuts-settings.jsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/components/shortcuts-settings.jsx b/src/components/shortcuts-settings.jsx index 4d3a1a1f..4ba5d95d 100644 --- a/src/components/shortcuts-settings.jsx +++ b/src/components/shortcuts-settings.jsx @@ -27,6 +27,7 @@ const TYPES = [ 'bookmarks', 'favourites', 'hashtag', + 'trending', ]; const TYPE_TEXT = { following: 'Home / Following', @@ -38,6 +39,7 @@ const TYPE_TEXT = { bookmarks: 'Bookmarks', favourites: 'Favourites', hashtag: 'Hashtag', + trending: 'Trending', }; const TYPE_PARAMS = { list: [ @@ -59,6 +61,14 @@ const TYPE_PARAMS = { placeholder: 'e.g. mastodon.social', }, ], + trending: [ + { + text: 'Instance', + name: 'instance', + type: 'text', + placeholder: 'e.g. mastodon.social', + }, + ], search: [ { text: 'Search term', @@ -118,6 +128,12 @@ export const SHORTCUTS_META = { path: ({ local, instance }) => `/${instance}/p${local ? '/l' : ''}`, icon: ({ local }) => (local ? 'group' : 'earth'), }, + trending: { + id: 'trending', + title: 'Trending', + path: ({ instance }) => `/${instance}/trending`, + icon: 'chart', + }, search: { id: 'search', title: ({ query }) => query,