mirror of
https://github.com/TeamPiped/Piped.git
synced 2025-07-04 10:39:49 +00:00
fix: remove from trending page and hide if watch history is diabled
remove the button from trending page because it only works in feed page.
This commit is contained in:
parent
095cd1869f
commit
ab2f6839e1
@ -122,8 +122,11 @@
|
||||
>
|
||||
<i class="i-fa6-solid:circle-minus" />
|
||||
</button>
|
||||
<!-- TODO hide watchButton if history is disabled -->
|
||||
<button ref="watchButton" @click="toggleWatched(item.url.substr(-11))">
|
||||
<button
|
||||
v-if="showMarkOnWatched && isFeed"
|
||||
ref="watchButton"
|
||||
@click="toggleWatched(item.url.substr(-11))"
|
||||
>
|
||||
<i v-if="item.watched" :title="$t('actions.mark_as_unwatched')" class="i-fa6-solid:eye-slash" />
|
||||
<i v-else :title="$t('actions.mark_as_watched')" class="i-fa6-solid:eye" />
|
||||
</button>
|
||||
@ -183,6 +186,7 @@ export default {
|
||||
showShareModal: false,
|
||||
showVideo: true,
|
||||
showConfirmRemove: false,
|
||||
showMarkOnWatched: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -195,6 +199,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.shouldShowVideo();
|
||||
this.shouldShowMarkOnWatched();
|
||||
},
|
||||
methods: {
|
||||
removeVideo() {
|
||||
@ -217,6 +222,9 @@ export default {
|
||||
}
|
||||
};
|
||||
},
|
||||
shouldShowMarkOnWatched() {
|
||||
this.showMarkOnWatched = this.getPreferenceBoolean("watchHistory", false);
|
||||
},
|
||||
toggleWatched(videoId) {
|
||||
if (window.db) {
|
||||
// Should match WatchVideo.vue
|
||||
|
Loading…
x
Reference in New Issue
Block a user