Merge pull request #239578 from Scrumplex/vencord-disable-updater
vencord: Disable Updater
This commit is contained in:
commit
1485d7bae8
|
@ -36,6 +36,7 @@ buildNpmPackage rec {
|
||||||
npmDepsHash = "sha256-m+hczXog03Gz81CP/blkRJPaTrEhmLQFvVtOfWKYQL4=";
|
npmDepsHash = "sha256-m+hczXog03Gz81CP/blkRJPaTrEhmLQFvVtOfWKYQL4=";
|
||||||
npmFlags = [ "--legacy-peer-deps" ];
|
npmFlags = [ "--legacy-peer-deps" ];
|
||||||
npmBuildScript = if buildWebExtension then "buildWeb" else "build";
|
npmBuildScript = if buildWebExtension then "buildWeb" else "build";
|
||||||
|
npmBuildFlags = [ "--" "--standalone" ];
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
cp ${./package-lock.json} ./package-lock.json
|
cp ${./package-lock.json} ./package-lock.json
|
||||||
|
@ -46,9 +47,11 @@ buildNpmPackage rec {
|
||||||
src = ./replace-git.patch;
|
src = ./replace-git.patch;
|
||||||
inherit version;
|
inherit version;
|
||||||
})
|
})
|
||||||
|
./disable-updater-ui.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = if buildWebExtension then ''
|
installPhase =
|
||||||
|
if buildWebExtension then ''
|
||||||
cp -r dist/chromium-unpacked/ $out
|
cp -r dist/chromium-unpacked/ $out
|
||||||
'' else ''
|
'' else ''
|
||||||
cp -r dist/ $out
|
cp -r dist/ $out
|
||||||
|
|
35
pkgs/misc/vencord/disable-updater-ui.patch
Normal file
35
pkgs/misc/vencord/disable-updater-ui.patch
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
diff --git a/src/components/VencordSettings/UpdaterTab.tsx b/src/components/VencordSettings/UpdaterTab.tsx
|
||||||
|
index 4d0b86c..0f1d87f 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 null;
|
||||||
|
diff --git a/src/plugins/_core/settings.tsx b/src/plugins/_core/settings.tsx
|
||||||
|
index 3ea5a43..da63213 100644
|
||||||
|
--- a/src/plugins/_core/settings.tsx
|
||||||
|
+++ b/src/plugins/_core/settings.tsx
|
||||||
|
@@ -105,7 +105,7 @@ export default definePlugin({
|
||||||
|
label: "Themes",
|
||||||
|
element: require("@components/VencordSettings/ThemesTab").default,
|
||||||
|
},
|
||||||
|
- !IS_WEB && {
|
||||||
|
+ false && !IS_WEB && {
|
||||||
|
section: "VencordUpdater",
|
||||||
|
label: "Updater",
|
||||||
|
element: require("@components/VencordSettings/UpdaterTab").default,
|
||||||
|
diff --git a/src/utils/updater.ts b/src/utils/updater.ts
|
||||||
|
index 2e2bfe1..5ebd06e 100644
|
||||||
|
--- a/src/utils/updater.ts
|
||||||
|
+++ b/src/utils/updater.ts
|
||||||
|
@@ -38,6 +38,7 @@ async function Unwrap<T>(p: Promise<IpcRes<T>>) {
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function checkForUpdates() {
|
||||||
|
+ return false;
|
||||||
|
changes = await Unwrap(VencordNative.updater.getUpdates());
|
||||||
|
if (changes.some(c => c.hash === gitHash)) {
|
||||||
|
isNewer = true;
|
|
@ -7,7 +7,7 @@ index 7ff599a..85b3bfa 100644
|
||||||
export const watch = process.argv.includes("--watch");
|
export const watch = process.argv.includes("--watch");
|
||||||
export const isStandalone = JSON.stringify(process.argv.includes("--standalone"));
|
export const isStandalone = JSON.stringify(process.argv.includes("--standalone"));
|
||||||
-export const gitHash = execSync("git rev-parse --short HEAD", { encoding: "utf-8" }).trim();
|
-export const gitHash = execSync("git rev-parse --short HEAD", { encoding: "utf-8" }).trim();
|
||||||
+export const gitHash = "@version@";
|
+export const gitHash = "v@version@";
|
||||||
export const banner = {
|
export const banner = {
|
||||||
js: `
|
js: `
|
||||||
// Vencord ${gitHash}
|
// Vencord ${gitHash}
|
||||||
|
|
Loading…
Reference in a new issue