Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 21 additions & 24 deletions frontend/src/components/DriverEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,37 +156,31 @@ function handleRemove() {

<span
v-if="driver.allowRtCodes?.length"
class="inline-flex items-center gap-1 rounded bg-purple-50 px-1.5 py-0.5 text-[10px] font-semibold text-purple-600 xl:text-xs"
class="inline-flex items-center gap-1 rounded bg-blue-100 px-1.5 py-0.5 text-[10px] font-semibold text-blue-700 xl:text-xs"
:title="$t('fieldAllowedExitCode')"
>
<Icon icon="mdi:alert-circle-success-outline" class="h-3 w-3" />
<Icon icon="mdi:numeric-1-box-outline" class="h-3 w-3" />
{{ driver.allowRtCodes.join(', ') }}
</span>

<span
v-if="driver.minExeTime > 0"
class="inline-flex items-center gap-1 rounded bg-blue-50 px-1.5 py-0.5 text-[10px] font-semibold text-blue-600 xl:text-xs"
class="inline-flex items-center gap-1 rounded bg-[#e5e7c8] px-1.5 py-0.5 text-[10px] font-semibold text-[#5f6a14] xl:text-xs"
:title="$t('fieldMinExecuteTime')"
>
<Icon icon="mdi:timer-outline" class="h-3 w-3" />
{{ driver.minExeTime }}s
</span>

<span
v-if="driver.incompatibles.length"
v-if="driver.incompatibles.length || driver.globalExclusive"
class="inline-flex items-center gap-1 rounded bg-yellow-100 px-1.5 py-0.5 text-[10px] font-semibold text-yellow-700 xl:text-xs"
:title="$t('labelIncompatibleWith')"
>
<Icon icon="mdi:source-merge" class="h-3 w-3" />
{{ driver.incompatibles.length }}
</span>

<span
v-if="driver.globalExclusive"
class="inline-flex items-center gap-1 rounded bg-fuchsia-100 px-1.5 py-0.5 text-[10px] font-semibold text-fuchsia-700 xl:text-xs"
:title="$t('fieldGlobalExclusive')"
:title="
driver.globalExclusive ? $t('fieldGlobalExclusive') : $t('labelIncompatibleWith')
"
>
<Icon icon="mdi:asterisk" class="h-3 w-3" />
<Icon icon="mdi:chart-timeline" class="h-3 w-3" />
{{ driver.globalExclusive ? $t('fieldGlobalExclusive') : driver.incompatibles.length }}
</span>
</div>
</div>
Expand Down Expand Up @@ -288,7 +282,17 @@ function handleRemove() {
</UTooltip>
</div>

<ChipInput v-model="driver.flags" placeholder="e.g. /S (Enter)">
<ChipInput
v-model="driver.flags"
placeholder="e.g. /S (Enter)"
style="
--chip-bg: #f4f4f5;
--chip-border: #e4e4e7;
--chip-text: #3f3f46;
--chip-close-text: #a1a1aa;
--chip-close-bg-hover: #e4e4e7;
"
>
<UDropdownMenu :items="[flagItems]" :ui="{ content: 'max-h-58 overflow-y-auto' }">
<button
type="button"
Expand All @@ -315,13 +319,6 @@ function handleRemove() {
:commit-keys="['enter', ' ']"
:parse="(raw: string) => raw.trim()"
:accept="(parsed: string) => /^-?\d+$/.test(parsed)"
style="
--chip-bg: #f4f4f5;
--chip-border: #e4e4e7;
--chip-text: #3f3f46;
--chip-close-text: #a1a1aa;
--chip-close-bg-hover: #e4e4e7;
"
/>
</fieldset>

Expand All @@ -332,7 +329,7 @@ function handleRemove() {
</label>

<span
class="rounded border border-half-baked-100 bg-half-baked-50 px-2 py-0.5 font-mono text-[10px] font-extrabold text-half-baked-600 shadow-sm xl:text-xs"
class="rounded border border-[#d9dcb0] bg-[#e5e7c8] px-2 py-0.5 font-mono text-[10px] font-extrabold text-[#5f6a14] shadow-sm xl:text-xs"
>
{{ driver.minExeTime > 0 ? driver.minExeTime + 's' : '—' }}
</span>
Expand Down
14 changes: 3 additions & 11 deletions frontend/src/pages/drivers/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,23 +162,15 @@ function openInspect(id: number) {
class="inline-flex items-center gap-0.5 rounded bg-orange-100 px-1 py-0.5 text-orange-700"
:title="$t('fieldGroupExclusive')"
>
<Icon icon="mdi:chart-timeline" />
</span>

<span
v-if="g.drivers.some(d => d.globalExclusive)"
class="inline-flex items-center rounded bg-fuchsia-100 px-1 py-0.5 text-fuchsia-700"
:title="$t('fieldGlobalExclusive')"
>
<Icon icon="mdi:asterisk" />
<Icon icon="mdi:queue-first-in-last-out" />
</span>

<span
v-if="g.drivers.some(d => d.incompatibles.length > 0)"
v-if="g.drivers.some(d => d.incompatibles.length > 0 || d.globalExclusive)"
class="inline-flex items-center rounded bg-yellow-100 px-1 py-0.5 text-yellow-700"
:title="$t('labelIncompatibleWith')"
>
<Icon icon="mdi:source-merge" />
<Icon icon="mdi:chart-timeline" />
</span>

<span
Expand Down
Loading