refactor: 更新测试用例和组件结构

- 在背景测试中更新菜单项标题,移除图标
- 在 StorageCleaner 页面中更新初始化加载状态的中文文案
- 在 QrCode 组件中修正导入路径
- 在 DecodeResultPaper 中使用 Label 组件替换原生 label 元素
- 移除不再使用的 formatFileSize 函数
This commit is contained in:
雨霖铃
2026-06-14 09:40:05 +08:00
parent 24c83de56d
commit 618f3c36f2
11 changed files with 36 additions and 29 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ describe('contextMenu', () => {
);
expect(imageMenus).toHaveLength(1);
expect(imageMenus[0].id).toBe('qrCode-image');
expect(imageMenus[0].title).toBe('🖼️ 解析图片二维码');
expect(imageMenus[0].title).toBe('解析图片二维码');
});
});
@@ -73,7 +73,7 @@ describe('contextMenu', () => {
expect(chrome.contextMenus.create).toHaveBeenCalledWith({
id: 'jwt',
title: '🔑 解析 JWT',
title: '解析 JWT',
contexts: ['selection'],
parentId: 'testing-tools-parent',
});
-13
View File
@@ -2,8 +2,6 @@
* Base64 转换器工具函数
*/
import { formatBytes } from './format';
/** 最大文件大小限制(10 MB) */
export const MAX_FILE_SIZE = 10 * 1024 * 1024;
@@ -212,17 +210,6 @@ export function extractMimeTypeFromDataUri(dataUri: string): string {
return match ? match[1] : 'application/octet-stream';
}
/**
* 格式化文件大小显示
*
* @deprecated 直接使用 {@link formatBytes} 代替
* @param bytes 字节数
* @returns 格式化后的字符串
*/
export function formatFileSize(bytes: number): string {
return formatBytes(bytes);
}
/**
* Base64 解码为二进制后的产物
*/