mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:41:29 +08:00
UX: Apply admin table classes for consistent mobile styling on the API keys page (#29630)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
* UX: Apply admin table classes for consistent mobile styling on the API keys page * apply prettier
This commit is contained in:
parent
0568d36133
commit
b4f7a1b761
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
{{#if this.model}}
|
{{#if this.model}}
|
||||||
<LoadMore @selector=".api-keys tr" @action={{action "loadMore"}}>
|
<LoadMore @selector=".api-keys tr" @action={{action "loadMore"}}>
|
||||||
<table class="api-keys grid">
|
<table class="d-admin-table api-keys">
|
||||||
<thead>
|
<thead>
|
||||||
<th>{{i18n "admin.api.key"}}</th>
|
<th>{{i18n "admin.api.key"}}</th>
|
||||||
<th>{{i18n "admin.api.description"}}</th>
|
<th>{{i18n "admin.api.description"}}</th>
|
||||||
|
@ -18,16 +18,21 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#each this.model as |k|}}
|
{{#each this.model as |k|}}
|
||||||
<tr class={{if k.revoked_at "revoked"}}>
|
<tr class="d-admin-row__content {{if k.revoked_at 'revoked'}}">
|
||||||
<td class="key">
|
<td class="d-admin-row__overview key">
|
||||||
{{#if k.revoked_at}}{{d-icon "circle-xmark"}}{{/if}}
|
{{#if k.revoked_at}}{{d-icon "circle-xmark"}}{{/if}}
|
||||||
{{k.truncatedKey}}
|
{{k.truncatedKey}}
|
||||||
</td>
|
</td>
|
||||||
<td class="key-description">
|
<td class="d-admin-row__detail key-description">
|
||||||
|
<div class="d-admin-row__mobile-label">{{i18n
|
||||||
|
"admin.api.description"
|
||||||
|
}}</div>
|
||||||
{{k.shortDescription}}
|
{{k.shortDescription}}
|
||||||
</td>
|
</td>
|
||||||
<td class="key-user">
|
<td class="d-admin-row__detail key-user">
|
||||||
<div class="label">{{i18n "admin.api.user"}}</div>
|
<div class="d-admin-row__mobile-label">{{i18n
|
||||||
|
"admin.api.user"
|
||||||
|
}}</div>
|
||||||
{{#if k.user}}
|
{{#if k.user}}
|
||||||
<LinkTo @route="adminUser" @model={{k.user}}>
|
<LinkTo @route="adminUser" @model={{k.user}}>
|
||||||
{{avatar k.user imageSize="small"}}
|
{{avatar k.user imageSize="small"}}
|
||||||
|
@ -36,19 +41,23 @@
|
||||||
{{i18n "admin.api.all_users"}}
|
{{i18n "admin.api.all_users"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td class="key-created">
|
<td class="d-admin-row__detail key-created">
|
||||||
<div class="label">{{i18n "admin.api.created"}}</div>
|
<div class="d-admin-row__mobile-label">{{i18n
|
||||||
|
"admin.api.created"
|
||||||
|
}}</div>
|
||||||
{{format-date k.created_at}}
|
{{format-date k.created_at}}
|
||||||
</td>
|
</td>
|
||||||
<td class="key-last-used">
|
<td class="d-admin-row__detail key-last-used">
|
||||||
<div class="label">{{i18n "admin.api.last_used"}}</div>
|
<div class="d-admin-row__mobile-label">{{i18n
|
||||||
|
"admin.api.last_used"
|
||||||
|
}}</div>
|
||||||
{{#if k.last_used_at}}
|
{{#if k.last_used_at}}
|
||||||
{{format-date k.last_used_at}}
|
{{format-date k.last_used_at}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{i18n "admin.api.never_used"}}
|
{{i18n "admin.api.never_used"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td class="key-controls">
|
<td class="d-admin-row__controls key-controls">
|
||||||
<DButton
|
<DButton
|
||||||
@action={{route-action "show" k}}
|
@action={{route-action "show" k}}
|
||||||
@icon="far-eye"
|
@icon="far-eye"
|
||||||
|
|
|
@ -48,43 +48,16 @@ table.web-hooks.grid {
|
||||||
table.api-keys {
|
table.api-keys {
|
||||||
margin-bottom: 0.25em;
|
margin-bottom: 0.25em;
|
||||||
|
|
||||||
.key-controls {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
tr.revoked {
|
tr.revoked {
|
||||||
color: var(--primary-medium);
|
color: var(--primary-medium);
|
||||||
}
|
}
|
||||||
|
|
||||||
@include breakpoint(tablet) {
|
.d-admin-row__overview.key {
|
||||||
tr {
|
width: 30%;
|
||||||
grid-template-columns: 0.25fr 1fr 1fr;
|
}
|
||||||
}
|
|
||||||
td.key {
|
.d-admin-row__content td {
|
||||||
grid-row: 1;
|
vertical-align: middle;
|
||||||
grid-column-start: 1;
|
|
||||||
grid-column-end: 1;
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
td.key-description {
|
|
||||||
grid-row: 1;
|
|
||||||
grid-column-start: 2;
|
|
||||||
grid-column-end: -1;
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
td.key-user {
|
|
||||||
grid-row: 2;
|
|
||||||
grid-column-start: 1;
|
|
||||||
}
|
|
||||||
td.key-controls {
|
|
||||||
grid-row: 2;
|
|
||||||
grid-column-end: -1;
|
|
||||||
grid-column-start: 2;
|
|
||||||
text-align: right;
|
|
||||||
.btn {
|
|
||||||
margin-bottom: 0.25em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user