mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 14:43:03 -04:00
build: allow overriding git details & disabling updating (#1677)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
f628aa7a70
commit
714d87241c
8 changed files with 24 additions and 14 deletions
|
@ -249,4 +249,4 @@ function Updater() {
|
|||
);
|
||||
}
|
||||
|
||||
export default IS_WEB ? null : wrapTab(Updater, "Updater");
|
||||
export default IS_UPDATER_DISABLED ? null : wrapTab(Updater, "Updater");
|
||||
|
|
1
src/globals.d.ts
vendored
1
src/globals.d.ts
vendored
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue