mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 23:34:10 +08:00
70f7c0ee6f
This commit changes the API for registering the plugin config page nav configuration from a server-side to a JS one; there is no need for it to be server-side. It also makes some changes to allow for 2 different ways of displaying navigation for plugin pages, depending on complexity: * TOP - This is the best mode for simple plugins without a lot of different custom configuration pages, and it reuses the grey horizontal nav bar already used for admins. * SIDEBAR - This is better for more complex plugins; likely this won't be used in the near future, but it's readily available if needed There is a new AdminPluginConfigNavManager service too to manage which plugin the admin is actively viewing, otherwise we would have trouble hiding the main plugin nav for admins when viewing a single plugin.
127 lines
2.2 KiB
SCSS
127 lines
2.2 KiB
SCSS
// Styles for /admin/plugins
|
|
|
|
.admin-contents.admin-plugins {
|
|
.controls {
|
|
.settings-button {
|
|
margin-left: auto;
|
|
}
|
|
}
|
|
|
|
.admin-plugins-list {
|
|
@media screen and (min-width: 550px) {
|
|
.admin-plugins-list__row {
|
|
grid-template-columns: 0.25fr repeat(4, 1fr);
|
|
}
|
|
}
|
|
@include breakpoint(mobile-extra-large) {
|
|
.admin-plugins-list__row {
|
|
grid-template-columns: 0.25fr repeat(3, 1fr);
|
|
}
|
|
.admin-plugins-list {
|
|
&__name-details {
|
|
grid-column-start: 2;
|
|
grid-column-end: -1;
|
|
}
|
|
&__settings {
|
|
grid-row: 2;
|
|
grid-column-start: 4;
|
|
text-align: right;
|
|
button {
|
|
display: flex;
|
|
}
|
|
}
|
|
&__version {
|
|
grid-row: 2;
|
|
grid-column-start: 3;
|
|
}
|
|
&__enabled {
|
|
grid-row: 2;
|
|
grid-column-start: 2;
|
|
}
|
|
}
|
|
}
|
|
|
|
.admin-plugins-list__row-admin-search-filtered {
|
|
background-color: var(--primary-low);
|
|
}
|
|
|
|
&__author {
|
|
font-size: var(--font-down-2);
|
|
padding: 0 0 0.25em 0;
|
|
}
|
|
|
|
&__name-with-badges {
|
|
display: flex;
|
|
}
|
|
|
|
&__name {
|
|
font-weight: bold;
|
|
margin-right: 0.5em;
|
|
}
|
|
|
|
&__badge {
|
|
font-weight: 400;
|
|
font-size: var(--font-down-2);
|
|
background-color: var(--primary-low);
|
|
color: var(--primary-medium);
|
|
padding: 0.2em 0.8em;
|
|
|
|
.d-icon {
|
|
font-size: 0.8em;
|
|
}
|
|
|
|
& + .admin-plugins-list__badge {
|
|
margin-left: 0.5em;
|
|
}
|
|
}
|
|
|
|
&__version {
|
|
.commit-hash {
|
|
font-size: var(--font-down-1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.admin-plugin-config-page {
|
|
.admin-controls {
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
&__main-area {
|
|
.admin-detail {
|
|
padding-top: 15px;
|
|
}
|
|
|
|
&.-without-inner-sidebar {
|
|
.admin-detail {
|
|
border-left: 0;
|
|
padding-left: 0;
|
|
width: 100%;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.admin-plugins .admin-container {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.admin-plugins-list-container {
|
|
margin-top: 1em;
|
|
}
|
|
|
|
.admin-plugin-filtered-site-settings {
|
|
&__filter {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.admin-plugin-config-area {
|
|
&__settings {
|
|
.admin-site-settings-filter-controls {
|
|
margin-bottom: 1em;
|
|
}
|
|
}
|
|
}
|