diff --git a/Dockerfile b/Dockerfile index 4645352..e26d954 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ # 打包命令 -# docker buildx build -t zhushenwudi/lovelive_sif2:1.0.0 --platform=linux/amd64 . +# docker buildx build -t zhushenwudi/lovelive-sif2:1.0.1 --platform=linux/amd64 . # 使用适用于 Linux x86 的基础映像 # 保存镜像 -# docker save -o lovelive_sif2.tar zhushenwudi/lovelive_sif2:1.0.0 +# docker save -o lovelive-sif2.tar zhushenwudi/lovelive-sif2:1.0.1 FROM docker.io/library/debian:latest AS builder @@ -31,7 +31,7 @@ RUN npm i && npm run build WORKDIR /ew/ -RUN . "$HOME/.cargo/env" && cargo build --release +RUN . "$HOME/.cargo/env" && cargo build --release --jobs=16 ## Second - sort stuff idk diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index af65012..36b0745 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,34 +1,42 @@ version: '3' services: lovelive_sif2: - image: zhushenwudi/lovelive_sif2:1.0.0 + image: zhushenwudi/lovelive-sif2:1.0.0 container_name: sif2 environment: - PORT: 8080 - ASSET_PORT: 8000 - DIRECTORY: /data/ - ASSET_DIRECTORY: /assets/ + # Server URL是否存在SSL/TSL加密协议 HTTPS: false + # 是否允许内部启动资源服务 ENABLE_ASSET_SERVER: false + # <数据迁移> SIF1服务器地址 #NPPS4_ADDRESS: "http://127.0.0.1:51376" - MAXTIME: 1717045200 # A day before global EOS - HIDDEN: false # Will disable the webui - DISABLE_IMPORTS: false # Will disable account imports - DISABLE_EXPORTS: false # Will disable account exports + # 服务器默认时间,建议设置到开服时间,最大设置为关服时间 + MAXTIME: 1736076211 + # 是否隐藏WebUI + HIDDEN: false + # 是否禁用账号导入 + DISABLE_IMPORTS: false + # 是否禁用账号导出 + DISABLE_EXPORTS: false - # Everything below is for the "Help" page + # 以下内容出现在Help界面 + # 未签名的apk下载地址 + ANDROID_JAPAN: "http://fir.zhushenwudi.top/n2tvzrhl" #ANDROID_GLOBAL: "link.to/patched/android/global.apk" - #ANDROID_JAPAN: "link.to/patched/android/japan.apk" + # 脱壳的ipa下载地址 + #IOS_JAPAN: "link.to/ios/jp.ipa" #IOS_GLOBAL: "link.to/ios/global.ipa" - #IOS_JAPAN: "link.to/ios/japan.ipa" #ASSET_URL: "link.to/client/assets/" ports: + # 只修改左侧本地端口 + # Server URL 端口 - "8080:8080" + # Assets URL 端口 - "8000:8000" volumes: # 只修改左侧本地路径 # 数据库存放路径(建议添加) - ./data:/data - # 资源文件存放路径(搭建asset server需要指定本地资源路径) + # 资源文件存放路径(搭建assets server需要指定本地资源路径) - ./assets:/assets restart: unless-stopped diff --git a/readme.md b/readme.md index a772edd..f9db212 100644 --- a/readme.md +++ b/readme.md @@ -1,31 +1,30 @@ # EW -(stands for ew why) -A (mostly functioning) server for Love Live! School idol festival 2 MIRACLE LIVE! +一款基本能正常运行的《Love Live! 学园偶像祭2 MIRACLE LIVE!》服务器程序 -## Building +## 构建 ### Linux -#### Requirements -- [perl](https://www.perl.org/get.html) (This is normally pre-installed) +#### 环境要求 +- [perl](https://www.perl.org/get.html) (这通常是预装的) - [rust](https://www.rust-lang.org/tools/install) - [npm](https://www.npmjs.com/) -- The [libssl-dev](https://packages.debian.org/buster/libssl-dev) package. This will vary across distros. +- [libssl-dev](https://packages.debian.org/buster/libssl-dev) (这在不同的发行版中会有所不同) `apt install -y npm libssl-dev perl` ### Windows -#### Requirements +#### 环境要求 - [Strawberry Perl](https://strawberryperl.com/) - [rust](https://www.rust-lang.org/tools/install) -### Packaging/Running +### 打包/运行 -**Build npm:** +**编译WebUI** `cd webui && npm install && npm run build` -**Build Rust:** +**编译Rust** Debug: `cargo run` Release: `cargo build --release --jobs=16` diff --git a/webui/src/help/Help.jsx b/webui/src/help/Help.jsx index 1163bc8..e8924cf 100644 --- a/webui/src/help/Help.jsx +++ b/webui/src/help/Help.jsx @@ -1,15 +1,17 @@ -import { useState, useParams, useEffect } from 'react' +import {useEffect, useState} from 'react' import './Help.css' import Request from '../Request.jsx' -let init = false; + +let init = false +let defaultDownloadUrl = "您的服务器管理员没有可供下载的预打补丁的应用程序包。请参阅下面的问题。" function Help() { - const [downloadUrl, setDownloadUrl] = useState(
Your server admin has no pre-patched apks to download. See the question below..
); + const [downloadUrl, setDownloadUrl] = useState(
{defaultDownloadUrl}
); 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("https://sif2.sif.moe"); - + useEffect(() => { (async () => { if (init) return; @@ -21,15 +23,16 @@ function Help() { 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.assets) { @@ -46,43 +49,63 @@ function Help() { })(); }); - + + const renderNoAndroidDownloadUrl = () => { + return <> +

我的服务器管理员没有下载链接,我该如何修补apk(安卓)?

+

你可以用 @arasfon's sif2 apk 修补工具。 + 在“服务器URL”中填写"{window.location.origin}",在“资源URL”中填写 "{assetUrl}"(默认已经帮你填入了以上信息)。 + 选择你的游戏版本, 更改头部格式为“Lowercase”, 最后点击开始修补。完成修补后使用 uber-apk-signer 来签署apk. + 最后便可以安装到你的手机上了!

+ + } + 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.

+
+

帮助/关于

+

“ew”是什么?这个服务器是用来做什么的?

+

“ew”是一个用Rust编写的私人服务器,原作者:Ethan O'Brien,原项目:ew仓库地址。 + 本项目为二次开发版本,用于短命的游戏《Love Live! School idol festival 2 MIRACLE LIVE!》, + 这是一款以Love Live!为主题的移动节奏游戏。

-

I'm just trying to play on this server, how do I install the app? (Android)

-

{downloadUrl}

+

我只是想在这个服务器上玩,我该如何安装这个应用程序?(安卓)

+

{downloadUrl}

-

My server admin has no download URLs, how do I patch the apk? (Android)

-

You can use @arasfon's sif2 apk patcher. Plug and the asset url, which is "{assetUrl}", into the "Assets URL" textbox, and then the server url (Which is likely "{window.location.origin}", though this may not be the case). Select your game version, set "header format" to "Lowercase", and press patch. Once that done, use uber-apk-signer to sign the apk. Then, get it onto your phone and install!

+ {downloadUrl === defaultDownloadUrl ? renderNoAndroidDownloadUrl() : null} -

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), and the asset url, which is "{assetUrl}". If you have any errors opening the app, make sure none of the urls in settings end with a slash (/).

+

我该如何安装这款应用?(iOS)

+

在iOS上运行要比Android简单得多,这要归功于Discord上的Triangle。你首先要下载一个用于 国际服 或者 日服 的ipa文件, + 然后使用 Sideloadly (或任何能够实现侧载的应用程序)来安装这个APP。打开手机系统设置, + 导航到SIF2应用的设置页面, 填入“Server URL”:"{window.location.origin}" 与 “Assets URL”:"{assetUrl}"。 + 如果您在打开应用程序时遇到任何错误,请确保设置中的所有网址都没有以斜杠结尾。

-

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.

+

求求!我尝试打开SIF2,但它显示为“不可用”(iOS)。

+

不要删除当前的SIF2,只需重新侧载该应用程序。这是苹果的安全功能。

-

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.

+

程序的执行效率如何?

+

运行得相当不错。服务器本身占用的存储空间甚至不到20兆字节,并且是用Rust编写的。我个人认为它写得相当好。

-

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 actions. ew repo

+

我的电脑/笔记本电脑能运行服务器吗?

+

非常有可能。如果平台是支持 Rust语言 的, + 那么答案是肯定的!在我有时间设置自动操作之前,建议手动编译项目。 ew仓库地址

-

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?

-

Most events do not, though most should not crash the game. Star events are partially implemented. You can get your rank up, and compete with other players in a ranking table, but no rewards are currently implemented.

+

打歌活动能正常游玩吗?

+

大多数活动会让游戏崩溃,不过这确实是不应该的。明星活动部分已实现。你可以提升自己的排名,并在排名表中与其他玩家竞争,但目前尚未实现奖励功能。

-

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.

+

我该如何获取活动UR呢?

+

可以通过游戏内兑换码的方式领取活动UR:meow、kode、ganuy

-

Why does the game crash when I do x?

-

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

-
+

当我操作窗口关闭时,为什么游戏会崩溃?

+

这很可能意味着服务器上有某些地方出故障了。如果你是自行托管(服务器),请通过Matrix联系我。否则,联系你的服务器管理员,并让他们报告这个问题。

+
); } diff --git a/webui/src/home/Home.jsx b/webui/src/home/Home.jsx index 23d024b..146eb1c 100644 --- a/webui/src/home/Home.jsx +++ b/webui/src/home/Home.jsx @@ -50,28 +50,29 @@ function Bonus() { updatedItems.splice(index, 1); setSubmittedItems(updatedItems); }; -// + return (
-

