summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/.gitignore3
-rw-r--r--ui/index.html20
-rw-r--r--ui/index.js29
-rw-r--r--ui/package.json24
-rw-r--r--ui/postcss.config.js6
-rw-r--r--ui/preload.js7
-rw-r--r--ui/src/input.css3
-rw-r--r--ui/tailwind.config.js12
8 files changed, 104 insertions, 0 deletions
diff --git a/ui/.gitignore b/ui/.gitignore
new file mode 100644
index 0000000..2109e19
--- /dev/null
+++ b/ui/.gitignore
@@ -0,0 +1,3 @@
+build
+node_modules
+package-lock.json
diff --git a/ui/index.html b/ui/index.html
new file mode 100644
index 0000000..240e6ca
--- /dev/null
+++ b/ui/index.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
+ <title>Hello World!</title>
+ <link rel="stylesheet" href="build/output.css"> </head>
+<body>
+ <div class="container mx-auto mt-10 p-5 bg-gray-100 rounded shadow-lg">
+ <h1 class="text-4xl font-bold text-blue-600 text-center">
+ Hello World!
+ </h1>
+ <p class="text-center text-gray-700 mt-2">
+ Welcome to your Electron app with Tailwind CSS!
+ </p>
+ </div>
+
+ </body>
+</html>
+
diff --git a/ui/index.js b/ui/index.js
new file mode 100644
index 0000000..9751fb2
--- /dev/null
+++ b/ui/index.js
@@ -0,0 +1,29 @@
+const { app, BrowserWindow, ipcMain } = require('electron');
+const path = require('node:path');
+
+function createWindow () {
+ const mainWindow = new BrowserWindow({
+ width: 800,
+ height: 600,
+ webPreferences: {
+ preload: path.join(__dirname, 'preload.js'),
+ contextIsolation: true,
+ nodeIntegration: false
+ }
+ });
+
+ mainWindow.loadFile('index.html');
+}
+
+app.whenReady().then(() => {
+ createWindow();
+
+ app.on('activate', function () {
+ if (BrowserWindow.getAllWindows().length === 0) createWindow();
+ });
+});
+
+app.on('window-all-closed', function () {
+ if (process.platform !== 'darwin') app.quit();
+});
+
diff --git a/ui/package.json b/ui/package.json
new file mode 100644
index 0000000..1c56341
--- /dev/null
+++ b/ui/package.json
@@ -0,0 +1,24 @@
+{
+ "name": "TaSTT",
+ "version": "1.0.0",
+ "description": "Speech-to-text tool for VRChat",
+ "main": "index.js",
+ "scripts": {
+ "start": "npm run build:css && electron .",
+ "build:css": "tailwindcss -i ./src/input.css -o ./build/output.css",
+ "watch:css": "tailwindcss -i ./src/input.css -o ./build/output.css --watch",
+ "dev": "npm run watch:css & electron .",
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "keywords": [],
+ "author": "yum_food",
+ "license": "MIT",
+ "devDependencies": {
+ "autoprefixer": "^10.4.21",
+ "concurrently": "^9.1.2",
+ "cross-env": "^7.0.3",
+ "electron": "^36.3.2",
+ "postcss": "^8.5.4",
+ "tailwindcss": "^3.4.17"
+ }
+}
diff --git a/ui/postcss.config.js b/ui/postcss.config.js
new file mode 100644
index 0000000..33ad091
--- /dev/null
+++ b/ui/postcss.config.js
@@ -0,0 +1,6 @@
+module.exports = {
+ plugins: {
+ tailwindcss: {},
+ autoprefixer: {},
+ },
+}
diff --git a/ui/preload.js b/ui/preload.js
new file mode 100644
index 0000000..9f87d19
--- /dev/null
+++ b/ui/preload.js
@@ -0,0 +1,7 @@
+const { contextBridge, ipcRenderer } = require('electron');
+
+contextBridge.exposeInMainWorld('electronAPI', {
+});
+
+console.log('Preload script loaded.');
+
diff --git a/ui/src/input.css b/ui/src/input.css
new file mode 100644
index 0000000..b5c61c9
--- /dev/null
+++ b/ui/src/input.css
@@ -0,0 +1,3 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
diff --git a/ui/tailwind.config.js b/ui/tailwind.config.js
new file mode 100644
index 0000000..fa93053
--- /dev/null
+++ b/ui/tailwind.config.js
@@ -0,0 +1,12 @@
+/** @type {import('tailwindcss').Config} */
+module.exports = {
+ content: [
+ "./index.html",
+ "./src/**/*.{html,js}",
+ ],
+ theme: {
+ extend: {},
+ },
+ plugins: [],
+}
+