AquaNet: update README, move userbox config to .env, and add check before build

Signed-off-by: Yonle <yonle@proton.me>
This commit is contained in:
Yonle
2026-05-31 21:12:28 +07:00
parent 72c1f48bdb
commit 18451b5948
5 changed files with 31 additions and 15 deletions

View File

@@ -1,14 +1,20 @@
VITE_AQUA_HOST=https://aquadx.net/aqua
# Link to datas (eg, songid, information, etc).
# Leave this as is if you do not have the data.
VITE_DATA_HOST=https://aquadx.net
VITE_AQUA_CONNECTION=aquadx.hydev.org
VITE_TURNSTILE_SITE_KEY=0x4AAAAAAASGA2KQEIelo9P9
VITE_DISCORD_INVITE=https://discord.gg/FNgveqFF7s
VITE_TELEGRAM_INVITE=https://t.me/+zBL4RZdyfvUzZGU1
VITE_QQ_INVITE=https://qm.qq.com/q/dpYmGoVHnG
VITE_GITHUB_REPOSITORY=https://github.com/MewoLab/AquaDX
# Documentation for Userbox mode can be found in `docs/aquabox-url-mode.md`
# Please note that if this is set, it must be manually unset by users in Chuni Settings -> Update Userbox -> Switch to URL mode -> (empty value) -> Enter key
VITE_USERBOX_DEFAULT_URL=
# the following is used at some case where custom access code QR code URL has been done.
# example:
# https://aquadx.net/cards/#accesskey=....

View File

@@ -9,12 +9,15 @@ This project uses Svelte (NOT SvelteKit) + TypeScript + Sass, built using Vite.
### Running locally
First, you would need to install Node.js and bun.
Then, you would need to start your testing AquaDX server and configure the `aqua_host` in `src/libs/config.ts` to use your URL.
Please leave `data_host` unchanged if you're not sure what it is.
Finally, run:
```shell
bun install
bun run dev
You will need to have Node.js (or equivalent) and `pnpm` installed, Start by installing dependencies by running:
```
pnpm install
```
Then, you would need to start your testing AquaDX server and configure the `VITE_AQUA_HOST` in `.env` (copy `.env.example` file to `.env`) to use your URL.
Please leave `VITE_DATA_HOST` unchanged if you're not sure what it is.
Finally, run:
```
pnpm run dev
```

9
AquaNet/buildcheck.js Normal file
View File

@@ -0,0 +1,9 @@
import { existsSync } from "fs"
if (!existsSync(".env")) {
console.error(" I did not see .env being here. You sure it was there?")
console.error(" Copy .env.example to .env, edit .env, and try again.\n")
process.exit(1)
}
process.exit(0)

View File

@@ -4,8 +4,8 @@
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"dev": "node buildcheck.js && vite",
"build": "node buildcheck.js && vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"lint": "eslint . --ext ts,tsx,svelte --max-warnings 0 --fix"

View File

@@ -20,9 +20,7 @@ export const DEFAULT_PFP = '/assets/imgs/no_profile.png'
// Key name for access key scanned from QR code
export const ACCESSCODE_QKEY = import.meta.env.VITE_ACCESSCODE_QKEY || "accesskey"
// Documentation for Userbox mode can be found in `docs/aquabox-url-mode.md`
// Please note that if this is set, it must be manually unset by users in Chuni Settings -> Update Userbox -> Switch to URL mode -> (empty value) -> Enter key
export const USERBOX_DEFAULT_URL = ""
export const USERBOX_DEFAULT_URL = import.meta.env.VITE_USERBOX_DEFAULT_URL || ""
export const HAS_USERBOX_ASSETS = true
@@ -48,4 +46,4 @@ export const CHU3_MATCHINGS: ChusanMatchingOption[] = [
reflector: "http://reflector.naominet.live:18080/",
coop: ["RinNET", "MysteriaNET"],
},
]
]