This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
// Metro module 6716 (f6717).
const r10 = {
IGNORE_SUCCESS: "IGNORE_SUCCESS",
UNIGNORE_SUCCESS: "UNIGNORE_SUCCESS",
BLOCK_SUCCESS: "BLOCK_SUCCESS",
UNBLOCK_SUCCESS: "UNBLOCK_SUCCESS",
MUTE_SUCCESS: "MUTE_SUCCESS",
UNMUTE_SUCCESS: "UNMUTE_SUCCESS",
REPORT_SUCCESS: "REPORT_SUCCESS",
TIGGER_PAWTECT_ERROR: "TIGGER_PAWTECT_ERROR",
TIGGER_PAWTECT_VERIFIED: "TIGGER_PAWTECT_VERIFIED",
GENERIC_ERROR: "GENERIC_ERROR",
REPORT_TO_MOD_SUCCESS: "REPORT_TO_MOD_SUCCESS",
SAFETY_FEEDBACK_SUCCESS: "SAFETY_FEEDBACK_SUCCESS",
EXISTING_USER_AGE_GATE_SUCCESS: "EXISTING_USER_AGE_GATE_SUCCESS"
};
const r24 = {
SENSITIVE_CONTENT_FILTER_AGE_VERIFICATION_NOTICE: "sensitive_content_filter_age_verification_notice",
SENSITIVE_CONTENT_FILTER_TEEN_NOTICE: "sensitive_content_filter_teen_notice",
RESTRICTED_ACCOUNTS_SETTING_NOTICE: "restricted_accounts_setting_notice",
CONTENT_AND_SOCIAL_PARENTAL_CONTROLS_NOTICE: "content_and_social_parental_controls_notice",
AGE_CONFIRMATION_NOTICE: "age_confirmation_notice"
};
const r30 = {
DISMISS: "dismiss",
VIEWED: "viewed",
LEARN_MORE: "learn_more",
CONFIRM_AGE: "confirm_age"
};
export { r10 as SafetyToastType };
export { r24 as SafetySettingsNoticeType };
export { r30 as SafetySettingsNoticeAction };
@@ -0,0 +1,12 @@
// Metro module 8514 (f8515).
import { createContext, useContext } from "react";
const context = createContext({
obscured: false
});
export { context as ObscuredSurfaceContext };
export const OBSCURED_VALUE = {
obscured: true
};
export function useObscuredSurface() {
return useContext(context);
}
@@ -0,0 +1,9 @@
// Metro module 13779 (f13780).
import { AnalyticEvents } from "../../Constants";
import AnalyticsUtils from "../../utils/AnalyticsUtils";
export function trackSafetySettingsNoticeAnalytics(a0, a1) {
AnalyticsUtils.track(AnalyticEvents.SAFETY_SETTINGS_NOTICE_ACTION, {
notice_type: a0,
action: a1
});
}
@@ -0,0 +1,34 @@
// Metro module 6721 (f6722).
import { SafetyToastType } from "./Constants";
import { showSafetySuccess, presentFailedToast } from "../toast/native/ToastUtils";
import { getSafetyToastTypeContent } from "./SafetyToastsUtils";
const r15 = {
showIgnoreSuccessToast: (a0, a1) => {
showSafetySuccess(SafetyToastType.IGNORE_SUCCESS, getSafetyToastTypeContent(SafetyToastType.IGNORE_SUCCESS, a0, a1));
},
showUnignoreSuccessToast: (a0, a1) => {
showSafetySuccess(SafetyToastType.UNIGNORE_SUCCESS, getSafetyToastTypeContent(SafetyToastType.UNIGNORE_SUCCESS, a0, a1));
},
showBlockSuccessToast: (a0, a1) => {
showSafetySuccess(SafetyToastType.BLOCK_SUCCESS, getSafetyToastTypeContent(SafetyToastType.BLOCK_SUCCESS, a0, a1));
},
showUnblockSuccessToast: (a0, a1) => {
showSafetySuccess(SafetyToastType.UNBLOCK_SUCCESS, getSafetyToastTypeContent(SafetyToastType.UNBLOCK_SUCCESS, a0, a1));
},
showMuteSuccessToast: (a0, a1) => {
showSafetySuccess(SafetyToastType.MUTE_SUCCESS, getSafetyToastTypeContent(SafetyToastType.MUTE_SUCCESS, a0, a1));
},
showUnmuteSuccessToast: (a0, a1) => {
showSafetySuccess(SafetyToastType.UNMUTE_SUCCESS, getSafetyToastTypeContent(SafetyToastType.UNMUTE_SUCCESS, a0, a1));
},
showReportSuccessToast: (a0, a1) => {
showSafetySuccess(SafetyToastType.REPORT_SUCCESS, getSafetyToastTypeContent(SafetyToastType.REPORT_SUCCESS, a0, a1));
},
showSuccessToast: (a0) => {
showSafetySuccess(a0, getSafetyToastTypeContent(a0));
},
showFailedToast: (a0) => {
presentFailedToast(getSafetyToastTypeContent(a0 == null ? SafetyToastType.GENERIC_ERROR : a0));
}
};
export default r15;
@@ -0,0 +1,70 @@
// Metro module 6722 (f6723).
import ChannelStore from "../../stores/ChannelStore";
import UserStore from "../../stores/UserStore";
import { SafetyToastType } from "./Constants";
import NicknameUtils from "../../utils/NicknameUtils";
import UserUtils from "../../utils/UserUtils";
import { intl, t } from "../../intl/index.native";
import ReportToMod_messages from "../report_to_mod/ReportToMod.messages";
export function getSafetyToastTypeContent(a0, a1, a2) {
const user = UserStore.getUser(a1);
const channel = ChannelStore.getChannel(a2);
let username = NicknameUtils.getName(channel?.guild_id, channel?.id, user);
if (username == null) {
username = UserUtils.getGlobalName(user);
}
if (SafetyToastType.IGNORE_SUCCESS === a0) {
return intl.formatToPlainString(t["+joqrP"], {
username
});
}
if (SafetyToastType.UNIGNORE_SUCCESS === a0) {
return intl.formatToPlainString(t.THExKa, {
username
});
}
if (SafetyToastType.BLOCK_SUCCESS === a0) {
return intl.formatToPlainString(t.XXPrIs, {
username
});
}
if (SafetyToastType.UNBLOCK_SUCCESS === a0) {
return intl.formatToPlainString(t.uExcGX, {
username
});
}
if (SafetyToastType.MUTE_SUCCESS === a0) {
return intl.formatToPlainString(t.X4NtYb, {
username
});
}
if (SafetyToastType.UNMUTE_SUCCESS === a0) {
return intl.formatToPlainString(t.tRaBfY, {
username
});
}
if (SafetyToastType.REPORT_SUCCESS === a0) {
return intl.formatToPlainString(t.FOptFU, {
username
});
}
if (SafetyToastType.TIGGER_PAWTECT_ERROR === a0) {
return intl.string(t.c6kn6F);
}
if (SafetyToastType.TIGGER_PAWTECT_VERIFIED === a0) {
return intl.string(t["7nKAXx"]);
}
if (SafetyToastType.GENERIC_ERROR === a0) {
return intl.string(t.zBpoc7);
}
if (SafetyToastType.REPORT_TO_MOD_SUCCESS === a0) {
return intl.string(ReportToMod_messages.iBypeZ);
}
if (SafetyToastType.SAFETY_FEEDBACK_SUCCESS === a0) {
return intl.string(t.TcFR5k);
}
if (SafetyToastType.EXISTING_USER_AGE_GATE_SUCCESS === a0) {
return intl.string(t["susqq/"]);
}
return intl.string(t["+c5xtT"]);
}
@@ -0,0 +1,65 @@
// Metro module 8513 (f8514).
import { View } from "react-native";
import { createStyles } from "../../../design/components/Styles/native/createStyles";
import Module712 from "../../../_bundle/Module712";
import { ObscuredSurfaceContext, OBSCURED_VALUE } from "../ObscuredSurfaceContext";
import { ImageWarningIcon } from "../../../design/components/Icon/native/redesign/generated/ImageWarningIcon";
import { Text } from "../../../design/components/Text/native/Text";
import { intl, t } from "../../../intl/index.native";
const useStyles = createStyles({
container: {
position: "relative",
overflow: "hidden"
},
content: {
pointerEvents: "none",
userSelect: "none"
},
cover: {
position: "absolute",
inset: 0,
zIndex: 1,
backgroundColor: Module712.colors.SPOILER_HIDDEN_BACKGROUND
},
warning: {
position: "absolute",
insetInlineStart: "50%",
top: "50%",
transform: "translate(-50%, -50%)",
display: "flex",
flexDirection: "column",
alignItems: "center",
gap: Module712.space.PX_8,
paddingHorizontal: Module712.space.PX_12,
paddingVertical: Module712.space.PX_8,
textAlign: "center",
userSelect: "none",
zIndex: 2
}
});
export default function ObscuredSurface(props) {
const obscured = props.obscured;
let heading = props.heading;
let description = props.description;
const children = props.children;
const styles = useStyles();
let r21 = children;
if (obscured) {
const Provider = ObscuredSurfaceContext.Provider;
const r31 = [<View style={styles.content} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" accessible={false} aria-hidden>{children}</View>, <View style={styles.cover} />, ,];
const r46 = [<ImageWarningIcon size="lg" color={Module712.colors.TEXT_DEFAULT} />, , ,];
if (heading == null) {
heading = intl.string(t.xC8Saf);
}
r46[1] = <Text variant="heading-md/semibold" color="text-strong">{heading}</Text>;
if (description == null) {
description = intl.string(t["0fc/DG"]);
}
r46[2] = <Text variant="text-sm/normal" color="text-muted">{description}</Text>;
r31[2] = <View style={styles.warning}>{r46}</View>;
r21 = <Provider value={OBSCURED_VALUE}>
<View style={styles.container}>{r31}</View>
</Provider>;
}
return r21;
};
@@ -0,0 +1,53 @@
// Metro module 13778 (f13779).
import { useEffect, useCallback } from "react";
import { View } from "react-native";
import { SafetySettingsNoticeAction } from "../Constants";
import { createStyles } from "../../../design/components/Styles/native/createStyles";
import Module712 from "../../../_bundle/Module712";
import { trackSafetySettingsNoticeAnalytics } from "../SafetySettingsUtils";
import { CircleInformationIcon } from "../../../design/components/Icon/native/redesign/generated/CircleInformationIcon";
import { Text } from "../../../design/components/Text/native/Text";
import { intl } from "../../../intl/index.native";
const useStyles = createStyles({
blockedIgnoredRedirect: {
display: "flex",
flexDirection: "row",
alignItems: "center",
gap: Module712.space.PX_8,
padding: Module712.space.PX_8,
borderRadius: Module712.radii.xs,
borderColor: Module712.colors.TEXT_LINK,
borderWidth: 1,
backgroundColor: Module712.colors.BACKGROUND_FEEDBACK_INFO
}
});
export default function SafetySettingsNotice(props) {
let callback;
const { label, labelHook, noticeType, count } = props;
callback = void 0;
const styles = useStyles();
useEffect(() => {
trackSafetySettingsNoticeAnalytics(noticeType, SafetySettingsNoticeAction.VIEWED);
}, [noticeType]);
callback = useCallback(() => {
labelHook();
trackSafetySettingsNoticeAnalytics(noticeType, SafetySettingsNoticeAction.LEARN_MORE);
}, [noticeType, labelHook]);
return <View style={styles.blockedIgnoredRedirect}>
<CircleInformationIcon color="text-link" />
<Text style={{
flexShrink: 1
}} variant="heading-sm/medium">
{count != null ? intl.format(label, {
hook: (a0) => <Text role="link" variant="heading-sm/medium" color="text-link" onPress={callback}>
{a0}
</Text>,
count
}) : intl.format(label, {
hook: (a0) => <Text role="link" variant="heading-sm/medium" color="text-link" onPress={callback}>
{a0}
</Text>
})}
</Text>
</View>;
};
@@ -0,0 +1,34 @@
// Metro module 12290 (f12291).
import { ScrollView } from "react-native";
import { createStyles } from "../../../design/components/Styles/native/createStyles";
import Module712 from "../../../_bundle/Module712";
import { useUrlParts } from "../../masked_link/SharedStateUtils";
import { Text } from "../../../design/components/Text/native/Text";
const useStyles = createStyles({
linkCalloutContainer: {
maxHeight: 300,
backgroundColor: Module712.colors.BACKGROUND_SURFACE_HIGH,
width: "100%",
borderRadius: Module712.radii.md
},
linkCalloutContainerText: {
padding: Module712.space.PX_8,
paddingVertical: Module712.space.PX_12,
textAlign: "center"
}
});
export function URLCallout(props) {
const url = props.url;
const styles = useStyles();
const urlParts = useUrlParts(url);
return <ScrollView style={styles.linkCalloutContainer}>
<Text style={styles.linkCalloutContainerText} variant="text-md/normal">
<Text variant="text-md/normal" color="text-muted">
{urlParts.protocol}
//
</Text>
<Text variant="text-md/semibold" color="text-default">{urlParts.hostname}</Text>
<Text variant="text-md/normal" color="text-muted">{urlParts.theRestOfTheUrl}</Text>
</Text>
</ScrollView>;
}