From 9315fa6cf717745511de1d444fe3e4ac8f98b2e0 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Thu, 7 Mar 2024 23:12:35 -0500 Subject: [PATCH] Added subscriber count in the channel page --- CHANGELOG.md | 8 +++++- .../src/components/ChannelView/ChannelView.bs | 2 ++ .../components/ChannelView/ChannelView.xml | 4 +++ .../Invidious/InvidiousToContentNode.bs | 26 +++++++++++++++++-- 4 files changed, 37 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66a7f975..b2161396 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,15 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Added + +- Subscriber count in the channel page + ## [0.21.0] - 2024-03-07 ### Added diff --git a/playlet-lib/src/components/ChannelView/ChannelView.bs b/playlet-lib/src/components/ChannelView/ChannelView.bs index d4ff4f01..488bd457 100644 --- a/playlet-lib/src/components/ChannelView/ChannelView.bs +++ b/playlet-lib/src/components/ChannelView/ChannelView.bs @@ -16,6 +16,7 @@ function Init() m.banner = m.top.findNode("banner") m.thumbnail = m.top.findNode("thumbnail") m.authorLabel = m.top.findNode("authorLabel") + m.subCountLabel = m.top.findNode("subCountLabel") m.subscribeButton = m.top.findNode("subscribeButton") m.rowList = m.top.FindNode("rowList") m.rowList.focusable = true @@ -60,6 +61,7 @@ function OnContentSet() as void ' NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation. m.authorLabel.text = content._author + m.subCountLabel.text = content.subCountText m.banner.uri = content.banner if StringUtils.IsNullOrEmpty(content.thumbnail) m.thumbnail.uri = "" diff --git a/playlet-lib/src/components/ChannelView/ChannelView.xml b/playlet-lib/src/components/ChannelView/ChannelView.xml index bbfb1bdc..3f79830a 100644 --- a/playlet-lib/src/components/ChannelView/ChannelView.xml +++ b/playlet-lib/src/components/ChannelView/ChannelView.xml @@ -36,6 +36,10 @@ id="authorLabel" translation="[115,40]" font="font:MediumBoldSystemFont" /> +