UX: Make the emojis in the admin page table list work better on mobile (#29619)
* UX: Apply admin table classes for consistent mobile styling on the emojis page * UX: remove icon from the button * UX: styling tweaks on the emoji uploader form * UX: right align table button controls * apply prettier
This commit is contained in:
parent
6158a1ae29
commit
13c7773036
|
@ -42,10 +42,9 @@
|
|||
/>
|
||||
<DButton
|
||||
@translatedLabel={{this.buttonLabel}}
|
||||
@icon="plus"
|
||||
@action={{this.chooseFiles}}
|
||||
@disabled={{this.uppyUpload.uploading}}
|
||||
class="btn-primary"
|
||||
class="btn-default"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -19,15 +19,9 @@
|
|||
|
||||
<hr />
|
||||
|
||||
{{#if this.sortedEmojis}}
|
||||
<table id="custom_emoji">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{i18n "admin.emoji.image"}}</th>
|
||||
<th>{{i18n "admin.emoji.name"}}</th>
|
||||
<th>{{i18n "admin.emoji.group"}}</th>
|
||||
<th>{{i18n "admin.emoji.created_by"}}</th>
|
||||
<th colspan="2">
|
||||
<div class="form-horizontal">
|
||||
<div class="inline-form">
|
||||
<label class="label">Show</label>
|
||||
<ComboBox
|
||||
@value={{this.filter}}
|
||||
@content={{this.sortingGroups}}
|
||||
|
@ -35,22 +29,49 @@
|
|||
@valueProperty={{null}}
|
||||
@onChange={{action "filterGroups"}}
|
||||
/>
|
||||
</th>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if this.sortedEmojis}}
|
||||
<table id="custom_emoji" class="d-admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{i18n "admin.emoji.image"}}</th>
|
||||
<th>{{i18n "admin.emoji.name"}}</th>
|
||||
<th>{{i18n "admin.emoji.group"}}</th>
|
||||
<th colspan="3">{{i18n "admin.emoji.created_by"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each this.sortedEmojis as |e|}}
|
||||
<tr>
|
||||
<td><img
|
||||
<tr class="d-admin-row__content">
|
||||
<td class="d-admin-row__overview">
|
||||
<img
|
||||
class="emoji emoji-custom"
|
||||
src={{e.url}}
|
||||
title={{e.name}}
|
||||
alt={{i18n "admin.emoji.alt"}}
|
||||
/></td>
|
||||
<td>:{{e.name}}:</td>
|
||||
<td>{{e.group}}</td>
|
||||
<td>{{e.created_by}}</td>
|
||||
<td class="action">
|
||||
/>
|
||||
</td>
|
||||
<td class="d-admin-row__detail">
|
||||
<div class="d-admin-row__mobile-label">
|
||||
{{i18n "admin.emoji.name"}}
|
||||
</div>
|
||||
:{{e.name}}:
|
||||
</td>
|
||||
<td class="d-admin-row__detail">
|
||||
<div class="d-admin-row__mobile-label">
|
||||
{{i18n "admin.emoji.group"}}
|
||||
</div>
|
||||
{{e.group}}
|
||||
</td>
|
||||
<td class="d-admin-row__detail">
|
||||
<div class="d-admin-row__mobile-label">
|
||||
{{i18n "admin.emoji.created_by"}}
|
||||
</div>
|
||||
{{e.created_by}}
|
||||
</td>
|
||||
<td class="d-admin-row__controls action">
|
||||
<DButton
|
||||
@action={{fn this.destroyEmoji e}}
|
||||
@icon="trash-can"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
.admin-contents.admin-emojis {
|
||||
#custom_emoji .select-kit,
|
||||
.emoji-uploader .select-kit {
|
||||
.select-kit {
|
||||
max-width: 210px;
|
||||
}
|
||||
#custom_emoji td.action {
|
||||
|
@ -19,7 +18,47 @@
|
|||
animation: background-fade-highlight 2.5s ease-out;
|
||||
}
|
||||
}
|
||||
|
||||
.emoji-uploader.form-horizontal {
|
||||
padding: var(--space-3);
|
||||
margin-top: var(--space-2);
|
||||
background: var(--primary-very-low);
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
flex-direction: row;
|
||||
align-items: end;
|
||||
|
||||
@include breakpoint("tablet") {
|
||||
flex-direction: column;
|
||||
align-items: normal;
|
||||
}
|
||||
|
||||
.control-group {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-weight: bold;
|
||||
margin-right: var(--space-2);
|
||||
color: var(--primary-high);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.d-admin-table {
|
||||
.d-admin-row__content td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.d-admin-row__overview {
|
||||
width: 20%;
|
||||
|
||||
@include breakpoint("tablet") {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.admin-emojis__header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
@include breakpoint("tablet") {
|
||||
display: block;
|
||||
margin-bottom: var(--space-3);
|
||||
box-shadow: var(--shadow-card);
|
||||
border: 1px solid var(--primary-low);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,17 @@
|
|||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
&.d-admin-row__controls {
|
||||
text-align: right;
|
||||
|
||||
@include breakpoint("tablet") {
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
right: 0;
|
||||
border-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,14 +95,7 @@
|
|||
}
|
||||
|
||||
.d-admin-row__controls {
|
||||
@include breakpoint("tablet") {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
&-options {
|
||||
text-align: right;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 0.5em;
|
||||
|
|
Loading…
Reference in New Issue