diff --git a/ui/components.d.ts b/ui/components.d.ts index 25695e0b8..c853f0c96 100644 --- a/ui/components.d.ts +++ b/ui/components.d.ts @@ -66,5 +66,7 @@ declare module '@vue/runtime-core' { RouterView: typeof import('vue-router')['RouterView'] ServerJang: typeof import('./src/components/ServerJang.vue')['default'] SKLand: typeof import('./src/components/SKLand.vue')['default'] + TriggerDialog: typeof import('./src/components/TriggerDialog.vue')['default'] + TriggerEditor: typeof import('./src/components/TriggerEditor.vue')['default'] } } diff --git a/ui/src/components/TriggerDialog.vue b/ui/src/components/TriggerDialog.vue new file mode 100644 index 000000000..0197fc3b0 --- /dev/null +++ b/ui/src/components/TriggerDialog.vue @@ -0,0 +1,29 @@ + + + diff --git a/ui/src/components/TriggerEditor.vue b/ui/src/components/TriggerEditor.vue new file mode 100644 index 000000000..13d11a808 --- /dev/null +++ b/ui/src/components/TriggerEditor.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/ui/src/pages/Plan.vue b/ui/src/pages/Plan.vue index f339bc8a2..08b6384de 100644 --- a/ui/src/pages/Plan.vue +++ b/ui/src/pages/Plan.vue @@ -22,7 +22,7 @@ const { } = storeToRefs(plan_store) const { load_plan } = plan_store -import { inject, ref, computed } from 'vue' +import { inject, ref, computed, provide } from 'vue' const axios = inject('axios') import { file_dialog } from '@/utils/dialog' @@ -116,9 +116,20 @@ const current_conf = computed(() => { } return backup_plans.value[sub_plan.value].conf }) + +const show_trigger_editor = ref(false) +provide('show_trigger_editor', show_trigger_editor) + +const trigger = computed(() => { + if (sub_plan.value == 'main') { + return {} + } + return backup_plans.value[sub_plan.value].trigger +})