Skip to content

Commit

Permalink
IV: Show channel handle in search results (#3791)
Browse files Browse the repository at this point in the history
* IV: Show channel handle in search results

* move handle to front, add separator

* remove unused locale key
  • Loading branch information
ChunkyProgrammer authored Oct 10, 2023
1 parent dea6305 commit fffd139
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
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

0 comments on commit fffd139

Please sign in to comment.