refactor: use Component type for EFFECT_ICONS in PlayerPanel
Panel / Lint, typy i build (pull_request) Successful in 24s
Backend / Lint i formatowanie (pull_request) Successful in 36s
Backend / Testy i kontrakt API (pull_request) Successful in 1m7s
Backend / Testowy build obrazu (pull_request) Successful in 1m34s

This commit is contained in:
mmacierzanka committed 2026-09-13 17:19:25 +02:00
1 parent dadb5f8b0e
commit bb9213024d
2 files changed
+19 -6

No files matched your search

+15 -5
View File
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { computed, ref, toRef, watch } from 'vue'
import { computed, ref, toRef, watch, type Component } from 'vue'
import {
Activity,
Bot,
@@ -95,7 +95,7 @@ async function commitVolume() {
draggedVolume.value = null
}
const EFFECT_ICONS: Record<string, any> = {
const EFFECT_ICONS: Record<string, Component> = {
zap: Zap,
sparkles: Sparkles,
waves: Waves,
@@ -338,9 +338,15 @@ async function cycleLoop() {
<span class="volume-value">{{ volume }}%</span>
</div>
<div v-if="effects.length" class="effects-container">
<div
v-if="effects.length"
class="effects-container"
>
<div class="effects-header">
<SlidersHorizontal :size="13" class="effects-header-icon" />
<SlidersHorizontal
:size="13"
class="effects-header-icon"
/>
<span class="effects-header-title">Efekty odtwarzacza</span>
</div>
<div class="effects-grid">
@@ -353,7 +359,11 @@ async function cycleLoop() {
:title="fx.name"
@click="onToggleEffect(fx)"
>
<component :is="effectIcon(fx.icon)" :size="15" class="effect-icon" />
<component
:is="effectIcon(fx.icon)"
:size="15"
class="effect-icon"
/>
<span class="effect-name">{{ fx.name }}</span>
</button>
</div>
+4 -1
View File
@@ -164,7 +164,10 @@ async function restoreQueue() {
title="Przywróć kolejkę zapisaną przed ostatnim zatrzymaniem lub rozłączeniem"
@click="restoreQueue"
>
<LoaderCircle v-if="restoring" class="restore-spinner" />
<LoaderCircle
v-if="restoring"
class="restore-spinner"
/>
<RotateCcw v-else />
<span>{{ restoring ? 'Przywracanie kolejki…' : 'Przywróć ostatnią kolejkę' }}</span>
</button>