mirror of
https://github.com/aunetx/deezer-linux.git
synced 2025-07-27 23:54:08 +02:00
add option to disable animations via cli or environment variable
This commit is contained in:
parent
ab48516655
commit
9ac53b9b4e
2
Makefile
2
Makefile
@ -49,6 +49,8 @@ prepare: clean install_build_deps
|
||||
@echo "09 - Add Discord Rich Presence (https://github.com/aunetx/deezer-linux/pull/82)"
|
||||
@echo "10 - Improve responsiveness on small devices (https://github.com/aunetx/deezer-linux/pull/122)"
|
||||
@echo "11 - Hide Application is offline banner (https://github.com/aunetx/deezer-linux/pull/124)"
|
||||
@echo "12 - Disable animations (https://github.com/aunetx/deezer-linux/pull/133)"
|
||||
|
||||
@$(foreach p, $(wildcard ./patches/*), patch -p 1 -d $(APP_DIR) < $(p);)
|
||||
|
||||
@echo "Append `package-append.json` to the `package.json` of the app"
|
||||
|
@ -45,11 +45,13 @@ Other packages can be installed from you package manager, either by clicking on
|
||||
| `--disable-features` | Disable some features (see [patch](./patches/06-better-management-of-MPRIS.patch)) |
|
||||
| `--enable-discord-rpc` | Enable Discord RPC integration (see [patch](./patches/09-discord-rich-presence.patch)) |
|
||||
| `--hide-appoffline-banner` | Hide the "Application is offline" banner that appears when using a VPN or DNS blocker (see [patch](./patches/11-hide-appoffline-banner.patch)) |
|
||||
| `--disable-animations` | Disable animations (see [patch](./patches/12-disable-animations.patch)) |
|
||||
| `--enable-wayland-ime` `--ozone-platform-hint=auto` `--wayland-text-input-version=3` | Enable IME keyboard support on Wayland |
|
||||
|
||||
| Environment variable | Options | Description |
|
||||
| --------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
||||
| `DZ_HIDE_APPOFFLINE_BANNER` | `yes`,`no` | Hide the "Application is offline" banner (see [patch](./patches/11-hide-appoffline-banner.patch)) |
|
||||
| `DZ_DISABLE_ANIMATIONS` | `yes`,`no` | Disable animations (see [patch](./patches/12-disable-animations.patch)) |
|
||||
| `LOG_LEVEL` | `silly`,`debug`,`verbose`,`info`,`warning`,`error` | Set the log level (see [patch](./patches/07-log-level-environment-variable.patch)) |
|
||||
| `DZ_DEVTOOLS` | `yes`,`no` | Enable the developer console (ctrl+shift+i) |
|
||||
|
||||
|
60
patches/12-disable-animations.patch
Normal file
60
patches/12-disable-animations.patch
Normal file
@ -0,0 +1,60 @@
|
||||
From a220daa47a06d19ff6a995d567c0f46e42d14f6b Mon Sep 17 00:00:00 2001
|
||||
From: josselinonduty <contact@josselinonduty.fr>
|
||||
Date: Tue, 8 Jul 2025 14:37:23 +0200
|
||||
Subject: [PATCH] feat(patch): disable animations (cli/env)
|
||||
|
||||
---
|
||||
build/index.html | 6 ++++++
|
||||
build/main.js | 3 +++
|
||||
build/preload.js | 4 ++++
|
||||
3 files changed, 13 insertions(+)
|
||||
|
||||
diff --git a/build/index.html b/build/index.html
|
||||
index 4be829c..2ef7709 100644
|
||||
--- a/build/index.html
|
||||
+++ b/build/index.html
|
||||
@@ -92,6 +92,12 @@
|
||||
.alert-wrapper:has(> div[data-testid="alert-AppOffline"]) {
|
||||
display: none !important;
|
||||
}
|
||||
+
|
||||
+ /* Disable animations */
|
||||
+ .disable-animations * {
|
||||
+ animation: none !important;
|
||||
+ transition: none !important;
|
||||
+ }
|
||||
</style>
|
||||
</head>
|
||||
<body class="electron">
|
||||
diff --git a/build/main.js b/build/main.js
|
||||
index 8fa4b6f..61028cd 100644
|
||||
--- a/build/main.js
|
||||
+++ b/build/main.js
|
||||
@@ -3246,6 +3246,9 @@
|
||||
(process.argv.some((arg) => arg === "--hide-appoffline-banner") ||
|
||||
"yes" === process.env.DZ_HIDE_APPOFFLINE_BANNER) &&
|
||||
"--hide-appoffline-banner",
|
||||
+ (process.argv.some((arg) => arg === "--disable-animations") ||
|
||||
+ "yes" === process.env.DZ_DISABLE_ANIMATIONS) &&
|
||||
+ "--disable-animations",
|
||||
].filter(Boolean),
|
||||
},
|
||||
windowOptions = {
|
||||
diff --git a/build/preload.js b/build/preload.js
|
||||
index 05939c4..0df9150 100644
|
||||
--- a/build/preload.js
|
||||
+++ b/build/preload.js
|
||||
@@ -542,6 +542,10 @@
|
||||
document
|
||||
.getElementsByTagName("body")[0]
|
||||
.classList.add("hide-AppOffline-banner");
|
||||
+ if (process.argv.some((arg) => arg === "--disable-animations"))
|
||||
+ document
|
||||
+ .getElementsByTagName("body")[0]
|
||||
+ .classList.add("disable-animations");
|
||||
});
|
||||
})(),
|
||||
(module.exports = __webpack_exports__);
|
||||
--
|
||||
2.48.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user