mirror of
https://github.com/DerTyp7/teamspeak-obs-overlay.git
synced 2026-07-31 08:39:04 +02:00
[feature] deploy to single file
This commit is contained in:
19
package-lock.json
generated
19
package-lock.json
generated
@@ -22,7 +22,8 @@
|
|||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
"eslint-plugin-react-refresh": "^0.3.4",
|
"eslint-plugin-react-refresh": "^0.3.4",
|
||||||
"typescript": "^5.0.2",
|
"typescript": "^5.0.2",
|
||||||
"vite": "^4.3.9"
|
"vite": "^4.3.9",
|
||||||
|
"vite-plugin-singlefile": "^0.13.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/android-arm": {
|
"node_modules/@esbuild/android-arm": {
|
||||||
@@ -2499,6 +2500,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/vite-plugin-singlefile": {
|
||||||
|
"version": "0.13.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/vite-plugin-singlefile/-/vite-plugin-singlefile-0.13.5.tgz",
|
||||||
|
"integrity": "sha512-y/aRGh8qHmw2f1IhaI/C6PJAaov47ESYDvUv1am1YHMhpY+19B5k5Odp8P+tgs+zhfvak6QB1ykrALQErEAo7g==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"micromatch": "^4.0.5"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^14.18.0 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"rollup": ">=2.79.0",
|
||||||
|
"vite": ">=3.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/which": {
|
"node_modules/which": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
"eslint-plugin-react-refresh": "^0.3.4",
|
"eslint-plugin-react-refresh": "^0.3.4",
|
||||||
"typescript": "^5.0.2",
|
"typescript": "^5.0.2",
|
||||||
"vite": "^4.3.9"
|
"vite": "^4.3.9",
|
||||||
|
"vite-plugin-singlefile": "^0.13.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ export default function App() {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log("====================================");
|
|
||||||
setCurrentStates();
|
setCurrentStates();
|
||||||
}, [clients, channels, connections, activeConnectionId]);
|
}, [clients, channels, connections, activeConnectionId]);
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export class TS5Connection {
|
|||||||
name: "TS5 OBS Overlay",
|
name: "TS5 OBS Overlay",
|
||||||
description: "A OBS overlay for TS5 by DerTyp876",
|
description: "A OBS overlay for TS5 by DerTyp876",
|
||||||
content: {
|
content: {
|
||||||
apiKey: localStorage.getItem("apiKey") || "",
|
apiKey: localStorage.getItem("apiKey") ?? "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -51,6 +51,10 @@ export class TS5Connection {
|
|||||||
this.ws.send(JSON.stringify(initalPayload));
|
this.ws.send(JSON.stringify(initalPayload));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.ws.onclose = (event) => {
|
||||||
|
console.log("WebSocket connection closed", event);
|
||||||
|
};
|
||||||
|
|
||||||
// Handle messages received from TS5 client
|
// Handle messages received from TS5 client
|
||||||
// See TS5MessageHandler class
|
// See TS5MessageHandler class
|
||||||
this.ws.onmessage = (event) => {
|
this.ws.onmessage = (event) => {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
/* Linting */
|
/* Linting */
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": false,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"noFallthroughCasesInSwitch": true
|
"noFallthroughCasesInSwitch": true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import react from '@vitejs/plugin-react-swc'
|
import react from '@vitejs/plugin-react-swc'
|
||||||
|
import { viteSingleFile } from "vite-plugin-singlefile"
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@@ -14,5 +15,5 @@ export default defineConfig({
|
|||||||
"@utils": "/src/utils",
|
"@utils": "/src/utils",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [react()],
|
plugins: [react(), viteSingleFile({ useRecommendedBuildConfig: false })],
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user