mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-26 15:54:34 +08:00
This allows text content in these AI usage tables to wrap anywhere as needed to avoid page overflow, but still prioritizes the first column (username/model/feature) so it will get the most space. I'm also allowing the tables to stack at some wider viewports so text wrapping is less necessary, and made it so cells containing avatars and usernames wrap a little better. Before: <img width="1682" height="478" alt="image" src="https://github.com/user-attachments/assets/09c8f291-c14a-451d-baff-96a94b29f374" /> After: <img width="1632" height="508" alt="image" src="https://github.com/user-attachments/assets/80fe7829-f04c-4954-8e92-86d67612ea16" />
282 lines
5.4 KiB
SCSS
Vendored
282 lines
5.4 KiB
SCSS
Vendored
.admin-config-area-card {
|
|
padding: var(--space-4);
|
|
border: 1px solid var(--content-border-color);
|
|
border-radius: var(--d-border-radius);
|
|
background-color: var(--secondary);
|
|
min-width: 0;
|
|
|
|
&__label-optional {
|
|
color: var(--primary-medium);
|
|
font-size: var(--font-down-1);
|
|
margin-left: 5px;
|
|
}
|
|
|
|
&__additional-help {
|
|
color: var(--primary-medium);
|
|
font-size: var(--font-down-1);
|
|
}
|
|
|
|
&__warning-banner {
|
|
color: var(--primary-high);
|
|
background-color: var(--danger-low);
|
|
font-size: var(--font-down-1);
|
|
padding: 10px 10px;
|
|
}
|
|
|
|
&__control-group-horizontal {
|
|
display: flex;
|
|
margin-bottom: 18px;
|
|
|
|
label {
|
|
margin-right: 1em;
|
|
}
|
|
}
|
|
|
|
&__title {
|
|
flex: 2;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
&__header-wrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
flex: 1;
|
|
}
|
|
|
|
&__content {
|
|
margin-top: 0.5rem;
|
|
}
|
|
}
|
|
|
|
.admin-config-page {
|
|
&__main-area {
|
|
.admin-detail {
|
|
padding-top: 15px;
|
|
border-left: 0;
|
|
padding-left: 0;
|
|
width: 100%;
|
|
}
|
|
}
|
|
}
|
|
|
|
.admin-config-area {
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
gap: var(--space-4);
|
|
align-items: flex-start;
|
|
|
|
@media (max-width: $mobile-breakpoint) {
|
|
flex-direction: column;
|
|
}
|
|
|
|
&__full-width {
|
|
flex: 1 0 100%;
|
|
}
|
|
|
|
&__primary-content {
|
|
flex: 0 1 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-4);
|
|
max-width: var(--admin-content-max-width);
|
|
}
|
|
|
|
&__aside {
|
|
/* use for help inset */
|
|
flex: 0 1 20%;
|
|
padding: var(--space-2);
|
|
|
|
@media (max-width: $mobile-breakpoint) {
|
|
flex: 0 1 auto;
|
|
}
|
|
}
|
|
|
|
&__settings {
|
|
.setting-label {
|
|
margin-left: 18px;
|
|
}
|
|
}
|
|
|
|
.btn-back {
|
|
margin-bottom: 1em;
|
|
}
|
|
}
|
|
|
|
.admin-site-settings-filter-controls {
|
|
background: var(--primary-very-low);
|
|
margin-bottom: 1em;
|
|
|
|
.controls,
|
|
.search.controls {
|
|
background: var(--primary-very-low);
|
|
}
|
|
}
|
|
|
|
.admin-config-area-empty-list,
|
|
.admin-empty-list {
|
|
padding: 1em;
|
|
border: 1px solid var(--content-border-color);
|
|
border-radius: var(--d-border-radius);
|
|
|
|
&__cta-button {
|
|
display: flex;
|
|
margin-top: 1em;
|
|
}
|
|
}
|
|
|
|
.admin-config-area-card-section {
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
gap: var(--space-4);
|
|
flex-direction: column;
|
|
width: calc(100% - 1em);
|
|
border: 1px solid var(--content-border-color);
|
|
padding: 0.5em;
|
|
|
|
@media (max-width: $mobile-breakpoint) {
|
|
flex-direction: column;
|
|
}
|
|
|
|
&__header-wrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
|
|
&.collapsable {
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
&__title {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
&__content {
|
|
margin-top: 0.5rem;
|
|
padding-right: 1em;
|
|
padding-bottom: 1em;
|
|
gap: 1.5em;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
}
|
|
|
|
.admin-logo-form {
|
|
.form-kit__section {
|
|
.form-kit__container {
|
|
padding: 1em;
|
|
width: calc(100% - 2em) !important;
|
|
border: 1px solid var(--content-border-color);
|
|
}
|
|
}
|
|
|
|
#control-logo_dark .image-uploader.has-image .uploaded-image-preview {
|
|
background-color: #333;
|
|
background-clip: border-box;
|
|
}
|
|
|
|
.form-kit__field-toggle .form-kit__container-content.--full {
|
|
// avoid label wrapping
|
|
width: var(--form-kit-small-input) !important;
|
|
}
|
|
}
|
|
|
|
.admin-fonts-form {
|
|
&__more {
|
|
font-size: var(--font-down-1-rem);
|
|
}
|
|
|
|
.form-kit__field-custom {
|
|
width: 100% !important;
|
|
|
|
.form-kit__control-custom {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
|
|
.admin-fonts-form__button-option {
|
|
border: 1px solid var(--content-border-color);
|
|
font-size: var(--font-down-1-rem);
|
|
max-height: 4em;
|
|
height: 50px;
|
|
margin-bottom: 1em;
|
|
padding: 0 0.65em;
|
|
|
|
&:hover {
|
|
border-color: var(--primary-low-mid);
|
|
}
|
|
|
|
&.active {
|
|
position: relative;
|
|
border: 2px solid var(--tertiary);
|
|
|
|
&::after {
|
|
position: absolute;
|
|
top: 35%;
|
|
left: 0.5rem;
|
|
font-family: "Segoe UI", Arial, sans-serif;
|
|
content: "\2714"; // ✔
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 1rem;
|
|
height: 1rem;
|
|
background-color: var(--tertiary);
|
|
color: var(--secondary);
|
|
border-radius: 9999px;
|
|
font-size: 0.5rem;
|
|
margin-left: 0.25rem;
|
|
}
|
|
|
|
&:hover {
|
|
border-color: var(--tertiary);
|
|
}
|
|
}
|
|
|
|
&.font {
|
|
flex: 0 0 32%;
|
|
max-width: 32%;
|
|
|
|
@media (max-width: $mobile-breakpoint) {
|
|
flex: 0 0 100%;
|
|
max-width: 100%;
|
|
}
|
|
}
|
|
|
|
&.text-size {
|
|
flex: 0 0 19%;
|
|
max-width: 19%;
|
|
|
|
// px must be used because there is different font size inside each button
|
|
height: 45px;
|
|
|
|
@media (max-width: $mobile-breakpoint) {
|
|
flex: 0 0 100%;
|
|
max-width: 100%;
|
|
}
|
|
|
|
&.smallest {
|
|
font-size: var(--base-font-size-smallest);
|
|
}
|
|
|
|
&.smaller {
|
|
font-size: var(--base-font-size-smaller);
|
|
}
|
|
|
|
&.normal {
|
|
font-size: var(--base-font-size-normal);
|
|
}
|
|
|
|
&.larger {
|
|
font-size: var(--base-font-size-larger);
|
|
}
|
|
|
|
&.largest {
|
|
font-size: var(--base-font-size-largest);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|