mirror of
https://github.com/discourse/discourse.git
synced 2025-01-22 19:39:46 +08:00
DEV: Use RouteTemplate for admin API keys template (#30835)
This is a small clean-up PR that does the following: - Convert api-keys.hbs to a RouteTemplate backed api-keys.gjs. - Move the sub-page templates (index, show, new) into /api-keys sub-directory. - Removes some styles that aren't used after the admin UI conversion.
This commit is contained in:
parent
d964fbc550
commit
0718f940fa
|
@ -1,5 +1,11 @@
|
|||
<PluginOutlet @name="admin-api-keys">
|
||||
<div class="admin-api-keys admin-config-page">
|
||||
import RouteTemplate from "ember-route-template";
|
||||
import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item";
|
||||
import DPageHeader from "discourse/components/d-page-header";
|
||||
import PluginOutlet from "discourse/components/plugin-outlet";
|
||||
import { i18n } from "discourse-i18n";
|
||||
|
||||
export default RouteTemplate(<template>
|
||||
<PluginOutlet @name="admin-api-keys">
|
||||
<DPageHeader
|
||||
@titleLabel={{i18n "admin.api_keys.title"}}
|
||||
@descriptionLabel={{i18n "admin.api_keys.description"}}
|
||||
|
@ -23,5 +29,5 @@
|
|||
<div class="admin-container admin-config-page__main-area">
|
||||
{{outlet}}
|
||||
</div>
|
||||
</div>
|
||||
</PluginOutlet>
|
||||
</PluginOutlet>
|
||||
</template>);
|
|
@ -25,55 +25,7 @@
|
|||
|
||||
// Api keys
|
||||
|
||||
.d-admin-table.api-keys {
|
||||
margin-bottom: 0.25em;
|
||||
|
||||
tr.revoked {
|
||||
color: var(--primary-high);
|
||||
}
|
||||
|
||||
.d-admin-row__overview.key {
|
||||
width: 20%;
|
||||
}
|
||||
}
|
||||
|
||||
.admin-api-keys {
|
||||
h2 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.api-key-new {
|
||||
.form-element,
|
||||
.form-element-desc {
|
||||
&.input-area {
|
||||
width: 100%;
|
||||
|
||||
.value-list,
|
||||
.select-kit,
|
||||
input[type="text"],
|
||||
input[type="text"].filter-input {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@include breakpoint(mobile-extra-large, min-width) {
|
||||
width: 75%;
|
||||
.value-list,
|
||||
.select-kit,
|
||||
input[type="text"] {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.label-area {
|
||||
label {
|
||||
margin: 0.5em 1em 0 0;
|
||||
}
|
||||
@include breakpoint(mobile-extra-large, min-width) {
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.api-key-show {
|
||||
.form-element,
|
||||
.form-element-desc {
|
||||
|
|
Loading…
Reference in New Issue
Block a user