decord/source/modules/media_uploads/getAttachmentUploadAbortAlert.tsx

42 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 12791
// Function ID: 12792
2026-07-20 16:05:17 +00:00
// Name: getAttachmentUploadAbortAlertContent
2026-08-24 06:08:38 +00:00
// Dependencies: [676, 1236, 4835, 2]
2026-07-20 16:05:17 +00:00
// Exports: getAttachmentUploadAbortAlertContent
2026-08-24 06:08:38 +00:00
// Module 12791 (getAttachmentUploadAbortAlertContent)
import set from "set" /* 2 */;
import ME from "ME" /* 676 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const AbortCodes = ME.AbortCodes;
const result = set.fileFinishedImporting("modules/media_uploads/getAttachmentUploadAbortAlert.tsx");
2026-07-20 16:05:17 +00:00
export const getAttachmentUploadAbortAlertContent = function getAttachmentUploadAbortAlertContent(code) {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
const stringResult = intl.string(getSystemLocale.t.B3vFdU);
2026-07-20 16:05:17 +00:00
if (AbortCodes.TOTAL_ATTACHMENT_SIZE_TOO_LARGE === code) {
2026-07-29 08:29:29 +00:00
let obj = { title: null, body: null };
obj[0] = stringResult;
const intl4 = tmp(1236).intl;
obj = { maxSizeMb: null };
2026-08-24 06:08:38 +00:00
obj[0] = tmp(4835).MAX_TOTAL_ATTACHMENT_SIZE_MB;
2026-07-29 08:29:29 +00:00
obj[1] = intl4.formatToPlainString(tmp(1236).t.DYFPg2, obj);
2026-07-20 16:05:17 +00:00
return obj;
2026-07-29 08:29:29 +00:00
} else if (tmp4.CLOUD_UPLOAD_NOT_FOUND === code) {
2026-08-24 06:08:38 +00:00
obj1 = { title: null, body: null };
2026-07-29 08:29:29 +00:00
obj1[0] = stringResult;
const intl3 = tmp(1236).intl;
obj1[1] = intl3.string(tmp(1236).t.bQldfH);
2026-07-20 16:05:17 +00:00
return obj1;
2026-07-29 08:29:29 +00:00
} else if (tmp4.INVALID_PERMISSIONS === code) {
obj = { title: null, body: null };
obj[0] = stringResult;
const intl2 = tmp(1236).intl;
obj[1] = intl2.string(tmp(1236).t.zl4Weq);
2026-07-20 16:05:17 +00:00
return obj;
} else {
return null;
}
};