镜像自地址
https://github.com/lhly/cloud-drive-renamer.git
已同步 2026-10-20 13:47:47 +08:00
feat(文件选择器): 添加音频类型支持
在文件选择器中新增音频类型支持,包括: 1. 在类型定义中添加audio类型 2. 在工具栏下拉菜单中添加音频选项 3. 添加音频文件扩展名检测逻辑 4. 更新多语言翻译文件
这个提交包含在:
父节点
e4ef456e5f
当前提交
3810c776c7
@ -250,10 +250,12 @@ export class FileSelectorPanel extends LitElement {
|
||||
|
||||
const videoExts = ['.mp4', '.avi', '.mkv', '.mov', '.wmv', '.flv', '.webm', '.m4v'];
|
||||
const imageExts = ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.svg', '.webp', '.ico'];
|
||||
const audioExts = ['.mp3', '.wav', '.flac', '.aac', '.m4a', '.ogg', '.opus', '.wma'];
|
||||
const docExts = ['.pdf', '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.txt', '.md'];
|
||||
|
||||
if (videoExts.includes(lowerExt)) return 'video';
|
||||
if (imageExts.includes(lowerExt)) return 'image';
|
||||
if (audioExts.includes(lowerExt)) return 'audio';
|
||||
if (docExts.includes(lowerExt)) return 'document';
|
||||
return 'other';
|
||||
}
|
||||
|
||||
@ -144,6 +144,7 @@ export class Toolbar extends LitElement {
|
||||
<option value="all">${I18nService.t('all_types')}</option>
|
||||
<option value="video">${I18nService.t('type_video')}</option>
|
||||
<option value="image">${I18nService.t('type_image')}</option>
|
||||
<option value="audio">${I18nService.t('type_audio')}</option>
|
||||
<option value="document">${I18nService.t('type_document')}</option>
|
||||
<option value="other">${I18nService.t('type_other')}</option>
|
||||
</select>
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
"all_types": "All Types",
|
||||
"type_video": "Video",
|
||||
"type_image": "Image",
|
||||
"type_audio": "Audio",
|
||||
"type_document": "Document",
|
||||
"type_other": "Other",
|
||||
"selected_files_count": "Selected $1 / $2 files",
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
"all_types": "全部类型",
|
||||
"type_video": "视频",
|
||||
"type_image": "图片",
|
||||
"type_audio": "音频",
|
||||
"type_document": "文档",
|
||||
"type_other": "其他",
|
||||
"selected_files_count": "已选择 $1 / $2 个文件",
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
"all_types": "所有類型",
|
||||
"type_video": "影片",
|
||||
"type_image": "圖片",
|
||||
"type_audio": "音訊",
|
||||
"type_document": "文件",
|
||||
"type_other": "其他",
|
||||
"selected_files_count": "已選擇 $1 / $2 個檔案",
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
* 1. Edit version in package.json
|
||||
* 2. Run: npm run sync:version (or automatically via prebuild/predev)
|
||||
*
|
||||
* Generated at: 2025-12-30T08:01:25.159Z
|
||||
* Generated at: 2025-12-30T08:23:44.405Z
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@ -4,7 +4,7 @@ import { RuleConfig } from './rule';
|
||||
/**
|
||||
* File type categories for filtering
|
||||
*/
|
||||
export type FileType = 'video' | 'image' | 'document' | 'other';
|
||||
export type FileType = 'video' | 'image' | 'audio' | 'document' | 'other';
|
||||
|
||||
/**
|
||||
* Preview item for the preview panel
|
||||
|
||||
正在加载...
在新工单中引用
屏蔽一个用户