From d793cc0f54f7df87bf1859e54fe7da887eecc368 Mon Sep 17 00:00:00 2001 From: sujal shah Date: Thu, 9 May 2024 02:10:59 +0530 Subject: [PATCH] tooltip: Render tooltips for `Not subscribed` and `All channels` tabs. Render tooltips for both the tabs if the user is guest user. Fixes #21869. --- web/src/tippyjs.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/web/src/tippyjs.ts b/web/src/tippyjs.ts index 237750f9a9..ec2fae6085 100644 --- a/web/src/tippyjs.ts +++ b/web/src/tippyjs.ts @@ -388,6 +388,20 @@ export function initialize(): void { }, }); + tippy.delegate("body", { + target: [ + "[data-tab-key='not-subscribed'].disabled", + "[data-tab-key='all-streams'].disabled", + ].join(","), + content: $t({ + defaultMessage: "You can only view channels that you are subscribed to.", + }), + appendTo: () => document.body, + onHidden(instance) { + instance.destroy(); + }, + }); + tippy.delegate("body", { target: ".default-stream.default_stream_private_tooltip", content: $t({