重新构建dev产物,反映本轮死代码清理+收藏批量删除弹层+通讯录CSS修复三处改动
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
0d32569633
commit
6ab2867f27
+28
-4
@@ -9444,8 +9444,9 @@ function Favorites({
|
|||||||
});
|
});
|
||||||
}, [items]);
|
}, [items]);
|
||||||
const toggle = id => setSelected(values => values.includes(id) ? values.filter(v => v !== id) : values.concat(id));
|
const toggle = id => setSelected(values => values.includes(id) ? values.filter(v => v !== id) : values.concat(id));
|
||||||
const deleteSelected = () => {
|
const [confirmingDelete, setConfirmingDelete] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(false);
|
||||||
if (!window.confirm(`确定删除已选择的 ${selected.length} 项收藏吗?`)) return;
|
const confirmDelete = () => {
|
||||||
|
setConfirmingDelete(false);
|
||||||
(0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_5__.batchDeleteFavorites)(selected).then(result => {
|
(0,_lib_im_api_js__WEBPACK_IMPORTED_MODULE_5__.batchDeleteFavorites)(selected).then(result => {
|
||||||
const okIds = new Set((result && result.items || []).filter(r => r.ok).map(r => r.favorite_id));
|
const okIds = new Set((result && result.items || []).filter(r => r.ok).map(r => r.favorite_id));
|
||||||
setItems(values => {
|
setItems(values => {
|
||||||
@@ -9552,14 +9553,37 @@ function Favorites({
|
|||||||
}, void 0, true), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)("button", {
|
}, void 0, true), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)("button", {
|
||||||
type: "button",
|
type: "button",
|
||||||
disabled: !selected.length,
|
disabled: !selected.length,
|
||||||
onClick: deleteSelected,
|
onClick: () => setConfirmingDelete(true),
|
||||||
children: [(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)(Icon, {
|
children: [(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)(Icon, {
|
||||||
children: "delete_outline"
|
children: "delete_outline"
|
||||||
}, void 0, false), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)("span", {
|
}, void 0, false), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)("span", {
|
||||||
children: "删除"
|
children: "删除"
|
||||||
}, void 0, false)]
|
}, void 0, false)]
|
||||||
}, void 0, true)]
|
}, void 0, true)]
|
||||||
}, void 0, true) : null]
|
}, void 0, true) : null, confirmingDelete ? (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)("div", {
|
||||||
|
className: "library-sheet-backdrop",
|
||||||
|
children: (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)("section", {
|
||||||
|
className: "library-confirm-sheet",
|
||||||
|
role: "dialog",
|
||||||
|
"aria-modal": "true",
|
||||||
|
children: [(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)(Icon, {
|
||||||
|
children: "delete_outline"
|
||||||
|
}, void 0, false), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)("h2", {
|
||||||
|
children: "删除收藏"
|
||||||
|
}, void 0, false), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)("p", {
|
||||||
|
children: ["确定删除已选择的 ", selected.length, " 项收藏吗?"]
|
||||||
|
}, void 0, true), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)("button", {
|
||||||
|
type: "button",
|
||||||
|
className: "danger",
|
||||||
|
onClick: confirmDelete,
|
||||||
|
children: "确定"
|
||||||
|
}, void 0, false), (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxDEV)("button", {
|
||||||
|
type: "button",
|
||||||
|
onClick: () => setConfirmingDelete(false),
|
||||||
|
children: "取消"
|
||||||
|
}, void 0, false)]
|
||||||
|
}, void 0, true)
|
||||||
|
}, void 0, false) : null]
|
||||||
}, void 0, true);
|
}, void 0, true);
|
||||||
}
|
}
|
||||||
function FavoriteShare({
|
function FavoriteShare({
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user