init: CryptoCoin desktop ticker
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
56
README.md
Normal file
56
README.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# CryptoCoin
|
||||
|
||||
Windows 桌面迷你行情挂件(Tauri 2 + 币安 24hr API)。
|
||||
|
||||
## 设置文件(重要)
|
||||
|
||||
配置保存在 **与 `CryptoCoin.exe` 同级** 的 `data` 文件夹:
|
||||
|
||||
```
|
||||
D:\WindowsApp\CryptoCoin\data\settings.json
|
||||
```
|
||||
|
||||
(便携安装;开发时则在 `target\debug\data\` 等目录。)
|
||||
|
||||
首次从旧版 `%APPDATA%\com.smy.cryptocoin\` 升级时会自动迁移 `settings.json` 到 `data`。
|
||||
|
||||
可将项目内 `src-tauri/settings.json` 复制为 `data\settings.json` 模板。托盘 **打开设置目录** 会打开 `data` 文件夹。
|
||||
|
||||
示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"enabled": ["BTCUSDT", "ETHUSDT"],
|
||||
"proxyBaseUrl": "https://bn-api-proxy.smyhub.com",
|
||||
"useProxy": true,
|
||||
"refreshIntervalMs": 5000,
|
||||
"backgroundTheme": "dark"
|
||||
}
|
||||
```
|
||||
|
||||
`backgroundTheme` 可选:`dark`、`slate`、`navy`、`charcoal`、`midnight`、`forest`、`light`;也可在托盘 **背景颜色** 中切换。
|
||||
|
||||
- `useProxy: true` 且 `proxyBaseUrl` 非空 → 走代理
|
||||
- `useProxy: false` → 直连(`proxyBaseUrl` 仍保留,便于下次切回代理)
|
||||
- `refreshIntervalMs` 最小 **3000**(托盘从 3 秒起,避免 API 限流)
|
||||
|
||||
## 开发
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run tauri dev
|
||||
```
|
||||
|
||||
## 发布安装包
|
||||
|
||||
修改代码后需重新打包,旧 exe 不会包含新逻辑:
|
||||
|
||||
```bash
|
||||
npm run tauri build
|
||||
```
|
||||
|
||||
安装包:`src-tauri/target/release/bundle/nsis/CryptoCoin_*_x64-setup.exe`
|
||||
|
||||
## 代理 Worker
|
||||
|
||||
见 [cryptocoin-binance-proxy/README.md](cryptocoin-binance-proxy/README.md)。
|
||||
Reference in New Issue
Block a user