mirror of
https://github.com/zulip/zulip.git
synced 2026-07-09 21:21:47 +08:00
buttons: Modify the styles of buttons in stream settings.
This commit is contained in:
parent
05542d6cb4
commit
5b1ddf35ba
@ -198,9 +198,15 @@ export function update_settings_button_for_sub(sub: StreamSubscription): void {
|
||||
}
|
||||
|
||||
if (sub.subscribed) {
|
||||
$settings_button.text($t({defaultMessage: "Unsubscribe"})).removeClass("unsubscribed");
|
||||
$settings_button
|
||||
.text($t({defaultMessage: "Unsubscribe"}))
|
||||
.removeClass("unsubscribed action-button-quiet-brand")
|
||||
.addClass("action-button-quiet-neutral");
|
||||
} else {
|
||||
$settings_button.text($t({defaultMessage: "Subscribe"})).addClass("unsubscribed");
|
||||
$settings_button
|
||||
.text($t({defaultMessage: "Subscribe"}))
|
||||
.addClass("unsubscribed action-button-quiet-brand")
|
||||
.removeClass("action-button-quiet-neutral");
|
||||
}
|
||||
if (stream_data.can_toggle_subscription(sub)) {
|
||||
$settings_button.prop("disabled", false);
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
{{/tr}}
|
||||
</span>
|
||||
</template>
|
||||
<button class="action-button action-button-quiet-brand subscribe-button sub_unsub_button {{#if should_display_subscription_button}}toggle-subscription-tooltip{{/if}} {{#unless subscribed }}unsubscribed{{/unless}}" type="button" name="button" data-tooltip-template-id="toggle-subscription-tooltip-template" {{#unless should_display_subscription_button}}disabled="disabled"{{/unless}}>
|
||||
<button class="action-button subscribe-button sub_unsub_button {{#if subscribed}}action-button-quiet-neutral{{else}}action-button-quiet-brand{{/if}} {{#if should_display_subscription_button}}toggle-subscription-tooltip{{/if}} {{#unless subscribed }}unsubscribed{{/unless}}" type="button" name="button" data-tooltip-template-id="toggle-subscription-tooltip-template" {{#unless should_display_subscription_button}}disabled="disabled"{{/unless}}>
|
||||
{{#if subscribed }}
|
||||
{{t "Unsubscribe" }}
|
||||
{{else}}
|
||||
@ -22,7 +22,7 @@
|
||||
{{> ../components/action_button
|
||||
icon="eye"
|
||||
attention="quiet"
|
||||
intent="info"
|
||||
intent="neutral"
|
||||
custom_classes="tippy-zulip-delayed-tooltip"
|
||||
data-tooltip-template-id="view-stream-tooltip-template"
|
||||
id="preview-stream-button"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user