Add 'Remove All Page Bookmarks' setting

This commit is contained in:
Jason Henriquez 2024-04-22 19:14:18 -05:00
parent a12c4ea894
commit a3057c606a
3 changed files with 30 additions and 0 deletions

View File

@ -23,6 +23,7 @@ export default defineComponent({
showRemoveHistoryPrompt: false,
showRemoveSubscriptionsPrompt: false,
showRemovePlaylistsPrompt: false,
showRemovePageBookmarksPrompt: false,
promptValues: [
'yes',
'no'
@ -46,6 +47,9 @@ export default defineComponent({
removeSubscriptionsPromptMessage: function () {
return this.$t('Settings.Privacy Settings["Are you sure you want to remove all subscriptions and profiles? This cannot be undone."]')
},
removePageBookmarksPromptMessage: function () {
return this.$t('Settings.Privacy Settings["Are you sure you want to remove all page bookmarks? This cannot be undone."]')
},
promptNames: function () {
return [
this.$t('Yes'),
@ -114,6 +118,14 @@ export default defineComponent({
showToast(this.$t('Settings.Privacy Settings.All playlists have been removed'))
},
handleRemovePageBookmarks: function (option) {
this.showRemovePageBookmarksPrompt = false
if (option !== 'yes') { return }
this.removeAllPageBookmarks()
showToast(this.$t('Settings.Privacy Settings.All page bookmarks have been removed'))
},
...mapActions([
'updateRememberHistory',
'removeAllHistory',
@ -127,6 +139,7 @@ export default defineComponent({
'updateAllSubscriptionsList',
'updateProfileSubscriptions',
'removeAllPlaylists',
'removeAllPageBookmarks',
'updateQuickBookmarkTargetPlaylistId',
])
}

View File

@ -56,6 +56,12 @@
background-color="var(--primary-color)"
@click="showRemovePlaylistsPrompt = true"
/>
<ft-button
:label="$t('Settings.Privacy Settings.Remove All Page Bookmarks')"
text-color="var(--text-with-main-color)"
background-color="var(--primary-color)"
@click="showRemovePageBookmarksPrompt = true"
/>
</ft-flex-box>
<ft-prompt
v-if="showSearchCachePrompt"
@ -85,6 +91,13 @@
:option-values="promptValues"
@click="handleRemovePlaylists"
/>
<ft-prompt
v-if="showRemovePageBookmarksPrompt"
:label="removePageBookmarksPromptMessage"
:option-names="promptNames"
:option-values="promptValues"
@click="handleRemovePageBookmarks"
/>
</ft-settings-section>
</template>

View File

@ -434,6 +434,10 @@ Settings:
Remove All Playlists: Remove All Playlists
All playlists have been removed: All playlists have been removed
Are you sure you want to remove all your playlists?: Are you sure you want to remove all your playlists?
Remove All Page Bookmarks: Remove All Page Bookmarks
Are you sure you want to remove all page bookmarks? This cannot be undone.: Are
you sure you want to remove all page bookmarks? This cannot be undone.
All page bookmarks have been removed: All page bookmarks have been removed
Subscription Settings:
Subscription Settings: Subscription Settings
Hide Videos on Watch: Hide Videos on Watch