mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:11:58 +08:00
UX: show envelope when tag is only used in PM
UX: use regular envelope instead of solid envelope REFACTOR: %s/enveloppe/envelope/g
This commit is contained in:
@ -5,5 +5,10 @@ export default RestModel.extend({
|
|||||||
@computed("count", "pm_count")
|
@computed("count", "pm_count")
|
||||||
totalCount(count, pmCount) {
|
totalCount(count, pmCount) {
|
||||||
return count + pmCount;
|
return count + pmCount;
|
||||||
|
},
|
||||||
|
|
||||||
|
@computed("count", "pm_count")
|
||||||
|
pmOnly(count, pmCount) {
|
||||||
|
return count === 0 && pmCount > 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{#each sortedTags as |tag|}}
|
{{#each sortedTags as |tag|}}
|
||||||
<div class='tag-box'>
|
<div class='tag-box'>
|
||||||
{{discourse-tag tag.id isPrivateMessage=isPrivateMessage tagsForUser=tagsForUser}} {{#if tag.pm_count}}{{d-icon "envelope"}}{{/if}}{{#if tag.totalCount}} <span class='tag-count'>x {{tag.totalCount}}</span>{{/if}}
|
{{discourse-tag tag.id isPrivateMessage=isPrivateMessage tagsForUser=tagsForUser}} {{#if tag.pmOnly}}{{d-icon "far-envelope"}}{{/if}}{{#if tag.totalCount}} <span class='tag-count'>x {{tag.totalCount}}</span>{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
<div class="clearfix" />
|
<div class="clearfix" />
|
||||||
|
@ -54,7 +54,7 @@ widgetTest("via-email", {
|
|||||||
},
|
},
|
||||||
async test(assert) {
|
async test(assert) {
|
||||||
await click(".post-info.via-email");
|
await click(".post-info.via-email");
|
||||||
assert.ok(this.rawEmailShown, "clicking the enveloppe shows the raw email");
|
assert.ok(this.rawEmailShown, "clicking the envelope shows the raw email");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ widgetTest("via-email without permission", {
|
|||||||
await click(".post-info.via-email");
|
await click(".post-info.via-email");
|
||||||
assert.ok(
|
assert.ok(
|
||||||
!this.rawEmailShown,
|
!this.rawEmailShown,
|
||||||
`clicking the enveloppe doesn't show the raw email`
|
"clicking the envelope doesn't show the raw email"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user