From f554eee20b4d5315e2155b3950d64d2dbf37eb13 Mon Sep 17 00:00:00 2001 From: AlexMa233 Date: Sun, 29 Mar 2026 16:29:12 +0800 Subject: [PATCH] fix(web): align browser context actions with settings pages (#302) --- .../browser/components/context-setting.vue | 35 ++++++++++--------- apps/web/src/pages/browser/index.vue | 2 +- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/apps/web/src/pages/browser/components/context-setting.vue b/apps/web/src/pages/browser/components/context-setting.vue index 39ef28ba..8896f144 100644 --- a/apps/web/src/pages/browser/components/context-setting.vue +++ b/apps/web/src/pages/browser/components/context-setting.vue @@ -199,28 +199,30 @@ - - -
+
- + - -
+ + @@ -248,6 +250,7 @@ import { useI18n } from 'vue-i18n' import { toast } from 'vue-sonner' import { useDialogMutation } from '@/composables/useDialogMutation' import ConfirmPopover from '@/components/confirm-popover/index.vue' +import LoadingButton from '@/components/loading-button/index.vue' import { resolveApiErrorMessage } from '@/utils/api-error' import { emptyTimezoneValue } from '@/utils/timezones' import TimezoneSelect from '@/components/timezone-select/index.vue' @@ -321,7 +324,7 @@ const { mutateAsync: updateMutation, isLoading: isSaving } = useMutation({ mutation: async (data: { id: string; name: string; config: Record }) => { const { data: result } = await putBrowserContextsById({ path: { id: data.id }, - body: { name: data.name } as BrowsercontextsUpdateRequest, + body: { name: data.name, config: data.config } as BrowsercontextsUpdateRequest, throwOnError: true, }) return result @@ -329,7 +332,7 @@ const { mutateAsync: updateMutation, isLoading: isSaving } = useMutation({ onSettled: () => queryCache.invalidateQueries({ key: ['browser-contexts'] }), }) -const { mutateAsync: deleteMutation } = useMutation({ +const { mutateAsync: deleteMutation, isLoading: isDeleting } = useMutation({ mutation: async (id: string) => { await deleteBrowserContextsById({ path: { id }, diff --git a/apps/web/src/pages/browser/index.vue b/apps/web/src/pages/browser/index.vue index 66f34810..d1db144d 100644 --- a/apps/web/src/pages/browser/index.vue +++ b/apps/web/src/pages/browser/index.vue @@ -73,7 +73,7 @@ const openStatus = reactive({ :model-value="selectContext(item.id as string).value" @update:model-value="(isSelect) => { if (isSelect) { - curContext = item + curContext.value = item } }" >