mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-07 00:20:07 +00:00
## Summary - Replace hardcoded `text-white` class with theme-aware alternatives to fix invisible text on light themes - Update Load3D control backgrounds to use semantic tokens - Update dropdown menus to use `bg-interface-menu-surface` - Update overlay backgrounds to use `bg-backdrop` with opacity ## Changes | Component | Old | New | |-----------|-----|-----| | Text on primary bg | `text-white` | `text-base-foreground` | | Dropdown menus | `bg-black/50` | `bg-interface-menu-surface` | | Control panels | `bg-smoke-700/30` | `bg-backdrop/30` | | Loading overlays | `bg-black bg-opacity-50` | `bg-backdrop/50` | | Selected states | `bg-smoke-600` | `bg-button-active-surface` | ## Files Modified (14) - `src/components/TopMenuSection.vue` - `src/components/input/MultiSelect.vue` - `src/components/load3d/*.vue` (12 files) - `src/renderer/extensions/vueNodes/VideoPreview.vue` ## Test plan - [ ] Verify text visibility in light theme - [ ] Verify text visibility in dark theme - [ ] Test Load3D viewer controls functionality - [ ] Test MultiSelect dropdown checkbox visibility ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7908-fix-replace-text-white-with-theme-aware-color-tokens-2e26d73d36508107bb01d1d6e3b74f6a) by [Unito](https://www.unito.io)
70 lines
1.4 KiB
Vue
70 lines
1.4 KiB
Vue
<template>
|
|
<div class="relative show-slider">
|
|
<Button
|
|
v-tooltip.right="{ value: tooltipText, showDelay: 300 }"
|
|
size="icon"
|
|
variant="textonly"
|
|
class="rounded-full"
|
|
:aria-label="tooltipText"
|
|
@click="toggleSlider"
|
|
>
|
|
<i :class="['pi', icon, 'text-lg text-base-foreground']" />
|
|
</Button>
|
|
<div
|
|
v-show="showSlider"
|
|
class="absolute top-0 left-12 rounded-lg bg-interface-menu-surface p-4 shadow-lg w-[150px]"
|
|
>
|
|
<Slider
|
|
v-model="value"
|
|
class="w-full"
|
|
:min="min"
|
|
:max="max"
|
|
:step="step"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import Slider from 'primevue/slider'
|
|
import { onMounted, onUnmounted, ref } from 'vue'
|
|
|
|
import Button from '@/components/ui/button/Button.vue'
|
|
|
|
const {
|
|
icon = 'pi-expand',
|
|
min = 10,
|
|
max = 150,
|
|
step = 1
|
|
} = defineProps<{
|
|
icon?: string
|
|
tooltipText: string
|
|
min?: number
|
|
max?: number
|
|
step?: number
|
|
}>()
|
|
|
|
const value = defineModel<number>()
|
|
const showSlider = ref(false)
|
|
|
|
const toggleSlider = () => {
|
|
showSlider.value = !showSlider.value
|
|
}
|
|
|
|
const closeSlider = (e: MouseEvent) => {
|
|
const target = e.target as HTMLElement
|
|
|
|
if (!target.closest('.show-slider')) {
|
|
showSlider.value = false
|
|
}
|
|
}
|
|
|
|
onMounted(() => {
|
|
document.addEventListener('click', closeSlider)
|
|
})
|
|
|
|
onUnmounted(() => {
|
|
document.removeEventListener('click', closeSlider)
|
|
})
|
|
</script>
|