From d7c10b4f2af568857d25e730a267c0ca352abb66 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Mon, 30 Jun 2025 14:30:09 +0530 Subject: [PATCH] chore: Add "Coming Soon" overlay to voice channel selector (#11835) # Pull Request Template ### Screenshots **Dark** image **Light** image --------- Co-authored-by: Muhsin Keloth --- .eslintrc.js | 1 + .../dashboard/components/ChannelSelector.vue | 21 ++++++++++++++----- .../components/widgets/ChannelItem.vue | 7 +++++++ .../dashboard/i18n/locale/en/components.json | 3 +++ 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 6c867f557..6b5205ad7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -103,6 +103,7 @@ module.exports = { '⌘', '📄', '🎉', + '🚀', '💬', '👥', '📥', diff --git a/app/javascript/dashboard/components/ChannelSelector.vue b/app/javascript/dashboard/components/ChannelSelector.vue index 1e09f5363..236ae3ded 100644 --- a/app/javascript/dashboard/components/ChannelSelector.vue +++ b/app/javascript/dashboard/components/ChannelSelector.vue @@ -9,20 +9,31 @@ export default { type: String, required: true, }, + isComingSoon: { + type: Boolean, + default: false, + }, }, }; @@ -33,7 +44,7 @@ export default { } &:hover { - @apply border-transparent shadow-none cursor-not-allowed; + @apply border-n-strong shadow-none cursor-not-allowed; } } diff --git a/app/javascript/dashboard/components/widgets/ChannelItem.vue b/app/javascript/dashboard/components/widgets/ChannelItem.vue index 933e117a9..5bc96d2b5 100644 --- a/app/javascript/dashboard/components/widgets/ChannelItem.vue +++ b/app/javascript/dashboard/components/widgets/ChannelItem.vue @@ -57,6 +57,12 @@ export default { 'voice', ].includes(key); }, + isComingSoon() { + const { key } = this.channel; + // Show "Coming Soon" only if the channel is marked as coming soon + // and the corresponding feature flag is not enabled yet. + return ['voice'].includes(key) && !this.isActive; + }, }, methods: { getChannelThumbnail() { @@ -79,6 +85,7 @@ export default { :class="{ inactive: !isActive }" :title="channel.name" :src="getChannelThumbnail()" + :is-coming-soon="isComingSoon" @click="onItemClick" /> diff --git a/app/javascript/dashboard/i18n/locale/en/components.json b/app/javascript/dashboard/i18n/locale/en/components.json index e44c6e039..0a2542a84 100644 --- a/app/javascript/dashboard/i18n/locale/en/components.json +++ b/app/javascript/dashboard/i18n/locale/en/components.json @@ -49,5 +49,8 @@ "HOURS": "Hours", "DAYS": "Days", "PLACEHOLDER": "Enter duration" + }, + "CHANNEL_SELECTOR": { + "COMING_SOON": "Coming Soon!" } }