From 5a0f88800038cba28dc9d3caed258edca553ee89 Mon Sep 17 00:00:00 2001 From: zhushenwudi <55681140@163.com> Date: Sun, 5 Jan 2025 22:33:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=8C=96=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 +-- docker/docker-compose.yml | 34 ++++++++------ readme.md | 19 ++++---- webui/src/help/Help.jsx | 89 +++++++++++++++++++++++-------------- webui/src/home/Home.jsx | 41 ++++++++--------- webui/src/import/Import.jsx | 16 +++---- webui/src/login/Login.jsx | 12 ++--- 7 files changed, 124 insertions(+), 93 deletions(-) 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(
你可以用 @arasfon's sif2 apk 修补工具。 + 在“服务器URL”中填写"{window.location.origin}",在“资源URL”中填写 "{assetUrl}"(默认已经帮你填入了以上信息)。 + 选择你的游戏版本, 更改头部格式为“Lowercase”, 最后点击开始修补。完成修补后使用 uber-apk-signer 来签署apk. + 最后便可以安装到你的手机上了!
+ > + } + return ( -"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”是一个用Rust编写的私人服务器,原作者:Ethan O'Brien,原项目:ew仓库地址。 + 本项目为二次开发版本,用于短命的游戏《Love Live! School idol festival 2 MIRACLE LIVE!》, + 这是一款以Love Live!为主题的移动节奏游戏。
-{downloadUrl}
+{downloadUrl}
-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} -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上运行要比Android简单得多,这要归功于Discord上的Triangle。你首先要下载一个用于 国际服 或者 日服 的ipa文件, + 然后使用 Sideloadly (或任何能够实现侧载的应用程序)来安装这个APP。打开手机系统设置, + 导航到SIF2应用的设置页面, 填入“Server URL”:"{window.location.origin}" 与 “Assets URL”:"{assetUrl}"。 + 如果您在打开应用程序时遇到任何错误,请确保设置中的所有网址都没有以斜杠结尾。
-Do not delete it, Just re-sideload the app. This is an Apple security feature.
+不要删除当前的SIF2,只需重新侧载该应用程序。这是苹果的安全功能。
-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编写的。我个人认为它写得相当好。
-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仓库地址
-Assuming you have just loaded this page on the server you use, then the answer is no, otherwise please contact your server admin.
+假设你刚刚在你使用的服务器上加载了这个页面,那么答案是否定的,否则请联系你的服务器管理员。
-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.
+大多数活动会让游戏崩溃,不过这确实是不应该的。明星活动部分已实现。你可以提升自己的排名,并在排名表中与其他玩家竞争,但目前尚未实现奖励功能。
-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:meow、kode、ganuy
-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联系我。否则,联系你的服务器管理员,并让他们报告这个问题。
+Error: { error[0] }
: }You can find a list of available login bonus IDs here. You should input the id
field
你可以找到可用登录奖励ID的列表。 这里. 你应该输入指定 id
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() }
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则会重置它。时间的推进仍将基于您设置此时间戳的时间。
Loading...
}