fix(voices): remove duplicate filters and unused imports in Phase 2
AI Code Review / AI Code Review (pull_request) Failing after 0s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 14s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 21s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 56s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 49s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 47s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
PR Automation / Auto Approve on CI Green (pull_request) Successful in 55s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 1m57s
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Validate - Code Quality (pull_request) Has been cancelled
CI/CD Pipeline / Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / PR Build API Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been cancelled
Preview Deploy / Deploy Preview Environment (pull_request) Has been cancelled
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 46m8s

- Remove duplicate inline Select filters (gender+language) now in VoiceFilterBar
- Clean up 7 unused icon imports (moved to child components)
- Remove unused Select and formatFileSize imports

Signed-off-by: xiaoxia <xiaoxia@xiaoxiajianji.com>
This commit is contained in:
SaaS Frontend
2026-07-25 13:11:04 +08:00
parent be2a33a20b
commit d23f1ed782
+1 -33
View File
@@ -11,21 +11,14 @@ import React, { useMemo, useState, useRef, useEffect, useCallback } from "react"
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query"
import {
SoundOutlined,
PlayCircleOutlined,
PauseCircleOutlined,
SearchOutlined,
PlusOutlined,
RobotOutlined,
UploadOutlined,
AudioOutlined,
HeartOutlined,
UserOutlined,
DeleteOutlined,
ReloadOutlined,
CloseCircleOutlined,
} from "@ant-design/icons"
import { Modal, Upload, message } from "antd"
import { Button, Select } from "@/components/ui"
import { Button } from "@/components/ui"
import PageHead from "@/components/layout/PageHead"
import { fetchPresetVoices, fetchVoices } from "@/api/voices"
import {
@@ -55,7 +48,6 @@ import {
genderLabel,
languageLabel,
formatTime,
formatFileSize,
} from "@/pages/voices/utils/format"
import { getAudioDuration } from "@/pages/voices/utils/audio"
import CloneModal from "@/components/voice/CloneModal"
@@ -497,30 +489,6 @@ const VoiceLibrary: React.FC = () => {
onGenderChange={setFilterGender}
onLangChange={setFilterLang}
/>
<Select
value={filterGender}
onChange={setFilterGender}
style={{ width: 130 }}
options={[
{ value: "all", label: "全部音色" },
{ value: "male", label: "男声" },
{ value: "female", label: "女声" },
{ value: "child", label: "童声" },
{ value: "elderly", label: "老年" },
]}
/>
<Select
value={filterLang}
onChange={setFilterLang}
style={{ width: 130 }}
options={[
{ value: "all", label: "全部语言" },
{ value: "zh", label: "中文" },
{ value: "en", label: "英文" },
{ value: "ja", label: "日文" },
{ value: "ko", label: "韩文" },
]}
/>
</div>
{presetLoading && (