mirror of
https://github.com/aunetx/deezer-linux.git
synced 2025-07-24 06:05:01 +02:00
fix: improve hide appoffline patch w/ env var + docs
This commit is contained in:
parent
947b699d25
commit
953841da37
27
README.md
27
README.md
@ -37,20 +37,21 @@ Other packages can be installed from you package manager, either by clicking on
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
| Option | Description |
|
| Option | Description |
|
||||||
| ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `--start-in-tray` | Start the app in the tray (see [patch](./patches/01-start-hidden-in-tray.patch)) |
|
| `--start-in-tray` | Start the app in the tray (see [patch](./patches/01-start-hidden-in-tray.patch)) |
|
||||||
| `--disable-systray` | Quit the app when the window is closed (see [patch](./patches/03-quit.patch)) |
|
| `--disable-systray` | Quit the app when the window is closed (see [patch](./patches/03-quit.patch)) |
|
||||||
| `--keep-kernel` | Use the exact kernel version (see [patch](./patches/05-remove-os-information.patch)) <br/> _This feature impacts privacy._ |
|
| `--keep-kernel` | Use the exact kernel version (see [patch](./patches/05-remove-os-information.patch)) <br/> _This feature impacts privacy._ |
|
||||||
| `--disable-features` | Disable some features (see [patch](./patches/06-better-management-of-MPRIS.patch)) |
|
| `--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)) |
|
| `--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))
|
| `--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)) |
|
||||||
| `--enable-wayland-ime` `--ozone-platform-hint=auto` `--wayland-text-input-version=3` | Enable IME keyboard support on Wayland |
|
| `--enable-wayland-ime` `--ozone-platform-hint=auto` `--wayland-text-input-version=3` | Enable IME keyboard support on Wayland |
|
||||||
|
|
||||||
| Environment variable | Options | Description |
|
| Environment variable | Options | Description |
|
||||||
| -------------------- | -------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
| --------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
||||||
| `LOG_LEVEL` | `silly`,`debug`,`verbose`,`info`,`warning`,`error` | Set the log level (see [patch](./patches/07-log-level-environment-variable.patch)) |
|
| `DZ_HIDE_APPOFFLINE_BANNER` | `yes`,`no` | Hide the "Application is offline" banner (see [patch](./patches/11-hide-appoffline-banner.patch)) |
|
||||||
| `DZ_DEVTOOLS` | `yes`,`no` | Enable the developer console (ctrl+shift+i) |
|
| `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) |
|
||||||
|
|
||||||
## Building from source
|
## Building from source
|
||||||
|
|
||||||
|
@ -1,62 +1,65 @@
|
|||||||
From eada05985500a3fb4c8dc0a9fa12a2300f785206 Mon Sep 17 00:00:00 2001
|
From bbb88f846c94978959f4816069332b4d9f9f4dab Mon Sep 17 00:00:00 2001
|
||||||
From: Aurélien Hamy <me@aunetx.dev>
|
From: josselinonduty <contact@josselinonduty.fr>
|
||||||
Date: Mon, 26 May 2025 15:50:35 +0200
|
Date: Tue, 8 Jul 2025 12:54:19 +0200
|
||||||
Subject: [PATCH] feat: add toggle to hide application offline banner
|
Subject: [PATCH] feat: add toggle to hide application offline banner
|
||||||
|
|
||||||
This solves #123 by adding the `--hide-appoffline-banner` command-line argument
|
This solves #123 by adding the `--hide-appoffline-banner` command-line argument
|
||||||
to hide the annoying "Application is offline" banner, that sometimes appears when
|
to hide the annoying "Application is offline" banner, that sometimes appears when
|
||||||
using a VPN or DNS level blocker.
|
using a VPN or DNS level blocker.
|
||||||
---
|
---
|
||||||
build/index.html | 5 +++++
|
build/index.html | 6 ++++++
|
||||||
build/main.js | 1 +
|
build/main.js | 5 +++++
|
||||||
build/preload.js | 6 ++++++
|
build/preload.js | 4 ++++
|
||||||
3 files changed, 12 insertions(+)
|
3 files changed, 15 insertions(+)
|
||||||
|
|
||||||
diff --git a/build/index.html b/build/index.html
|
diff --git a/build/index.html b/build/index.html
|
||||||
index 4efcd23..019e786 100644
|
index 4efcd23..4be829c 100644
|
||||||
--- a/build/index.html
|
--- a/build/index.html
|
||||||
+++ b/build/index.html
|
+++ b/build/index.html
|
||||||
@@ -86,6 +86,11 @@
|
@@ -86,6 +86,12 @@
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ /* hide the offline alert when needed */
|
+ /* hide the offline alert when needed */
|
||||||
+ .hide-AppOffline-banner .alert-wrapper:has(> div[data-testid="alert-AppOffline"]) {
|
+ .hide-AppOffline-banner
|
||||||
|
+ .alert-wrapper:has(> div[data-testid="alert-AppOffline"]) {
|
||||||
+ display: none !important;
|
+ display: none !important;
|
||||||
+ }
|
+ }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="electron">
|
<body class="electron">
|
||||||
diff --git a/build/main.js b/build/main.js
|
diff --git a/build/main.js b/build/main.js
|
||||||
index 99935cb..91c99fb 100644
|
index 99935cb..1c16dbe 100644
|
||||||
--- a/build/main.js
|
--- a/build/main.js
|
||||||
+++ b/build/main.js
|
+++ b/build/main.js
|
||||||
@@ -3166,6 +3166,7 @@
|
@@ -3166,6 +3166,11 @@
|
||||||
getRealPath(external_electron_namespaceObject.app, __dirname),
|
getRealPath(external_electron_namespaceObject.app, __dirname),
|
||||||
"preload.js"
|
"preload.js"
|
||||||
),
|
),
|
||||||
+ additionalArguments: [`--hide-appoffline-banner=${process.argv.some((arg) => arg === "--hide-appoffline-banner")}`],
|
+ additionalArguments: [
|
||||||
|
+ (process.argv.some((arg) => arg === "--hide-appoffline-banner") ||
|
||||||
|
+ "yes" === process.env.DZ_HIDE_APPOFFLINE_BANNER) &&
|
||||||
|
+ "--hide-appoffline-banner",
|
||||||
|
+ ].filter(Boolean),
|
||||||
},
|
},
|
||||||
windowOptions = {
|
windowOptions = {
|
||||||
title: "Deezer Desktop",
|
title: "Deezer Desktop",
|
||||||
diff --git a/build/preload.js b/build/preload.js
|
diff --git a/build/preload.js b/build/preload.js
|
||||||
index 1301e93..6814466 100644
|
index 1301e93..05939c4 100644
|
||||||
--- a/build/preload.js
|
--- a/build/preload.js
|
||||||
+++ b/build/preload.js
|
+++ b/build/preload.js
|
||||||
@@ -538,6 +538,12 @@
|
@@ -538,6 +538,10 @@
|
||||||
external_i18next_default().dir(external_i18next_default().language)
|
external_i18next_default().dir(external_i18next_default().language)
|
||||||
? "rtl"
|
? "rtl"
|
||||||
: "ltr");
|
: "ltr");
|
||||||
+ if (process.argv.some((arg) => arg === "--hide-appoffline-banner=true"))
|
+ if (process.argv.some((arg) => arg === "--hide-appoffline-banner"))
|
||||||
+ document
|
+ document
|
||||||
+ .getElementsByTagName("body")[0]
|
+ .getElementsByTagName("body")[0]
|
||||||
+ .classList.add(
|
+ .classList.add("hide-AppOffline-banner");
|
||||||
+ "hide-AppOffline-banner"
|
|
||||||
+ );
|
|
||||||
});
|
});
|
||||||
})(),
|
})(),
|
||||||
(module.exports = __webpack_exports__);
|
(module.exports = __webpack_exports__);
|
||||||
--
|
--
|
||||||
2.49.0
|
2.48.1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user