@ -0,0 +1,24 @@ |
|||||||
|
# Logs |
||||||
|
logs |
||||||
|
*.log |
||||||
|
npm-debug.log* |
||||||
|
yarn-debug.log* |
||||||
|
yarn-error.log* |
||||||
|
pnpm-debug.log* |
||||||
|
lerna-debug.log* |
||||||
|
|
||||||
|
node_modules |
||||||
|
dist |
||||||
|
dist-ssr |
||||||
|
*.local |
||||||
|
|
||||||
|
# Editor directories and files |
||||||
|
.vscode/* |
||||||
|
!.vscode/extensions.json |
||||||
|
.idea |
||||||
|
.DS_Store |
||||||
|
*.suo |
||||||
|
*.ntvs* |
||||||
|
*.njsproj |
||||||
|
*.sln |
||||||
|
*.sw? |
||||||
@ -0,0 +1,3 @@ |
|||||||
|
{ |
||||||
|
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] |
||||||
|
} |
||||||
@ -0,0 +1,7 @@ |
|||||||
|
# Tauri + React |
||||||
|
|
||||||
|
This template should help get you started developing with Tauri and React in Vite. |
||||||
|
|
||||||
|
## Recommended IDE Setup |
||||||
|
|
||||||
|
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) |
||||||
@ -0,0 +1,24 @@ |
|||||||
|
<!doctype html> |
||||||
|
<html lang="en"> |
||||||
|
|
||||||
|
<head> |
||||||
|
<meta charset="UTF-8" /> |
||||||
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> |
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
||||||
|
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com"> |
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
||||||
|
<link |
||||||
|
href="https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@200..900&family=Sora:wght@100..800&display=swap" |
||||||
|
rel="stylesheet"> |
||||||
|
|
||||||
|
|
||||||
|
<title>ControlPanel</title> |
||||||
|
</head> |
||||||
|
|
||||||
|
<body> |
||||||
|
<div id="root"></div> |
||||||
|
<script type="module" src="/src/main.jsx"></script> |
||||||
|
</body> |
||||||
|
|
||||||
|
</html> |
||||||
@ -0,0 +1,26 @@ |
|||||||
|
{ |
||||||
|
"name": "control-panel", |
||||||
|
"private": true, |
||||||
|
"version": "0.1.0", |
||||||
|
"type": "module", |
||||||
|
"scripts": { |
||||||
|
"dev": "vite", |
||||||
|
"build": "vite build", |
||||||
|
"preview": "vite preview", |
||||||
|
"tauri": "tauri" |
||||||
|
}, |
||||||
|
"dependencies": { |
||||||
|
"@tailwindcss/vite": "^4.1.12", |
||||||
|
"@tauri-apps/api": "^2", |
||||||
|
"@tauri-apps/plugin-opener": "^2", |
||||||
|
"howler": "^2.2.4", |
||||||
|
"react": "^19.1.0", |
||||||
|
"react-dom": "^19.1.0", |
||||||
|
"tailwindcss": "^4.1.12" |
||||||
|
}, |
||||||
|
"devDependencies": { |
||||||
|
"@tauri-apps/cli": "^2", |
||||||
|
"@vitejs/plugin-react": "^4.6.0", |
||||||
|
"vite": "^7.0.4" |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,46 @@ |
|||||||
|
{ |
||||||
|
"cuelist": [ |
||||||
|
{ |
||||||
|
"id": 1, |
||||||
|
"name": "Q1", |
||||||
|
"type": "bg", |
||||||
|
"description": "preset bg", |
||||||
|
"audioFile": "assets/bg-02.mp3", |
||||||
|
"loop": true |
||||||
|
}, |
||||||
|
{ |
||||||
|
"id": 2, |
||||||
|
"name": "Q2", |
||||||
|
"type": "announce", |
||||||
|
"description": "announce", |
||||||
|
"audioFile": "assets/bg-01 (小束袋).mp3", |
||||||
|
"loop": true, |
||||||
|
"status":"reset" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"id": 3, |
||||||
|
"name": "Q3", |
||||||
|
"type": "bg", |
||||||
|
"description": "during bg", |
||||||
|
"loop": true, |
||||||
|
"audioFile": "assets/bg-04.mp3" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"id": 3.1, |
||||||
|
"name": "Q3.1", |
||||||
|
"type": "light", |
||||||
|
"description": "fade out light", |
||||||
|
"callback": "fade_out_light" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"id": 4, |
||||||
|
"name": "Q4", |
||||||
|
"type": "bg", |
||||||
|
"description": "Ending", |
||||||
|
"audioFile": "assets/record-05.mp3", |
||||||
|
"status":"end", |
||||||
|
"callback":"fade_in_light" |
||||||
|
} |
||||||
|
] |
||||||
|
} |
||||||
|
|
||||||
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,7 @@ |
|||||||
|
# Generated by Cargo |
||||||
|
# will have compiled files and executables |
||||||
|
/target/ |
||||||
|
|
||||||
|
# Generated by Tauri |
||||||
|
# will have schema files for capabilities auto-completion |
||||||
|
/gen/schemas |
||||||
@ -0,0 +1,25 @@ |
|||||||
|
[package] |
||||||
|
name = "control-panel" |
||||||
|
version = "0.1.0" |
||||||
|
description = "A Tauri App" |
||||||
|
authors = ["you"] |
||||||
|
edition = "2021" |
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html |
||||||
|
|
||||||
|
[lib] |
||||||
|
# The `_lib` suffix may seem redundant but it is necessary |
||||||
|
# to make the lib name unique and wouldn't conflict with the bin name. |
||||||
|
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 |
||||||
|
name = "control_panel_lib" |
||||||
|
crate-type = ["staticlib", "cdylib", "rlib"] |
||||||
|
|
||||||
|
[build-dependencies] |
||||||
|
tauri-build = { version = "2", features = [] } |
||||||
|
|
||||||
|
[dependencies] |
||||||
|
tauri = { version = "2", features = [] } |
||||||
|
tauri-plugin-opener = "2" |
||||||
|
serde = { version = "1", features = ["derive"] } |
||||||
|
serde_json = "1" |
||||||
|
|
||||||
@ -0,0 +1,3 @@ |
|||||||
|
fn main() { |
||||||
|
tauri_build::build() |
||||||
|
} |
||||||
@ -0,0 +1,10 @@ |
|||||||
|
{ |
||||||
|
"$schema": "../gen/schemas/desktop-schema.json", |
||||||
|
"identifier": "default", |
||||||
|
"description": "Capability for the main window", |
||||||
|
"windows": ["main"], |
||||||
|
"permissions": [ |
||||||
|
"core:default", |
||||||
|
"opener:default" |
||||||
|
] |
||||||
|
} |
||||||
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 974 B |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 903 B |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 14 KiB |
@ -0,0 +1,14 @@ |
|||||||
|
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||||
|
#[tauri::command] |
||||||
|
fn greet(name: &str) -> String { |
||||||
|
format!("Hello, {}! You've been greeted from Rust!", name) |
||||||
|
} |
||||||
|
|
||||||
|
#[cfg_attr(mobile, tauri::mobile_entry_point)] |
||||||
|
pub fn run() { |
||||||
|
tauri::Builder::default() |
||||||
|
.plugin(tauri_plugin_opener::init()) |
||||||
|
.invoke_handler(tauri::generate_handler![greet]) |
||||||
|
.run(tauri::generate_context!()) |
||||||
|
.expect("error while running tauri application"); |
||||||
|
} |
||||||
@ -0,0 +1,6 @@ |
|||||||
|
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||||
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] |
||||||
|
|
||||||
|
fn main() { |
||||||
|
control_panel_lib::run() |
||||||
|
} |
||||||
@ -0,0 +1,35 @@ |
|||||||
|
{ |
||||||
|
"$schema": "https://schema.tauri.app/config/2", |
||||||
|
"productName": "control-panel", |
||||||
|
"version": "0.1.0", |
||||||
|
"identifier": "com.ultracombos.control-panel", |
||||||
|
"build": { |
||||||
|
"beforeDevCommand": "npm run dev", |
||||||
|
"devUrl": "http://localhost:1420", |
||||||
|
"beforeBuildCommand": "npm run build", |
||||||
|
"frontendDist": "../dist" |
||||||
|
}, |
||||||
|
"app": { |
||||||
|
"windows": [ |
||||||
|
{ |
||||||
|
"title": "control-panel", |
||||||
|
"width": 800, |
||||||
|
"height": 600 |
||||||
|
} |
||||||
|
], |
||||||
|
"security": { |
||||||
|
"csp": null |
||||||
|
} |
||||||
|
}, |
||||||
|
"bundle": { |
||||||
|
"active": true, |
||||||
|
"targets": "all", |
||||||
|
"icon": [ |
||||||
|
"icons/32x32.png", |
||||||
|
"icons/128x128.png", |
||||||
|
"icons/128x128@2x.png", |
||||||
|
"icons/icon.icns", |
||||||
|
"icons/icon.ico" |
||||||
|
] |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,35 @@ |
|||||||
|
@import "tailwindcss"; |
||||||
|
|
||||||
|
html{ |
||||||
|
font-family: "Sora", sans-serif; |
||||||
|
|
||||||
|
} |
||||||
|
button{ |
||||||
|
@apply cursor-pointer min-w-[5rem] rounded-full bg-yellow-200 p-2 text-black font-bold; |
||||||
|
} |
||||||
|
tr{ |
||||||
|
@apply border-b border-gray-400; |
||||||
|
} |
||||||
|
|
||||||
|
input[type='range'] { |
||||||
|
overflow: hidden; |
||||||
|
/* width: 80px; */ |
||||||
|
-webkit-appearance: none; |
||||||
|
background-color: #b8b8b8; |
||||||
|
} |
||||||
|
|
||||||
|
input[type='range']::-webkit-slider-runnable-track { |
||||||
|
height: 20px; |
||||||
|
-webkit-appearance: none; |
||||||
|
color: #505050; |
||||||
|
margin-top: -1px; |
||||||
|
} |
||||||
|
|
||||||
|
input[type='range']::-webkit-slider-thumb { |
||||||
|
width: 20px; |
||||||
|
-webkit-appearance: none; |
||||||
|
height: 20px; |
||||||
|
cursor: ew-resize; |
||||||
|
background: #15ff00; |
||||||
|
box-shadow: -80px 0 0 80px #43e5f7; |
||||||
|
} |
||||||
|
After Width: | Height: | Size: 4.0 KiB |
@ -0,0 +1,9 @@ |
|||||||
|
import React from "react"; |
||||||
|
import ReactDOM from "react-dom/client"; |
||||||
|
import App from "./App"; |
||||||
|
|
||||||
|
ReactDOM.createRoot(document.getElementById("root")).render( |
||||||
|
<React.StrictMode> |
||||||
|
<App /> |
||||||
|
</React.StrictMode>, |
||||||
|
); |
||||||
@ -0,0 +1,33 @@ |
|||||||
|
import { defineConfig } from "vite"; |
||||||
|
import react from "@vitejs/plugin-react"; |
||||||
|
import tailwindcss from '@tailwindcss/vite' |
||||||
|
|
||||||
|
|
||||||
|
const host = process.env.TAURI_DEV_HOST; |
||||||
|
|
||||||
|
// https://vite.dev/config/
|
||||||
|
export default defineConfig(async () => ({ |
||||||
|
plugins: [react(), tailwindcss()], |
||||||
|
|
||||||
|
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
||||||
|
//
|
||||||
|
// 1. prevent Vite from obscuring rust errors
|
||||||
|
clearScreen: false, |
||||||
|
// 2. tauri expects a fixed port, fail if that port is not available
|
||||||
|
server: { |
||||||
|
port: 1420, |
||||||
|
strictPort: true, |
||||||
|
host: host || false, |
||||||
|
hmr: host |
||||||
|
? { |
||||||
|
protocol: "ws", |
||||||
|
host, |
||||||
|
port: 1421, |
||||||
|
} |
||||||
|
: undefined, |
||||||
|
watch: { |
||||||
|
// 3. tell Vite to ignore watching `src-tauri`
|
||||||
|
ignored: ["**/src-tauri/**"], |
||||||
|
}, |
||||||
|
}, |
||||||
|
})); |
||||||