From 47d52a971e0cebc94924cecd4cd273e09dc14363 Mon Sep 17 00:00:00 2001 From: erio Date: Mon, 30 Mar 2026 21:04:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(channel):=20=E5=B9=B3=E5=8F=B0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=94=B9=E4=B8=BA=E5=8B=BE=E9=80=89=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E5=8B=BE=E9=80=89=E5=90=8E=E5=87=BA=E7=8E=B0=20Tab=20=E4=BD=86?= =?UTF-8?q?=E4=B8=8D=E8=87=AA=E5=8A=A8=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/cmd/server/VERSION | 2 +- frontend/src/views/admin/ChannelsView.vue | 98 +++++++---------------- 2 files changed, 28 insertions(+), 72 deletions(-) diff --git a/backend/cmd/server/VERSION b/backend/cmd/server/VERSION index b97f3d0367..19f8c454a9 100644 --- a/backend/cmd/server/VERSION +++ b/backend/cmd/server/VERSION @@ -1 +1 @@ -0.1.105.10 +0.1.105.11 diff --git a/frontend/src/views/admin/ChannelsView.vue b/frontend/src/views/admin/ChannelsView.vue index fe69f050c0..19420f53d9 100644 --- a/frontend/src/views/admin/ChannelsView.vue +++ b/frontend/src/views/admin/ChannelsView.vue @@ -234,70 +234,25 @@
-
- -
- -
- -
-
-
- -
- {{ t('admin.channels.form.noPlatforms', '点击"添加平台"开始配置渠道') }} -
- - -
-
{{ t('admin.channels.form.platformConfig', '平台配置') }} +
+
+ + + {{ t('admin.groups.platforms.' + p, p) }} +
@@ -544,7 +499,6 @@ const editingChannel = ref(null) const submitting = ref(false) const showDeleteDialog = ref(false) const deletingChannel = ref(null) -const showPlatformMenu = ref(false) const activeTab = ref('basic') // Groups @@ -597,10 +551,6 @@ function formatDate(value: string): string { // ── Platform section helpers ── const activePlatforms = computed(() => form.platforms.map(s => s.platform)) -const availablePlatformsToAdd = computed(() => - platformOrder.filter(p => !activePlatforms.value.includes(p)) -) - function addPlatformSection(platform: GroupPlatform) { form.platforms.push({ platform, @@ -609,8 +559,15 @@ function addPlatformSection(platform: GroupPlatform) { model_mapping: {}, model_pricing: [] }) - showPlatformMenu.value = false - activeTab.value = platform +} + +function togglePlatform(platform: GroupPlatform) { + const idx = form.platforms.findIndex(s => s.platform === platform) + if (idx >= 0) { + removePlatformSection(idx) + } else { + addPlatformSection(platform) + } } function removePlatformSection(idx: number) { @@ -873,7 +830,6 @@ function resetForm() { form.restrict_models = false form.billing_model_source = 'requested' form.platforms = [] - showPlatformMenu.value = false activeTab.value = 'basic' }