mirror of
https://github.com/modrinth/code.git
synced 2026-08-31 12:05:53 +00:00
feat: add warning icon for incompatible selection
This commit is contained in:
@@ -23,10 +23,16 @@
|
|||||||
:class="{
|
:class="{
|
||||||
'text-brand-red opacity-40': isGameVersionUnavailable(item.value),
|
'text-brand-red opacity-40': isGameVersionUnavailable(item.value),
|
||||||
'text-green': isSelected,
|
'text-green': isSelected,
|
||||||
|
'!opacity-100': isSelected,
|
||||||
'text-primary': !isGameVersionUnavailable(item.value) && !isSelected,
|
'text-primary': !isGameVersionUnavailable(item.value) && !isSelected,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<span class="min-w-0 truncate font-semibold leading-tight">{{ item.label }}</span>
|
<span class="min-w-0 truncate font-semibold leading-tight">{{ item.label }}</span>
|
||||||
|
<TriangleAlertIcon
|
||||||
|
v-if="isSelected && isGameVersionUnavailable(item.value)"
|
||||||
|
aria-hidden="true"
|
||||||
|
class="size-5 shrink-0 text-orange"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #dropdown-footer>
|
<template #dropdown-footer>
|
||||||
@@ -59,10 +65,16 @@
|
|||||||
:class="{
|
:class="{
|
||||||
'text-brand-red opacity-40': isPlatformUnavailable(item.value),
|
'text-brand-red opacity-40': isPlatformUnavailable(item.value),
|
||||||
'text-green': isSelected,
|
'text-green': isSelected,
|
||||||
|
'!opacity-100': isSelected,
|
||||||
'text-primary': !isPlatformUnavailable(item.value) && !isSelected,
|
'text-primary': !isPlatformUnavailable(item.value) && !isSelected,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<span class="min-w-0 truncate font-semibold leading-tight">{{ item.label }}</span>
|
<span class="min-w-0 truncate font-semibold leading-tight">{{ item.label }}</span>
|
||||||
|
<TriangleAlertIcon
|
||||||
|
v-if="isSelected && isPlatformUnavailable(item.value)"
|
||||||
|
aria-hidden="true"
|
||||||
|
class="size-5 shrink-0 text-orange"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Combobox>
|
</Combobox>
|
||||||
@@ -126,7 +138,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Labrinth } from '@modrinth/api-client'
|
import type { Labrinth } from '@modrinth/api-client'
|
||||||
import { DownloadIcon } from '@modrinth/assets'
|
import { DownloadIcon, TriangleAlertIcon } from '@modrinth/assets'
|
||||||
import {
|
import {
|
||||||
ButtonStyled,
|
ButtonStyled,
|
||||||
type CdnDownloadReason,
|
type CdnDownloadReason,
|
||||||
|
|||||||
Reference in New Issue
Block a user