mirror of
https://github.com/cucumber-sp/yandex-music-linux.git
synced 2025-08-15 14:03:44 +03:00
Merge 89a9971ea3
into 066a6c7f50
This commit is contained in:
commit
dbc732a168
@ -29,20 +29,20 @@ diff --git a/main/index.js b/main/index.js
|
||||
diff --git a/main/lib/handlers/handleWindowLifecycleEvents.js b/main/lib/handlers/handleWindowLifecycleEvents.js
|
||||
--- a/main/lib/handlers/handleWindowLifecycleEvents.js
|
||||
+++ b/main/lib/handlers/handleWindowLifecycleEvents.js
|
||||
@@ -24,2 +24,5 @@
|
||||
@@ -25,2 +25,5 @@
|
||||
const handleWindowLifecycleEvents = (window) => {
|
||||
+ const isPlatformWindows = deviceInfo_js_1.devicePlatform === platform_js_1.Platform.WINDOWS;
|
||||
+ const isTrayEnabled = process.env.TRAY_ENABLED && process.env.TRAY_ENABLED > 0;
|
||||
+ const isAlwaysLeaveToTray = process.env.ALWAYS_LEAVE_TO_TRAY && process.env.ALWAYS_LEAVE_TO_TRAY > 0;
|
||||
electron_1.app.on('activate', () => {
|
||||
@@ -31,5 +34,5 @@ const handleWindowLifecycleEvents = (window) => {
|
||||
@@ -32,5 +35,5 @@ const handleWindowLifecycleEvents = (window) => {
|
||||
electron_1.app.on('window-all-closed', () => {
|
||||
- if ([platform_js_1.Platform.WINDOWS, platform_js_1.Platform.LINUX].includes(deviceInfo_js_1.devicePlatform)) {
|
||||
+ if (!isTrayEnabled || isPlatformWindows) {
|
||||
electron_1.app.quit();
|
||||
}
|
||||
});
|
||||
@@ -54,18 +57,13 @@ const handleWindowLifecycleEvents = (window) => {
|
||||
@@ -55,18 +58,13 @@ const handleWindowLifecycleEvents = (window) => {
|
||||
window.on('close', (event) => {
|
||||
- if (deviceInfo_js_1.devicePlatform !== platform_js_1.Platform.MACOS) {
|
||||
- return;
|
||||
|
@ -74,7 +74,7 @@ find "./" -type f \( -name "*.js" -o -name "*.js.map" \) -print0 | while IFS= re
|
||||
sed -i 's/panel:!1,allowOverwriteExperiments:!1/panel:window.IS_DEVTOOLS_ENABLED??!1,allowOverwriteExperiments:window.IS_DEVTOOLS_ENABLED??!1/g' "$file"
|
||||
sed -i -E 's;"MacOS",(\w).LINUX="Linux";"MacOS",\1.LINUX="Windows";g' "$file"
|
||||
sed -i -E 's;LINUX:(\w)="uVNvVMAvdrvjtwN0VlhEt2";LINUX:\1="kzqU4XhfCaY6B6JTHODeq5";g' "$file"
|
||||
sed -i "s/a=atob(e)/a=atob(e).replace('nt(25,', \`nt(\${window.VIBE_ANIMATION_MAX_FPS??25},\`)/g" "$file"
|
||||
sed -i "s/n=atob(e)/n=atob(e).replace('nt(25,', \`nt(\${window.VIBE_ANIMATION_MAX_FPS??25},\`)/g" "$file"
|
||||
done
|
||||
echo ".js chunks patched"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user