mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
block channels in trending too
This commit is contained in:
parent
b46555fbcd
commit
4876ead6a3
5 changed files with 11 additions and 7 deletions
|
@ -286,7 +286,7 @@
|
|||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<h2 class="text-center" v-t="'actions.blocked_channels'"></h2>
|
||||
<h2 class="text-center" v-t="'titles.misc'"></h2>
|
||||
<label class="pref" for="blockedChannels">
|
||||
<strong v-t="'actions.blocked_channels'" />
|
||||
<input
|
||||
|
|
|
@ -143,9 +143,9 @@ export default {
|
|||
isBlocked(result) {
|
||||
if (!result.uploaderUrl) {
|
||||
// item is a channel
|
||||
return this.isChannelBlocked(result.url.replace("/channel/", ""));
|
||||
return this.isChannelBlocked(result.url);
|
||||
}
|
||||
return this.isChannelBlocked(result.uploaderUrl.replace("/channel/", ""));
|
||||
return this.isChannelBlocked(result.uploaderUrl);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<div v-if="!isBlocked">
|
||||
<router-link
|
||||
:to="{
|
||||
path: '/watch',
|
||||
|
@ -178,6 +178,9 @@ export default {
|
|||
short() {
|
||||
return this.video.duration > 0 && this.video.duration <= 61;
|
||||
},
|
||||
isBlocked() {
|
||||
return this.isChannelBlocked(this.video.uploaderUrl);
|
||||
},
|
||||
},
|
||||
components: { PlaylistAddModal },
|
||||
};
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
"playlists": "Playlists",
|
||||
"account": "Account",
|
||||
"instance": "Instance",
|
||||
"player": "Player"
|
||||
"player": "Player",
|
||||
"misc": "Miscellaneous"
|
||||
},
|
||||
"player": {
|
||||
"watch_on": "Watch on {0}"
|
||||
|
@ -98,7 +99,7 @@
|
|||
"backup_preferences": "Backup preferences",
|
||||
"restore_preferences": "Restore preferences",
|
||||
"back_to_home": "Back to home",
|
||||
"blocked_channels": "Blocked channels"
|
||||
"blocked_channels": "Blocked channels (IDs, seperated by ',')"
|
||||
},
|
||||
"comment": {
|
||||
"pinned_by": "Pinned by",
|
||||
|
|
|
@ -234,7 +234,7 @@ const mixin = {
|
|||
isChannelBlocked(channelId) {
|
||||
const blockedChannels = localStorage.getItem("blockedChannels");
|
||||
if (!blockedChannels) return false;
|
||||
return blockedChannels.split(",").includes(channelId);
|
||||
return blockedChannels.split(",").includes(channelId.replace("/channel/", ""));
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue