mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-10-20 05:56:56 +00:00
fix(webui): selectable chip fallback, precise css fixup docs
This commit is contained in:
+808
-807
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { faCheck, faCopy, faTriangleExclamation } from '@fortawesome/free-solid-svg-icons'
|
import { faCheck, faCopy, faTriangleExclamation } from '@fortawesome/free-solid-svg-icons'
|
||||||
import { ref, useTemplateRef } from 'vue'
|
import { computed, onUnmounted, ref, useTemplateRef } from 'vue'
|
||||||
|
|
||||||
import { Badge } from '@/components/ui/badge'
|
import { Badge } from '@/components/ui/badge'
|
||||||
import { copyText } from '@/lib/clipboard'
|
import { copyText } from '@/lib/clipboard'
|
||||||
@@ -50,12 +50,16 @@ const icon = {
|
|||||||
selected: faCheck,
|
selected: faCheck,
|
||||||
failed: faTriangleExclamation,
|
failed: faTriangleExclamation,
|
||||||
}
|
}
|
||||||
const title = {
|
const title = computed(() => ({
|
||||||
idle: `Copy ${props.id}`,
|
idle: `Copy ${props.id}`,
|
||||||
copied: 'Copied',
|
copied: 'Copied',
|
||||||
selected: 'Selected — press Ctrl/Cmd+C',
|
selected: 'Selected — press Ctrl/Cmd+C',
|
||||||
failed: 'Copy failed',
|
failed: 'Copy failed',
|
||||||
}
|
}))
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
clearTimeout(resetTimer)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -68,7 +72,7 @@ const title = {
|
|||||||
:title="title[state]"
|
:title="title[state]"
|
||||||
@click="onClick"
|
@click="onClick"
|
||||||
>
|
>
|
||||||
<span ref="label">{{ id }}</span>
|
<span ref="label" class="select-text">{{ id }}</span>
|
||||||
<FontAwesomeIcon :icon="icon[state]" class="size-2.5 shrink-0" aria-hidden="true" />
|
<FontAwesomeIcon :icon="icon[state]" class="size-2.5 shrink-0" aria-hidden="true" />
|
||||||
</Badge>
|
</Badge>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -45,11 +45,13 @@ const overview = computed(() => dashboard.overview)
|
|||||||
// string, so the HTML5 parser's "foster parenting" algorithm — which
|
// string, so the HTML5 parser's "foster parenting" algorithm — which
|
||||||
// only runs while building a DOM tree FROM a token stream — never fires
|
// only runs while building a DOM tree FROM a token stream — never fires
|
||||||
// here at all; a <div> placed as a <tbody> child by direct DOM
|
// here at all; a <div> placed as a <tbody> child by direct DOM
|
||||||
// manipulation stays exactly where it was put. What actually breaks is
|
// manipulation stays exactly where it was put. CSS2.1 §17.2.1 does
|
||||||
// layout: CSS table rendering (CSS2.1 §17.2.1's anonymous-table-object
|
// define this case: a non-row child of a row-group box is wrapped in
|
||||||
// generation) does not know what to do with a block-level box sitting
|
// an anonymous table-row plus an anonymous table-cell, not left
|
||||||
// directly inside a table-row-group box, so the table's visual layout
|
// undefined. What actually breaks is column alignment: that one
|
||||||
// misbehaves around it. Either way, a <div> does not belong there.
|
// anonymous cell holds the div's entire contents, outside the table's
|
||||||
|
// real column structure, so none of it lines up with the table's
|
||||||
|
// actual columns. Either way, a <div> does not belong there.
|
||||||
// (reka-ui's Collapsible primitives DO support an `as` prop that could in
|
// (reka-ui's Collapsible primitives DO support an `as` prop that could in
|
||||||
// principle render Root as a <tbody> and Trigger/Content as <tr> —
|
// principle render Root as a <tbody> and Trigger/Content as <tr> —
|
||||||
// installed and inspected via the CLI to check, then not used:
|
// installed and inspected via the CLI to check, then not used:
|
||||||
@@ -292,7 +294,7 @@ function clearQuery(): void {
|
|||||||
-->
|
-->
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="flex items-center gap-2 rounded focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring"
|
class="-my-1 flex items-center gap-2 rounded py-1 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring"
|
||||||
:aria-expanded="expandedProviders.has(p.name)"
|
:aria-expanded="expandedProviders.has(p.name)"
|
||||||
:aria-controls="expandedProviders.has(p.name) ? providerModelsId(p.name) : undefined"
|
:aria-controls="expandedProviders.has(p.name) ? providerModelsId(p.name) : undefined"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user