perf: card layout in each page

This commit is contained in:
Junyan Qin
2025-05-10 09:25:39 +08:00
parent f8b877fde0
commit 55087e54d0
15 changed files with 48 additions and 60 deletions

View File

@@ -32,7 +32,7 @@ export default function PluginCardComponent({
}
return (
<div
className="w-[26rem] h-[10rem] bg-white rounded-[10px] shadow-[0px_2px_2px_0_rgba(0,0,0,0.2)] p-[1.2rem] cursor-pointer"
className="w-[100%] h-[10rem] bg-white rounded-[10px] shadow-[0px_2px_2px_0_rgba(0,0,0,0.2)] p-[1.2rem] cursor-pointer"
onClick={onCardClick}
>
<div className="w-full h-full flex flex-row items-start justify-start gap-[1.2rem]">

View File

@@ -79,6 +79,8 @@ export default function PluginForm({
.then((res) => {
const taskId = res.task_id;
let alreadySuccess = false;
const interval = setInterval(() => {
httpClient.getAsyncTask(taskId).then((res) => {
if (res.runtime.done) {
@@ -87,6 +89,11 @@ export default function PluginForm({
setPluginRemoveError(res.runtime.exception);
setPluginRemoveStatus(PluginRemoveStatus.ERROR);
} else {
// success
if (!alreadySuccess) {
toast.success('插件删除成功');
alreadySuccess = true;
}
setPluginRemoveStatus(PluginRemoveStatus.WAIT_INPUT);
setShowDeleteConfirmModal(false);
onFormSubmit();