清理项目冗余文件与死代码
删除内容: - config.py:旧架构配置残留,已被 core/config.py 替代 - README_SOCKS.md:内容严重过时(引用已删除的 api_server.py 和测试脚本),功能说明已合并至 README - frontend/src/api/types.js:纯 JSDoc typedef,未被任何模块引用,属于死文档 - frontend/src/assets/vue.svg:默认模板资源,项目中无任何页面引用 - frontend/src/utils/clipboard.js:移除 copyTextFallback 函数(使用已废弃的 document.execCommand)
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
/**
|
||||
* @typedef {object} ApiResponse<T>
|
||||
* @property {number} code
|
||||
* @property {string} message
|
||||
* @property {T} data
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} StatsData
|
||||
* @property {number} total
|
||||
* @property {number} available
|
||||
* @property {number} today_new
|
||||
* @property {number} avg_score
|
||||
* @property {number} http_count
|
||||
* @property {number} https_count
|
||||
* @property {number} socks4_count
|
||||
* @property {number} socks5_count
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} Proxy
|
||||
* @property {string} ip
|
||||
* @property {number} port
|
||||
* @property {string} protocol
|
||||
* @property {number} score
|
||||
* @property {string} last_check
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} ProxyListData
|
||||
* @property {Proxy[]} list
|
||||
* @property {number} total
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} Plugin
|
||||
* @property {string|number} id
|
||||
* @property {string} name
|
||||
* @property {string} description
|
||||
* @property {boolean} enabled
|
||||
* @property {number} success_count
|
||||
* @property {number} failure_count
|
||||
* @property {string|null} last_run
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {object} SettingsData
|
||||
* @property {string} db_path
|
||||
* @property {number} crawl_timeout
|
||||
* @property {number} validation_timeout
|
||||
* @property {number} max_retries
|
||||
* @property {number} default_concurrency
|
||||
* @property {number} min_proxy_score
|
||||
* @property {number} proxy_expiry_days
|
||||
*/
|
||||
|
||||
export {}
|
||||
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
||||
|
Before Width: | Height: | Size: 496 B |
@@ -39,25 +39,3 @@ export async function copyProxy(proxy) {
|
||||
return copyToClipboard(text)
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制文本(备选方案:使用 DOM)
|
||||
* @param {string} text
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function copyTextFallback(text) {
|
||||
const textarea = document.createElement('textarea')
|
||||
textarea.value = text
|
||||
textarea.style.cssText = 'position:fixed;left:-9999px;opacity:0;'
|
||||
document.body.appendChild(textarea)
|
||||
|
||||
try {
|
||||
textarea.select()
|
||||
textarea.setSelectionRange(0, text.length)
|
||||
const success = document.execCommand('copy')
|
||||
document.body.removeChild(textarea)
|
||||
return success
|
||||
} catch {
|
||||
document.body.removeChild(textarea)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user