mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
tooltips: Use stream ID instead of name for tooltip IDs.
Previously, tooltip templates were identified using the stream's name in their `id` attributes. This commit changes the tooltip IDs to use the stream's ID instead, rather than its name, to ensure uniqueness and avoid potential conflicts.
This commit is contained in:
committed by
Tim Abbott
parent
7b0c6f9d3f
commit
daa98c72d3
@@ -4,8 +4,8 @@
|
||||
{{#if subscribed}}
|
||||
<div class="check checked sub_unsub_button">
|
||||
|
||||
<div class="tippy-zulip-tooltip" data-tooltip-template-id="unsubscribe-from-{{name}}-stream-tooltip-template">
|
||||
<template id="unsubscribe-from-{{name}}-stream-tooltip-template">
|
||||
<div class="tippy-zulip-tooltip" data-tooltip-template-id="unsubscribe-from-{{stream_id}}-stream-tooltip-template">
|
||||
<template id="unsubscribe-from-{{stream_id}}-stream-tooltip-template">
|
||||
<span>
|
||||
{{#tr}}
|
||||
Unsubscribe from <z-stream></z-stream>
|
||||
@@ -23,8 +23,8 @@
|
||||
{{else}}
|
||||
<div class="check sub_unsub_button {{#unless should_display_subscription_button}}disabled{{/unless}}">
|
||||
|
||||
<div class="tippy-zulip-tooltip" data-tooltip-template-id="{{#if should_display_subscription_button}}subscribe-to-{{name}}-stream-tooltip-template{{else}}cannot-subscribe-to-{{name}}-stream-tooltip-template{{/if}}">
|
||||
<template id="subscribe-to-{{name}}-stream-tooltip-template">
|
||||
<div class="tippy-zulip-tooltip" data-tooltip-template-id="{{#if should_display_subscription_button}}subscribe-to-{{stream_id}}-stream-tooltip-template{{else}}cannot-subscribe-to-{{stream_id}}-stream-tooltip-template{{/if}}">
|
||||
<template id="subscribe-to-{{stream_id}}-stream-tooltip-template">
|
||||
<span>
|
||||
{{#tr}}
|
||||
Subscribe to <z-stream></z-stream>
|
||||
@@ -33,7 +33,7 @@
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template id="cannot-subscribe-to-{{name}}-stream-tooltip-template">
|
||||
<template id="cannot-subscribe-to-{{stream_id}}-stream-tooltip-template">
|
||||
<span>
|
||||
{{#tr}}
|
||||
Cannot subscribe to <z-stream></z-stream>
|
||||
|
Reference in New Issue
Block a user