diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 407fd03f..22958d3f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,6 +8,9 @@ After forking the repository, run the following commands to get started: A few notes: +- Use `next` branch for development and as base & target branch for pull requests if possible. +- To link dependency locally e.g. flying-squid add this to `pnpm` > `overrides` of root package.json: `"flying-squid": "file:../space-squid",` (with some modules `pnpm link` also works) + - It's recommended to use debugger for debugging. VSCode has a great debugger built-in. If debugger is slow, you can use `--no-sources` flag that would allow browser to speedup .map file parsing. - Some data are cached between restarts. If you see something doesn't work after upgrading dependencies, try to clear the by simply removing the `dist` folder. - The same folder `dist` is used for both development and production builds, so be careful when deploying the project. diff --git a/assets/generic_91.png b/assets/generic_91.png new file mode 100644 index 00000000..99e4d04a Binary files /dev/null and b/assets/generic_91.png differ diff --git a/assets/generic_92.png b/assets/generic_92.png new file mode 100644 index 00000000..299e081b Binary files /dev/null and b/assets/generic_92.png differ diff --git a/assets/generic_93.png b/assets/generic_93.png new file mode 100644 index 00000000..1b35f671 Binary files /dev/null and b/assets/generic_93.png differ diff --git a/assets/generic_94.png b/assets/generic_94.png new file mode 100644 index 00000000..19dc788d Binary files /dev/null and b/assets/generic_94.png differ diff --git a/assets/generic_95.png b/assets/generic_95.png new file mode 100644 index 00000000..2286dbfc Binary files /dev/null and b/assets/generic_95.png differ diff --git a/config.json b/config.json index 7c0ce254..81572913 100644 --- a/config.json +++ b/config.json @@ -3,5 +3,5 @@ "defaultHost": "", "defaultProxy": "zardoy.site:2344", "defaultVersion": "1.18.2", - "mapsProvider": "zardoy.site/maps" + "mapsProvider": "https://maps.mcraft.fun/" } diff --git a/esbuild.mjs b/esbuild.mjs index 46283bb1..2d18ae3a 100644 --- a/esbuild.mjs +++ b/esbuild.mjs @@ -70,7 +70,8 @@ const buildOptions = { 'process.env.NODE_ENV': JSON.stringify(dev ? 'development' : 'production'), 'process.env.BUILD_VERSION': JSON.stringify(!dev ? buildingVersion : 'undefined'), 'process.env.GITHUB_URL': - JSON.stringify(`https://github.com/${process.env.GITHUB_REPOSITORY || `${process.env.VERCEL_GIT_REPO_OWNER}/${process.env.VERCEL_GIT_REPO_SLUG}`}`) + JSON.stringify(`https://github.com/${process.env.GITHUB_REPOSITORY || `${process.env.VERCEL_GIT_REPO_OWNER}/${process.env.VERCEL_GIT_REPO_SLUG}`}`), + 'process.env.DEPS_VERSIONS': JSON.stringify({}) }, loader: { // todo use external or resolve issues with duplicating diff --git a/index.html b/index.html index 6a273589..0d4ee729 100644 --- a/index.html +++ b/index.html @@ -12,8 +12,8 @@
-
Loading...
-
A true Minecraft client in your browser!
+
Loading...
+
A true Minecraft client in your browser!
` @@ -22,6 +22,17 @@ if (!window.pageLoaded) { document.documentElement.appendChild(loadingDivElem) } + // load error handling + const onError = (message) => { + console.log(message) + if (document.querySelector('.initial-loader') && document.querySelector('.initial-loader').querySelector('.title').textContent !== 'Error') { + document.querySelector('.initial-loader').querySelector('.title').textContent = 'Error' + document.querySelector('.initial-loader').querySelector('.subtitle').textContent = message + window.location.hash = '#dev' // show eruda + } + } + window.addEventListener('unhandledrejection', (e) => onError(e.reason)) + window.addEventListener('error', (e) => onError(e.message))