fix(everything): correct a bunch of broken shit
This commit is contained in:
parent
d43c37de01
commit
6fb3eabf62
10 changed files with 65 additions and 17 deletions
18
.forgejo/FUNDING.yml
Normal file
18
.forgejo/FUNDING.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
# These are supported funding model platforms
|
||||
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: cocobo1
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
polar: # Replace with a single Polar username
|
||||
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
||||
thanks_dev: # Replace with a single thanks.dev username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
|
||||
|
|
@ -113,7 +113,7 @@
|
|||
"UH_OH": "Uh Oh",
|
||||
"UNINSTALL": "Uninstall",
|
||||
"UNINSTALL_TITLE": "Uninstall {title}",
|
||||
"URL_PLACEHOLDER": "https://github.com/revenge-mod",
|
||||
"URL_PLACEHOLDER": "https://github.com/C0C0B01/Kettu",
|
||||
"VERSION": "Version",
|
||||
"VERSIONS": "Versions"
|
||||
}
|
||||
|
|
@ -105,20 +105,6 @@ export default function Plugins() {
|
|||
</Card>
|
||||
</View>;
|
||||
}}
|
||||
ListFooterComponent={() => __DEV__ && (
|
||||
<View style={{ alignItems: "center", justifyContent: "center", paddingTop: 16, gap: 12 }}><Button
|
||||
size="lg"
|
||||
text="Browse Plugins"
|
||||
icon={findAssetId("CompassIcon")}
|
||||
onPress={() => {
|
||||
navigation.push("PUPU_CUSTOM_PAGE", {
|
||||
title: "Plugin Browser",
|
||||
render: React.lazy(() => import("../PluginBrowser")),
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
installAction={{
|
||||
label: "Install a plugin",
|
||||
fetchFn: async (url: string) => {
|
||||
|
|
|
|||
|
|
@ -52,4 +52,4 @@ export default async () => {
|
|||
|
||||
// We good :)
|
||||
logger.log("Kettu is ready!");
|
||||
};
|
||||
};
|
||||
42
src/lib/addons/themes/colors/fix.ts
Normal file
42
src/lib/addons/themes/colors/fix.ts
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import { StatusBar } from "react-native";
|
||||
import { findByStoreNameLazy } from "@metro/wrappers";
|
||||
import { _colorRef } from "./updater"; // <-- import your colorRef
|
||||
|
||||
const ThemeStore = findByStoreNameLazy("ThemeStore");
|
||||
|
||||
function getBarStyle() {
|
||||
// Check for custom theme
|
||||
const custom = _colorRef.current;
|
||||
if (custom) {
|
||||
// Bunny theme (spec 3)
|
||||
if (custom.spec === 3 && custom.reference) {
|
||||
return custom.reference === "light" ? "dark-content" : "light-content";
|
||||
}
|
||||
// Vendetta theme (spec 2)
|
||||
if (custom.spec === 2 && custom.reference) {
|
||||
return custom.reference === "light" ? "dark-content" : "light-content";
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback to Discord theme string
|
||||
const theme = ThemeStore?.theme;
|
||||
if (typeof theme === "string") {
|
||||
const lowerTheme = theme.toLowerCase();
|
||||
return (lowerTheme.includes("dark") || lowerTheme.includes("midnight")) ? "light-content" : "dark-content";
|
||||
}
|
||||
|
||||
if (typeof ThemeStore?.isDark === "boolean") {
|
||||
return ThemeStore.isDark ? "light-content" : "dark-content";
|
||||
}
|
||||
|
||||
return "dark-content";
|
||||
}
|
||||
|
||||
export default function fixStatusBar() {
|
||||
const origSetBarStyle = StatusBar.setBarStyle;
|
||||
StatusBar.setBarStyle = function (_style: any, ...args: any[]) {
|
||||
return origSetBarStyle.call(this, getBarStyle(), ...args);
|
||||
};
|
||||
|
||||
StatusBar.setBarStyle(getBarStyle());
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
import fixStatusBar from "./fix";
|
||||
import patchChatBackground from "./patches/background";
|
||||
import patchDefinitionAndResolver from "./patches/resolver";
|
||||
import patchStorage from "./patches/storage";
|
||||
|
|
@ -13,6 +13,8 @@ export default function initColors(manifest: ColorManifest | null) {
|
|||
patchChatBackground()
|
||||
];
|
||||
|
||||
fixStatusBar();
|
||||
|
||||
if (manifest) updateBunnyColor(manifest, { update: false });
|
||||
|
||||
return () => patches.forEach(p => p());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue