mirror of
https://github.com/discourse/discourse.git
synced 2025-03-22 06:46:39 +08:00
UX: Show anchor icon instead of text when topic bump is disabled
This commit is contained in:
parent
a960a57c72
commit
448e95b97d
@ -195,13 +195,6 @@ export default Ember.Controller.extend({
|
||||
}
|
||||
},
|
||||
|
||||
@computed("model.noBump")
|
||||
topicBumpText(noBump) {
|
||||
if (noBump) {
|
||||
return I18n.t("composer.no_topic_bump");
|
||||
}
|
||||
},
|
||||
|
||||
@computed
|
||||
isStaffUser() {
|
||||
const currentUser = this.currentUser;
|
||||
|
@ -21,8 +21,8 @@
|
||||
{{#if whisperOrUnlistTopicText}}
|
||||
<span class='whisper'>({{whisperOrUnlistTopicText}})</span>
|
||||
{{/if}}
|
||||
{{#if topicBumpText}}
|
||||
<span class="no-bump">{{topicBumpText}}</span>
|
||||
{{#if model.noBump}}
|
||||
<span class="no-bump">{{d-icon "anchor"}}</span>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
|
||||
@ -123,10 +123,8 @@
|
||||
{{d-icon "eye-slash"}}
|
||||
</span>
|
||||
{{/if}}
|
||||
{{#if topicBumpText}}
|
||||
<span class="no-bump">
|
||||
{{d-icon "anchor"}}
|
||||
</span>
|
||||
{{#if model.noBump}}
|
||||
<span class="no-bump">{{d-icon "anchor"}}</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
|
@ -153,7 +153,6 @@
|
||||
}
|
||||
|
||||
.whisper,
|
||||
.no-bump,
|
||||
.display-edit-reason {
|
||||
font-style: italic;
|
||||
}
|
||||
|
@ -1318,7 +1318,6 @@ en:
|
||||
whisper: "whisper"
|
||||
unlist: "unlisted"
|
||||
blockquote_text: "Blockquote"
|
||||
no_topic_bump: "(no bump)"
|
||||
|
||||
add_warning: "This is an official warning."
|
||||
toggle_whisper: "Toggle Whisper"
|
||||
|
@ -261,10 +261,9 @@ QUnit.test("replying to post - toggle_topic_bump", async assert => {
|
||||
await composerActions.expand();
|
||||
await composerActions.selectRowByValue("toggle_topic_bump");
|
||||
|
||||
assert.equal(
|
||||
find(".composer-fields .no-bump").text(),
|
||||
I18n.t("composer.no_topic_bump"),
|
||||
"no-bump text is visible"
|
||||
assert.ok(
|
||||
find(".composer-fields .no-bump").length === 1,
|
||||
"no-bump icon is visible"
|
||||
);
|
||||
|
||||
await composerActions.expand();
|
||||
@ -272,7 +271,7 @@ QUnit.test("replying to post - toggle_topic_bump", async assert => {
|
||||
|
||||
assert.ok(
|
||||
find(".composer-fields .no-bump").length === 0,
|
||||
"no-bump text is not visible"
|
||||
"no-bump icon is not visible"
|
||||
);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user