UX: minor improvements to LLM page and admin tables (#1034)

This commit is contained in:
Kris 2024-12-19 18:14:22 -05:00 committed by GitHub
parent a4033e2af9
commit ac705b694b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 40 additions and 18 deletions

View File

@ -119,14 +119,17 @@ export default class AiLlmsListEditor extends Component {
@llmTemplate={{@llmTemplate}}
/>
{{else}}
<DPageSubheader
@titleLabel={{i18n "discourse_ai.llms.short_title"}}
@descriptionLabel={{i18n
"discourse_ai.llms.preconfigured.description"
}}
@learnMoreUrl="https://meta.discourse.org/t/discourse-ai-large-language-model-llm-settings-page/319903"
/>
{{#if this.hasLlmElements}}
<section class="ai-llms-list-editor__configured">
<DPageSubheader
@titleLabel={{i18n "discourse_ai.llms.configured.title"}}
@descriptionLabel={{i18n
"discourse_ai.llms.preconfigured.description"
}}
@learnMoreUrl="https://meta.discourse.org/t/discourse-ai-large-language-model-llm-settings-page/319903"
/>
<table class="d-admin-table">
<thead>
@ -185,18 +188,7 @@ export default class AiLlmsListEditor extends Component {
</section>
{{/if}}
<section class="ai-llms-list-editor__templates">
<DPageSubheader
@titleLabel={{i18n this.preconfiguredTitle}}
@descriptionLabel={{unless
this.hasLlmElements
(i18n "discourse_ai.llms.preconfigured.description")
}}
@learnMoreUrl={{unless
this.hasLlmElements
"https://meta.discourse.org/t/discourse-ai-large-language-model-llm-settings-page/319903"
}}
/>
<DPageSubheader @titleLabel={{i18n this.preconfiguredTitle}} />
<AdminSectionLandingWrapper
class="ai-llms-list-editor__templates-list"
>

View File

@ -6,8 +6,9 @@
margin: 0 0 1em 0;
}
&__configured + &__templates {
margin-top: 3em;
&__configured,
&__templates {
margin-top: 2em;
}
}
@ -66,12 +67,41 @@
}
}
.ai-llms-list-editor__configured,
.ai-llms-list-editor__templates {
h2 {
font-size: var(--font-up-1);
}
}
.ai-llms-list-editor__configured {
.d-toggle-switch {
justify-content: center;
}
}
.ai-tool-list-editor__current,
.ai-persona-list-editor__current,
.ai-llms-list-editor__configured {
.d-admin-table {
tr:hover {
background: inherit;
}
th,
td {
&:first-child {
padding-left: 0;
}
}
th,
td {
&:last-child {
padding-right: 0;
}
}
}
}
.ai-llms-list-editor__templates {
&-list {
display: grid;