Skip to content

Commit

Permalink
* Allow user to attempt quick bookmark without target set
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE committed May 7, 2024
1 parent 7235cc4 commit aacadde
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
18 changes: 16 additions & 2 deletions src/renderer/components/ft-list-video/ft-list-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ import FtIconButton from '../ft-icon-button/ft-icon-button.vue'
import { mapActions } from 'vuex'
import {
copyToClipboard,
deepCopy,
formatDurationAsTimestamp,
formatNumber,
getRelativeTimeFromDate,
openInternalPath,
openExternalLink,
showToast,
toDistractionFreeTitle,
deepCopy
} from '../../helpers/utils'
import { deArrowData, deArrowThumbnail } from '../../helpers/sponsorblock'
import debounce from 'lodash.debounce'
Expand Down Expand Up @@ -762,7 +763,13 @@ export default defineComponent({

toggleQuickBookmarked() {
if (!this.isQuickBookmarkEnabled) {
// This should be prevented by UI
showToast(
this.$t('Video["Quick Bookmark Disabled. Click Here To Open User Playlists Page To Enable Quick Bookmark"]'),
5000,
() => {
this.createNewWindowInUserPlaylistsView()
},
)
return
}

Expand All @@ -772,6 +779,13 @@ export default defineComponent({
this.addToQuickBookmarkPlaylist()
}
},
createNewWindowInUserPlaylistsView: function () {
openInternalPath({
path: '/userPlaylists',
query: {},
doCreateNewWindow: true,
})
},
addToQuickBookmarkPlaylist() {
const videoData = {
videoId: this.id,
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/ft-list-video/ft-list-video.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
@click="togglePlaylistPrompt"
/>
<ft-icon-button
v-if="isQuickBookmarkEnabled && quickBookmarkButtonEnabled"
v-if="quickBookmarkButtonEnabled"
:title="quickBookmarkIconText"
:icon="isInQuickBookmarkPlaylist ? ['fas', 'check'] : ['fas', 'bookmark']"
class="quickBookmarkVideoIcon"
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 @@ -740,6 +740,7 @@ Video:
Save Video: Save Video
Video has been saved: Video has been saved
Video has been removed from your saved list: Video has been removed from your saved list
"Quick Bookmark Disabled. Click Here To Open User Playlists Page To Enable Quick Bookmark": "Quick Bookmark Disabled. Click Here To Open User Playlists Page To Enable Quick Bookmark"
Open in YouTube: Open in YouTube
Copy YouTube Link: Copy YouTube Link
Open YouTube Embedded Player: Open YouTube Embedded Player
Expand Down

0 comments on commit aacadde

Please sign in to comment.