UX: Layout fixes for admin permalinks page (#14819)

This commit is contained in:
Penar Musaraj 2021-11-04 14:15:55 -04:00 committed by GitHub
parent 8257b8cc0c
commit 9b30103628
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 57 additions and 20 deletions

View File

@ -1,17 +1,21 @@
<div class="permalink-title"> <h1>{{i18n "admin.permalink.title"}}</h1>
<h2>{{i18n "admin.permalink.title"}}</h2>
</div>
<div class="permalink-description"> <div class="permalink-description">
<span>{{i18n "admin.permalink.description"}}</span> <span>{{i18n "admin.permalink.description"}}</span>
</div> </div>
<div class="permalink-search">
{{text-field value=filter class="url-input" placeholderKey="admin.permalink.form.filter" autocorrect="off" autocapitalize="off"}}
</div>
{{permalink-form action=(action "recordAdded")}} {{permalink-form action=(action "recordAdded")}}
<br>
{{#conditional-loading-spinner condition=loading}} {{#conditional-loading-spinner condition=loading}}
{{#if model.length}} {{#if model.length}}
<div class="permalink-search">
{{text-field
value=filter
class="url-input"
placeholderKey="admin.permalink.form.filter"
autocorrect="off"
autocapitalize="off"
}}
</div>
<table class="admin-logs-table permalinks grid"> <table class="admin-logs-table permalinks grid">
<thead class="heading-container"> <thead class="heading-container">
<th class="col heading first url">{{i18n "admin.permalink.url"}}</th> <th class="col heading first url">{{i18n "admin.permalink.url"}}</th>
@ -21,7 +25,14 @@
<tbody> <tbody>
{{#each model as |pl|}} {{#each model as |pl|}}
<tr class="admin-list-item"> <tr class="admin-list-item">
<td class="col first url">{{d-button title="admin.permalink.copy_to_clipboard" icon="far-clipboard" action=(action "copyUrl" pl)}} <span id="admin-permalink-{{pl.id}}" title={{pl.url}}>{{pl.url}}</span></td> <td class="col first url">
{{flat-button
title="admin.permalink.copy_to_clipboard"
icon="far-clipboard"
action=(action "copyUrl" pl)
}}
<span id="admin-permalink-{{pl.id}}" title={{pl.url}}>{{pl.url}}</span>
</td>
<td class="col destination"> <td class="col destination">
{{#if pl.topic_id}} {{#if pl.topic_id}}
<a href={{pl.topic_url}}>{{pl.topic_title}}</a> <a href={{pl.topic_url}}>{{pl.topic_title}}</a>

View File

@ -671,12 +671,14 @@
margin-top: 1em; margin-top: 1em;
color: var(--primary-medium); color: var(--primary-medium);
} }
// Permalinks // Permalinks
.permalinks { .permalinks {
.url, .url,
.topic, .topic,
.category, .category,
.external_url, .external_url,
.destination,
.post { .post {
@include ellipsis; @include ellipsis;
max-width: 100px; max-width: 100px;
@ -690,27 +692,51 @@
} }
} }
.permalink-search {
text-align: left;
@include breakpoint(tablet, min-width) {
text-align: right;
}
}
.permalink-form { .permalink-form {
padding: 0.5em 1em 0 1em;
margin-top: 1em;
background: var(--primary-very-low);
.select-kit { .select-kit {
max-width: 200px; max-width: 260px;
}
@include breakpoint(tablet) {
label {
width: 100%;
}
} }
}
.permalink-title {
margin-bottom: 10px;
} }
.permalink-description { .permalink-description {
color: var(--primary-medium); color: var(--primary-medium);
} }
.permalink-search {
margin-top: 2em;
input {
min-width: 250px;
margin-bottom: 0;
}
}
table.permalinks {
@include breakpoint(tablet, min-width) {
td.url,
th.url {
width: 33%;
}
th.destination,
td.destination {
width: 60%;
}
}
@include breakpoint(tablet) {
td.url .btn-flat {
display: none;
}
}
}
// embedding // embedding
.embeddable-hosts { .embeddable-hosts {
margin-bottom: 2em; margin-bottom: 2em;