From ae1da4c3e829607cc17b00774829dcf2edb8790f Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Mon, 21 Oct 2024 17:48:06 +0900 Subject: [PATCH] feat: add 6 new bottom nav buttons (#3011) --- components/nav/NavBottom.vue | 21 ++++++++++++++++++++- components/nav/button/Bookmark.vue | 11 +++++++++++ components/nav/button/Compose.vue | 11 +++++++++++ components/nav/button/Favorite.vue | 11 +++++++++++ components/nav/button/Hashtag.vue | 11 +++++++++++ components/nav/button/List.vue | 17 +++++++++++++++++ components/settings/SettingsBottomNav.vue | 5 +++++ composables/settings/definition.ts | 2 +- 8 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 components/nav/button/Bookmark.vue create mode 100644 components/nav/button/Compose.vue create mode 100644 components/nav/button/Favorite.vue create mode 100644 components/nav/button/Hashtag.vue create mode 100644 components/nav/button/List.vue diff --git a/components/nav/NavBottom.vue b/components/nav/NavBottom.vue index fdc10d529..4ab9e1598 100644 --- a/components/nav/NavBottom.vue +++ b/components/nav/NavBottom.vue @@ -2,7 +2,21 @@ import type { Component } from 'vue' import type { NavButtonName } from '../../composables/settings' -import { NavButtonExplore, NavButtonFederated, NavButtonHome, NavButtonLocal, NavButtonMention, NavButtonMoreMenu, NavButtonNotification, NavButtonSearch } from '#components' +import { + NavButtonBookmark, + NavButtonCompose, + NavButtonExplore, + NavButtonFavorite, + NavButtonFederated, + NavButtonHashtag, + NavButtonHome, + NavButtonList, + NavButtonLocal, + NavButtonMention, + NavButtonMoreMenu, + NavButtonNotification, + NavButtonSearch, +} from '#components' import { STORAGE_KEY_BOTTOM_NAV_BUTTONS } from '~/constants' @@ -16,9 +30,14 @@ const navButtons: NavButton[] = [ { name: 'search', component: NavButtonSearch }, { name: 'notification', component: NavButtonNotification }, { name: 'mention', component: NavButtonMention }, + { name: 'favorite', component: NavButtonFavorite }, + { name: 'bookmark', component: NavButtonBookmark }, + { name: 'compose', component: NavButtonCompose }, { name: 'explore', component: NavButtonExplore }, { name: 'local', component: NavButtonLocal }, { name: 'federated', component: NavButtonFederated }, + { name: 'list', component: NavButtonList }, + { name: 'hashtag', component: NavButtonHashtag }, { name: 'moreMenu', component: NavButtonMoreMenu }, ] diff --git a/components/nav/button/Bookmark.vue b/components/nav/button/Bookmark.vue new file mode 100644 index 000000000..eee0c7b60 --- /dev/null +++ b/components/nav/button/Bookmark.vue @@ -0,0 +1,11 @@ + + + diff --git a/components/nav/button/Compose.vue b/components/nav/button/Compose.vue new file mode 100644 index 000000000..63831c801 --- /dev/null +++ b/components/nav/button/Compose.vue @@ -0,0 +1,11 @@ + + + diff --git a/components/nav/button/Favorite.vue b/components/nav/button/Favorite.vue new file mode 100644 index 000000000..fee4ebcbd --- /dev/null +++ b/components/nav/button/Favorite.vue @@ -0,0 +1,11 @@ + + + diff --git a/components/nav/button/Hashtag.vue b/components/nav/button/Hashtag.vue new file mode 100644 index 000000000..af48d09f4 --- /dev/null +++ b/components/nav/button/Hashtag.vue @@ -0,0 +1,11 @@ + + + diff --git a/components/nav/button/List.vue b/components/nav/button/List.vue new file mode 100644 index 000000000..13a961dc0 --- /dev/null +++ b/components/nav/button/List.vue @@ -0,0 +1,17 @@ + + + diff --git a/components/settings/SettingsBottomNav.vue b/components/settings/SettingsBottomNav.vue index e75a41548..5a810972f 100644 --- a/components/settings/SettingsBottomNav.vue +++ b/components/settings/SettingsBottomNav.vue @@ -13,9 +13,14 @@ const availableNavButtons: NavButton[] = [ { name: 'search', label: 'nav.search', icon: 'i-ri:search-line' }, { name: 'notification', label: 'nav.notifications', icon: 'i-ri:notification-4-line' }, { name: 'mention', label: 'nav.conversations', icon: 'i-ri:at-line' }, + { name: 'favorite', label: 'nav.favourites', icon: 'i-ri:heart-line' }, + { name: 'bookmark', label: 'nav.bookmarks', icon: 'i-ri:bookmark-line' }, + { name: 'compose', label: 'nav.compose', icon: 'i-ri:quill-pen-line' }, { name: 'explore', label: 'nav.explore', icon: 'i-ri:compass-3-line' }, { name: 'local', label: 'nav.local', icon: 'i-ri:group-2-line' }, { name: 'federated', label: 'nav.federated', icon: 'i-ri:earth-line' }, + { name: 'list', label: 'nav.lists', icon: 'i-ri:list-check' }, + { name: 'hashtag', label: 'nav.hashtags', icon: 'i-ri:hashtag' }, { name: 'moreMenu', label: 'nav.more_menu', icon: 'i-ri:more-fill' }, ] as const diff --git a/composables/settings/definition.ts b/composables/settings/definition.ts index c54c97368..98f3c3371 100644 --- a/composables/settings/definition.ts +++ b/composables/settings/definition.ts @@ -7,7 +7,7 @@ export type OldFontSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' export type ColorMode = 'light' | 'dark' | 'system' -export type NavButtonName = 'home' | 'search' | 'notification' | 'mention' | 'explore' | 'local' | 'federated' | 'moreMenu' +export type NavButtonName = 'home' | 'search' | 'notification' | 'mention' | 'favorite' | 'bookmark' | 'compose' | 'explore' | 'local' | 'federated' | 'list' | 'hashtag' | 'setting' | 'moreMenu' export interface PreferencesSettings { hideAltIndicatorOnPosts: boolean