Based on QuantumNous/new-api v1.0.0-rc.36 (shallow history squashed). - CNY quota display mode: RMB-denominated top-up and crediting across Epay/Waffo channels - New CheckinButton in both authenticated and public headers (Turnstile supported) - New /subscribe page with public plan snapshot, Alipay/balance payment, auto group upgrade/reset - New /docs 12-section beginner guide with anchor navigation - New home PromoBanner linking to /docs; i18n synced (en/zh/zh-TW/fr/ja/ru/vi) - README: document custom features, live demo https://ai.88531.cn
18 lines
556 B
JavaScript
Vendored
18 lines
556 B
JavaScript
Vendored
const { contextBridge } = require('electron');
|
|
|
|
// 获取数据目录路径(用于显示给用户)
|
|
// 优先使用主进程设置的真实路径,如果没有则回退到手动拼接
|
|
function getDataDirPath() {
|
|
// 如果主进程已设置真实路径,直接使用
|
|
if (process.env.ELECTRON_DATA_DIR) {
|
|
return process.env.ELECTRON_DATA_DIR;
|
|
}
|
|
}
|
|
|
|
contextBridge.exposeInMainWorld('electron', {
|
|
isElectron: true,
|
|
version: process.versions.electron,
|
|
platform: process.platform,
|
|
versions: process.versions,
|
|
dataDir: getDataDirPath()
|
|
}); |