diff --git a/webui/src/help/Help.css b/webui/src/help/Help.css new file mode 100644 index 0000000..87822a0 --- /dev/null +++ b/webui/src/help/Help.css @@ -0,0 +1,36 @@ +body { + background-color: #616161; +} + +#home { + width: 90%; + margin: 50px auto; + background-color: #43A047; + border-radius: 10px; + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); + font-family: "Poppins", sans-serif; + padding: 20px 10px; +} + +#logout { + border: none; + text-align: center; + text-decoration: underline; + display: inline-block; + font-size: 16px; + transition-duration: 0.4s; + float: right; + background-color: yellow; + border-radius: 30px; + padding: 5px 20px; + cursor: pointer; +} + +#logout:hover { + background-color: red; +} + +#error p { + color: orange; + grid-template-columns: auto auto auto; +} diff --git a/webui/src/help/Help.jsx b/webui/src/help/Help.jsx new file mode 100644 index 0000000..9b07308 --- /dev/null +++ b/webui/src/help/Help.jsx @@ -0,0 +1,82 @@ +import { useState, useParams, useEffect } from 'react' +import './Help.css' +import Request from '../Request.jsx' + +function Help() { + const [downloadUrl, setDownloadUrl] = useState(
Contact your server admin, asking for a patched apk. Examples can be found here.
); + const [downloadUrliOSGL, setDownloadUrliOSGL] = useState("https://ethanthesleepy.one/public/lovelive/sif2/sif2-gl.ipa"); + const [downloadUrliOSJP, setDownloadUrliOSJP] = useState("https://ethanthesleepy.one/public/lovelive/sif2/sif2-jp.ipa"); + + const [assetUrl, setAssetUrl] = useState("http://sif2.sif.moe"); + let init = false; + + useEffect(() => { + if (init) return; + init = true; + (async () => { + let resp = await Request("/api/webui/serverInfo"); + if (resp.result !== "OK") { + return; + } + if (!resp.data.links) return; + if (resp.data.links.global && resp.data.links.japan) { + setDownloadUrl( +
Your server admin has a link to download! Download Japan or Global
+ ); + } else if (resp.data.links.global) { + setDownloadUrl( +
Your server admin has a link to download! Download Global
+ ); + } else if (resp.data.links.japan) { + setDownloadUrl( +
Your server admin has a link to download! Download Japan
+ ); + } + if (!resp.data.links.ios) return; + if (resp.data.links.ios.japan) { + setDownloadUrliOSJP(resp.data.links.ios.japan); + } + if (resp.data.links.ios.global) { + setDownloadUrliOSJP(resp.data.links.ios.global); + } + + })(); + }); + + return ( +
+

Help/About

+

What is "ew"? What is this server for?

+

"ew" is a private server, written in Rust, for the short lived game "Love Live! School idol festival 2 MIRACLE LIVE!", a Love Live! themed mobile rhythm game.

+ +

So I got the server running, how do I install the app? (Android)

+

{downloadUrl}

+ +

So I got the server running, how do I install the app? (iOS)

+

Running on iOS is much simpler than Android, thanks to triangle on the discord. You first download an ipa file for global or Japan, and use Sideloadly (or your preferred application installer) to install the app. Then open settings, navigate to the app you just installed, and input the server url (Which is likely "{window.location.origin}", though this may not be the case). If you have any errors opening the app, make sure none of the urls in settings end with a slash (/).

+ +

Help! I'm trying to open the app and it shows as "unavailable" (iOS)

+

Do not delete it, Just re-sideload the app. This is an Apple "security" feature.

+ +

How well does this work?

+

Works well enough. The server itself takes up not even 20mb of storage, and it's written in rust. I personally think it's pretty well written.

+ +

Could my computer/laptop run a server?

+

Very very likely. If the platform is supported by rust, then the answer is yes! It is recommended to manually compile the project until I get the time to setup GitHub actions. ew github repo

+ +

Is the server down right now? I can't connect

+

Assuming you have just loaded this page on the server you use, then the answer is no, otherwise please contact your server admin.

+ +

Do events work?

+

No, sadly events are the only thing not implemented, and it's not entirely on my road map either. If you want it to happen, feel free to contribute.

+ +

But then, how do I get event URs?

+

There are serial codes for several things, one of which includes all the event URs. I don't remember what does what but it is recommended to look at the serial code file to get the latest codes.

+ +

Why does the game crash when I do x?

+

This likely means something on the server is broken. If you're self hosting, please open a GitHub issue. Otherwise, contact your server admin and ask them to report the issue.

+
+ ); +} + +export default Help; diff --git a/webui/src/login/Login.jsx b/webui/src/login/Login.jsx index cd626c0..e2dfaf4 100644 --- a/webui/src/login/Login.jsx +++ b/webui/src/login/Login.jsx @@ -41,6 +41,11 @@ function Login() { window.location.href = "/import/"; } + const help = (e) => { + e.preventDefault(); + window.location.href = "/help/"; + } + const adminPanel = (e) => { e.preventDefault(); window.location.href = "/admin/"; @@ -57,6 +62,7 @@ function Login() {


+

{ error[0] ?

Error: { error[0] }

:

}
diff --git a/webui/src/main.jsx b/webui/src/main.jsx index ae91ac8..eeea5fc 100644 --- a/webui/src/main.jsx +++ b/webui/src/main.jsx @@ -4,6 +4,7 @@ import Login from './login/Login.jsx' import Home from './home/Home.jsx' import Import from './import/Import.jsx' import Admin from './admin/Admin.jsx' +import Help from './help/Help.jsx' let Elem; switch (window.location.pathname) { @@ -19,6 +20,9 @@ switch (window.location.pathname) { case "/admin/": Elem = Admin; break; + case "/help/": + Elem = Help; + break; default: window.location.pathname = "/"; }