mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2024-11-22 01:45:40 +01:00
Only enable page bookmarking on certain routes
This commit is contained in:
parent
a2914fa6ff
commit
e9b539face
@ -34,11 +34,20 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
return {
|
||||
isRouteBookmarkable: false,
|
||||
showSearchContainer: true,
|
||||
isArrowBackwardDisabled,
|
||||
isArrowForwardDisabled,
|
||||
currentRouteFullPath: '',
|
||||
searchSuggestionsDataList: [],
|
||||
allowedPageBookmarkRouteMetaTitles: [
|
||||
'Search Results',
|
||||
'Playlist',
|
||||
'Channel',
|
||||
'Watch',
|
||||
'Hashtag',
|
||||
'Settings' // for linkable settings sections
|
||||
],
|
||||
lastSuggestionQuery: ''
|
||||
}
|
||||
},
|
||||
@ -129,6 +138,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
this.currentRouteFullPath = to.fullPath
|
||||
this.isRouteBookmarkable = this.allowedPageBookmarkRouteMetaTitles.includes(to.meta.title)
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
|
@ -60,7 +60,8 @@
|
||||
}
|
||||
|
||||
&.arrowBackwardDisabled,
|
||||
&.arrowForwardDisabled {
|
||||
&.arrowForwardDisabled,
|
||||
&.disabled {
|
||||
color: #808080;
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
|
@ -107,8 +107,8 @@
|
||||
:icon="['fas', 'star']"
|
||||
:title="pageBookmarkIconTitle"
|
||||
:active="isPageBookmarked"
|
||||
:class="{ [pageBookmarkIconTheme]: true }"
|
||||
:disabled="!pageBookmarksAvailable"
|
||||
:class="{ [pageBookmarkIconTheme]: true, disabled: !pageBookmarksAvailable || !isRouteBookmarkable }"
|
||||
:aria-disabled="!pageBookmarksAvailable || !isRouteBookmarkable"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
@click="showPageBookmarkPrompt"
|
||||
|
@ -1123,6 +1123,7 @@ Page Bookmark:
|
||||
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.
|
||||
This page cannot be bookmarked.: This page cannot be bookmarked.
|
||||
Role Descriptions:
|
||||
bookmark: bookmark
|
||||
Moments Ago: moments ago
|
||||
|
Loading…
Reference in New Issue
Block a user