FIX: Fixed deleted posts layout (#7348)

This commit is contained in:
Tim Lange 2019-04-10 19:00:39 +02:00 committed by Régis Hanol
parent cab83596ec
commit fe9c271d44
4 changed files with 20 additions and 1 deletions

View File

@ -8,6 +8,16 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
import { getOwner } from "discourse-common/lib/get-owner";
export default Ember.Component.extend(LoadMore, {
_initialize: function() {
const filter = this.get("stream.filter");
if (filter) {
this.set("classNames", [
"user-stream",
"filter-" + filter.toString().replace(",", "-")
]);
}
}.on("init"),
loading: false,
eyelineSelector: ".user-stream .item",
classNames: ["user-stream"],

View File

@ -193,7 +193,7 @@
{{/if}}
{{#if canDeleteUser}}
<div>{{d-button action=(action "adminDelete") icon="exclamation-triangle" label="user.admin_delete" class="btn-danger"}}</div>
<div class='pull-right'>{{d-button action=(action "adminDelete") icon="exclamation-triangle" label="user.admin_delete" class="btn-danger"}}</div>
{{/if}}
</dl>
{{plugin-outlet name="user-profile-secondary" args=(hash model=model)}}

View File

@ -0,0 +1,7 @@
.user-stream {
&.filter-deleted {
grid-column-start: 1;
grid-column-end: 3;
grid-row-start: 2;
}
}

View File

@ -27,6 +27,8 @@ QUnit.test("Filters", async assert => {
await visit("/u/eviltrout/activity/replies");
hasStream(assert);
assert.ok(exists(".user-stream.filter-5"), "stream has filter class");
});
QUnit.test("Badges", async assert => {