工具完成
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
2025-06-28 22:38:49 +08:00
parent 2c668fedd0
commit 8400dbfab9
60 changed files with 23197 additions and 144 deletions

65
src/types/tools.ts Normal file
View File

@ -0,0 +1,65 @@
import type { IconDefinition } from '@fortawesome/fontawesome-svg-core'
/**
* 工具类型接口
*/
export interface Tool {
/** 工具唯一代码 */
code: string
/** 工具图标 */
icon: IconDefinition
/** 工具标题 - 可选,现在使用多语言文件 */
title?: string
/** 工具所属分类 */
category: string[]
/** 工具描述 - 可选,现在使用多语言文件 */
description?: string
/** 搜索关键词,包括各种可能的中英文搜索词 */
keywords: string[]
}
/**
* 分类类型接口
*/
export interface Category {
/** 分类唯一代码 */
code: string
/** 分类名称 - 可选,现在使用多语言文件 */
name?: string
/** 是否激活 */
active?: boolean
}
/**
* 语言类型
*/
export type Language = 'zh' | 'en'
/**
* 多语言文本类型
*/
export interface LocalizedText {
zh: string
en: string
}
/**
* API响应类型
*/
export interface ApiResponse<T = any> {
success: boolean
data?: T
message?: string
error?: string
}
/**
* 历史记录条目类型
*/
export interface HistoryItem {
id: string
title: string
content: string
timestamp: number
isFavorite?: boolean
}