初始化 Line_Project_Bot:LP_Bot 重構版(介面重設計+平台環境改讀試算表)
根本原因: LP_Bot 介面老舊且環境設定寫死在程式內,新增平台或環境都要改碼重建。 影響: 全新深色控制台介面;首頁改為「平台+環境+Token」,平台清單與連線設定 即時讀取 Google 試算表(quickopen 同款資料來源),選擇與 Token 會記憶於 localStorage;支援「開遊戲」直開跳過維護網址;SD 機台自製 Spin 面板 (押注/延遲/倍率停/轉數停+Log 終端)。 修法: - 底層引擎(Engine/Common/define/FormTable*)自 LP_Bot 原封搬移 - UI 層全部重寫(Login/Lobby/SlotList/SDGame),antd 深色主題 - 新增 GoogleSheetService:service account 簽 JWT 讀 Sheets API, 非安全來源 fallback jsrsasign - 移除 React.StrictMode(雙重掛載會讓 NetManagerSD 單例連線互蓋) - SD socket 依 gameUrl 協定強制 wss - 機台 1310/1311/1801/1803/1804/1805 Spin 帶 mode:0 特例 (依 SD3 客戶端 MainState 原始碼) - credentials.json 不進版控,附 credentials.example.json 範本 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import react from "@vitejs/plugin-react-swc";
|
||||
import path from "path";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
define: {
|
||||
"AppVersion": JSON.stringify(process.env.npm_package_version),
|
||||
},
|
||||
resolve: {
|
||||
alias: [
|
||||
{ find: "@", replacement: path.resolve(__dirname, "src") },
|
||||
{ find: "@views", replacement: path.resolve(__dirname, "src/views") },
|
||||
{ find: "@assets", replacement: path.resolve(__dirname, "src/assets") },
|
||||
{ find: "@css", replacement: path.resolve(__dirname, "src/assets/css") },
|
||||
{ find: "@less", replacement: path.resolve(__dirname, "src/assets/less") },
|
||||
{ find: "@images", replacement: path.resolve(__dirname, "src/assets/images") },
|
||||
{ find: "@components", replacement: path.resolve(__dirname, "src/components") },
|
||||
],
|
||||
},
|
||||
publicDir: "build-templates",
|
||||
build: {
|
||||
outDir: "./build"
|
||||
},
|
||||
base: "./",
|
||||
// envDir: "./viteEnv",
|
||||
});
|
||||
Reference in New Issue
Block a user