From 8c62e25c123025e8175f2bc00b4d2ebaafcfd07e Mon Sep 17 00:00:00 2001 From: NanamiAdmin Date: Wed, 18 Mar 2026 23:36:07 +0800 Subject: [PATCH] feat(InstanceDetail): add configuration edit form with modal dialog - Move form styles from Instances.vue to common.css for reusability - Add edit configuration modal with form handling - Rename back-btn to common-btn for consistent styling - Implement configuration update logic with API calls --- src/styles/common.css | 47 +++++- src/views/InstanceDetail.vue | 287 ++++++++++++++++++++++++++++++++++- src/views/Instances.vue | 38 ----- 3 files changed, 326 insertions(+), 46 deletions(-) diff --git a/src/styles/common.css b/src/styles/common.css index e3be3dd..79def9a 100644 --- a/src/styles/common.css +++ b/src/styles/common.css @@ -42,6 +42,45 @@ gap: 8px; } +.form { + display: flex; + flex-direction: column; + gap: 16px; +} + +.form-group { + display: flex; + flex-direction: column; + gap: 8px; +} + +.form-group label { + font-size: 14px; + font-weight: 500; + color: var(--text-color); +} + +.form-group input, +.form-group select { + padding: 10px; + border: 1px solid var(--border-color); + border-radius: 4px; + font-size: 14px; + background: var(--bg-color); + color: var(--text-color); +} + +.form-group.checkbox-group { + flex-direction: row; + align-items: center; + gap: 8px; +} + +.form-group.checkbox-group input { + width: auto; +} + + .empty-state { text-align: center; padding: 60px 20px; @@ -192,12 +231,12 @@ background: #2a2a2a; } -.dark .back-btn { +.dark .common-btn { background: #3d3d3d; color: var(--text-color); } -.dark .back-btn:hover { +.dark .common-btn:hover { background: #4d4d4d; } @@ -446,7 +485,7 @@ font-size: 18px; } -.back-btn { +.common-btn { padding: 8px 16px; background: #f0f0f0; border: none; @@ -456,7 +495,7 @@ transition: all 0.3s; } -.back-btn:hover { +.common-btn:hover { background: #e0e0e0; } diff --git a/src/views/InstanceDetail.vue b/src/views/InstanceDetail.vue index e3dd295..ddce4b8 100644 --- a/src/views/InstanceDetail.vue +++ b/src/views/InstanceDetail.vue @@ -1,15 +1,19 @@