GoonCord/src/lib/ui/settings/index.tsx
kmmiio99o bc3abf5a6d Rename Kettu to ShiggyCord and update branding
- Replace all references to "Kettu" with "ShiggyCord" in code, UI, and
docs - Update icons and assets to use shiggy.png - Change repo URLs to
GitHub ShiggyCord repository - Update build output to shiggycord.js -
Remove Codeberg and legacy workflow/config files - Add new GitHub
release workflow and semantic-release config - Update i18n strings and
debug info to reflect ShiggyCord branding - Refactor settings, plugin,
and theme pages for new branding and improved UX - Add FixEmbed and
MessageFix core plugins - Refactor NoTrack plugin for improved telemetry
blocking - Remove unused PluginBrowser page - Miscellaneous code style
and formatting improvements
2025-10-11 02:27:23 +02:00

37 lines
920 B
TypeScript

// Good luck reading this!
import { lazy } from "react";
import type { ImageURISource } from "react-native";
import { patchTabsUI } from "./patches/tabs";
export interface RowConfig {
key: string;
title: () => string;
onPress?: () => any;
render?: Parameters<typeof lazy>[0];
icon?: ImageURISource | number;
IconComponent?: React.ReactNode;
usePredicate?: () => boolean;
useTrailing?: () => string | JSX.Element;
rawTabsConfig?: Record<string, any>;
}
export const registeredSections = {} as {
[key: string]: RowConfig[];
};
export function registerSection(section: { name: string; items: RowConfig[] }) {
registeredSections[section.name] = section.items;
return () => delete registeredSections[section.name];
}
/**
* @internal
*/
export function patchSettings() {
const unpatches = new Array<() => boolean>();
patchTabsUI(unpatches);
return () => unpatches.forEach((u) => u());
}