WIP: Alpha version bugfixes

This commit is contained in:
Jesse Malotaux 2025-04-13 13:07:15 +02:00
parent fd9430dbc6
commit cb5516f863
18 changed files with 474 additions and 144 deletions

View file

@ -26,7 +26,9 @@ func ApiCORS(w http.ResponseWriter, r *http.Request) (http.ResponseWriter, *http
func ApiGet(w http.ResponseWriter, r *http.Request) { func ApiGet(w http.ResponseWriter, r *http.Request) {
file := "" // base directory file := "" // base directory
if r.URL.Path != "/" { if strings.Contains(r.URL.Path, "/config.js") {
file = "../public/config.js"
} else if r.URL.Path != "/" {
file = "../public" + r.URL.Path // request file = "../public" + r.URL.Path // request
} }
@ -40,7 +42,7 @@ func ApiGet(w http.ResponseWriter, r *http.Request) {
file = "../public/index.html" // default file = "../public/index.html" // default
} }
http.ServeFile(w, r, file) // serve file http.ServeFile(w, r, file)
} }
func ApiPost(w http.ResponseWriter, r *http.Request) { func ApiPost(w http.ResponseWriter, r *http.Request) {

View file

@ -1,23 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>404 - BALLS</title>
<style>
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
}
</style>
</head>
<body>
<h1>Balls found</h1>
<span>So not the content you're looking for.</span>
</body>
</html>

BIN
be/macrame Normal file

Binary file not shown.

BIN
be/macrame.exe Normal file

Binary file not shown.

BIN
be/main.exe Normal file

Binary file not shown.

View file

@ -30,6 +30,8 @@ func main() {
func apiInit(w http.ResponseWriter, r *http.Request) { func apiInit(w http.ResponseWriter, r *http.Request) {
app.ApiCORS(w, r) app.ApiCORS(w, r)
app.MCRMLog("Remote IP: " + r.RemoteAddr)
if r.Method == "GET" { if r.Method == "GET" {
app.ApiGet(w, r) app.ApiGet(w, r)
} else if r.Method == "POST" { } else if r.Method == "POST" {

270
fe/package-lock.json generated
View file

@ -24,6 +24,7 @@
"eslint-plugin-vue": "^9.32.0", "eslint-plugin-vue": "^9.32.0",
"pinia": "^3.0.1", "pinia": "^3.0.1",
"prettier": "^3.5.1", "prettier": "^3.5.1",
"qrcode": "^1.5.4",
"sass-embedded": "^1.85.1", "sass-embedded": "^1.85.1",
"tailwindcss": "^4.0.9", "tailwindcss": "^4.0.9",
"uuid": "^11.1.0", "uuid": "^11.1.0",
@ -1960,6 +1961,15 @@
"url": "https://github.com/sponsors/epoberezkin" "url": "https://github.com/sponsors/epoberezkin"
} }
}, },
"node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/ansi-styles": { "node_modules/ansi-styles": {
"version": "4.3.0", "version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
@ -2104,6 +2114,15 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"dev": true,
"engines": {
"node": ">=6"
}
},
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001710", "version": "1.0.30001710",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001710.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001710.tgz",
@ -2140,6 +2159,17 @@
"url": "https://github.com/chalk/chalk?sponsor=1" "url": "https://github.com/chalk/chalk?sponsor=1"
} }
}, },
"node_modules/cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
"integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
"dev": true,
"dependencies": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
"wrap-ansi": "^6.2.0"
}
},
"node_modules/color-convert": { "node_modules/color-convert": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
@ -2257,6 +2287,15 @@
} }
} }
}, },
"node_modules/decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/deep-is": { "node_modules/deep-is": {
"version": "0.1.4", "version": "0.1.4",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
@ -2320,6 +2359,12 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/dijkstrajs": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz",
"integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==",
"dev": true
},
"node_modules/dunder-proto": { "node_modules/dunder-proto": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
@ -2340,6 +2385,12 @@
"integrity": "sha512-QgX9EBvWGmvSRa74zqfnG7+Eno0Ak0vftBll0Pt2/z5b3bEGYL6OUXLgKPtvx73dn3dvwrlyVkjPKRRlhLYTEg==", "integrity": "sha512-QgX9EBvWGmvSRa74zqfnG7+Eno0Ak0vftBll0Pt2/z5b3bEGYL6OUXLgKPtvx73dn3dvwrlyVkjPKRRlhLYTEg==",
"dev": true "dev": true
}, },
"node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
"node_modules/enhanced-resolve": { "node_modules/enhanced-resolve": {
"version": "5.18.1", "version": "5.18.1",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz",
@ -2900,6 +2951,15 @@
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true,
"engines": {
"node": "6.* || 8.* || >= 10.*"
}
},
"node_modules/get-intrinsic": { "node_modules/get-intrinsic": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
@ -3121,6 +3181,15 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/is-glob": { "node_modules/is-glob": {
"version": "4.0.3", "version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
@ -3786,6 +3855,15 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true,
"engines": {
"node": ">=6"
}
},
"node_modules/parent-module": { "node_modules/parent-module": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
@ -3878,6 +3956,15 @@
} }
} }
}, },
"node_modules/pngjs": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz",
"integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==",
"dev": true,
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/postcss": { "node_modules/postcss": {
"version": "8.5.3", "version": "8.5.3",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz",
@ -3984,6 +4071,38 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/qrcode": {
"version": "1.5.4",
"resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz",
"integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==",
"dev": true,
"dependencies": {
"dijkstrajs": "^1.0.1",
"pngjs": "^5.0.0",
"yargs": "^15.3.1"
},
"bin": {
"qrcode": "bin/qrcode"
},
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
"dev": true
},
"node_modules/resolve-from": { "node_modules/resolve-from": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
@ -4429,6 +4548,12 @@
"node": ">=10" "node": ">=10"
} }
}, },
"node_modules/set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
"dev": true
},
"node_modules/shebang-command": { "node_modules/shebang-command": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@ -4493,6 +4618,32 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/strip-final-newline": { "node_modules/strip-final-newline": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz",
@ -4742,9 +4893,9 @@
"devOptional": true "devOptional": true
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "6.2.5", "version": "6.2.6",
"resolved": "https://registry.npmjs.org/vite/-/vite-6.2.5.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.6.tgz",
"integrity": "sha512-j023J/hCAa4pRIUH6J9HemwYfjB5llR2Ps0CWeikOtdR8+pAURAk0DoJC5/mm9kd+UgdnIy7d6HE4EAvlYhPhA==", "integrity": "sha512-9xpjNl3kR4rVDZgPNdTL0/c6ao4km69a/2ihNQbcANz8RuCOK3hQBmLSJf3bRKVQjVMda+YvizNE8AwvogcPbw==",
"dependencies": { "dependencies": {
"esbuild": "^0.25.0", "esbuild": "^0.25.0",
"postcss": "^8.5.3", "postcss": "^8.5.3",
@ -5018,6 +5169,12 @@
"node": ">= 8" "node": ">= 8"
} }
}, },
"node_modules/which-module": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz",
"integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==",
"dev": true
},
"node_modules/word-wrap": { "node_modules/word-wrap": {
"version": "1.2.5", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
@ -5027,6 +5184,20 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
"integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
"dev": true,
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/xml-name-validator": { "node_modules/xml-name-validator": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz",
@ -5036,12 +5207,105 @@
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/y18n": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
"integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
"dev": true
},
"node_modules/yallist": { "node_modules/yallist": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
"dev": true "dev": true
}, },
"node_modules/yargs": {
"version": "15.4.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
"integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
"dev": true,
"dependencies": {
"cliui": "^6.0.0",
"decamelize": "^1.2.0",
"find-up": "^4.1.0",
"get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^4.2.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^18.1.2"
},
"engines": {
"node": ">=8"
}
},
"node_modules/yargs-parser": {
"version": "18.1.3",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
"integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
"dev": true,
"dependencies": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/yargs/node_modules/find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dev": true,
"dependencies": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/yargs/node_modules/locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dev": true,
"dependencies": {
"p-locate": "^4.1.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/yargs/node_modules/p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dev": true,
"dependencies": {
"p-try": "^2.0.0"
},
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/yargs/node_modules/p-locate": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dev": true,
"dependencies": {
"p-limit": "^2.2.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/yocto-queue": { "node_modules/yocto-queue": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",

View file

@ -27,6 +27,7 @@
"eslint-plugin-vue": "^9.32.0", "eslint-plugin-vue": "^9.32.0",
"pinia": "^3.0.1", "pinia": "^3.0.1",
"prettier": "^3.5.1", "prettier": "^3.5.1",
"qrcode": "^1.5.4",
"sass-embedded": "^1.85.1", "sass-embedded": "^1.85.1",
"tailwindcss": "^4.0.9", "tailwindcss": "^4.0.9",
"uuid": "^11.1.0", "uuid": "^11.1.0",

View file

@ -41,3 +41,7 @@ ul {
strong { strong {
@apply font-bold; @apply font-bold;
} }
a {
@apply underline text-amber-400 hover:text-amber-300;
}

View file

@ -107,6 +107,8 @@ nav {
items-center items-center
gap-2 gap-2
px-4 py-2 px-4 py-2
text-white
no-underline
border-transparent border-transparent
transition-colors; transition-colors;

View file

@ -51,6 +51,7 @@ onMounted(() => {
const toggleSave = () => { const toggleSave = () => {
if (!macroRecorder.save()) errorDialog.value.toggleDialog(true) if (!macroRecorder.save()) errorDialog.value.toggleDialog(true)
else window.location.reload()
} }
</script> </script>

View file

@ -1,6 +1,5 @@
import { createRouter, createWebHistory } from 'vue-router' import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue' import DashboardView from '../views/DashboardView.vue'
import { useDeviceStore } from '@/stores/device'
import { checkAuth, isLocal } from '@/services/ApiService' import { checkAuth, isLocal } from '@/services/ApiService'
const router = createRouter({ const router = createRouter({
@ -8,8 +7,8 @@ const router = createRouter({
routes: [ routes: [
{ {
path: '/', path: '/',
name: 'home', name: 'dashboard',
component: HomeView, component: DashboardView,
}, },
{ {
path: '/panels', path: '/panels',

View file

@ -0,0 +1,97 @@
<template>
<div id="dashboard" class="panel">
<h1 class="panel__title">Dashboard</h1>
<div class="panel__content">
<div class="grid gap-1 opacity-50 h-fit">
<em v-if="isLocal()">This is the server dashboard.</em>
<em v-else>This is the server dashboard.</em>
</div>
<div v-if="isLocal()">
<h4>Start: Authenticate a device</h4>
<ul>
<li>
Open <strong>{{ server.ip }}:{{ server.port }}</strong> in a browser on your phone.
<div class="p-4 qr-container">
<canvas ref="serverQr"></canvas>
</div>
</li>
<li>Navigate to the Server page. An authentication request will start automatically.</li>
<li>
Open the
<RouterLink to="/devices"> Devices</RouterLink>
page in this window.
</li>
<li>
<div class="inline-flex items-center gap-2">
The device will appear, if not click the
<span class="p-1 border rounded-sm"><IconReload class="size-4" /></span> button.
</div>
</li>
</ul>
<h4>Using a panel</h4>
<ul>
<li>Once authenticated you can access the Test Panel on your device.</li>
<li>Open the Panels page on your device and click the Test Panel.</li>
</ul>
</div>
<div v-else>
<h4>Start: Authenticate this device</h4>
<ul>
<li>
Open
<RouterLink to="/devices"> Server</RouterLink>
to start.
</li>
<li>An authentication request will start automatically.</li>
</ul>
<h4>Using a panel</h4>
<ul>
<li>
Once authenticated you can access the
<RouterLink to="/panel/view/test_panel"> Test Panel</RouterLink>
on your device.
</li>
<li>
Open the
<RouterLink to="/panels">Panels page</RouterLink>
you can edit the panel.
</li>
</ul>
</div>
</div>
</div>
</template>
<script setup>
import { RouterLink } from 'vue-router'
import { isLocal } from '@/services/ApiService'
import { useDeviceStore } from '@/stores/device'
import { onMounted, reactive, ref } from 'vue'
import { IconReload } from '@tabler/icons-vue'
import QRCode from 'qrcode'
const device = useDeviceStore()
const server = reactive({
ip: '',
port: '',
fullPath: '',
})
const serverQr = ref()
onMounted(async () => {
const serverIP = await device.serverGetIP()
server.ip = serverIP
server.port = window.__CONFIG__.MCRM__PORT
server.fullPath = `http://${server.ip}:${server.port}`
QRCode.toCanvas(serverQr.value, server.fullPath, (error) => {
console.log(error)
})
})
</script>
<style lang="scss" scoped></style>

View file

@ -1,17 +0,0 @@
<template>
<div id="dashboard" class="panel">
<h1 class="panel__title">Dashboard</h1>
<div class="panel__content">
<div class="grid gap-1 opacity-50 h-fit">
<em>Hello nothing to see here. Something will be added in the future.</em>
<em>Use the menu to navigate.</em>
<em>Have a nice day!</em>
</div>
</div>
</div>
</template>
<script setup></script>
<style lang="scss" scoped></style>

View file

@ -21,105 +21,105 @@
id="button_2" id="button_2"
mcrm__button mcrm__button
> >
Close window Close application
</div> </div>
<div <div
class="flex items-center justify-center bg-sky-400" class="flex items-center justify-center bg-sky-400"
id="button_3" id="button_3"
mcrm__button mcrm__button
> >
button3 Run
</div> </div>
<div <div
class="flex items-center justify-center bg-sky-400" class="flex items-center justify-center bg-sky-400"
id="button_4" id="button_4"
mcrm__button mcrm__button
> >
button4 Files
</div> </div>
<div <div
class="flex items-center justify-center bg-sky-400" class="flex items-center justify-center bg-sky-400"
id="button_5" id="button_5"
mcrm__button mcrm__button
> >
button5 Settings
</div> </div>
<div <div
class="flex items-center justify-center bg-sky-400" class="flex items-center justify-center bg-sky-400"
id="button_6" id="button_6"
mcrm__button mcrm__button
> >
button6 New Desktop
</div> </div>
<div <div
class="flex items-center justify-center bg-sky-400" class="flex items-center justify-center bg-sky-400"
id="button_7" id="button_7"
mcrm__button mcrm__button
> >
button7 Displays
</div> </div>
<div <div
class="flex items-center justify-center bg-sky-400" class="flex items-center justify-center bg-sky-400"
id="button_8" id="button_8"
mcrm__button mcrm__button
> >
button8 Task View
</div> </div>
<div <div
class="flex items-center justify-center bg-sky-400" class="flex items-center justify-center bg-rose-400"
id="button_9" id="button_9"
mcrm__button mcrm__button
> >
button9 New Window
</div> </div>
<div <div
class="flex items-center justify-center bg-sky-400" class="flex items-center justify-center bg-rose-400"
id="button_10" id="button_10"
mcrm__button mcrm__button
> >
button10 Close Window
</div> </div>
<div <div
class="flex items-center justify-center bg-sky-400" class="flex items-center justify-center bg-rose-400"
id="button_11" id="button_11"
mcrm__button mcrm__button
> >
button11 Previous Tab
</div> </div>
<div <div
class="flex items-center justify-center bg-sky-400" class="flex items-center justify-center bg-rose-400"
id="button_12" id="button_12"
mcrm__button mcrm__button
> >
button12 Next Tab
</div> </div>
<div <div
class="flex items-center justify-center bg-sky-400" class="flex items-center justify-center bg-rose-400"
id="button_13" id="button_13"
mcrm__button mcrm__button
> >
button13 Close Tab
</div> </div>
<div <div
class="flex items-center justify-center bg-sky-400" class="flex items-center justify-center bg-rose-400"
id="button_14" id="button_14"
mcrm__button mcrm__button
> >
button14 New Tab
</div> </div>
<div <div
class="flex items-center justify-center bg-sky-400" class="flex items-center justify-center bg-rose-400"
id="button_15" id="button_15"
mcrm__button mcrm__button
> >
button15 Fullscreen
</div> </div>
<div <div
class="flex items-center justify-center bg-sky-400" class="flex items-center justify-center bg-rose-400"
id="button_16" id="button_16"
mcrm__button mcrm__button
> >
button16 Home
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,66 +1,69 @@
.m-0 { /*! tailwindcss v4.1.2 | MIT License | https://tailwindcss.com */
margin: calc(var(--spacing) * 0); @layer theme, utilities;
@layer theme {
:root, :host {
--color-red-500: oklch(63.7% 0.237 25.331);
--color-sky-400: oklch(74.6% 0.16 232.661);
--color-rose-400: oklch(71.2% 0.194 13.428);
--color-slate-400: oklch(70.4% 0.04 256.788);
--color-slate-500: oklch(55.4% 0.046 257.417);
--spacing: 0.25rem;
}
} }
.flex { @layer utilities {
display: flex; .m-0 {
margin: calc(var(--spacing) * 0);
}
.flex {
display: flex;
}
.grid {
display: grid;
}
.aspect-\[9\/20\] {
aspect-ratio: 9/20;
}
.size-full {
width: 100%;
height: 100%;
}
.h-full {
height: 100%;
}
.h-screen {
height: 100vh;
}
.w-screen {
width: 100vw;
}
.grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-rows-8 {
grid-template-rows: repeat(8, minmax(0, 1fr));
}
.items-center {
align-items: center;
}
.justify-center {
justify-content: center;
}
.gap-2 {
gap: calc(var(--spacing) * 2);
}
.bg-rose-400 {
background-color: var(--color-rose-400);
}
.bg-sky-400 {
background-color: var(--color-sky-400);
}
.bg-slate-400 {
background-color: var(--color-slate-400);
}
.bg-slate-500 {
background-color: var(--color-slate-500);
}
} }
.grid {
display: grid;
}
.aspect-\[9\/20\] {
aspect-ratio: 9/20;
}
.size-full {
width: 100%;
height: 100%;
}
.h-dvh {
height: 100dvh;
}
.h-full {
height: 100%;
}
.h-screen {
height: 100vh;
}
.w-dvw {
width: 100dvw;
}
.w-screen {
width: 100vw;
}
.grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-rows-8 {
grid-template-rows: repeat(8, minmax(0, 1fr));
}
.items-center {
align-items: center;
}
.justify-center {
justify-content: center;
}
.gap-2 {
gap: calc(var(--spacing) * 2);
}
.border {
border-style: var(--tw-border-style);
border-width: 1px;
}
.border-red-500 {
border-color: var(--color-red-500);
}
.bg-sky-400 {
background-color: var(--color-sky-400);
}
.bg-slate-400 {
background-color: var(--color-slate-400);
}
.bg-slate-500 {
background-color: var(--color-slate-500);
}
body * { body * {
box-sizing: border-box; box-sizing: border-box;
} }

View file

@ -1,11 +1 @@
{ {"dir":"","name":"Test Panel 1","description":"This is the very first panel to be created. It is a test panel for a mobile phone.","aspectRatio":"10/20","macros":{"button_1":"Task_Manager","button_10":"Close_Browser_Window","button_11":"Previous_Tab","button_12":"Next_Tab","button_13":"Close_Tab","button_14":"New_Tab","button_15":"Fullscreen","button_16":"Home","button_2":"Close_Application","button_3":"RunDialog","button_4":"Files","button_5":"Settings","button_6":"New_Desktop","button_7":"Displays","button_8":"Task_view","button_9":"New_Window"}}
"dir": "",
"name": "Test Panel 1",
"description": "This is the very first panel to be created. It is a test panel for a mobile phone.",
"aspectRatio": "10/20",
"macros": {
"button_1": "Task_manager",
"button_16": "Task_manager",
"button_2": "ALT+F4"
}
}

5
test-config.js Normal file
View file

@ -0,0 +1,5 @@
window.__CONFIG__ = {
"MCRM__IV": "7290919109450742",
"MCRM__PORT": "52893",
"MCRM__SALT": "UQrNepgDabFnvSC/xqKt7MyQQVLS"
};