diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-25 14:15:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-25 14:15:02 +0200 |
commit | 714d87241ceb07dfd6c08cee55347a937e97a279 (patch) | |
tree | e65caebca7a459c3bd29e69573fcac9398132218 /src | |
parent | f628aa7a70fdf33757995836bca90dcd4d759d37 (diff) | |
download | Vencord-714d87241ceb07dfd6c08cee55347a937e97a279.tar.gz Vencord-714d87241ceb07dfd6c08cee55347a937e97a279.tar.bz2 Vencord-714d87241ceb07dfd6c08cee55347a937e97a279.zip |
build: allow overriding git details & disabling updating (#1677)
Co-authored-by: V <vendicated@riseup.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/components/VencordSettings/UpdaterTab.tsx | 2 | ||||
-rw-r--r-- | src/globals.d.ts | 1 | ||||
-rw-r--r-- | src/main/updater/index.ts | 3 | ||||
-rw-r--r-- | src/plugins/_core/settings.tsx | 2 | ||||
-rw-r--r-- | src/utils/updater.ts | 2 |
5 files changed, 6 insertions, 4 deletions
diff --git a/src/components/VencordSettings/UpdaterTab.tsx b/src/components/VencordSettings/UpdaterTab.tsx index 4d0b86c..6766cf0 100644 --- a/src/components/VencordSettings/UpdaterTab.tsx +++ b/src/components/VencordSettings/UpdaterTab.tsx @@ -249,4 +249,4 @@ function Updater() { ); } -export default IS_WEB ? null : wrapTab(Updater, "Updater"); +export default IS_UPDATER_DISABLED ? null : wrapTab(Updater, "Updater"); diff --git a/src/globals.d.ts b/src/globals.d.ts index 720cd5e..daccf33 100644 --- a/src/globals.d.ts +++ b/src/globals.d.ts @@ -35,6 +35,7 @@ declare global { export var IS_WEB: boolean; export var IS_DEV: boolean; export var IS_STANDALONE: boolean; + export var IS_UPDATER_DISABLED: boolean; export var IS_DISCORD_DESKTOP: boolean; export var IS_VESKTOP: boolean; export var VERSION: string; diff --git a/src/main/updater/index.ts b/src/main/updater/index.ts index 7036112..32d5cd6 100644 --- a/src/main/updater/index.ts +++ b/src/main/updater/index.ts @@ -16,4 +16,5 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import(IS_STANDALONE ? "./http" : "./git"); +if (!IS_UPDATER_DISABLED) + import(IS_STANDALONE ? "./http" : "./git"); diff --git a/src/plugins/_core/settings.tsx b/src/plugins/_core/settings.tsx index e5f710c..88ebb57 100644 --- a/src/plugins/_core/settings.tsx +++ b/src/plugins/_core/settings.tsx @@ -103,7 +103,7 @@ export default definePlugin({ element: require("@components/VencordSettings/ThemesTab").default, className: "vc-themes" }, - !IS_WEB && { + !IS_UPDATER_DISABLED && { section: "VencordUpdater", label: "Updater", element: require("@components/VencordSettings/UpdaterTab").default, diff --git a/src/utils/updater.ts b/src/utils/updater.ts index 2e2bfe1..f99c6ca 100644 --- a/src/utils/updater.ts +++ b/src/utils/updater.ts @@ -63,7 +63,7 @@ export async function update() { export const getRepo = () => Unwrap(VencordNative.updater.getRepo()); export async function maybePromptToUpdate(confirmMessage: string, checkForDev = false) { - if (IS_WEB) return; + if (IS_WEB || IS_UPDATER_DISABLED) return; if (checkForDev && IS_DEV) return; try { |