Browse Source

fix: update layout and class bindings in BaseEditor, EnableTLS, and SiteList components

Jacky 3 weeks ago
parent
commit
d55fcef9a3

+ 2 - 2
app/src/components/BaseEditor/BaseEditor.vue

@@ -26,7 +26,7 @@ const loading = computed(() =>
 
 <template>
   <ASpin class="h-full base-editor-spin" :spinning="loading" :indicator="indicator">
-    <ARow :gutter="{ xs: 0, sm: 16 }">
+    <ARow :gutter="[16, 16]">
       <ACol
         :xs="24"
         :sm="24"
@@ -39,7 +39,7 @@ const loading = computed(() =>
       </ACol>
 
       <ACol
-        :class="props.colRightClass"
+        :class="colRightClass"
         :xs="24"
         :sm="24"
         :md="24"

+ 2 - 2
app/src/views/site/site_edit/components/EnableTLS/EnableTLS.vue

@@ -107,14 +107,14 @@ const supportSSL = computed(() => {
 </script>
 
 <template>
-  <div v-if="hasServers">
+  <div v-if="hasServers" class="px-6">
     <ContextHolder />
 
     <AFormItem
       v-if="!supportSSL"
       :label="$gettext('Enable TLS')"
     >
-      <ASwitch @change="confirmChangeTLS" />
+      <ASwitch class="<sm:ml-2" @change="confirmChangeTLS" />
     </AFormItem>
   </div>
 </template>

+ 12 - 0
app/src/views/site/site_list/SiteList.vue

@@ -70,6 +70,7 @@ function handle_click_duplicate(name: string) {
       :table-props="{
         rowKey: 'name',
       }"
+      disable-add
       disable-delete
       disable-view
       disable-export
@@ -82,6 +83,17 @@ function handle_click_duplicate(name: string) {
         path: `/sites/${encodeURIComponent(record.name)}`,
       })"
     >
+      <template #beforeListActions>
+        <AButton
+          type="link"
+          size="small"
+          @click="router.push({
+            path: '/sites/add',
+          })"
+        >
+          {{ $gettext('Add') }}
+        </AButton>
+      </template>
       <template #beforeCardBody>
         <InspectConfig ref="inspectConfig" />
         <EnvGroupTabs v-model:active-key="envGroupId" :env-groups="envGroups" />