Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page bookmarks #5003

Open
wants to merge 33 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
920bf92
Implement page bookmarking modal & call, icon, & handling/calls
kommunarr Apr 22, 2024
808cadb
Update search results with matching bookmarks
kommunarr Apr 22, 2024
a12c4ea
Fix bookmark search result styling and keyboard interactions
kommunarr Apr 23, 2024
a3057c6
Add 'Remove All Page Bookmarks' setting
kommunarr Apr 23, 2024
e60cd78
Improve default bookmark names for Playlist and Search Results routes
kommunarr Apr 23, 2024
c254875
Fix bookmark searching logic
kommunarr Apr 23, 2024
871e330
Update bookmark icon color to use secondary colors when top nav is co…
kommunarr Apr 23, 2024
f7b8f1a
Add aria-roledescription for page bookmark search results
kommunarr Apr 23, 2024
0572d33
Fix deletion call and disable bookmark icon while data is being loade…
kommunarr Apr 23, 2024
88ec2a8
Fix bookmark search results when search suggestions are disabled
kommunarr Apr 23, 2024
7896b7b
Modify bookmark result star icon opacity
kommunarr Apr 23, 2024
392fa75
Implement changes to make work re-usable for saving generic search hi…
kommunarr Apr 23, 2024
78d1b9c
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Apr 27, 2024
5ee7638
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr May 2, 2024
709caef
Update styling of search results
kommunarr May 3, 2024
50dc04b
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr May 8, 2024
5597720
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr May 20, 2024
c075058
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr May 22, 2024
d9d8c9c
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Jun 4, 2024
ede347a
Fix page bookmark removal function call to pass the route, not the fu…
kommunarr Jun 4, 2024
d6429d5
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Jun 11, 2024
7f6a4ad
Add search history sync logic
kommunarr Jun 11, 2024
33d2d50
Have 'Cancel' button appear for already bookmarked page case
kommunarr Jun 11, 2024
4736723
Update to show the proper page bookmark name upon deletion
kommunarr Jun 11, 2024
039fce1
Delete page bookmarks to user playlists when those user playlists are…
kommunarr Jun 11, 2024
85e46b5
Add icons corresponding to bookmarked page route
kommunarr Jun 11, 2024
a81a8b5
Prevent search results from wrapping across to multiple rows
kommunarr Jun 11, 2024
e5b5b43
Constrain visible ft-input results list length to 15
kommunarr Jun 11, 2024
094b2c2
Add message when there are other page bookmarks with the same name
kommunarr Jun 11, 2024
b162507
Update playlist route icons
kommunarr Jun 12, 2024
13ba73e
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Jun 15, 2024
3504424
Merge branch 'development' into feat/add-page-bookmarking
kommunarr Jun 19, 2024
abbd349
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Jul 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ export default defineComponent({
isBookmarkBeingCreated: function () {
return this.pageBookmark == null
},
pageBookmarks: function () {
return this.$store.getters.getPageBookmarks
},
duplicateNameCount: function () {
const currentBookmarkAdjustment = this.name === this.pageBookmark?.name ? -1 : 0
return currentBookmarkAdjustment + this.pageBookmarks.filter((pageBookmark) => pageBookmark.name === this.name).length
},
duplicateNameMessage: function () {
return this.$tc('Page Bookmark["There is {count} other bookmark with the same name."]', this.duplicateNameCount, { count: this.duplicateNameCount })
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remove the dot in key and it'a much easier to type (rant)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, I think having the key match the EN-US content as close as possible is best, even for minor things like punctuation, which help communicate tone

},
pageBookmark: function () {
return this.$store.getters.getPageBookmarkWithRoute(this.$router.currentRoute.fullPath)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
@clear="e => name = ''"
@keydown.enter.native="save"
/>
<ft-flex-box v-if="duplicateNameCount > 0">
<p>{{ duplicateNameMessage }}</p>
</ft-flex-box>
</div>
<div class="actions-container">
<ft-flex-box>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/store/modules/search-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const state = {
}

const getters = {
getPageBookmarks: (state) => () => {
getPageBookmarks: (state) => {
return state.pageBookmarks
},

Expand Down
1 change: 1 addition & 0 deletions static/locales/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,7 @@ Page Bookmark:
Created page bookmark: Created page bookmark "{name}"
Updated page bookmark: Updated page bookmark "{name}"
Removed page bookmark: Removed page bookmark "{name}"
There is {count} other bookmark with the same name.: There is {count} other page bookmark with the same name. | There are {count} other page bookmarks with the same name.
Role Descriptions:
bookmark: bookmark
Moments Ago: moments ago
Expand Down