mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 23:04:27 +08:00
85774cc214
This commit attempts to improve the mobile experience for admin page header and subheader by automatically collapsing all action buttons in these components into a DMenu when viewing mobile. This is done by using different "list" wrapper components and a DMenu trigger and a DropdownMenu on mobile only, and uses has-block to determine whether to render the DMenu trigger at all. This also removes the `PluginOutlet` in `AdminPluginConfigPage`, it was too inflexible for this `DropdownMenu` case, and since the `:actions` were always rendering we couldn't rely on `has-block`. A new plugin API, `registerPluginHeaderActionComponent`, has been introduced instead to replace it.
87 lines
1.4 KiB
SCSS
87 lines
1.4 KiB
SCSS
.admin-page-header,
|
|
.admin-page-subheader {
|
|
&__title-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: stretch;
|
|
margin-bottom: var(--space-2);
|
|
|
|
h1,
|
|
h3 {
|
|
margin: 0;
|
|
}
|
|
|
|
.admin-page-header__actions {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
|
|
@media (max-width: $mobile-breakpoint) {
|
|
flex-direction: column;
|
|
}
|
|
|
|
button {
|
|
margin-left: var(--space-2);
|
|
|
|
@media (max-width: $mobile-breakpoint) {
|
|
width: 100%;
|
|
margin-bottom: var(--space-2);
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.admin-nav-submenu {
|
|
background: transparent;
|
|
border-bottom: 1px solid var(--primary-low);
|
|
|
|
.horizontal-overflow-nav {
|
|
background: transparent;
|
|
|
|
&:before {
|
|
display: none;
|
|
}
|
|
|
|
&:after {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.nav-pills {
|
|
width: auto;
|
|
margin: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.admin-page-header {
|
|
&__title-row {
|
|
@media (max-width: $mobile-breakpoint) {
|
|
flex-direction: row;
|
|
align-items: center;
|
|
|
|
.admin-page-header__actions {
|
|
button {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.admin-page-subheader {
|
|
&__title-row {
|
|
@media (max-width: $mobile-breakpoint) {
|
|
flex-direction: row;
|
|
align-items: center;
|
|
}
|
|
}
|
|
}
|
|
|
|
.admin-page-action-list-item {
|
|
.btn-primary {
|
|
color: var(--primary);
|
|
}
|
|
}
|