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

@@ -0,0 +1,90 @@
// Metro module 16171 (f16172).
import AuthenticationStore from "../../../stores/AuthenticationStore";
import { AnalyticEvents } from "../../../Constants";
import { FeedbackCategory, FeedbackType, StreamFeedbackOption } from "../../../modules/feedback/Constants";
import { useGetStreamApplication } from "../../../modules/go_live/utils/StreamerApplicationSelectors";
import { useStateFromStores } from "../../../_bundle/Module589";
import { intl, t } from "../../../intl/index.native";
import Feedback_messages from "../../../modules/feedback/intl/Feedback.messages";
import { getStreamFeedbackOptions, processOptOut } from "../../../modules/feedback/FeedbackUtils";
import FeedbackActionSheetV2 from "../../../modules/feedback/native/FeedbackActionSheetV2";
import AnalyticsUtils from "../../../utils/AnalyticsUtils";
import trackStreamProblem from "../../../modules/go_live/utils/trackStreamProblem";
import { shouldShowLogUploadForCategory } from "../../../modules/feedback/shouldShowLogUploadForCategory";
import ActionSheetActionCreators from "../../../modules/action_sheet/native/ActionSheetActionCreators";
import { presentFeedbackSent } from "../../../modules/toast/native/ToastUtils";
export default function StreamFeedbackActionSheet(props) {
const { stream, analyticsData } = props;
const getStreamApplication = useGetStreamApplication(stream);
const stateFromStores = useStateFromStores([AuthenticationStore], () => AuthenticationStore.getId() === stream.ownerId);
const headerLabel = intl.string(t["5smP3R"]);
const r10 = intl.string(t["0uxA2V"]);
let ratingBody = intl.string(t.CqjnLN);
const r52 = {
value: stateFromStores ? FeedbackCategory.STREAMING : FeedbackCategory.STREAM_WATCHING,
label: intl.string(stateFromStores ? Feedback_messages["0ZBLiZ"] : Feedback_messages.TVTIT1),
problemsHeader: intl.string(t["6Y1t5P"]),
problemOptions: getStreamFeedbackOptions({
isStreamer: stateFromStores
}),
freeformConfig: {
value: StreamFeedbackOption.FREEFORM,
label: intl.string(t.emlT91)
}
};
if (stateFromStores) {
ratingBody = r10;
}
return <FeedbackActionSheetV2 headerLabel={headerLabel} showHeaderCloseButton ratingBody={ratingBody} categoriesHeader={intl.string(Feedback_messages.tq8598)} optionsTree={[r52]} trackOpen={function trackOpen() {
AnalyticsUtils.track(AnalyticEvents.OPEN_POPOUT, {
type: "Stream Feedback Sheet",
other_user_id: stream.ownerId,
application_id: getStreamApplication != null ? getStreamApplication.id : null,
application_name: getStreamApplication != null ? getStreamApplication.name : null,
game_id: getStreamApplication != null ? getStreamApplication.id : null
});
}} trackReport={function trackReport(a0) {
const { dontShowAgain, rating, category, reason } = a0;
let feedback = a0.feedback;
if (dontShowAgain) {
processOptOut({
feedbackType: FeedbackType.STREAM,
location: "StreamFeedbackActionSheet"
});
}
L17: {
if (rating != null) {
let problem = reason?.value;
if (problem == null) {
problem = null;
}
let variant = reason?.variant;
if (variant == null) {
variant = null;
}
if (feedback == null) {
feedback = "";
}
trackStreamProblem({
category,
problem,
variant,
stream,
feedback,
streamApplication: getStreamApplication,
analyticsData,
location: "Stream End",
rating
});
if (reason != null && shouldShowLogUploadForCategory(rating, category, reason)) {
ActionSheetActionCreators.openLazy(import("../../../modules/feedback/native/UploadLogsActionSheet"), "UploadLogs", {
mediaSessionId: analyticsData.media_session_id,
rtcConnectionId: analyticsData.rtc_connection_id
});
break L17;
}
presentFeedbackSent();
}
}
}} />;
};
@@ -0,0 +1,28 @@
// Metro module 16695 (f16696).
import { Image as Image2 } from "react-native";
import { getErrorInfo, AVError } from "../../../modules/errors/av_errors/AVError";
import { intl, t } from "../../../intl/index.native";
import Alert from "../../common/Alert";
import { Text } from "../../../design/components/Text/native/Text";
import Module16696 from "../../../_bundle/Module16696";
let c12029_6 = {
image: {
alignSelf: "center",
marginTop: 32
},
body: {
marginTop: 16
}
};
export default function StreamFullAlert(props) {
const r13 = intl.formatToPlainString(t.ejOT95, {
errorCode: getErrorInfo(AVError.STREAM_FULL)?.errorCode
});
return <Alert {...props} title={intl.string(t.GzjdO5)}>
<Text variant="text-md/normal" style={c12029_6.body}>
{intl.string(t.VVZDBL)}
</Text>
<Text variant="text-md/normal" selectable color="text-muted" style={c12029_6.body}>{r13}</Text>
<Image2 source={Module16696} style={c12029_6.image} />
</Alert>;
};
@@ -0,0 +1,60 @@
// Metro module 16036 (f16037).
import PresenceStore from "../../../stores/PresenceStore";
import { AnalyticEvents } from "../../../Constants";
import { createStyles } from "../../../design/components/Styles/native/createStyles";
import Module712 from "../../../_bundle/Module712";
import useMountEffect from "../../../hooks/useMountEffect";
import { getStreamerApplication } from "../../../modules/go_live/utils/StreamerApplicationSelectors";
import AnalyticsUtils from "../../../utils/AnalyticsUtils";
import trackStreamProblem from "../../../modules/go_live/utils/trackStreamProblem";
import ActionSheetActionCreators from "../../../modules/action_sheet/native/ActionSheetActionCreators";
import { presentFeedbackSent } from "../../../modules/toast/native/ToastUtils";
import getStreamIssueReportOptions from "../../../modules/go_live/utils/getStreamIssueReportOptions";
import { ActionSheetRow } from "../../../design/components/Sheet/native/ActionSheetRow.native";
import { ActionSheet } from "../../../design/components/Sheet/native/ActionSheet.native";
import { BottomSheetTitleHeader } from "../../../design/components/Sheet/native/BottomSheetTitleHeader.native";
import { intl, t } from "../../../intl/index.native";
import { BottomSheetScrollView } from "../../../_bundle/Module5245";
const useStyles = createStyles({
container: {
padding: 16,
backgroundColor: Module712.colors.BACKGROUND_SURFACE_HIGH
}
});
export default function ReportProblem(props) {
const { stream, analyticsData } = props;
const styles = useStyles();
useMountEffect(() => {
const streamerApplication = getStreamerApplication(stream, PresenceStore);
AnalyticsUtils.track(AnalyticEvents.OPEN_POPOUT, {
type: "Stream Issue Sheet",
other_user_id: stream.ownerId,
application_id: streamerApplication != null ? streamerApplication.id : null,
application_name: streamerApplication != null ? streamerApplication.name : null,
game_id: streamerApplication != null ? streamerApplication.id : null
});
});
const r8 = getStreamIssueReportOptions({
isStreamer: false,
isEndStream: false
}).map((item, index) => {
const value = item.value;
return <ActionSheetRow key={index} label={item.label} arrow onPress={() => {
trackStreamProblem({
problem: value,
stream,
feedback: "",
streamApplication: getStreamerApplication(stream, PresenceStore),
analyticsData,
location: "Stream"
});
ActionSheetActionCreators.hideActionSheet();
presentFeedbackSent();
}} />;
});
return <ActionSheet scrollable header={<BottomSheetTitleHeader title={intl.string(t.XuqqwI)} />}>
<BottomSheetScrollView style={styles.container}>
<ActionSheetRow.Group hasIcons={false}>{r8}</ActionSheetRow.Group>
</BottomSheetScrollView>
</ActionSheet>;
};
@@ -0,0 +1,85 @@
// Metro module 10547 (f10548).
import { View } from "react-native";
import ChannelStore from "../../../stores/ChannelStore";
import { Fonts } from "../../../Constants";
import { createStyles } from "../../../design/components/Styles/native/createStyles";
import Module712 from "../../../_bundle/Module712";
import { StreamEnded } from "../../../design/components/Illustration/native/redesign/generated/StreamEnded";
import { LegacyText } from "../../../design/void/native";
import { intl, t } from "../../../intl/index.native";
import { StreamFailed } from "../../../design/components/Illustration/native/redesign/generated/StreamFailed";
import { getErrorInfo, AVError } from "../../../modules/errors/av_errors/AVError";
import { useStateFromStores } from "../../../_bundle/Module589";
import useMountEffect from "../../../hooks/useMountEffect";
import { stopStream } from "../../../actions/StreamActionCreators";
import { encodeStreamKey } from "../../../modules/go_live/utils/StreamKeyUtils";
import { Text } from "../../../design/components/Text/native/Text";
import { BaseTextButton } from "../../../design/components/Button/native/BaseTextButton.native";
let c7088_8 = {
NONE: "NONE",
STREAM_ENDED: "STREAM_ENDED",
STREAM_FAILED: "STREAM_FAILED"
};
const useStyles = createStyles({
container: {
alignItems: "center",
justifyContent: "center",
backgroundColor: Module712.unsafe_rawColors.PRIMARY_700,
padding: 8
},
placeholderImage: {
marginBottom: 8,
width: "100%",
resizeMode: "contain"
},
placeholderText: {
color: Module712.unsafe_rawColors.WHITE,
fontFamily: Fonts.PRIMARY_SEMIBOLD,
fontSize: 16,
lineHeight: 20,
textAlign: "center"
},
buttonWrapper: {
marginTop: 16,
alignSelf: "center"
},
buttonPill: {
borderRadius: Module712.radii.round
}
});
export default function VideoEmptyState(props) {
const { type, style, avError, removeSplashImage, removeCloseButton, stream, ...props2 } = props;
const styles = useStyles();
const r31 = c7088_8.STREAM_ENDED === type ? <>
{removeSplashImage ? !removeSplashImage : <StreamEnded style={styles.placeholderImage} />}
<LegacyText style={styles.placeholderText}>
{intl.formatToMarkdownString(t["1Ww0Hi"], {})}
</LegacyText>
</> : c7088_8.STREAM_FAILED === type ? <>
{removeSplashImage ? !removeSplashImage : <StreamFailed style={styles.placeholderImage} />}
<LegacyText style={styles.placeholderText}>
{intl.string(t.rSlOep)}
</LegacyText>
</> : c7088_8.NONE === type ? null : void 0;
const errorCode = avError != null ? getErrorInfo(avError).errorCode : type === c7088_8.STREAM_FAILED ? getErrorInfo(AVError.STREAM_FAILED_TO_START).errorCode : null;
const stateFromStores = useStateFromStores([ChannelStore], () => ChannelStore.getChannel(stream.channelId), [stream.channelId]);
useMountEffect(() => {
if (stateFromStores == null ? void 0 : stateFromStores.isGuildStageVoice()) {
stopStream(encodeStreamKey(stream));
}
});
return <View {...props2} style={[styles.container, style]}>
{r31}
{errorCode != null && <Text variant="text-sm/semibold" color="text-muted" selectable>
{intl.formatToPlainString(t.ejOT95, {
errorCode
})}
</Text>}
{removeCloseButton ? !removeCloseButton : <View style={styles.buttonWrapper}>
<BaseTextButton pillStyle={styles.buttonPill} variant="secondary" text={intl.string(t["4EGMWL"])} onPress={() => {
stopStream(encodeStreamKey(stream));
}} />
</View>}
</View>;
};
export { c7088_8 as VideoEmptyTypes };