Skip to content

Commit

Permalink
waifu optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
HowcanoeWang committed Dec 4, 2023
1 parent c6eee54 commit 286645f
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 17 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,18 @@
* Linux端仅支持`tar.gz`解压安装。
* AppImage每次运行都在临时文件夹内,故替换后重启不起效;
* 使用包管理器(apt-get, AUR)安装的,往往权限不足无法替换文件。
* 安卓端的傻\*文件权限管理直接锁死了这条技术路线。
* 安卓11以上版本的傻\*文件权限管理直接锁死了这条技术路线。
* 重装思源可以解决因这个插件引起的所有问题。但是重装后需要重新替换。
* 记得在 `设置`-`关于`-`访问授权码`,开启锁屏功能来得到更好的体验。
* 锁屏页面是有背景音乐的,但是Chrome安全权限要求需要手动点击才能触发播放。
* 明亮和黑暗模式根据当前时间变化(6点-18点为明亮主题),遵循原神的模式而非思源的明亮和黑暗模式设置。
* 该插件支持自动替换应用图标
MacOS由于图标缓存,有时即使重启电脑也不生效。建议手动替换图标:
<img src="https://cdn.jsdelivr.net/gh/HowcanoeWang/siyuan-genshin-launcher@main/imgs/macIconReplace.png">
* 看板娘功能仅为临时使用,**不准备**提供更深度的功能定制如移动位置、更换模型等,更完善的功能请期待看板娘插件的更新。
<details>
<summary>MacOS由于图标缓存,有时即使重启电脑也不生效。建议手动替换图标 (点击展开图片教程):</summary>
<img src="https://cdn.jsdelivr.net/gh/HowcanoeWang/siyuan-genshin-launcher@main/imgs/macIconReplace.png">
</details>
* 看板娘功能仅为临时使用,<b style='color:red'>不准备</b>提供更深度的功能定制如移动位置、更换模型等,更完善的功能请期待看板娘插件的更新。
<b style='color:red'>看板娘的渲染非常吃性能,不建议在低性能本或离电使用时开启</b>


# 参考资料
Expand Down
9 changes: 6 additions & 3 deletions README_en_US.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ English | [简体中文](https://github.com/HowcanoeWang/siyuan-genshin-launcher
* Light and dark mode change according to local time (6:00 to 18:00 as light mode), following Genshin's logic rather than SiYuan's mode setting.
* The plugin also has the capability to automatically replace the application icon.
However, on Mac, due to icon caching, the changes may not take effect immediately and even after restart.
Please manually replace the icon by the following step:
<img src="https://cdn.jsdelivr.net/gh/HowcanoeWang/siyuan-genshin-launcher@main/imgs/macIconReplace.png">
<details>
<summary>Please manually replace the icon by the following step (click to open image tuturials): </summary>
<img src="https://cdn.jsdelivr.net/gh/HowcanoeWang/siyuan-genshin-launcher@main/imgs/macIconReplace.png">
</details>
Image Translation: Applications -> SiYuan.app -> (1) Get Info (2) Show package contents -> Drag icon from package contents to icon area in info panel.
* The Paimon Assistant function is only for temporary use, and there are **NO** plans to provide more advanced customization options such as moving position or changing models. Please look forward to the updates of the Waifu plugin for more comprehensive features.
* The Paimon Assistant function is only for temporary use, and there are <b style='color:red'>NO**</b> plans to provide more advanced customization options such as moving position or changing models. Please look forward to the updates of the Waifu plugin for more comprehensive features.
<b style='color:red'>Rendering the Paimon is very comutation intensive, not recommended using on low performance computer or with battery</b>

# References

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "siyuan-genshin-launcher",
"version": "4.1.1",
"version": "4.1.2",
"description": "This is a plugin for changing the lanucher and lock screen to genshin style",
"main": ".src/index.js",
"scripts": {
Expand Down
7 changes: 5 additions & 2 deletions plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "siyuan-genshin-launcher",
"author": "HowcanoeWang",
"url": "https://github.com/HowcanoeWang/siyuan-genshin-launcher",
"version": "4.1.1",
"version": "4.1.2",
"minAppVersion": "2.10.2",
"backends": ["windows", "darwin", "linux"],
"frontends": ["desktop"],
Expand All @@ -24,5 +24,8 @@
"patreon": "",
"github": "",
"custom": []
}
},
"keywords": [
"美化", "Beautify", "原神", "Genshin", "看板娘", "Waifu"
]
}
6 changes: 4 additions & 2 deletions src/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
"recoverBtnText": "Unable to Restore",
"recoverBtnTitle1": "Reason: Complete backup for original resources not found, please reinstall SiYuan if need to recover",
"recoverBtnTitle2": "Reason: Already been the SiYuan default",
"reinstallInfo": "Reinstalling SiYuan can fully restore,adapted to v2.10.2,higher or lower version may have compatative problem, please report by Github Issue",
"reinstallInfo": "Reinstalling SiYuan can fully restore,adapted to v2.10.2 or higher,if you meet the compatative problem, please report by Github Issue",
"restartRequest": "Restart SiYuan",
"activated": "Genshin, Start!</br>Restart or lock Siyuan to see the effects",
"deactivated": "Genshin, Stop!</br>Restart or lock Siyuan to see the effects",
"hideWaifuTitle": "Hide Paimon",
"hideWaifuDes": "Not display the Paimon assistant on your notebook.",
"hideWaifuDes": "Not display the Paimon assistant on your notebook. (<span style='color:red'>Very comutation intensive, not recommended using on low performance PC or with battery</span>).",
"hideWaifuRefreshTitle": "Reload now?",
"hideWaifuRefreshDes": "The Paimon still working at backend until next restart of SiYuan, reload now to release its computation cost?",
"muteWaifuTitle": "Mute Paimon",
"muteWaifuDes": "Click the Paimon head, hands, and body will play sound, <span style='color:red'>be careful in the working condition!</span>",
"inDevModeLabel": "Developer mode",
Expand Down
6 changes: 4 additions & 2 deletions src/i18n/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
"recoverBtnText": "无法还原",
"recoverBtnTitle1": "原因:未找到完整备份的原始资源,如需恢复请重装思源",
"recoverBtnTitle2": "原因:已经为思源默认版本",
"reinstallInfo": "重装思源笔记可以完全恢复为默认,适配2.10.2版本,版本过高或过低有可能会有兼容问题,请在issue中反馈",
"reinstallInfo": "重装思源笔记可以完全恢复为默认,适配2.10.2及以上版本,如果遇到了兼容问题,请在issue中反馈",
"restartRequest": "重启思源",
"activated": "源神已启动,重启思源或锁屏以查看效果",
"deactivated": "源神已卸载,重启思源或锁屏以查看效果",
"hideWaifuTitle": "隐藏派蒙看板娘",
"hideWaifuDes": "在笔记本中隐藏派蒙看板娘",
"hideWaifuDes": "在笔记本中隐藏派蒙看板娘(<span style='color:red'>非常吃性能,不建议在低性能本或离电使用时开启</span>)",
"hideWaifuRefreshTitle": "是否重新加载?",
"hideWaifuRefreshDes": "直到下一次重启思源笔记之前看板娘依然在后台运行,是否重新加载彻底释放占用的性能?",
"muteWaifuTitle": "哑巴模式",
"muteWaifuDes": "点击派蒙头、身体、手会播放不同的语音,<span style='color:red'>工作环境中小心社死!</span>",
"inDevModeLabel": "开发者模式",
Expand Down
11 changes: 8 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,6 @@ export default class PluginSample extends Plugin {
// mute the sound of waifu
window.waifuMute = true;
configs.set('waifuMute', true);
// show waifu
await waifu.setWaifuHide(false);
})

})
Expand Down Expand Up @@ -646,7 +644,7 @@ export default class PluginSample extends Plugin {
1000);

// close waifu
await waifu.setWaifuHide(true);
// await waifu.setWaifuHide(true);
})

})
Expand All @@ -661,6 +659,13 @@ export default class PluginSample extends Plugin {
waifuStatus = !waifuStatus;
waifuHideElement.checked = waifuStatus;
await waifu.setWaifuHide(waifuStatus);

if ( waifuHideElement.checked ) {
confirm(this.i18n.hideWaifuRefreshTitle, this.i18n.hideWaifuRefreshDes, ()=>{
window.location.reload();
})
}

})

// 看板娘静音设置
Expand Down

0 comments on commit 286645f

Please sign in to comment.