mirror of
https://github.com/HugoAura/Seewo-HugoAura.git
synced 2026-06-21 23:54:26 +08:00
Compare commits
11 Commits
stable
...
v0.1.1-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a29e909f2 | ||
|
|
2b9d1c97c5 | ||
|
|
abd5a10d24 | ||
|
|
c857f00771 | ||
|
|
6b64481e2e | ||
|
|
fb01b27d1d | ||
|
|
585f1713a9 | ||
|
|
2ff4a28b70 | ||
|
|
d5b4c4b61e | ||
|
|
774d999752 | ||
|
|
ae2e2ff62d |
3
.github/ISSUE_TEMPLATE/bugReport.yml
vendored
3
.github/ISSUE_TEMPLATE/bugReport.yml
vendored
@@ -54,10 +54,11 @@ body:
|
|||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: 日志 / Logs
|
label: 日志 / Logs
|
||||||
description: 请前往 `用户文件夹/Documents/HugoAura/logs` 取得日志
|
description: 请前往 `偏好设置` - `调试选项` 打开日志文件夹
|
||||||
placeholder: |
|
placeholder: |
|
||||||
[LOG] Logger initialized. Log file: C:\...
|
[LOG] Logger initialized. Log file: C:\...
|
||||||
[LOG] [HugoAura / Loaded] Aura is loaded!
|
[LOG] [HugoAura / Loaded] Aura is loaded!
|
||||||
|
render: bash
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
|
|||||||
119
.github/workflows/pack.yml
vendored
119
.github/workflows/pack.yml
vendored
@@ -1,6 +1,8 @@
|
|||||||
name: Patch ASAR & Pack source code
|
name: Pack source code & Create CI/CD Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 5 * * *'
|
||||||
push:
|
push:
|
||||||
branches: [dev, stable]
|
branches: [dev, stable]
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -11,115 +13,24 @@ permissions: write-all
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pack:
|
pack:
|
||||||
name: Patch & Pack
|
name: Pack
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Node.JS 20 LTS
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: "20"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y p7zip-full wget
|
|
||||||
npm install -g asar
|
|
||||||
|
|
||||||
- name: Checkout repository code
|
- name: Checkout repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: "./HugoAura-Code"
|
path: "./HugoAura-Code"
|
||||||
|
|
||||||
- name: Download SeewoServiceSetup
|
- name: Create aura.zip
|
||||||
run: |
|
|
||||||
echo "[DEBUG] Working DIR:"
|
|
||||||
pwd
|
|
||||||
|
|
||||||
wget -nv -O "SeewoService.exe" "https://e.seewo.com/download/file?code=SeewoServiceSetup"
|
|
||||||
echo "[DEBUG] Listing downloaded file"
|
|
||||||
ls -la SeewoService*
|
|
||||||
|
|
||||||
- name: Extract SeewoServiceSetup as zip
|
|
||||||
run: |
|
|
||||||
mkdir -p SeewoServiceSource
|
|
||||||
7z x "SeewoService.exe" -o"./SeewoServiceSource/" -y
|
|
||||||
|
|
||||||
echo "[DEBUG] Listing extracted files"
|
|
||||||
ls -la SeewoServiceSource/
|
|
||||||
|
|
||||||
- name: Extract ASAR file
|
|
||||||
run: |
|
|
||||||
cd SeewoServiceSource
|
|
||||||
SEEWO_DIR=$(find . -name "SeewoService_*" -type d | head -1)
|
|
||||||
echo "[INFO] Found SeewoService directory: $SEEWO_DIR"
|
|
||||||
|
|
||||||
cd "$SEEWO_DIR/SeewoServiceAssistant/resources/"
|
|
||||||
|
|
||||||
asar extract ./app.asar ./app-unpacked
|
|
||||||
|
|
||||||
- name: Move app-unpacked and clean SSASource
|
|
||||||
run: |
|
|
||||||
mkdir -p SSARes
|
|
||||||
|
|
||||||
cd SeewoServiceSource
|
|
||||||
SEEWO_DIR=$(find . -name "SeewoService_*" -type d | head -1)
|
|
||||||
mv "$SEEWO_DIR/SeewoServiceAssistant/resources/app-unpacked" "../SSARes/"
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
rm -rf SeewoServiceSource
|
|
||||||
rm -rf *.exe
|
|
||||||
echo "[DEBUG] Listing Working DIR"
|
|
||||||
ls -la
|
|
||||||
|
|
||||||
- name: Patch main.js
|
|
||||||
run: |
|
|
||||||
cd SSARes/app-unpacked
|
|
||||||
|
|
||||||
### cp main.js main.js.bak
|
|
||||||
|
|
||||||
cat > patch_main.js << 'EOF'
|
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
let content = fs.readFileSync('main.js', 'utf8');
|
|
||||||
|
|
||||||
content = 'const hook = require("./hook.js");\n' + content;
|
|
||||||
|
|
||||||
content = content.replace(/n\.m=e/, ';const zeron = require("./zeron.js");n = zeron(n);n.m=e');
|
|
||||||
|
|
||||||
content = content.replace(/let f=new s\(Object\.assign\(\{\},\{transparent:!0,/, ';hook({ central: n, windowName: this.wname, config: c });let f=new s(Object.assign({},{transparent:!0,');
|
|
||||||
|
|
||||||
content = content.replace(/c\.canOpenDevTool/, 'c.canOpenDevTool,preload: __dirname + "\\\\preload.js"');
|
|
||||||
|
|
||||||
fs.writeFileSync('main.js', content);
|
|
||||||
|
|
||||||
console.log('[SUCCESS] main.js has been modified successfully');
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo "[DEBUG] Running patch_main.js"
|
|
||||||
node ./patch_main.js
|
|
||||||
|
|
||||||
rm -rf patch_main.js
|
|
||||||
|
|
||||||
- name: Copy HugoAura core files
|
|
||||||
run: |
|
|
||||||
cp -r HugoAura-Code/src/core/* SSARes/app-unpacked/
|
|
||||||
|
|
||||||
echo "[DEBUG] Listing files under <Working DIR>/SSARes/app-unpacked/"
|
|
||||||
ls -la SSARes/app-unpacked/
|
|
||||||
|
|
||||||
- name: Create artifacts DIR and re-pack ASAR
|
|
||||||
run: |
|
run: |
|
||||||
echo "[DEBUG] Creating artifacts directory"
|
echo "[DEBUG] Creating artifacts directory"
|
||||||
mkdir -p Artifacts
|
mkdir -p Artifacts
|
||||||
|
cd ./HugoAura-Code/src/aura
|
||||||
asar pack SSARes/app-unpacked Artifacts/app-patched.asar
|
|
||||||
|
|
||||||
- name: Create aura.zip
|
|
||||||
run: |
|
|
||||||
cd HugoAura-Code/src/aura
|
|
||||||
zip -r ../../../Artifacts/aura.zip .
|
zip -r ../../../Artifacts/aura.zip .
|
||||||
|
cd ../core
|
||||||
|
zip -r ../../../Artifacts/core.zip .
|
||||||
cd ../../..
|
cd ../../..
|
||||||
|
|
||||||
echo "[DEBUG] Files in <Working DIR>/Artifacts directory:"
|
echo "[DEBUG] Files in <Working DIR>/Artifacts directory:"
|
||||||
@@ -152,18 +63,18 @@ jobs:
|
|||||||
#### 🕘 构建时间: ${{ env.BUILDTIME }}
|
#### 🕘 构建时间: ${{ env.BUILDTIME }}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
- name: Upload patched ASAR
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: asar-patched
|
|
||||||
path: Artifacts/app-patched.asar
|
|
||||||
|
|
||||||
- name: Upload aura.zip
|
- name: Upload aura.zip
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: aura-code
|
name: aura-code
|
||||||
path: Artifacts/aura.zip
|
path: Artifacts/aura.zip
|
||||||
|
|
||||||
|
- name: Upload core.zip
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: aura-core
|
||||||
|
path: Artifacts/core.zip
|
||||||
|
|
||||||
- name: Upload release
|
- name: Upload release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
@@ -174,5 +85,5 @@ jobs:
|
|||||||
generate_release_notes: false
|
generate_release_notes: false
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: |
|
files: |
|
||||||
Artifacts/app-patched.asar
|
|
||||||
Artifacts/aura.zip
|
Artifacts/aura.zip
|
||||||
|
Artifacts/core.zip
|
||||||
|
|||||||
26
.github/workflows/trigger-install-upd.yml
vendored
Normal file
26
.github/workflows/trigger-install-upd.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: Trigger Aura Install static JSON update
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
trigger-dispatch:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
if: github.event.release.tag_name != 'vAutoBuild'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Trigger repository dispatch
|
||||||
|
uses: peter-evans/repository-dispatch@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.AURA_INSTALL_REPO_PAT }}
|
||||||
|
repository: HugoAura/HugoAura-Install
|
||||||
|
event-type: hugoaura_rel
|
||||||
|
client-payload: |
|
||||||
|
{
|
||||||
|
"tag_name": "${{ github.event.release.tag_name }}",
|
||||||
|
"release_name": "${{ github.event.release.name }}",
|
||||||
|
"release_url": "${{ github.event.release.html_url }}",
|
||||||
|
"repository": "${{ github.repository }}"
|
||||||
|
}
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -22,3 +22,6 @@ desktop.ini
|
|||||||
|
|
||||||
# Editor Files
|
# Editor Files
|
||||||
.vscode/
|
.vscode/
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
*.bak
|
||||||
|
|||||||
30
README.md
30
README.md
@@ -9,10 +9,22 @@
|
|||||||
<br />
|
<br />
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> HugoAura 的首个预览版已发布! [查看安装教程](https://github.com/HugoAura/HugoAura/wiki)
|
> 在[此处](https://github.com/HugoAura/HugoAura/wiki)查看 HugoAura 的安装教程
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> 已经过测试的希沃管家版本: v1.5.4.3824
|
> 已经过测试的希沃管家版本: v1.5.5.3878
|
||||||
|
|
||||||
|
> [!CAUTION]
|
||||||
|
> 由于作者高三学业繁忙, 项目正处于缓慢更新阶段。
|
||||||
|
>
|
||||||
|
> 作者将尽可能抽出时间维护项目, 但新功能的实现速度将大幅降低。
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> 我们正在使用 C++ 重构 PLS, 新的子项目代号为 [Aikari](https://github.com/HugoAura/HugoAura-Aikari)。其将集成 MQTT 消息中转、HugoAura 自动更新、特权操作辅助等功能。
|
||||||
|
>
|
||||||
|
> 在 Aikari 的首个 Alpha 版本发布前, HugoAura 主项目与 [PLS](https://github.com/HugoAura/HugoAura-PLS) 的新功能更新频率将减弱。
|
||||||
|
>
|
||||||
|
> 您依然可以提出 Feature Request 或 Bug Report。开发者将在能力 / 时间限度内尽可能处理。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -33,7 +45,7 @@
|
|||||||
- [x] 修改希沃管家密码认证组件 (自定义密码 / 解除密码 / 重设认证方式 / ...)
|
- [x] 修改希沃管家密码认证组件 (自定义密码 / 解除密码 / 重设认证方式 / ...)
|
||||||
- [x] 阻止希沃管家前端 Audit 上报行为
|
- [x] 阻止希沃管家前端 Audit 上报行为
|
||||||
- [x] 屏蔽屏幕锁 / 自定义屏幕锁行为
|
- [x] 屏蔽屏幕锁 / 自定义屏幕锁行为
|
||||||
- [ ] Aura 代理层服务 (篡改上报数据 / 欺骗冰冻状态)
|
- [x] Aura 代理层服务 (篡改上报数据 / 欺骗冰冻状态)
|
||||||
- [ ] 窥屏提醒
|
- [ ] 窥屏提醒
|
||||||
- [ ] 插件功能
|
- [ ] 插件功能
|
||||||
|
|
||||||
@@ -55,6 +67,18 @@
|
|||||||
|
|
||||||
请参阅 [Wiki](https://github.com/HugoAura/HugoAura/wiki) 以了解安装流程。
|
请参阅 [Wiki](https://github.com/HugoAura/HugoAura/wiki) 以了解安装流程。
|
||||||
|
|
||||||
|
## 🤖 AIGC 声明
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 📦 贡献准则
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 🎉 鸣谢
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## ❗ 免责声明
|
## ❗ 免责声明
|
||||||
|
|
||||||
本项目仅用于研究或教育目的, 请勿将本项目用于可能违反当地法律、侵犯著作权或其他软件 EULA 的用途。若将本项目用于非法用途, 一切后果由使用者承担。开发者不承担此类行为带来的任何后果或责任。
|
本项目仅用于研究或教育目的, 请勿将本项目用于可能违反当地法律、侵犯著作权或其他软件 EULA 的用途。若将本项目用于非法用途, 一切后果由使用者承担。开发者不承担此类行为带来的任何后果或责任。
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "HugoAura",
|
"name": "HugoAura",
|
||||||
"version": "0.1.1-beta",
|
"version": "0.1.1-beta-patch-1",
|
||||||
"description": "Aura for SeewoHugo",
|
"description": "Aura for SeewoHugo",
|
||||||
"main": "app.asar/main.js",
|
"main": "app.asar/main.js",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ const applyPlsIpcHandler = (ipcMain) => {
|
|||||||
launched: false,
|
launched: false,
|
||||||
detached: isPlsDetached,
|
detached: isPlsDetached,
|
||||||
connected: false,
|
connected: false,
|
||||||
version: "未知",
|
version: "unknown",
|
||||||
status: "dead",
|
status: "dead",
|
||||||
authToken: global.__HUGO_AURA_CONFIG__.plsToken,
|
authToken: global.__HUGO_AURA_CONFIG__.plsToken,
|
||||||
};
|
};
|
||||||
@@ -490,12 +490,42 @@ const applyPlsIpcHandler = (ipcMain) => {
|
|||||||
PLS_BIN_PATH,
|
PLS_BIN_PATH,
|
||||||
"--startup auto install"
|
"--startup auto install"
|
||||||
);
|
);
|
||||||
case "rmSvc":
|
case "rmSvc": {
|
||||||
return await functions.execCommand(logHeader, PLS_BIN_PATH, "remove");
|
const result = await functions.execCommand(
|
||||||
|
logHeader,
|
||||||
|
PLS_BIN_PATH,
|
||||||
|
"remove"
|
||||||
|
);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
case "startSvc":
|
case "startSvc":
|
||||||
return await functions.execCommand(logHeader, PLS_BIN_PATH, "start");
|
return await functions.execCommand(logHeader, PLS_BIN_PATH, "start");
|
||||||
case "stopSvc":
|
case "stopSvc": {
|
||||||
return await functions.execCommand(logHeader, PLS_BIN_PATH, "stop");
|
const result = await functions.execCommand(
|
||||||
|
logHeader,
|
||||||
|
PLS_BIN_PATH,
|
||||||
|
"stop"
|
||||||
|
);
|
||||||
|
if (result.success && global.__HUGO_AURA__.plsStats) {
|
||||||
|
global.__HUGO_AURA__.plsStats.connected = false;
|
||||||
|
global.__HUGO_AURA__.plsStats.launched = false;
|
||||||
|
global.__HUGO_AURA__.plsStats.version = "unknown";
|
||||||
|
global.__HUGO_AURA__.plsStats.status = "dead";
|
||||||
|
|
||||||
|
ipcMain.send(
|
||||||
|
"assistant",
|
||||||
|
`${methodBase}.post.onPlsStatsUpdate`,
|
||||||
|
global.__HUGO_AURA__.plsStats
|
||||||
|
);
|
||||||
|
|
||||||
|
ipcMain.send(
|
||||||
|
"auraWsKeepAlive",
|
||||||
|
`${methodBase}.post.plsStopped`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
case "rmBin":
|
case "rmBin":
|
||||||
const unlinkPromise = new Promise((resolve) => {
|
const unlinkPromise = new Promise((resolve) => {
|
||||||
fs.unlink(PLS_BIN_PATH, (error) => {
|
fs.unlink(PLS_BIN_PATH, (error) => {
|
||||||
@@ -521,6 +551,19 @@ const applyPlsIpcHandler = (ipcMain) => {
|
|||||||
|
|
||||||
const unlinkRet = await unlinkPromise;
|
const unlinkRet = await unlinkPromise;
|
||||||
|
|
||||||
|
if (unlinkRet.success && global.__HUGO_AURA__.plsStats) {
|
||||||
|
global.__HUGO_AURA__.plsStats.connected = false;
|
||||||
|
global.__HUGO_AURA__.plsStats.launched = false;
|
||||||
|
global.__HUGO_AURA__.plsStats.installed = false;
|
||||||
|
global.__HUGO_AURA__.plsStats.version = "unknown";
|
||||||
|
|
||||||
|
ipcMain.send(
|
||||||
|
"assistant",
|
||||||
|
`${methodBase}.post.onPlsStatsUpdate`,
|
||||||
|
global.__HUGO_AURA__.plsStats
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return unlinkRet;
|
return unlinkRet;
|
||||||
default:
|
default:
|
||||||
return { success: false, errorObj: new Error("Method not found") };
|
return { success: false, errorObj: new Error("Method not found") };
|
||||||
|
|||||||
@@ -168,8 +168,8 @@
|
|||||||
observers.set(moduleKey, observer);
|
observers.set(moduleKey, observer);
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadResources = async (resources, type, moduleKey, isRevive) => {
|
const loadResources = async (resources, type, moduleKey) => {
|
||||||
if (!resources || isRevive) return [];
|
if (!resources) return [];
|
||||||
|
|
||||||
const resourceArray = Array.isArray(resources) ? resources : [resources];
|
const resourceArray = Array.isArray(resources) ? resources : [resources];
|
||||||
const loadedResources = [];
|
const loadedResources = [];
|
||||||
@@ -232,12 +232,11 @@
|
|||||||
const resources = new Set();
|
const resources = new Set();
|
||||||
moduleResources.set(moduleKey, resources);
|
moduleResources.set(moduleKey, resources);
|
||||||
|
|
||||||
if (config.pageCSS) {
|
if (config.pageCSS && !isRevive) {
|
||||||
const cssResources = await loadResources(
|
const cssResources = await loadResources(
|
||||||
config.pageCSS,
|
config.pageCSS,
|
||||||
"css",
|
"css",
|
||||||
moduleKey,
|
moduleKey
|
||||||
isRevive
|
|
||||||
);
|
);
|
||||||
cssResources.forEach((resource) => resources.add(resource));
|
cssResources.forEach((resource) => resources.add(resource));
|
||||||
}
|
}
|
||||||
@@ -250,16 +249,22 @@
|
|||||||
insertElement(target, container, config.selectorMode);
|
insertElement(target, container, config.selectorMode);
|
||||||
monitorParent(moduleKey, target, container, config.selectorMode);
|
monitorParent(moduleKey, target, container, config.selectorMode);
|
||||||
|
|
||||||
if (config.pageScript) {
|
if (config.pageScript && !isRevive) {
|
||||||
const jsResources = await loadResources(
|
const jsResources = await loadResources(
|
||||||
config.pageScript,
|
config.pageScript,
|
||||||
"js",
|
"js",
|
||||||
moduleKey,
|
moduleKey
|
||||||
isRevive
|
|
||||||
);
|
);
|
||||||
jsResources.forEach((resource) => resources.add(resource));
|
jsResources.forEach((resource) => resources.add(resource));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isRevive) {
|
||||||
|
const onReviveEvent = new CustomEvent(
|
||||||
|
`onLoaderElRevive:${moduleKey}`
|
||||||
|
);
|
||||||
|
document.dispatchEvent(onReviveEvent);
|
||||||
|
}
|
||||||
|
|
||||||
const observer = new MutationObserver(() => {
|
const observer = new MutationObserver(() => {
|
||||||
if (
|
if (
|
||||||
!document.contains(container) &&
|
!document.contains(container) &&
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const buildClass = (n) => {
|
const buildClass = (n) => {
|
||||||
// >>> BEGIN OF SEEWO HUGO ORIGINAL CODE <<< //
|
// >>> BEGIN OF SEEWO HUGO ORIGINAL CODE <<< //
|
||||||
const s = n(237),
|
const s = n(239),
|
||||||
o = n(7);
|
o = n(7);
|
||||||
class WebSocketManager {
|
class WebSocketManager {
|
||||||
constructor(e, t) {
|
constructor(e, t) {
|
||||||
|
|||||||
10
src/aura/jsRewrite/vendor/passwordValidation.js
vendored
10
src/aura/jsRewrite/vendor/passwordValidation.js
vendored
@@ -46,8 +46,8 @@ const newFunction = function (e, t, b) {
|
|||||||
_ = b(14),
|
_ = b(14),
|
||||||
M = b(44),
|
M = b(44),
|
||||||
g = b(22),
|
g = b(22),
|
||||||
w = (b(432), b(7)),
|
w = (b(433), b(7)),
|
||||||
D = b(17),
|
D = b(15),
|
||||||
T = b.n(D),
|
T = b.n(D),
|
||||||
j = b(10),
|
j = b(10),
|
||||||
E = b.n(j),
|
E = b.n(j),
|
||||||
@@ -56,7 +56,7 @@ const newFunction = function (e, t, b) {
|
|||||||
z = b(19),
|
z = b(19),
|
||||||
Y = b(78),
|
Y = b(78),
|
||||||
L = b.n(Y);
|
L = b.n(Y);
|
||||||
b(444);
|
b(445);
|
||||||
var x,
|
var x,
|
||||||
k = 2,
|
k = 2,
|
||||||
S = 0,
|
S = 0,
|
||||||
@@ -178,7 +178,7 @@ const newFunction = function (e, t, b) {
|
|||||||
value: s,
|
value: s,
|
||||||
size: n.width || null,
|
size: n.width || null,
|
||||||
})
|
})
|
||||||
: v.a.createElement("img", { src: b(447) })
|
: v.a.createElement("img", { src: b(448) })
|
||||||
),
|
),
|
||||||
d !== C &&
|
d !== C &&
|
||||||
d !== O &&
|
d !== O &&
|
||||||
@@ -386,8 +386,8 @@ const newFunction = function (e, t, b) {
|
|||||||
} else {
|
} else {
|
||||||
originalFunc();
|
originalFunc();
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
// ### EOR ### //
|
// ### EOR ### //
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
16
src/aura/jsRewrite/vendor/screenLock.js
vendored
16
src/aura/jsRewrite/vendor/screenLock.js
vendored
@@ -30,12 +30,12 @@ const newFunction = function (e, t, n) {
|
|||||||
p = n.n(h),
|
p = n.n(h),
|
||||||
_ = n(41),
|
_ = n(41),
|
||||||
M = n.n(_),
|
M = n.n(_),
|
||||||
g = (n(808), n(7)),
|
g = (n(814), n(7)),
|
||||||
b = n(9),
|
b = n(9),
|
||||||
y = n(8),
|
y = n(8),
|
||||||
v = n.n(y),
|
v = n.n(y),
|
||||||
w =
|
w =
|
||||||
(n(810),
|
(n(816),
|
||||||
{
|
{
|
||||||
"./numberKeyboard.less": {
|
"./numberKeyboard.less": {
|
||||||
"ps-icon": "numberKeyboard__ps-icon__1KO_WOCz",
|
"ps-icon": "numberKeyboard__ps-icon__1KO_WOCz",
|
||||||
@@ -530,7 +530,7 @@ const newFunction = function (e, t, n) {
|
|||||||
password: "password",
|
password: "password",
|
||||||
},
|
},
|
||||||
G = n(19);
|
G = n(19);
|
||||||
n(812);
|
n(818);
|
||||||
function W(e) {
|
function W(e) {
|
||||||
var t = e.canvasRender,
|
var t = e.canvasRender,
|
||||||
n = void 0 === t || t,
|
n = void 0 === t || t,
|
||||||
@@ -589,12 +589,12 @@ const newFunction = function (e, t, n) {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
n(815);
|
n(821);
|
||||||
var J = n(64),
|
var J = n(64),
|
||||||
V = n(20);
|
V = n(20);
|
||||||
var q,
|
var q,
|
||||||
Z,
|
Z,
|
||||||
X = n(16);
|
X = n(17);
|
||||||
function K(r) {
|
function K(r) {
|
||||||
var a = (function () {
|
var a = (function () {
|
||||||
if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
|
if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
|
||||||
@@ -805,7 +805,7 @@ const newFunction = function (e, t, n) {
|
|||||||
);
|
);
|
||||||
})(h.PureComponent))
|
})(h.PureComponent))
|
||||||
) || Z,
|
) || Z,
|
||||||
oe = (n(817), n(137).a);
|
oe = (n(823), n(137).a);
|
||||||
function se(t, e) {
|
function se(t, e) {
|
||||||
var n = Object.keys(t);
|
var n = Object.keys(t);
|
||||||
if (Object.getOwnPropertySymbols) {
|
if (Object.getOwnPropertySymbols) {
|
||||||
@@ -913,6 +913,7 @@ const newFunction = function (e, t, n) {
|
|||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
(o.checkPasswordCorrect = function () {
|
(o.checkPasswordCorrect = function () {
|
||||||
|
// ### BOR ### //
|
||||||
const originalAuthFailed = () => {
|
const originalAuthFailed = () => {
|
||||||
o.failCount++,
|
o.failCount++,
|
||||||
o.passwordCheckFail(),
|
o.passwordCheckFail(),
|
||||||
@@ -955,6 +956,7 @@ const newFunction = function (e, t, n) {
|
|||||||
o.state.inputPassword.join("") === o.password
|
o.state.inputPassword.join("") === o.password
|
||||||
? (o.props.onActivationCorrect(), (o.failCount = 0))
|
? (o.props.onActivationCorrect(), (o.failCount = 0))
|
||||||
: customAuthFailed();
|
: customAuthFailed();
|
||||||
|
// ### EOR ### //
|
||||||
}),
|
}),
|
||||||
(o.insertHtml = function () {
|
(o.insertHtml = function () {
|
||||||
return p.a.createElement(
|
return p.a.createElement(
|
||||||
@@ -1002,7 +1004,7 @@ const newFunction = function (e, t, n) {
|
|||||||
n
|
n
|
||||||
);
|
);
|
||||||
})(I),
|
})(I),
|
||||||
me = (n(819), n(38));
|
me = (n(825), n(38));
|
||||||
function fe(r) {
|
function fe(r) {
|
||||||
var a = (function () {
|
var a = (function () {
|
||||||
if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
|
if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
|
||||||
|
|||||||
@@ -145,9 +145,10 @@ const renderInputArea = (entry, operationArea, descriptionArea) => {
|
|||||||
inputEl.value = entry.valueGetter();
|
inputEl.value = entry.valueGetter();
|
||||||
inputEl.placeholder = entry.placeHolder;
|
inputEl.placeholder = entry.placeHolder;
|
||||||
inputEl.id = entry.id;
|
inputEl.id = entry.id;
|
||||||
inputEl.addEventListener("change", async (event) => {
|
|
||||||
|
const handleSubmit = async (event = null) => {
|
||||||
const result = await entry.callbackFn(
|
const result = await entry.callbackFn(
|
||||||
event.target.value,
|
event ? event.target.value : inputEl.value,
|
||||||
inputEl,
|
inputEl,
|
||||||
operationArea,
|
operationArea,
|
||||||
descriptionArea
|
descriptionArea
|
||||||
@@ -166,7 +167,17 @@ const renderInputArea = (entry, operationArea, descriptionArea) => {
|
|||||||
descriptionArea.textContent = result.hint;
|
descriptionArea.textContent = result.hint;
|
||||||
descriptionArea.classList.add("ase-desc-error-hint");
|
descriptionArea.classList.add("ase-desc-error-hint");
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
inputEl.addEventListener("change", async (event) => {
|
||||||
|
await handleSubmit(event);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
inputEl.onsubmit = async (evt) => {
|
||||||
|
evt.preventDefault();
|
||||||
|
await handleSubmit();
|
||||||
|
};
|
||||||
|
|
||||||
operationArea.classList.add("ase-operation-area-expanded");
|
operationArea.classList.add("ase-operation-area-expanded");
|
||||||
return inputEl;
|
return inputEl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
connected: false,
|
connected: false,
|
||||||
launched: false,
|
launched: false,
|
||||||
status: "dead",
|
status: "dead",
|
||||||
version: "未知",
|
version: "unknown",
|
||||||
authToken: "",
|
authToken: "",
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -157,6 +157,13 @@
|
|||||||
sendRetryStatusToMain(false);
|
sendRetryStatusToMain(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (global.__HUGO_AURA__.plsStats.launched === false) {
|
||||||
|
console.warn(
|
||||||
|
"[HugoAura / UI / PLS Manager / WARN] PLS stopped, closing WebSocket connection."
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.error(
|
console.error(
|
||||||
@@ -274,7 +281,7 @@
|
|||||||
launched: false,
|
launched: false,
|
||||||
detached: false,
|
detached: false,
|
||||||
connected: false,
|
connected: false,
|
||||||
version: "未知",
|
version: "unknown",
|
||||||
status: "dead",
|
status: "dead",
|
||||||
authToken: "66ccff0d000721114514191981023333",
|
authToken: "66ccff0d000721114514191981023333",
|
||||||
};
|
};
|
||||||
@@ -332,6 +339,16 @@
|
|||||||
initPlsConnection();
|
initPlsConnection();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
global.ipcRenderer.on(
|
||||||
|
`${IPC_METHOD_BASE}.post.plsStopped`,
|
||||||
|
(_evt, _arg) => {
|
||||||
|
if (!global.__HUGO_AURA__.plsStats) return;
|
||||||
|
global.__HUGO_AURA__.plsStats.launched = false;
|
||||||
|
global.__HUGO_AURA__.plsStats.connected = false;
|
||||||
|
global.__HUGO_AURA__.plsStats.version = "unknown";
|
||||||
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@@ -13,7 +13,10 @@
|
|||||||
<!-- Chevron Left Icon -->
|
<!-- Chevron Left Icon -->
|
||||||
</div>
|
</div>
|
||||||
<p>雨光之环</p>
|
<p>雨光之环</p>
|
||||||
<div class="aura-config-page-app-bar-hr-vertical" id="auraConfigPageAppBarVerticalHr"></div>
|
<div
|
||||||
|
class="aura-config-page-app-bar-hr-vertical"
|
||||||
|
id="auraConfigPageAppBarVerticalHr"
|
||||||
|
></div>
|
||||||
<div class="aura-config-page-app-bar-spacer space-none"></div>
|
<div class="aura-config-page-app-bar-spacer space-none"></div>
|
||||||
<div
|
<div
|
||||||
onclick="global.__HUGO_AURA_UI_FUNCTIONS__.config.handleNavHome()"
|
onclick="global.__HUGO_AURA_UI_FUNCTIONS__.config.handleNavHome()"
|
||||||
|
|||||||
@@ -235,6 +235,11 @@ global.__HUGO_AURA_UI_FUNCTIONS__.config = {
|
|||||||
inputEl.value = "";
|
inputEl.value = "";
|
||||||
inputEl.classList.remove("invalid");
|
inputEl.classList.remove("invalid");
|
||||||
inputEl.classList.remove("is-invalid");
|
inputEl.classList.remove("is-invalid");
|
||||||
|
|
||||||
|
global.__HUGO_AURA_UI_FUNCTIONS__.config.resetAuthDialogInputElOnSubmit(
|
||||||
|
global.__HUGO_AURA_UI_FUNCTIONS__.config.verifyAuthPassword
|
||||||
|
);
|
||||||
|
|
||||||
acpDialogConfirmBtnEl.onclick = (_evt) => {
|
acpDialogConfirmBtnEl.onclick = (_evt) => {
|
||||||
global.__HUGO_AURA_UI_FUNCTIONS__.config.verifyAuthPassword();
|
global.__HUGO_AURA_UI_FUNCTIONS__.config.verifyAuthPassword();
|
||||||
};
|
};
|
||||||
@@ -243,6 +248,16 @@ global.__HUGO_AURA_UI_FUNCTIONS__.config = {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
resetAuthDialogInputElOnSubmit: (func) => {
|
||||||
|
const inputEl = document.getElementById("acp-auth-user-input");
|
||||||
|
inputEl.onsubmit = (evt) => evt.preventDefault();
|
||||||
|
inputEl.onkeydown = (event) => {
|
||||||
|
if (event.key === "Enter") {
|
||||||
|
func();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
handleACSNShow: async () => {
|
handleACSNShow: async () => {
|
||||||
const acsnRootEl = document.getElementsByClassName(
|
const acsnRootEl = document.getElementsByClassName(
|
||||||
"acp-config-status-notify"
|
"acp-config-status-notify"
|
||||||
@@ -359,7 +374,8 @@ global.__HUGO_AURA_UI_FUNCTIONS__.config = {
|
|||||||
let timeout = 0;
|
let timeout = 0;
|
||||||
Array.from(operationElArr).forEach((el) => {
|
Array.from(operationElArr).forEach((el) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
el.className = "operation-el-show aura-config-page-operation-el";
|
el.classList.remove("operation-el-hidden");
|
||||||
|
el.classList.add("operation-el-show");
|
||||||
}, timeout);
|
}, timeout);
|
||||||
timeout += 150;
|
timeout += 150;
|
||||||
});
|
});
|
||||||
@@ -385,6 +401,9 @@ global.__HUGO_AURA_UI_FUNCTIONS__.config = {
|
|||||||
"aura-config-page-header-area"
|
"aura-config-page-header-area"
|
||||||
)[0];
|
)[0];
|
||||||
acsDialogAreaEl.style = "";
|
acsDialogAreaEl.style = "";
|
||||||
|
global.__HUGO_AURA_UI_FUNCTIONS__.config.resetAuthDialogInputElOnSubmit(
|
||||||
|
global.__HUGO_AURA_UI_FUNCTIONS__.config.verifyAuthPassword
|
||||||
|
);
|
||||||
await window.__HUGO_AURA_GLOBAL__.utils.sleep(500);
|
await window.__HUGO_AURA_GLOBAL__.utils.sleep(500);
|
||||||
acsDialogAreaEl.classList.remove("acp-ada-hidden");
|
acsDialogAreaEl.classList.remove("acp-ada-hidden");
|
||||||
acpAppBarEl.classList.add("color-reverse");
|
acpAppBarEl.classList.add("color-reverse");
|
||||||
|
|||||||
@@ -331,6 +331,10 @@ if (!global.__HUGO_AURA_UI_REACTIVES__.subConfig)
|
|||||||
);
|
);
|
||||||
if (ret.success) {
|
if (ret.success) {
|
||||||
lifecycleStatus.svcRunning = false;
|
lifecycleStatus.svcRunning = false;
|
||||||
|
global.__HUGO_AURA__.plsStats.launched = false;
|
||||||
|
global.__HUGO_AURA__.plsStats.version = "unknown";
|
||||||
|
global.__HUGO_AURA__.plsStats.status = "dead";
|
||||||
|
|
||||||
global.__HUGO_AURA_UI_FUNCTIONS__.subConfig.plsStatus.updateToast(
|
global.__HUGO_AURA_UI_FUNCTIONS__.subConfig.plsStatus.updateToast(
|
||||||
"success",
|
"success",
|
||||||
"PLS 已停止",
|
"PLS 已停止",
|
||||||
@@ -442,11 +446,11 @@ if (!global.__HUGO_AURA_UI_REACTIVES__.subConfig)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curPlsStats.version && curPlsStats.version !== "未知") {
|
const versionTextEl = document.getElementById("acs-bc-psp-version-text");
|
||||||
const versionTextEl = document.getElementById(
|
if (curPlsStats.version && curPlsStats.version !== "unknown") {
|
||||||
"acs-bc-psp-version-text"
|
|
||||||
);
|
|
||||||
versionTextEl.textContent = "v" + curPlsStats.version;
|
versionTextEl.textContent = "v" + curPlsStats.version;
|
||||||
|
} else {
|
||||||
|
versionTextEl.textContent = "不可用"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,10 @@ const functions = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
global.__HUGO_AURA_UI_FUNCTIONS__.config.resetAuthDialogInputElOnSubmit(
|
||||||
|
verifyPassword
|
||||||
|
);
|
||||||
|
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
acpDialogConfirmBtnEl.onclick = verifyPassword;
|
acpDialogConfirmBtnEl.onclick = verifyPassword;
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
|
|||||||
@@ -9,9 +9,10 @@ global.__HUGO_AURA_UI_FUNCTIONS__.headerIcon = {
|
|||||||
let clickCounter = 0;
|
let clickCounter = 0;
|
||||||
let clickTimeout = null;
|
let clickTimeout = null;
|
||||||
|
|
||||||
const onMounted = () => {
|
const onMounted = (revive = false) => {
|
||||||
if (
|
if (
|
||||||
!global.__HUGO_AURA_CONFIG__.auraSettings.uiAccessMethod.showEntryIcon
|
!global.__HUGO_AURA_CONFIG__.auraSettings.uiAccessMethod.showEntryIcon &&
|
||||||
|
!revive
|
||||||
) {
|
) {
|
||||||
const rootEl = document.getElementById("root");
|
const rootEl = document.getElementById("root");
|
||||||
rootEl.classList.add("aura-header-icon-hidden");
|
rootEl.classList.add("aura-header-icon-hidden");
|
||||||
@@ -19,7 +20,8 @@ global.__HUGO_AURA_UI_FUNCTIONS__.headerIcon = {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
global.__HUGO_AURA_CONFIG__.auraSettings.uiAccessMethod
|
global.__HUGO_AURA_CONFIG__.auraSettings.uiAccessMethod
|
||||||
.fallbackAccessMethods.hotkey
|
.fallbackAccessMethods.hotkey &&
|
||||||
|
!revive
|
||||||
) {
|
) {
|
||||||
document.addEventListener("keydown", (event) => {
|
document.addEventListener("keydown", (event) => {
|
||||||
if (event.ctrlKey && event.shiftKey && event.key === "A") {
|
if (event.ctrlKey && event.shiftKey && event.key === "A") {
|
||||||
@@ -53,4 +55,11 @@ global.__HUGO_AURA_UI_FUNCTIONS__.headerIcon = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted();
|
onMounted();
|
||||||
|
|
||||||
|
document.addEventListener(
|
||||||
|
"onLoaderElRevive:Aura.UI.Assistant.HeaderEntry",
|
||||||
|
() => {
|
||||||
|
onMounted(true);
|
||||||
|
}
|
||||||
|
);
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const createWsWindow = (electron) => {
|
|||||||
frame: false,
|
frame: false,
|
||||||
skipTaskbar: true,
|
skipTaskbar: true,
|
||||||
transparent: true,
|
transparent: true,
|
||||||
alwaysOnTop: true,
|
alwaysOnTop: false,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
contextIsolation: false,
|
contextIsolation: false,
|
||||||
@@ -21,6 +21,7 @@ const createWsWindow = (electron) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
window.setIgnoreMouseEvents(true);
|
window.setIgnoreMouseEvents(true);
|
||||||
|
window.minimize();
|
||||||
window.loadFile(
|
window.loadFile(
|
||||||
path.join(
|
path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
const __AURA_VERSION__ = "0.1.1-beta";
|
const __AURA_VERSION__ = "0.1.1-beta-patch-1";
|
||||||
|
|
||||||
(() => {
|
(() => {
|
||||||
if (require.main) return; // 如果只是导入 Aura Version, 不运行闭包逻辑
|
if (require.main) return; // 如果只是导入 Aura Version, 不运行闭包逻辑
|
||||||
|
|||||||
Reference in New Issue
Block a user