1
0
Эх сурвалжийг харах

fix(external-notify): implement columns for external notification settings #1019

Jacky 16 цаг өмнө
parent
commit
0f09a0b03c

+ 5 - 5
app/package.json

@@ -42,11 +42,11 @@
     "splitpanes": "^4.0.3",
     "sse.js": "^2.6.0",
     "universal-cookie": "^8.0.1",
-    "unocss": "^66.0.0",
+    "unocss": "^66.1.0",
     "uuid": "^11.1.0",
     "vite-plugin-build-id": "0.5.0",
     "vue": "^3.5.13",
-    "vue-dompurify-html": "^5.2.0",
+    "vue-dompurify-html": "^5.3.0",
     "vue-router": "^4.5.1",
     "vue3-ace-editor": "2.2.4",
     "vue3-apexcharts": "1.5.3",
@@ -55,7 +55,7 @@
     "vuedraggable": "^4.1.0"
   },
   "devDependencies": {
-    "@antfu/eslint-config": "^4.12.0",
+    "@antfu/eslint-config": "^4.13.0",
     "@iconify-json/fa": "1.2.1",
     "@iconify-json/tabler": "^1.2.17",
     "@iconify/tools": "^4.1.2",
@@ -76,10 +76,10 @@
     "less": "^4.3.0",
     "postcss": "^8.5.3",
     "typescript": "5.8.3",
-    "unplugin-auto-import": "^19.1.2",
+    "unplugin-auto-import": "^19.2.0",
     "unplugin-vue-components": "^28.5.0",
     "unplugin-vue-define-options": "^1.5.5",
-    "vite": "^6.3.4",
+    "vite": "^6.3.5",
     "vite-plugin-inspect": "^11.0.1",
     "vite-svg-loader": "^5.1.0",
     "vue-tsc": "^2.2.10"

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 215 - 246
app/pnpm-lock.yaml


+ 13 - 0
app/src/views/preference/components/ExternalNotify/columns.ts → app/src/views/preference/components/ExternalNotify/columns.tsx

@@ -2,6 +2,7 @@ import type { Column } from '@/components/StdDesign/types'
 import { datetime, mask } from '@/components/StdDesign/StdDataDisplay/StdTableTransformer'
 import { select } from '@/components/StdDesign/StdDataEntry'
 import gettext from '@/gettext'
+import ExternalNotifyEditor from './ExternalNotifyEditor.vue'
 import configMap from './index'
 
 const languageAvailable = gettext.available
@@ -36,6 +37,18 @@ const columns: Column[] = [
       },
     },
   },
+  {
+    dataIndex: 'config',
+    edit: {
+      type: (_, record) => {
+        if (!record.config) {
+          record.config = {}
+        }
+        return <ExternalNotifyEditor v-model={record.config} type={record.type} />
+      },
+    },
+    hiddenInTable: true,
+  },
   {
     dataIndex: 'created_at',
     title: () => $gettext('Created at'),

+ 1 - 9
app/src/views/preference/tabs/ExternalNotify.vue

@@ -2,7 +2,6 @@
 import externalNotify from '@/api/external_notify'
 import { StdCurd } from '@/components/StdDesign/StdDataDisplay'
 import columns from '../components/ExternalNotify/columns'
-import ExternalNotifyEditor from '../components/ExternalNotify/ExternalNotifyEditor.vue'
 </script>
 
 <template>
@@ -12,14 +11,7 @@ import ExternalNotifyEditor from '../components/ExternalNotify/ExternalNotifyEdi
     :api="externalNotify"
     disable-view
     disable-query-params
-  >
-    <template #edit="{ data }">
-      <ExternalNotifyEditor
-        v-model="data.config"
-        :type="data.type"
-      />
-    </template>
-  </StdCurd>
+  />
 </template>
 
 <style scoped lang="less"></style>

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно