decord/source/modules/launchpad/native/shared/ChannelSubtitle.tsx

80 lines
2.7 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 16336
// Function ID: 16337
2026-07-20 16:05:17 +00:00
// Name: ChannelSubtitle
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 9950, 21, 16325, 4376, 15583, 9948, 2]
2026-07-20 16:05:17 +00:00
// Exports: renderChannelSubtitle
2026-08-25 06:04:03 +00:00
// Module 16336 (ChannelSubtitle)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
2026-08-25 06:04:03 +00:00
import Text from "Text" /* 4376 */;
import getChannelSubtitleData from "getChannelSubtitleData" /* 15583 */;
import getLayoutStyleDefault from "getLayoutStyle" /* 16325 */;
import { SUBTITLE_OPACITY_NORMAL } from "hairlineWidth" /* 9950 */;
2026-08-24 06:08:38 +00:00
import { jsx } from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function ChannelSubtitle(arg0) {
({ muted, textProps } = arg0);
({ connected, channelId, guildId, subtitle } = arg0);
2026-08-24 06:08:38 +00:00
let obj = getChannelSubtitleData;
2026-07-20 16:05:17 +00:00
const channelSubtitleData = obj.getChannelSubtitleData(subtitle);
if (null == channelSubtitleData) {
return null;
} else {
obj = {};
const merged = Object.assign(textProps);
2026-07-29 08:29:29 +00:00
obj = { content: null, muted: null, channelId: null, guildId: null, disableAnimatedEmoji: null, color: null };
obj[0] = channelSubtitleData.subtitle;
let flag = muted;
if (muted == null) {
flag = false;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = flag;
obj[2] = channelId;
obj[3] = guildId;
obj[4] = !("voice" === channelSubtitleData.type && connected);
2026-07-20 16:05:17 +00:00
let str = "text-subtle";
if (muted) {
str = "text-muted";
}
2026-07-29 08:29:29 +00:00
obj[5] = str;
2026-08-25 06:04:03 +00:00
obj.children = tmp(9948).renderMessagePreviewMarkup(obj);
return jsx(tmp(4376).Text, { content: null, muted: null, channelId: null, guildId: null, disableAnimatedEmoji: null, color: null });
2026-07-20 16:05:17 +00:00
}
}
2026-08-24 06:08:38 +00:00
noopAll;
const result = require("set").fileFinishedImporting("modules/launchpad/native/shared/ChannelSubtitle.tsx");
2026-07-20 16:05:17 +00:00
export const renderChannelSubtitle = function renderChannelSubtitle(arg0) {
({ subtitle, muted } = arg0);
if (null == subtitle) {
return null;
} else {
2026-07-29 08:29:29 +00:00
let obj = { variant: null, color: "text-muted", lineClamp: 1, maxFontSizeMultiplier: 1.75, style: null };
2026-08-24 06:08:38 +00:00
obj[0] = getLayoutStyleDefault().messagePreview.text.variant;
2026-07-20 16:05:17 +00:00
let num = 1;
if (!muted) {
num = SUBTITLE_OPACITY_NORMAL;
}
2026-07-29 08:29:29 +00:00
obj = { opacity: null };
obj[0] = num;
obj[4] = obj;
2026-08-04 21:03:28 +00:00
if (typeof subtitle === "string") {
2026-07-29 08:29:29 +00:00
obj = {};
2026-07-20 16:05:17 +00:00
const merged = Object.assign(obj);
2026-07-29 08:29:29 +00:00
obj.children = subtitle;
2026-08-24 06:08:38 +00:00
let tmp9 = jsx(Text.Text, {});
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
obj1 = { channelId: null, guildId: null, subtitle: null, muted: null, connected: null, textProps: null };
2026-07-29 08:29:29 +00:00
obj1[0] = tmp;
obj1[1] = tmp2;
obj1[2] = subtitle;
obj1[3] = muted;
obj1[4] = tmp3;
obj1[5] = obj;
tmp9 = <ChannelSubtitle channelId={null} guildId={null} subtitle={null} muted={null} connected={null} textProps={null} />;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp9;
2026-07-20 16:05:17 +00:00
}
};