From 6f57bce3aac31f1d19bbd3649a3d4aa877bacde4 Mon Sep 17 00:00:00 2001 From: Crimekillz Date: Wed, 1 May 2024 00:31:24 +0200 Subject: [PATCH] Snippets: Unify Clips & Bookmarks --- README.md | 8 +- locales/en-US.yml | 1 + locales/ja-JP.yml | 1 + packages/client/src/components/MkSearch.vue | 2 +- packages/client/src/navbar.ts | 27 +- packages/client/src/pages/clip.vue | 2 +- packages/client/src/pages/favorites.vue | 63 ----- packages/client/src/pages/my-clips/index.vue | 118 --------- .../client/src/pages/my-snippets/index.vue | 234 ++++++++++++++++++ packages/client/src/pages/user/home.vue | 8 +- packages/client/src/router.ts | 9 +- packages/client/src/scripts/get-note-menu.ts | 4 +- packages/client/src/store.ts | 7 +- 13 files changed, 263 insertions(+), 221 deletions(-) delete mode 100644 packages/client/src/pages/favorites.vue delete mode 100644 packages/client/src/pages/my-clips/index.vue create mode 100644 packages/client/src/pages/my-snippets/index.vue diff --git a/README.md b/README.md index 9138cf711..827b3aba9 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ __2024.04.1 is out!__ --- - Highlighted changes: - Achievements adopting code from Sharkey/Misskey + - Unified Bookmarks and Clips (Snippets, dev branch) - Chomp! Activity Support (Patch adopted [from mia](https://iceshrimp.dev/mia/withdrawal)) - Fast🚜 Scream🚜 Mod🔌 Tracker/SID playback support (Thanks to [Jeder](https://iceshrimp.dev/iceshrimp/iceshrimp/pulls/490)) - Suppress the "You haven't configured mail" message (Patch adopted [from mia](https://iceshrimp.dev/mia/withdrawal)) @@ -26,15 +27,20 @@ __2024.04.1 is out!__ - Allow federation via Tor / i2p - Allow proxying of videos and audio content (Thanks to ShittyKopper) - Post language selection and translate functionality by Namekuji + - Profile pictures can be viewed fullscreen (dev branch) + - Accessibility settings in the unauthenticated web viewer (dev branch) - So much more - Read the [changelog](CHANGELOG.md) to get an overview of all changes - Planned changes: - Unified Lists and News UI - New central Messenger UI unifying Chats, Groups, Channels and Announcements + - Unified Exploration and Search of Users, Posts, Channels + - E2E encrypted messaging - Improvements for single-user instances, anonymous and pseudonymous federation via Tor / i2p - Posts Health/XP Bar to indicate how many ppl have reported a post vs. interaction rate - Train Table Delay Captcha - Individual session revocation and One Time Access Tokens - - Accessibility settings in the unauthenticated web viewer +- Need Ideas for: + - Better integration of User Gallery and Pages - Don't like the Web UI? Good luck, the Mastodon-compatible API might work with the following clients: - [Elk](https://elk.zone), [Phanpy](https://phanpy.social/), [Enafore](https://enafore.social/), [Masto-FE-standalone](https://iceshrimp.dev/iceshrimp/masto-fe-standalone) (Web) - [Mona](https://apps.apple.com/us/app/mona-for-mastodon/id1659154653), [Toot!](https://apps.apple.com/us/app/toot-for-mastodon/id1229021451), [Ice Cubes](https://apps.apple.com/us/app/ice-cubes-for-mastodon/id6444915884), [Tusker](https://apps.apple.com/us/app/tusker/id1498334597), [Feditext](https://github.com/feditext/feditext), [Mastodon](https://apps.apple.com/us/app/mastodon-for-iphone-and-ipad/id1571998974) (iOS) diff --git a/locales/en-US.yml b/locales/en-US.yml index 041de9134..a93d46f17 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -36,6 +36,7 @@ save: "Save" users: "Users" addUser: "Add a user" addInstance: "Add a server" +snippets: "Snippets" favorite: "Add to bookmarks" favorites: "Bookmarks" unfavorite: "Remove from bookmarks" diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 68b5bd495..f49ec6dd3 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -36,6 +36,7 @@ addUser: "ユーザーを追加" addInstance: "サーバーを追加" favorite: "お気に入り" favorites: "お気に入り" +snippets: "Snippets" unfavorite: "お気に入り解除" favorited: "お気に入りに登録しました。" alreadyFavorited: "既にお気に入りに登録されています。" diff --git a/packages/client/src/components/MkSearch.vue b/packages/client/src/components/MkSearch.vue index 95628a242..cdd8d81fe 100644 --- a/packages/client/src/components/MkSearch.vue +++ b/packages/client/src/components/MkSearch.vue @@ -97,7 +97,7 @@ async function openSearchFilters(ev) { }, }, { - icon: "ph-bookmark-simple ph-bold ph-lg", + icon: "ph-bookmarks ph-bold ph-lg", text: i18n.ts._filters.inBookmarks, action: () => { appendSearchFilter("in:bookmarks"); diff --git a/packages/client/src/navbar.ts b/packages/client/src/navbar.ts index 04d056a14..9c1712d81 100644 --- a/packages/client/src/navbar.ts +++ b/packages/client/src/navbar.ts @@ -22,7 +22,7 @@ export const navbarItemDef = reactive({ title: "messaging", icon: "ph-tornado ph-bold ph-lg", show: computed(() => $i != null), - indicated: computed(() => $i?.hasUnreadMessagingMessage), + indicated: computed(() => $i?.hasUnreadMessagingMessage || $i?.hasUnreadAnnouncement), to: "/my/messaging", }, drive: { @@ -43,12 +43,6 @@ export const navbarItemDef = reactive({ icon: "ph-hash ph-bold ph-lg", to: "/explore", }, - announcements: { - title: "announcements", - icon: "ph-megaphone-simple ph-bold ph-lg", - indicated: computed(() => $i?.hasUnreadAnnouncement), - to: "/announcements", - }, search: { title: "search", icon: "ph-magnifying-glass ph-bold ph-lg", @@ -74,11 +68,11 @@ export const navbarItemDef = reactive({ show: computed(() => $i != null), to: "/my/antennas", }, - favorites: { - title: "favorites", - icon: "ph-bookmark-simple ph-bold ph-lg", + snippets: { + title: "snippets", + icon: "ph-bookmark ph-bold ph-lg", show: computed(() => $i != null), - to: "/my/favorites", + to: "/my/snippets", }, pages: { title: "pages", @@ -90,22 +84,11 @@ export const navbarItemDef = reactive({ icon: "ph-image-square ph-bold ph-lg", to: "/gallery", }, - clips: { - title: "clips", - icon: "ph-paperclip ph-bold ph-lg", - show: computed(() => $i != null), - to: "/my/clips", - }, channels: { title: "channel", icon: "ph-television ph-bold ph-lg", to: "/channels", }, - groups: { - title: "groups", - icon: "ph-users-three ph-bold ph-lg", - to: "/my/groups", - }, achievements: { title: "achievements", icon: "ph-medal-military ph-bold ph-lg", diff --git a/packages/client/src/pages/clip.vue b/packages/client/src/pages/clip.vue index 5cf8cc4da..8b03e6a35 100644 --- a/packages/client/src/pages/clip.vue +++ b/packages/client/src/pages/clip.vue @@ -1,6 +1,6 @@