重新构建dev产物(本轮7个并行agent全部完成后的统一构建)

This commit is contained in:
Your Name
2026-09-06 16:44:01 +08:00
parent 3790472b4c
commit e4b0868036
4 changed files with 214 additions and 30 deletions
+196 -27
View File
@@ -6887,6 +6887,9 @@ function AuthOnboardingView({
onError
}) {
const tenantName = sessionStorage.getItem('im-tenant-name') || '';
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
if (onError) onError();
}, [view]);
switch (view) {
case 'tenant':
return (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxDEV)(TenantEntry, {
@@ -8179,6 +8182,14 @@ function Verification({
(0,_lib_use_cached_data_js__WEBPACK_IMPORTED_MODULE_5__.writeCachedData)('profile-seed:' + uid, data);
setProfile(data);
}).catch(() => {});
(0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_4__.getConversationContext)(uid).then(ctx => {
if (ctx && ctx.relationship) {
setProfile(current => current ? {
...current,
relationship: ctx.relationship
} : current);
}
}).catch(() => {});
}, [uid]);
const alreadyPending = profile && (profile.relationship === 'pending_outbound' || profile.relationship === 'pending_inbound');
const alreadyFriend = profile && profile.relationship === 'friend';
@@ -8187,9 +8198,14 @@ function Verification({
(0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_4__.createFriendRequest)(uid, message.trim(), 'search').then(() => {
onToast('好友申请已发送');
setSent(true);
const priorSeed = (0,_lib_use_cached_data_js__WEBPACK_IMPORTED_MODULE_5__.readCachedData)('profile-seed:' + uid) || {};
(0,_lib_use_cached_data_js__WEBPACK_IMPORTED_MODULE_5__.writeCachedData)('profile-seed:' + uid, {
...((0,_lib_use_cached_data_js__WEBPACK_IMPORTED_MODULE_5__.readCachedData)('profile-seed:' + uid) || {}),
relationship: 'pending_outbound'
...priorSeed,
relationship: 'pending_outbound',
capabilities: {
...priorSeed.capabilities,
can_add_friend: false
}
});
window.setTimeout(() => navigate('group-member-profile', uid), 800);
}).catch(err => onToast(err.message || '发送失败')).finally(() => setSending(false));
@@ -8244,6 +8260,7 @@ function Profile({
uid,
friend,
onTopicSelected,
onCreateTopic,
onToast
}) {
const [profile, setProfile] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(() => uid ? (0,_lib_use_cached_data_js__WEBPACK_IMPORTED_MODULE_5__.readCachedData)('profile-seed:' + uid) : null);
@@ -8266,7 +8283,8 @@ function Profile({
if (ctx && ctx.relationship) {
setProfile(current => current ? {
...current,
relationship: ctx.relationship
relationship: ctx.relationship,
capabilities: ctx.capabilities || current.capabilities
} : current);
}
}).catch(() => {});
@@ -8298,7 +8316,7 @@ function Profile({
const canAdd = profile.capabilities && profile.capabilities.can_add_friend;
const isFriend = profile.relationship === 'friend';
const cannotAddReason = profile.relationship === 'blocked_by_peer' ? '对方已将你拉黑,无法添加为好友' : profile.relationship === 'blocked_by_me' ? '你已拉黑对方,需先取消拉黑才能添加为好友' : profile.relationship === 'pending_inbound' ? '对方已向你发送好友申请,请前往"新朋友"处理' : '好友申请正在等待验证';
const openChat = () => onTopicSelected(uid);
const openChat = () => (onCreateTopic || onTopicSelected)(uid);
return (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("div", {
className: "people-page",
children: [(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)(Header, {
@@ -8710,6 +8728,7 @@ function ContactManagementView({
myUserId,
tinode,
onTopicSelected,
onCreateTopic,
onOpenScanner
}) {
const [toast, setToast] = react__WEBPACK_IMPORTED_MODULE_0___default().useState('');
@@ -8736,6 +8755,7 @@ function ContactManagementView({
uid: uid,
friend: view === 'friend-profile',
onTopicSelected: onTopicSelected,
onCreateTopic: onCreateTopic,
onToast: setToast
}, void 0, false);else if (view === 'friend-settings' || view === 'friend-settings-blocked') content = (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)(Settings, {
uid: uid,
@@ -9347,6 +9367,7 @@ function Favorites({
const [items, setItems] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(() => (0,_lib_use_cached_data_js__WEBPACK_IMPORTED_MODULE_6__.readCachedData)('favorites:' + type) || null);
const [cursor, setCursor] = react__WEBPACK_IMPORTED_MODULE_0___default().useState('');
const [hasMore, setHasMore] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(false);
const [loadError, setLoadError] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(false);
const [fileUrls, setFileUrls] = react__WEBPACK_IMPORTED_MODULE_0___default().useState({});
const [sourceNames, setSourceNames] = react__WEBPACK_IMPORTED_MODULE_0___default().useState({});
const requestIdRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(0);
@@ -9358,6 +9379,7 @@ function Favorites({
cursor: append ? cursor : ''
}).then(data => {
if (requestIdRef.current !== requestId) return;
setLoadError(false);
setItems(prev => {
const list = append ? (prev || []).concat(data.items || []) : data.items || [];
if (!query) (0,_lib_use_cached_data_js__WEBPACK_IMPORTED_MODULE_6__.writeCachedData)('favorites:' + type, list);
@@ -9365,9 +9387,14 @@ function Favorites({
});
setCursor(data.next_cursor || '');
setHasMore(!!data.next_cursor);
}).catch(err => onToast(err.message || '加载失败'));
}).catch(err => {
if (requestIdRef.current !== requestId) return;
onToast(err.message || '加载失败');
if (!append) setLoadError(true);
});
}, [type, query, cursor]);
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
setLoadError(false);
setItems(!query && (0,_lib_use_cached_data_js__WEBPACK_IMPORTED_MODULE_6__.readCachedData)('favorites:' + type) || null);
load(false);
}, [type, query]);
@@ -9458,7 +9485,7 @@ function Favorites({
className: "library-favorite-list",
children: items === null ? (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)("p", {
className: "library-empty-hint",
children: "加载中…"
children: loadError ? '加载失败,请重试' : '加载中…'
}, void 0, false) : list.length ? (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment, {
children: [list.map(item => (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)(FavoriteItem, {
item: {
@@ -9857,6 +9884,7 @@ function History({
const [items, setItems] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(() => cacheKey && (0,_lib_use_cached_data_js__WEBPACK_IMPORTED_MODULE_6__.readCachedData)(cacheKey) || null);
const [cursor, setCursor] = react__WEBPACK_IMPORTED_MODULE_0___default().useState('');
const [hasMore, setHasMore] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(false);
const [loadError, setLoadError] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(false);
const [mediaUrls, setMediaUrls] = react__WEBPACK_IMPORTED_MODULE_0___default().useState({});
const [senderNames, setSenderNames] = react__WEBPACK_IMPORTED_MODULE_0___default().useState({});
const requestIdRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(0);
@@ -9871,6 +9899,7 @@ function History({
}) : (0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_5__.getTopicMedia)(topic, type, append ? cursor : '');
call.then(data => {
if (requestIdRef.current !== requestId) return;
setLoadError(false);
setItems(prev => {
const list = append ? (prev || []).concat(data.items || []) : data.items || [];
if (!query && cacheKey) (0,_lib_use_cached_data_js__WEBPACK_IMPORTED_MODULE_6__.writeCachedData)(cacheKey, list);
@@ -9878,9 +9907,14 @@ function History({
});
setCursor(data.next_cursor || '');
setHasMore(!!data.next_cursor);
}).catch(err => onToast(err.message || '加载失败'));
}).catch(err => {
if (requestIdRef.current !== requestId) return;
onToast(err.message || '加载失败');
if (!append) setLoadError(true);
});
}, [topic, view, query, cursor]);
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
setLoadError(false);
setItems(!query && cacheKey && (0,_lib_use_cached_data_js__WEBPACK_IMPORTED_MODULE_6__.readCachedData)(cacheKey) || null);
load(false);
}, [topic, view, query]);
@@ -9940,7 +9974,7 @@ function History({
className: "library-history-content",
children: [items === null ? (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)("p", {
className: "library-empty-hint",
children: "加载中…"
children: loadError ? '加载失败,请重试' : '加载中…'
}, void 0, false) : !list.length ? (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)("div", {
className: "library-empty",
children: [(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)(Icon, {
@@ -10824,7 +10858,7 @@ const navigateToProfile = (topic, userId, member) => {
}).catch(() => {});
}
};
const GROUP_MANAGEMENT_VIEWS = ['group-list', 'group-empty', 'group-invite', 'group-events', 'group-join-requests', 'group-new-request', 'group-announcement', 'group-summary', 'group-announcement-detail', 'group-settings', 'group-profile', 'group-avatar', 'group-nickname', 'group-description', 'group-my-nickname', 'group-members', 'group-role-message', 'group-qr', 'group-governance', 'group-admins', 'group-admin-add', 'group-admin-success', 'group-admin-partial', 'group-admin-removed', 'group-mute-add', 'group-muted', 'group-owner-select', 'group-owner-confirm', 'group-files', 'group-file-upload'];
const GROUP_MANAGEMENT_VIEWS = ['group-list', 'group-empty', 'group-invite', 'group-events', 'group-join-requests', 'group-new-request', 'group-announcement', 'group-summary', 'group-announcement-detail', 'group-settings', 'group-profile', 'group-avatar', 'group-nickname', 'group-description', 'group-my-nickname', 'group-members', 'group-role-message', 'group-qr', 'group-governance', 'group-admins', 'group-admin-add', 'group-admin-success', 'group-admin-partial', 'group-admin-removed', 'group-mute-add', 'group-muted', 'group-owner-select', 'group-owner-confirm', 'group-files', 'group-file-upload', 'group-invite-friends'];
function alphaInitial(name) {
const ch = (name || '').trim()[0] || '#';
if (/[A-Za-z]/.test(ch)) {
@@ -11656,7 +11690,7 @@ function GroupSettings({
}, void 0, false)]
}, item.user_id, true)), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("button", {
type: "button",
onClick: () => onToast('请通过转发/分享群二维码邀请成员'),
onClick: () => navigate('group-invite-friends', topic),
children: [(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("span", {
className: "group-member-tile-action",
children: (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)(Icon, {
@@ -12015,6 +12049,7 @@ function Governance({
}) {
const [gov, setGov] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(() => topic && (0,_lib_use_cached_data_js__WEBPACK_IMPORTED_MODULE_5__.readCachedData)('group-governance:' + topic) || null);
const [dissolving, setDissolving] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(false);
const [confirmingDissolve, setConfirmingDissolve] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(false);
const [loadError, setLoadError] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(false);
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
if (!topic) return;
@@ -12036,16 +12071,24 @@ function Governance({
setGov(data);
}).catch(err => onToast(err.message || '设置失败'));
};
const dissolve = () => {
const requestDissolve = () => {
if (myRole !== 'owner') return;
if (!window.confirm('解散后群聊将无法恢复,确定要解散该群聊吗?')) return;
setConfirmingDissolve(true);
};
const dissolve = () => {
const t = tinode ? tinode.getTopic(topic) : null;
if (!t) return;
if (!t) {
setConfirmingDissolve(false);
return;
}
setDissolving(true);
t.delTopic(true).then(() => {
onToast('群聊已解散');
navigate('group-list');
}).catch(err => onToast(err.message || '解散失败')).finally(() => setDissolving(false));
}).catch(err => {
onToast(err.message || '解散失败');
setConfirmingDissolve(false);
}).finally(() => setDissolving(false));
};
if (!gov) return (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("div", {
className: "group-page",
@@ -12131,10 +12174,31 @@ function Governance({
type: "button",
className: "group-danger",
disabled: dissolving || myRole !== 'owner',
onClick: dissolve,
onClick: requestDissolve,
children: "解散群组"
}, void 0, false)]
}, void 0, true)]
}, void 0, true), confirmingDissolve ? (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("div", {
className: "group-sheet-backdrop",
children: (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("section", {
className: "group-confirm-sheet",
children: [(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("h2", {
children: "解散群组"
}, void 0, false), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("p", {
children: "解散后群聊将无法恢复,确定要解散该群聊吗?"
}, void 0, false), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("button", {
type: "button",
className: "danger",
disabled: dissolving,
onClick: dissolve,
children: dissolving ? '处理中…' : '确定'
}, void 0, false), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("button", {
type: "button",
disabled: dissolving,
onClick: () => setConfirmingDissolve(false),
children: "取消"
}, void 0, false)]
}, void 0, true)
}, void 0, false) : null]
}, void 0, true);
}
function deriveOwnerAndAdmins(items) {
@@ -12400,6 +12464,95 @@ function MemberPicker({
}, void 0, false)]
}, void 0, true);
}
function InviteFriends({
topic,
onToast
}) {
const [friends, setFriends] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(null);
const [memberIds, setMemberIds] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(null);
const [selected, setSelected] = react__WEBPACK_IMPORTED_MODULE_0___default().useState([]);
const [query, setQuery] = react__WEBPACK_IMPORTED_MODULE_0___default().useState('');
const [toast, setToast] = react__WEBPACK_IMPORTED_MODULE_0___default().useState('');
const [busy, setBusy] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(false);
const [loadError, setLoadError] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(false);
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
if (!topic) return;
(0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_4__.fetchAllPages)(cursor => (0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_4__.getFriends)('', cursor)).then(setFriends).catch(() => {
onToast('加载失败');
setLoadError(true);
});
(0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_4__.fetchAllPages)(cursor => (0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_4__.getGroupMembers)(topic, {
cursor
})).then(items => setMemberIds(new Set(items.map(m => m.user_id)))).catch(() => setMemberIds(new Set()));
}, [topic]);
const eligible = (friends || []).filter(f => !memberIds || !memberIds.has(f.user_id));
const visible = eligible.filter(m => (m.remark || m.display_name || '').toLowerCase().includes(query.toLowerCase()));
const groups = groupBy(visible, m => alphaInitial(m.remark || m.display_name));
const toggle = id => setSelected(v => v.includes(id) ? v.filter(x => x != id) : v.concat(id));
const done = () => {
if (!selected.length || busy) return;
setBusy(true);
(0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_4__.inviteGroupMembers)(topic, selected).then(result => {
const items = result && result.items || [];
const already = items.filter(it => it.status === 'already_member').length;
const sent = items.filter(it => it.status === 'pending').length;
const failed = Math.max(selected.length - sent - already, 0);
const parts = [];
if (sent) parts.push(`已发送 ${sent} 条邀请`);
if (already) parts.push(`${already} 人已在群内`);
if (failed) parts.push(`${failed} 人邀请失败`);
setToast(parts.join(',') || '邀请已发送');
window.setTimeout(() => navigate('group-settings', topic), 1500);
}).catch(err => onToast(err.message || '邀请失败')).finally(() => setBusy(false));
};
return (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("div", {
className: "group-page",
children: [(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)(Header, {
title: "邀请好友",
back: "group-settings",
backTopic: topic,
right: `完成${selected.length ? `(${selected.length})` : ''}`,
onRight: selected.length ? done : undefined
}, void 0, false), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)(Search, {
value: query,
onChange: setQuery,
placeholder: "搜索好友"
}, void 0, false), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("main", {
className: "group-member-picker",
children: friends === null || memberIds === null ? (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("p", {
className: "group-inline-empty",
children: loadError ? '好友列表加载失败' : '加载中…'
}, void 0, false) : groups.length === 0 ? (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("p", {
className: "group-inline-empty",
children: friends.length ? '好友都已在群里了' : '暂无可邀请的好友'
}, void 0, false) : groups.map(([letter, list]) => (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), {
children: [(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("div", {
className: "group-section-title",
children: letter
}, void 0, false), list.map(item => (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("button", {
type: "button",
onClick: () => toggle(item.user_id),
children: [(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)(Avatar, {
item: item,
icon: "person"
}, void 0, false), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("span", {
children: (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("strong", {
children: item.remark || item.display_name
}, void 0, false)
}, void 0, false), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("i", {
className: 'group-check' + (selected.includes(item.user_id) ? ' checked' : ''),
children: selected.includes(item.user_id) ? (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)(Icon, {
children: "check"
}, void 0, false) : null
}, void 0, false)]
}, item.user_id, true))]
}, letter, true))
}, void 0, false), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)(CenterToast, {
message: toast,
onDone: () => setToast('')
}, void 0, false)]
}, void 0, true);
}
function Muted({
topic,
onToast
@@ -12923,12 +13076,16 @@ function MyNicknameEditor({
onToast
}) {
const [value, setValue] = react__WEBPACK_IMPORTED_MODULE_0___default().useState('');
const [version, setVersion] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(0);
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
if (!topic) return;
(0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_4__.getMyGroupProfile)(topic).then(data => setValue(data.nickname || '')).catch(() => {});
(0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_4__.getMyGroupProfile)(topic).then(data => {
setValue(data.nickname || '');
setVersion(data.version || 0);
}).catch(() => {});
}, [topic]);
const save = () => {
(0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_4__.updateMyGroupProfile)(topic, value.trim(), 0).then(() => {
(0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_4__.updateMyGroupProfile)(topic, value.trim(), version).then(() => {
onToast('保存成功');
window.setTimeout(() => navigate('group-settings', topic), 600);
}).catch(err => onToast(err.message || '保存失败'));
@@ -13040,6 +13197,9 @@ function GroupManagementView({
type: "mute-add",
topic: topic,
onToast: setToast
}, void 0, false);else if (view === 'group-invite-friends') content = (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)(InviteFriends, {
topic: topic,
onToast: setToast
}, void 0, false);else if (view === 'group-muted') content = (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)(Muted, {
topic: topic,
onToast: setToast
@@ -13335,6 +13495,9 @@ function draftyPreview(content) {
}[content.ent[0].tp];
if (label) return label;
}
if (typeof content.text === 'string' && content.text) return content.text;
if (typeof content.comment === 'string' && content.comment) return content.comment;
if (typeof content.title === 'string' && content.title) return '[聊天记录] ' + content.title;
return content.txt || '[消息]';
}
function formatConversationTime(ts) {
@@ -13794,6 +13957,8 @@ const NOTIFICATION_TEXT = {
'group.owner.transferred': '群主已转让',
'group.role.updated': '群成员角色有变更',
'group.settings.updated': '群设置有更新',
'group.join_request.accepted': '你的入群申请已通过',
'group.join_request.rejected': '你的入群申请被拒绝',
accepted: '对方已通过你的好友申请',
rejected: '对方拒绝了你的好友申请',
continue: '你确认继续了一次安全风险提示',
@@ -15819,19 +15984,22 @@ function CacheClear({
const confirm = async () => {
setBusy(true);
try {
const hasStorageEstimate = typeof navigator !== 'undefined' && navigator.storage && navigator.storage.estimate;
const hasCaches = typeof caches !== 'undefined';
const before = hasStorageEstimate ? (await navigator.storage.estimate().catch(() => ({
usage: 0
}))).usage || 0 : 0;
let freedBytes = 0;
if (hasCaches) {
const keys = await caches.keys();
for (const key of keys) {
const cache = await caches.open(key);
const requests = await cache.keys();
for (const request of requests) {
const response = await cache.match(request);
if (!response) continue;
freedBytes += (await response.clone().blob().catch(() => null))?.size || 0;
}
}
await Promise.all(keys.map(k => caches.delete(k)));
}
const after = hasStorageEstimate ? (await navigator.storage.estimate().catch(() => ({
usage: 0
}))).usage || 0 : 0;
setFreed(Math.max(0, before - after));
setFreed(freedBytes);
setDone(true);
} catch (err) {
onToast(err.message || '清理失败,请重试');
@@ -17560,6 +17728,7 @@ class SidepanelView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCo
myUserId: this.props.myUserId,
tinode: this.props.tinode,
onTopicSelected: this.props.onTopicSelected,
onCreateTopic: this.props.onCreateTopic,
onOpenScanner: this.props.onOpenScanner
}, view, false)
}, void 0, false);
@@ -17963,7 +18132,7 @@ const messages = (0,react_intl__WEBPACK_IMPORTED_MODULE_1__.defineMessages)({
description: 'Placeholder for the country selector'
}
});
const SIDE_PANEL_VIEWS = ['acc_general', 'archive', 'blocked', 'contacts', 'cred', 'crop', 'edit', 'general', 'newtpk', 'notif', 'register', 'reset', 'security', 'settings', 'support', 'wallpapers', 'tenant', 'login', 'enterprise-register', 'enterprise-feedback', 'identity-check', 'realname', 'realname-verified', 'realname-reminder', 'independent-password', 'messages-home', 'messages-offline', 'messages-menu', 'message-actions', 'system-messages', 'chat-inbound-request', 'chat-inbound-message', 'chat-outbound-request', 'chat-status', 'chat-friend', 'chat-media', 'chat-blocked', 'chat-deleted', 'chat-standard', 'chat-attachments', 'chat-mixed', 'chat-contact-card', 'compose-keyboard', 'mentions-select', 'mentions-complete', 'mentions-message', 'emoji-panel', 'emoji-message', 'voice-ready', 'voice-hold', 'voice-recording', 'media-uploading', 'media-gallery', 'media-retry', 'upload-file', 'file-message', 'message-multiselect', 'favorite-success', 'forward-select', 'forward-multiple', 'forward-individual', 'forward-bundle', 'address-book', 'friend-requests', 'add-friend', 'my-friend-qr', 'friend-qr', 'friend-search-result', 'friend-verification', 'friend-profile', 'group-member-profile', 'friend-settings', 'friend-settings-blocked', 'friend-delete-confirm', 'block-list', 'block-confirm', 'clear-chat-confirm', 'group-list', 'group-empty', 'group-invite', 'group-events', 'group-join-requests', 'group-new-request', 'group-announcement', 'group-summary', 'group-announcement-detail', 'group-settings', 'group-profile', 'group-avatar', 'group-nickname', 'group-description', 'group-my-nickname', 'group-members', 'group-role-message', 'group-qr', 'group-governance', 'group-admins', 'group-admin-add', 'group-admin-success', 'group-admin-partial', 'group-admin-removed', 'group-mute-add', 'group-muted', 'group-owner-select', 'group-owner-confirm', 'group-files', 'group-file-upload', 'favorites', 'favorites-mixed', 'favorites-files', 'favorites-text', 'favorites-voice', 'favorites-links', 'favorites-image', 'favorites-video', 'favorites-select', 'favorite-share', 'file-download', 'file-downloading', 'file-downloaded', 'history-search', 'history-files', 'history-links', 'history-images', 'history-videos', 'call-history', 'call-incoming', 'audio-call-ringing', 'audio-call-active', 'audio-call-muted', 'audio-call-speaker', 'video-call-ringing', 'video-call-camera-off', 'video-call-active', 'video-call-peer-camera-off', 'call-minimized', 'workbench', 'organization-directory', 'meeting-organizer', 'meeting-attendee', 'meeting-create', 'meeting-detail', 'daily-report-editor', 'daily-report-mine', 'daily-report-team', 'daily-report-detail', 'monthly-report-editor', 'monthly-report-mine', 'monthly-report-team', 'monthly-report-detail', 'executive-mailbox', 'executive-mailbox-notice', 'personal-center', 'personal-profile', 'profile-nickname', 'profile-birth-date', 'profile-signature', 'profile-gender', 'profile-region', 'personal-qrcode', 'android-settings', 'change-password', 'app-version', 'privacy-settings', 'friend-discovery-settings', 'youth-mode-off', 'youth-mode-on', 'youth-mode-verify', 'notification-permission', 'permission-settings-reminder', 'camera-permission-info', 'microphone-permission-info', 'fraud-risk-warning', 'fraud-risk-confirmation', 'abuse-report-reasons', 'abuse-report-details', 'user-feedback', ''];
const SIDE_PANEL_VIEWS = ['acc_general', 'archive', 'blocked', 'contacts', 'cred', 'crop', 'edit', 'general', 'newtpk', 'notif', 'register', 'reset', 'security', 'settings', 'support', 'wallpapers', 'tenant', 'login', 'enterprise-register', 'enterprise-feedback', 'identity-check', 'realname', 'realname-verified', 'realname-reminder', 'independent-password', 'messages-home', 'messages-offline', 'messages-menu', 'message-actions', 'system-messages', 'chat-inbound-request', 'chat-inbound-message', 'chat-outbound-request', 'chat-status', 'chat-friend', 'chat-media', 'chat-blocked', 'chat-deleted', 'chat-standard', 'chat-attachments', 'chat-mixed', 'chat-contact-card', 'compose-keyboard', 'mentions-select', 'mentions-complete', 'mentions-message', 'emoji-panel', 'emoji-message', 'voice-ready', 'voice-hold', 'voice-recording', 'media-uploading', 'media-gallery', 'media-retry', 'upload-file', 'file-message', 'message-multiselect', 'favorite-success', 'forward-select', 'forward-multiple', 'forward-individual', 'forward-bundle', 'address-book', 'friend-requests', 'add-friend', 'my-friend-qr', 'friend-qr', 'friend-search-result', 'friend-verification', 'friend-profile', 'group-member-profile', 'friend-settings', 'friend-settings-blocked', 'friend-delete-confirm', 'block-list', 'block-confirm', 'clear-chat-confirm', 'group-list', 'group-empty', 'group-invite', 'group-events', 'group-join-requests', 'group-new-request', 'group-announcement', 'group-summary', 'group-announcement-detail', 'group-settings', 'group-profile', 'group-avatar', 'group-nickname', 'group-description', 'group-my-nickname', 'group-members', 'group-role-message', 'group-qr', 'group-governance', 'group-admins', 'group-admin-add', 'group-admin-success', 'group-admin-partial', 'group-admin-removed', 'group-mute-add', 'group-muted', 'group-owner-select', 'group-owner-confirm', 'group-files', 'group-file-upload', 'group-invite-friends', 'favorites', 'favorites-mixed', 'favorites-files', 'favorites-text', 'favorites-voice', 'favorites-links', 'favorites-image', 'favorites-video', 'favorites-select', 'favorite-share', 'file-download', 'file-downloading', 'file-downloaded', 'history-search', 'history-files', 'history-links', 'history-images', 'history-videos', 'call-history', 'call-incoming', 'audio-call-ringing', 'audio-call-active', 'audio-call-muted', 'audio-call-speaker', 'video-call-ringing', 'video-call-camera-off', 'video-call-active', 'video-call-peer-camera-off', 'call-minimized', 'workbench', 'organization-directory', 'meeting-organizer', 'meeting-attendee', 'meeting-create', 'meeting-detail', 'daily-report-editor', 'daily-report-mine', 'daily-report-team', 'daily-report-detail', 'monthly-report-editor', 'monthly-report-mine', 'monthly-report-team', 'monthly-report-detail', 'executive-mailbox', 'executive-mailbox-notice', 'personal-center', 'personal-profile', 'profile-nickname', 'profile-birth-date', 'profile-signature', 'profile-gender', 'profile-region', 'personal-qrcode', 'android-settings', 'change-password', 'app-version', 'privacy-settings', 'friend-discovery-settings', 'youth-mode-off', 'youth-mode-on', 'youth-mode-verify', 'notification-permission', 'permission-settings-reminder', 'camera-permission-info', 'microphone-permission-info', 'fraud-risk-warning', 'fraud-risk-confirmation', 'abuse-report-reasons', 'abuse-report-details', 'user-feedback', ''];
const AUTH_FLOW_VIEWS = ['tenant', 'login', 'register', 'reset', 'cred', 'enterprise-register', 'enterprise-feedback'];
const CTRL_ERROR_TEXT_CN = {
'authentication failed': '账号或密码错误',