Current login bonus list

+

当前登录奖励列表

{ error[0] ?

Error: { error[0] }

:

}
-
+ setInputValue(event.target.value)} - placeholder="Enter login bonus ID" + placeholder="输入登录奖励ID" /> - +
-

You can find a list of available login bonus IDs here. You should input the id field

+

你可以找到可用登录奖励ID的列表。 这里. 你应该输入指定 id

); } @@ -158,10 +159,10 @@ function Home() { userdata(
-

User id: { user.user.id }

-

Migration id: { getMigrationID(user.user.id) }

-

Rank: { user.user.rank } ({ user.user.exp } exp)

-

Last Login: { (new Date(user.user.last_login_time * 1000)).toString() }

+

SIF2 用户id: { user.user.id }

+

引继码: { getMigrationID(user.user.id) }

+

等级: { user.user.rank } ({ user.user.exp } exp)

+

上次登录时间: { (new Date(user.user.last_login_time * 1000)).toString() }

); @@ -170,23 +171,23 @@ function Home() { return (
-


- -

Home

+


+ +

用户主页

{ user ?
{ user } -

Server time

+

服务器时间

{ error[0] ?

Error: { error[0] }

:

}
-

Currently set to { serverTime }. Setting to 0 will set it to now, and -1 will reset it. Time will still progress, based off of when you set this timestamp.

+

当前时间设置的值为 { serverTime }. 将其设置为0将会设置为当前时间,而-1则会重置它。时间的推进仍将基于您设置此时间戳的时间。

setInputValue(event.target.value)} - placeholder="Enter Server Time" + placeholder="输入服务器时间" /> - +
:

Loading...

}
diff --git a/webui/src/import/Import.jsx b/webui/src/import/Import.jsx index d4e514e..da1e160 100644 --- a/webui/src/import/Import.jsx +++ b/webui/src/import/Import.jsx @@ -54,27 +54,27 @@ function Login() { return (
-

Transfer

+

导入数据

{

{ status[0] }

} - + {file = event.target.files}} accept="application/json"/> - + {file1 = event.target.files}} accept="application/json"/> - + {file2 = event.target.files}} accept="application/json"/> - + {file3 = event.target.files}} accept="application/json"/> - + {password = event.target.value}} /> - +
- { error[0] ?

Error: { error[0] }. Please reload the page and try again.

:

} + { error[0] ?

错误: { error[0] }。请重新加载页面并重试。

:

}
diff --git a/webui/src/login/Login.jsx b/webui/src/login/Login.jsx index 59d1a20..1b3d800 100644 --- a/webui/src/login/Login.jsx +++ b/webui/src/login/Login.jsx @@ -48,19 +48,19 @@ function Login() { return (
-

Login

+

登录

{uid[1](event.target.value)}} value={uid[0]} /> - + {password[1](event.target.value)}} /> - +
-

-

+

+

{ error[0] ?

Error: { error[0] }

:

}
-

EW Version 1.0.0 - View source - View license

+

EW 版本号 1.0.1 - 查看源代码 - 查看许可证

);