mirror of
https://github.com/discourse/discourse.git
synced 2025-03-25 02:25:42 +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
|
@computed
|
||||||
isStaffUser() {
|
isStaffUser() {
|
||||||
const currentUser = this.currentUser;
|
const currentUser = this.currentUser;
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
{{#if whisperOrUnlistTopicText}}
|
{{#if whisperOrUnlistTopicText}}
|
||||||
<span class='whisper'>({{whisperOrUnlistTopicText}})</span>
|
<span class='whisper'>({{whisperOrUnlistTopicText}})</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if topicBumpText}}
|
{{#if model.noBump}}
|
||||||
<span class="no-bump">{{topicBumpText}}</span>
|
<span class="no-bump">{{d-icon "anchor"}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
@ -123,10 +123,8 @@
|
|||||||
{{d-icon "eye-slash"}}
|
{{d-icon "eye-slash"}}
|
||||||
</span>
|
</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if topicBumpText}}
|
{{#if model.noBump}}
|
||||||
<span class="no-bump">
|
<span class="no-bump">{{d-icon "anchor"}}</span>
|
||||||
{{d-icon "anchor"}}
|
|
||||||
</span>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -153,7 +153,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.whisper,
|
.whisper,
|
||||||
.no-bump,
|
|
||||||
.display-edit-reason {
|
.display-edit-reason {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
@ -1318,7 +1318,6 @@ en:
|
|||||||
whisper: "whisper"
|
whisper: "whisper"
|
||||||
unlist: "unlisted"
|
unlist: "unlisted"
|
||||||
blockquote_text: "Blockquote"
|
blockquote_text: "Blockquote"
|
||||||
no_topic_bump: "(no bump)"
|
|
||||||
|
|
||||||
add_warning: "This is an official warning."
|
add_warning: "This is an official warning."
|
||||||
toggle_whisper: "Toggle Whisper"
|
toggle_whisper: "Toggle Whisper"
|
||||||
|
@ -261,10 +261,9 @@ QUnit.test("replying to post - toggle_topic_bump", async assert => {
|
|||||||
await composerActions.expand();
|
await composerActions.expand();
|
||||||
await composerActions.selectRowByValue("toggle_topic_bump");
|
await composerActions.selectRowByValue("toggle_topic_bump");
|
||||||
|
|
||||||
assert.equal(
|
assert.ok(
|
||||||
find(".composer-fields .no-bump").text(),
|
find(".composer-fields .no-bump").length === 1,
|
||||||
I18n.t("composer.no_topic_bump"),
|
"no-bump icon is visible"
|
||||||
"no-bump text is visible"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
await composerActions.expand();
|
await composerActions.expand();
|
||||||
@ -272,7 +271,7 @@ QUnit.test("replying to post - toggle_topic_bump", async assert => {
|
|||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
find(".composer-fields .no-bump").length === 0,
|
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