feat(ui): update icons in About page
This commit is contained in:
parent
0817e533de
commit
ad9e05c203
3 changed files with 21 additions and 17 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { Strings } from "@core/i18n";
|
||||
import { PyoncordIcon } from "@core/ui/settings";
|
||||
import Version from "@core/ui/settings/pages/General/Version";
|
||||
import { useProxy } from "@core/vendetta/storage";
|
||||
import { getDebugInfo } from "@lib/api/debug";
|
||||
|
|
@ -14,7 +15,7 @@ export default function About() {
|
|||
{
|
||||
label: Strings.BUNNY,
|
||||
version: debugInfo.bunny.version,
|
||||
icon: "ic_progress_wrench_24px",
|
||||
icon: { uri: PyoncordIcon },
|
||||
},
|
||||
{
|
||||
label: "Discord",
|
||||
|
|
@ -24,17 +25,17 @@ export default function About() {
|
|||
{
|
||||
label: "React",
|
||||
version: debugInfo.react.version,
|
||||
icon: "ic_category_16px",
|
||||
icon: "ScienceIcon",
|
||||
},
|
||||
{
|
||||
label: "React Native",
|
||||
version: debugInfo.react.nativeVersion,
|
||||
icon: "mobile",
|
||||
icon: "MobilePhoneIcon",
|
||||
},
|
||||
{
|
||||
label: Strings.BYTECODE,
|
||||
version: debugInfo.hermes.bytecodeVersion,
|
||||
icon: "ic_server_security_24px",
|
||||
icon: "TopicsIcon",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -42,37 +43,37 @@ export default function About() {
|
|||
{
|
||||
label: Strings.LOADER,
|
||||
version: `${debugInfo.bunny.loader.name} (${debugInfo.bunny.loader.version})`,
|
||||
icon: "ic_download_24px",
|
||||
icon: "DownloadIcon",
|
||||
},
|
||||
{
|
||||
label: Strings.OPERATING_SYSTEM,
|
||||
version: `${debugInfo.os.name} ${debugInfo.os.version}`,
|
||||
icon: "ic_cog_24px"
|
||||
icon: "ScreenIcon"
|
||||
},
|
||||
...(debugInfo.os.sdk ? [{
|
||||
label: "SDK",
|
||||
version: debugInfo.os.sdk,
|
||||
icon: "pencil"
|
||||
icon: "StaffBadgeIcon"
|
||||
}] : []),
|
||||
{
|
||||
label: Strings.MANUFACTURER,
|
||||
version: debugInfo.device.manufacturer,
|
||||
icon: "ic_badge_staff"
|
||||
icon: "WrenchIcon"
|
||||
},
|
||||
{
|
||||
label: Strings.BRAND,
|
||||
version: debugInfo.device.brand,
|
||||
icon: "ic_settings_boost_24px"
|
||||
icon: "SparklesIcon"
|
||||
},
|
||||
{
|
||||
label: Strings.MODEL,
|
||||
version: debugInfo.device.model,
|
||||
icon: "ic_phonelink_24px"
|
||||
icon: "MobilePhoneIcon"
|
||||
},
|
||||
{
|
||||
label: Platform.select({ android: Strings.CODENAME, ios: Strings.MACHINE_ID })!,
|
||||
version: debugInfo.device.codename,
|
||||
icon: "ic_compose_24px"
|
||||
icon: "TagIcon"
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -2,18 +2,19 @@ import { findAssetId } from "@lib/api/assets";
|
|||
import { clipboard } from "@metro/common";
|
||||
import { LegacyFormText, TableRow } from "@metro/common/components";
|
||||
import { showToast } from "@ui/toasts";
|
||||
import { ImageURISource } from "react-native";
|
||||
|
||||
interface VersionProps {
|
||||
label: string;
|
||||
version: string;
|
||||
icon: string;
|
||||
icon: string | ImageURISource;
|
||||
}
|
||||
|
||||
export default function Version({ label, version, icon }: VersionProps) {
|
||||
return (
|
||||
<TableRow
|
||||
label={label}
|
||||
icon={<TableRow.Icon source={findAssetId(icon)} />}
|
||||
icon={<TableRow.Icon source={typeof icon === "string" ? findAssetId(icon) : icon} />}
|
||||
trailing={<LegacyFormText>{version}</LegacyFormText>}
|
||||
onPress={() => {
|
||||
clipboard.setString(`${label} - ${version}`);
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ export default function PluginInfoActionSheet({ plugin, navigation }: PluginInfo
|
|||
/>
|
||||
<ActionSheetRow
|
||||
label={Strings.COPY_URL}
|
||||
icon={<TableRow.Icon source={findAssetId("copy")} />}
|
||||
icon={<TableRow.Icon source={findAssetId("LinkIcon")} />}
|
||||
onPress={() => {
|
||||
clipboard.setString(plugin.id);
|
||||
showToast.showCopyToClipboard();
|
||||
|
|
@ -67,7 +67,7 @@ export default function PluginInfoActionSheet({ plugin, navigation }: PluginInfo
|
|||
/>
|
||||
<ActionSheetRow
|
||||
label={vdPlugin.update ? Strings.DISABLE_UPDATES : Strings.ENABLE_UPDATES}
|
||||
icon={<TableRow.Icon source={findAssetId("ic_download_24px")} />}
|
||||
icon={<TableRow.Icon source={findAssetId("DownloadIcon")} />}
|
||||
onPress={() => {
|
||||
vdPlugin.update = !vdPlugin.update;
|
||||
showToast(formatString("TOASTS_PLUGIN_UPDATE", {
|
||||
|
|
@ -78,7 +78,8 @@ export default function PluginInfoActionSheet({ plugin, navigation }: PluginInfo
|
|||
/>
|
||||
<ActionSheetRow
|
||||
label={Strings.CLEAR_DATA}
|
||||
icon={<TableRow.Icon source={findAssetId("ic_duplicate")} />}
|
||||
icon={<TableRow.Icon variant="danger" source={findAssetId("CopyIcon")} />}
|
||||
variant="danger"
|
||||
onPress={() => showConfirmationAlert({
|
||||
title: Strings.HOLD_UP,
|
||||
content: formatString("ARE_YOU_SURE_TO_CLEAR_DATA", { name: plugin.name }),
|
||||
|
|
@ -115,7 +116,8 @@ export default function PluginInfoActionSheet({ plugin, navigation }: PluginInfo
|
|||
/>
|
||||
<ActionSheetRow
|
||||
label={Strings.DELETE}
|
||||
icon={<TableRow.Icon source={findAssetId("ic_message_delete")} />}
|
||||
icon={<TableRow.Icon variant="danger" source={findAssetId("TrashIcon")} />}
|
||||
variant="danger"
|
||||
onPress={() => showConfirmationAlert({
|
||||
title: Strings.HOLD_UP,
|
||||
content: formatString("ARE_YOU_SURE_TO_DELETE_PLUGIN", { name: plugin.name }),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue