mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: improved layout of flag handling UI on mobile
This commit is contained in:
parent
6729f032b0
commit
f8584e28d7
@ -3,7 +3,6 @@
|
|||||||
<table class="admin-flags">
|
<table class="admin-flags">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class='user'></th>
|
|
||||||
<th class='excerpt'></th>
|
<th class='excerpt'></th>
|
||||||
<th class='flaggers'>{{i18n 'admin.flags.flagged_by'}}</th>
|
<th class='flaggers'>{{i18n 'admin.flags.flagged_by'}}</th>
|
||||||
<th class='flaggers'>{{#if adminOldFlagsView}}{{i18n 'admin.flags.resolved_by'}}{{/if}}</th>
|
<th class='flaggers'>{{#if adminOldFlagsView}}{{i18n 'admin.flags.resolved_by'}}{{/if}}</th>
|
||||||
@ -13,30 +12,42 @@
|
|||||||
{{#each content as |flaggedPost|}}
|
{{#each content as |flaggedPost|}}
|
||||||
<tr class={{flaggedPost.extraClasses}}>
|
<tr class={{flaggedPost.extraClasses}}>
|
||||||
|
|
||||||
<td class='user'>
|
|
||||||
{{#if flaggedPost.postAuthorFlagged}}
|
|
||||||
{{#if flaggedPost.user}}
|
|
||||||
{{#link-to 'adminUser' flaggedPost.user}}{{avatar flaggedPost.user imageSize="large"}}{{/link-to}}
|
|
||||||
{{#if flaggedPost.wasEdited}}<i class="fa fa-pencil" title="{{i18n 'admin.flags.was_edited'}}"></i>{{/if}}
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
|
||||||
{{#if adminActiveFlagsView}}
|
|
||||||
{{#if flaggedPost.previous_flags_count}}
|
|
||||||
<span title="{{i18n 'admin.flags.previous_flags_count' count=flaggedPost.previous_flags_count}}" class="badge-notification flagged-posts">{{flaggedPost.previous_flags_count}}</span>
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class='excerpt'>
|
<td class='excerpt'>
|
||||||
<h3>
|
|
||||||
{{#if flaggedPost.topic.isPrivateMessage}}
|
<div class="flex-center-align">
|
||||||
<span class="private-message-glyph">{{fa-icon "envelope"}}</span>
|
<div class="flagged-post-avatar">
|
||||||
|
{{#if flaggedPost.postAuthorFlagged}}
|
||||||
|
{{#if flaggedPost.user}}
|
||||||
|
{{#link-to 'adminUser' flaggedPost.user}}{{avatar flaggedPost.user imageSize="large"}}{{/link-to}}
|
||||||
|
{{#if flaggedPost.wasEdited}}<i class="fa fa-pencil" title="{{i18n 'admin.flags.was_edited'}}"></i>{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
{{#if adminActiveFlagsView}}
|
||||||
|
{{#if flaggedPost.previous_flags_count}}
|
||||||
|
<span title="{{i18n 'admin.flags.previous_flags_count' count=flaggedPost.previous_flags_count}}" class="badge-notification flagged-posts">{{flaggedPost.previous_flags_count}}</span>
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<div class="topic-excerpt">
|
||||||
|
<h3>
|
||||||
|
{{#if flaggedPost.topic.isPrivateMessage}}
|
||||||
|
<span class="private-message-glyph">{{fa-icon "envelope"}}</span>
|
||||||
|
{{/if}}
|
||||||
|
{{topic-status topic=flaggedPost.topic}}
|
||||||
|
<a href='{{unbound flaggedPost.url}}'>{{{unbound flaggedPost.topic.fancyTitle}}}</a>
|
||||||
|
</h3>
|
||||||
|
{{#unless site.mobileView}}
|
||||||
|
{{#if flaggedPost.postAuthorFlagged}}
|
||||||
|
<p>{{{flaggedPost.excerpt}}}</p>
|
||||||
|
{{/if}}
|
||||||
|
{{/unless}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{#if site.mobileView}}
|
||||||
|
{{#if flaggedPost.postAuthorFlagged}}
|
||||||
|
<p>{{{flaggedPost.excerpt}}}</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{topic-status topic=flaggedPost.topic}}
|
|
||||||
<a href='{{unbound flaggedPost.url}}'>{{{unbound flaggedPost.topic.fancyTitle}}}</a>
|
|
||||||
</h3>
|
|
||||||
{{#if flaggedPost.postAuthorFlagged}}
|
|
||||||
<p>{{{flaggedPost.excerpt}}}</p>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@ -104,7 +115,6 @@
|
|||||||
|
|
||||||
{{#each flaggedPost.conversations as |c|}}
|
{{#each flaggedPost.conversations as |c|}}
|
||||||
<tr class='message'>
|
<tr class='message'>
|
||||||
<td></td>
|
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<div>
|
<div>
|
||||||
{{#if c.response}}
|
{{#if c.response}}
|
||||||
@ -130,7 +140,7 @@
|
|||||||
|
|
||||||
{{#unless adminOldFlagsView}}
|
{{#unless adminOldFlagsView}}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4" class="action">
|
<td colspan="3" class="action">
|
||||||
{{#if adminActiveFlagsView}}
|
{{#if adminActiveFlagsView}}
|
||||||
<button title='{{i18n 'admin.flags.agree_title'}}' class='btn' {{action "showAgreeFlagModal" flaggedPost}}><i class="fa fa-thumbs-o-up"></i>{{i18n 'admin.flags.agree'}}…</button>
|
<button title='{{i18n 'admin.flags.agree_title'}}' class='btn' {{action "showAgreeFlagModal" flaggedPost}}><i class="fa fa-thumbs-o-up"></i>{{i18n 'admin.flags.agree'}}…</button>
|
||||||
{{#if flaggedPost.postHidden}}
|
{{#if flaggedPost.postHidden}}
|
||||||
|
@ -746,16 +746,25 @@ section.details {
|
|||||||
.message { background-color: dark-light-diff($highlight, $secondary, 50%, -70%); }
|
.message { background-color: dark-light-diff($highlight, $secondary, 50%, -70%); }
|
||||||
.message:hover { background-color: dark-light-diff($highlight, $secondary, 60%, -60%); }
|
.message:hover { background-color: dark-light-diff($highlight, $secondary, 60%, -60%); }
|
||||||
|
|
||||||
|
.flagged-post-avatar {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.excerpt {
|
.excerpt {
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
.fa { display: inline-block; }
|
.fa { display: inline-block; }
|
||||||
h3 {
|
h3 {
|
||||||
max-height: 1.2em;
|
|
||||||
overflow: hidden;
|
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
p:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.message td {
|
||||||
|
padding-left: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flagged-posts { background: $danger; }
|
.flagged-posts { background: $danger; }
|
||||||
@ -1828,6 +1837,20 @@ table#user-badges {
|
|||||||
left: -100%;
|
left: -100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mobile-view .admin-flags {
|
||||||
|
.flaggers {
|
||||||
|
padding: 2px;
|
||||||
|
.avatar {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tr.message td {
|
||||||
|
padding-left: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.cboxcontainer {
|
.cboxcontainer {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
|
@ -193,6 +193,11 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.flex-center-align {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
.unread-private-messages {
|
.unread-private-messages {
|
||||||
color: $secondary;
|
color: $secondary;
|
||||||
background: $success;
|
background: $success;
|
||||||
|
Loading…
Reference in New Issue
Block a user