diff --git a/LICENSE b/LICENSE index 22c00c1..cf2b1cf 100644 --- a/LICENSE +++ b/LICENSE @@ -2,6 +2,7 @@ BSD 3-Clause License Copyright (c) 2023, Team Vendetta Copyright (c) 2024, pylixonly +Copyright (c) 2024, Team Revenge Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/package.json b/package.json index 4180e36..ece3eb5 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "bunny", + "name": "revenge", "private": true, "author": { - "name": "Pyoncord Team", - "url": "https://github.com/pyoncord" + "name": "Revenge Team", + "url": "https://github.com/revenge-mod" }, "scripts": { "build": "node scripts/build.mjs", diff --git a/src/assets/icons/pyoncord.png b/src/assets/icons/pyoncord.png deleted file mode 100644 index e3f44bf..0000000 Binary files a/src/assets/icons/pyoncord.png and /dev/null differ diff --git a/src/assets/icons/revenge.png b/src/assets/icons/revenge.png new file mode 100644 index 0000000..b6aa5a2 Binary files /dev/null and b/src/assets/icons/revenge.png differ diff --git a/src/core/i18n/default.json b/src/core/i18n/default.json index 83a9ccc..39df982 100644 --- a/src/core/i18n/default.json +++ b/src/core/i18n/default.json @@ -6,11 +6,13 @@ "ARE_YOU_SURE_TO_DELETE_THEME": "Are you sure you wish to delete {name}?", "ASSET_BROWSER": "Asset Browser", "BRAND": "Brand", - "BUNNY": "Bunny", + "BUNNY": "Revenge", "BUNNY_URL": "Bunny URL", "BYTECODE": "Bytecode", "CANCEL": "Cancel", "CLEAR": "Clear", + "CLEAR_BUNDLE": "Clear JS bundle", + "CLEAR_BUNDLE_DESC": "Clear the cached bundle. This will force a re-download of the bundle next app launch.", "CLEAR_DATA": "Clear data", "CLEAR_DATA_FAILED": "Failed to clear data for {name}!", "CLEAR_DATA_SUCCESSFUL": "Cleared data for {name}.", @@ -66,6 +68,8 @@ "MANUFACTURER": "Manufacturer", "MESSAGE": "Message", "MISCELLANEOUS": "Miscellaneous", + "MODAL_RELOAD_REQUIRED": "Reload app?", + "MODAL_RELOAD_REQUIRED_DESC": "A reload is required to see the changes. Do you want to reload now?", "MODAL_THEME_REFETCHED": "Theme refetched", "MODAL_THEME_REFETCHED_DESC": "A reload is required to see the changes. Do you want to reload now?", "MODAL_UNPROXIED_PLUGIN_DESC": "The plugin you are trying to install has not been proxied/verified by staffs. Are you sure you want to continue?", @@ -81,10 +85,10 @@ "REFETCH": "Refetch", "RELOAD": "Reload", "RELOAD_DISCORD": "Reload Discord", - "RELOAD_IN_NORMAL_MODE": "Reload in Normal Mode", - "RELOAD_IN_NORMAL_MODE_DESC": "This will reload Discord normally", - "RELOAD_IN_SAFE_MODE": "Reload in Safe Mode", - "RELOAD_IN_SAFE_MODE_DESC": "This will reload Discord without loading addons", + "RELOAD_IN_NORMAL_MODE": "Reload in normal mode", + "RELOAD_IN_NORMAL_MODE_DESC": "Safe mode currently enabled, tap to reload in normal mode", + "RELOAD_IN_SAFE_MODE": "Reload in safe mode", + "RELOAD_IN_SAFE_MODE_DESC": "Tap to reload Discord without loading addons", "REMOVE": "Remove", "RESTART_REQUIRED_TO_TAKE_EFFECT": "Restart is required to take effect", "RETRY": "Retry", diff --git a/src/core/ui/settings/index.ts b/src/core/ui/settings/index.ts index 1d1b3e5..342b13d 100644 --- a/src/core/ui/settings/index.ts +++ b/src/core/ui/settings/index.ts @@ -1,4 +1,4 @@ -import PyoncordIcon from "@assets/icons/pyoncord.png"; +import PyoncordIcon from "@assets/icons/revenge.png"; import { Strings } from "@core/i18n"; import { findAssetId } from "@lib/api/assets"; import { isFontSupported, isThemeSupported } from "@lib/api/native/loader"; @@ -11,7 +11,7 @@ export { PyoncordIcon }; export default function initSettings() { registerSection({ - name: "Bunny", + name: Strings.BUNNY, items: [ { key: "BUNNY", diff --git a/src/core/ui/settings/pages/Developer/index.tsx b/src/core/ui/settings/pages/Developer/index.tsx index f8338dd..aaee709 100644 --- a/src/core/ui/settings/pages/Developer/index.tsx +++ b/src/core/ui/settings/pages/Developer/index.tsx @@ -13,10 +13,13 @@ import { findByProps } from "@metro/wrappers"; import { semanticColors } from "@ui/color"; import { ErrorBoundary } from "@ui/components"; import { createStyles, TextStyleSheet } from "@ui/styles"; +import { NativeModules } from "react-native"; import { ScrollView, StyleSheet } from "react-native"; const { hideActionSheet } = lazyDestructure(() => findByProps("openLazy", "hideActionSheet")); const { showSimpleActionSheet } = lazyDestructure(() => findByProps("showSimpleActionSheet")); +const { openAlert, dismissAlert } = lazyDestructure(() => findByProps("openAlert", "dismissAlert")); +const { AlertModal, AlertActionButton } = lazyDestructure(() => findByProps("AlertModal", "AlertActions")); const RDT_EMBED_LINK = "https://raw.githubusercontent.com/amsyarasyiq/rdt-embedder/main/dist.js"; @@ -96,6 +99,23 @@ export default function Developer() { } + } + onPress={() => { + openAlert("revenge-clear-bundle-reload-confirmation", + NativeModules.BundleUpdaterManager.reload()} /> + + + } + />); + }} + /> } - trailing={{version}} + trailing={} onPress={() => { clipboard.setString(`${label} - ${version}`); showToast.showCopyToClipboard(); diff --git a/src/core/ui/settings/pages/General/index.tsx b/src/core/ui/settings/pages/General/index.tsx index bffb4b1..750f3ed 100644 --- a/src/core/ui/settings/pages/General/index.tsx +++ b/src/core/ui/settings/pages/General/index.tsx @@ -61,11 +61,12 @@ export default function General() { icon={} onPress={() => NativeModules.BundleUpdaterManager.reload()} /> - } - onPress={toggleSafeMode} + value={settings.safeMode?.enabled} + onValueChange={toggleSafeMode} /> void | boolean)[]) { unpatches.push(after("default", findByNameLazy("getScreens", false), (_a, screens) => ({ ...screens, VendettaCustomPage: { - title: "Bunny", + title: Strings.BUNNY, render: () => }, BUNNY_CUSTOM_PAGE: { - title: "Bunny", + title: Strings.BUNNY, render: () => } }))); diff --git a/src/lib/ui/settings/patches/tabs.tsx b/src/lib/ui/settings/patches/tabs.tsx index 4c73b80..c160bb3 100644 --- a/src/lib/ui/settings/patches/tabs.tsx +++ b/src/lib/ui/settings/patches/tabs.tsx @@ -5,6 +5,7 @@ import { findByNameLazy, findByPropsLazy } from "@metro/wrappers"; import { registeredSections } from "@ui/settings"; import { CustomPageRenderer, wrapOnPress } from "./shared"; +import { Strings } from "@core/i18n"; const settingConstants = findByPropsLazy("SETTING_RENDERER_CONFIG"); const SettingsOverviewScreen = findByNameLazy("SettingsOverviewScreen", false); @@ -40,7 +41,7 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { ...rendererConfigValue, VendettaCustomPage: { type: "route", - title: () => "Bunny", + title: () => Strings.BUNNY, screen: { route: "VendettaCustomPage", getComponent: () => CustomPageRenderer @@ -48,7 +49,7 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { }, BUNNY_CUSTOM_PAGE: { type: "route", - title: () => "Bunny", + title: () => Strings.BUNNY, screen: { route: "BUNNY_CUSTOM_PAGE", getComponent: () => CustomPageRenderer diff --git a/src/lib/utils/constants.ts b/src/lib/utils/constants.ts index 1885fdf..83ab218 100644 --- a/src/lib/utils/constants.ts +++ b/src/lib/utils/constants.ts @@ -1,5 +1,5 @@ -export const DISCORD_SERVER = "https://discord.gg/XjYgWXHb9Q"; -export const GITHUB = "https://github.com/pyoncord"; +export const DISCORD_SERVER = "https://discord.com/invite/ddcQf3s2Uq"; +export const GITHUB = "https://github.com/revenge-mod"; export const HTTP_REGEX = /^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/; export const HTTP_REGEX_MULTI = /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&//=]*)/g; export const VD_PROXY_PREFIX = "https://vd-plugins.github.io/proxy"; diff --git a/src/lib/utils/logger.ts b/src/lib/utils/logger.ts index 44b519c..eb5582c 100644 --- a/src/lib/utils/logger.ts +++ b/src/lib/utils/logger.ts @@ -12,4 +12,4 @@ export interface Logger { } export const DiscordLogger = findByNameLazy("Logger"); -export const logger: Logger = new DiscordLogger("Bunny"); +export const logger: Logger = new DiscordLogger("Revenge");