From 38bddf17635469cfd339c3a9302678a3137d1900 Mon Sep 17 00:00:00 2001
From: Afonso <45356703+afonsopbarros@users.noreply.github.com>
Date: Mon, 12 Feb 2024 18:04:56 +0100
Subject: [PATCH] add prettier formatter
---
.gitignore | 5 +-
.prettierrc | 8 +
AquaMai/AquaMai.toml | 4 +-
AquaNet/README.md | 3 +-
AquaNet/SVELTE.md | 70 +-
AquaNet/index.html | 39 +-
AquaNet/package.json | 5 +-
AquaNet/public/assets/icons/site.webmanifest | 34 +-
AquaNet/src/App.svelte | 14 +-
AquaNet/src/libs/generalTypes.ts | 10 +-
AquaNet/src/libs/maimai.ts | 105 +--
AquaNet/src/libs/maimaiTypes.ts | 230 +++---
AquaNet/src/libs/ui.ts | 217 ++---
AquaNet/src/main.ts | 2 +-
AquaNet/src/pages/Home.svelte | 166 ++--
AquaNet/src/pages/MaimaiRating.svelte | 418 +++++-----
AquaNet/src/pages/UserHome.svelte | 811 ++++++++++---------
AquaNet/svelte.config.js | 2 +-
AquaNet/tsconfig.json | 2 +-
AquaNet/vite.config.ts | 4 +-
AquaNet/yarn.lock | 10 +
21 files changed, 1141 insertions(+), 1018 deletions(-)
create mode 100644 .prettierrc
diff --git a/.gitignore b/.gitignore
index 90f4ecf8..26fd3569 100644
--- a/.gitignore
+++ b/.gitignore
@@ -75,4 +75,7 @@ gradle-app.setting
### Gradle Patch ###
# Java heap dump
-*.hprof
\ No newline at end of file
+*.hprof
+
+### Docker ###
+/db/*
\ No newline at end of file
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 00000000..532651af
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,8 @@
+{
+ "trailingComma": "es5",
+ "semi": false,
+ "singleQuote": true,
+ "bracketSpacing": false,
+ "plugins": ["prettier-plugin-svelte"],
+ "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
+}
diff --git a/AquaMai/AquaMai.toml b/AquaMai/AquaMai.toml
index bdbe445e..24f0988a 100644
--- a/AquaMai/AquaMai.toml
+++ b/AquaMai/AquaMai.toml
@@ -11,6 +11,6 @@ TicketUnlock=true
# Skip the warning screen and logo shown after the POST sequence
SkipWarningScreen=true
# Single player: Show 1P only, at the center of the screen
-SinglePlayer=true
+SinglePlayer=false
# !!EXPERIMENTAL!! Skip from the card-scanning screen directly to music selection screen
-SkipToMusicSelection=false
\ No newline at end of file
+SkipToMusicSelection=true
\ No newline at end of file
diff --git a/AquaNet/README.md b/AquaNet/README.md
index d079bd1e..03ca07da 100644
--- a/AquaNet/README.md
+++ b/AquaNet/README.md
@@ -1,6 +1,6 @@
# AquaNet
-This is the codebase for the new frontend of AquaDX.
+This is the codebase for the new frontend of AquaDX.
This project is also heavily WIP, so more details will be added later on.
## Development
@@ -19,4 +19,3 @@ Finally, run:
yarn install
yarn dev
```
-
diff --git a/AquaNet/SVELTE.md b/AquaNet/SVELTE.md
index 94e85ede..74c5dfcf 100644
--- a/AquaNet/SVELTE.md
+++ b/AquaNet/SVELTE.md
@@ -1,35 +1,35 @@
-## Technical considerations
-
-**Why use this over SvelteKit?**
-
-- It brings its own routing solution which might not be preferable for some users.
-- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.
-
-This template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.
-
-Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.
-
-**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**
-
-Setting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.
-
-**Why include `.vscode/extensions.json`?**
-
-Other templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.
-
-**Why enable `allowJs` in the TS template?**
-
-While `allowJs: false` would indeed prevent the use of `.js` files in the project, it does not prevent the use of JavaScript syntax in `.svelte` files. In addition, it would force `checkJs: false`, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant.
-
-**Why is HMR not preserving my local component state?**
-
-HMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).
-
-If you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.
-
-```ts
-// store.ts
-// An extremely simple external store
-import { writable } from 'svelte/store'
-export default writable(0)
-```
\ No newline at end of file
+## Technical considerations
+
+**Why use this over SvelteKit?**
+
+- It brings its own routing solution which might not be preferable for some users.
+- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.
+
+This template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.
+
+Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.
+
+**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**
+
+Setting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.
+
+**Why include `.vscode/extensions.json`?**
+
+Other templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.
+
+**Why enable `allowJs` in the TS template?**
+
+While `allowJs: false` would indeed prevent the use of `.js` files in the project, it does not prevent the use of JavaScript syntax in `.svelte` files. In addition, it would force `checkJs: false`, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant.
+
+**Why is HMR not preserving my local component state?**
+
+HMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).
+
+If you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.
+
+```ts
+// store.ts
+// An extremely simple external store
+import {writable} from 'svelte/store'
+export default writable(0)
+```
diff --git a/AquaNet/index.html b/AquaNet/index.html
index 8788bb8e..4a515450 100644
--- a/AquaNet/index.html
+++ b/AquaNet/index.html
@@ -6,15 +6,36 @@