Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IV: Show channel handle in search results #3791

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/renderer/components/ft-list-channel/ft-list-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,14 @@ export default defineComponent({
this.channelName = this.data.author
this.id = this.data.authorId
this.subscriberCount = this.data.subCount
this.videoCount = this.data.videoCount
this.formattedVideoCount = formatNumber(this.data.videoCount)
this.formattedSubscriberCount = formatNumber(this.data.subCount)
this.handle = this.data.channelHandle
if (this.handle != null) {
this.videoCount = null
} else {
this.videoCount = this.data.videoCount
this.formattedVideoCount = formatNumber(this.data.videoCount)
}
this.description = this.data.description
}
}
Expand Down
16 changes: 9 additions & 7 deletions src/renderer/components/ft-list-channel/ft-list-channel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@
</h3>
</router-link>
<div class="infoLine">
<span
v-if="subscriberCount !== null && !hideChannelSubscriptions"
class="subscriberCount"
>
{{ $tc('Global.Counts.Subscriber Count', subscriberCount, {count: formattedSubscriberCount}) }}
</span>
<router-link
v-if="handle !== null"
class="handle"
Expand All @@ -44,9 +38,17 @@
{{ handle }}
</router-link>
<span
v-else
v-if="subscriberCount !== null && !hideChannelSubscriptions"
class="subscriberCount"
>
<template v-if="handle !== null"> • </template>
{{ $tc('Global.Counts.Subscriber Count', subscriberCount, {count: formattedSubscriberCount}) }}
</span>
<span
v-if="handle == null && videoCount != null"
class="videoCount"
>
<template v-if="subscriberCount !== null && !hideChannelSubscriptions"> • </template>
{{ $tc('Global.Counts.Video Count', videoCount, {count: formattedVideoCount}) }}
</span>
</div>
Expand Down