From a94ff700d2edc14aa244017925770f19cbb7a8be Mon Sep 17 00:00:00 2001 From: CaiHaosen Date: Tue, 3 Sep 2024 15:45:41 +0800 Subject: [PATCH] Refactor HTML Injection Form Component (#12) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind improvement #### What this PR does / why we need it: 原来的注入表单组件`HtmlInjectionAdd`把新增和更改的逻辑混在一起了, 该PR删除了该组件并拆分成`HtmlInjectionForm`,`HtmlInjectionCreationModal`和`HtmlInjectionEditionModal`分别用于渲染表单,新增注入和修改注入 #### Which issue(s) this PR fixes: Fixes #7 #### Does this PR introduce a user-facing change? ```release-note None ``` --- ui/src/views/HtmlInjectionAdd.vue | 154 -------------------- ui/src/views/HtmlInjectionCreationModal.vue | 58 ++++++++ ui/src/views/HtmlInjectionEditionModal.vue | 52 +++++++ ui/src/views/HtmlInjectionForm.vue | 88 +++++++++++ ui/src/views/HtmlInjectionList.vue | 95 +++++++----- 5 files changed, 254 insertions(+), 193 deletions(-) delete mode 100644 ui/src/views/HtmlInjectionAdd.vue create mode 100644 ui/src/views/HtmlInjectionCreationModal.vue create mode 100644 ui/src/views/HtmlInjectionEditionModal.vue create mode 100644 ui/src/views/HtmlInjectionForm.vue diff --git a/ui/src/views/HtmlInjectionAdd.vue b/ui/src/views/HtmlInjectionAdd.vue deleted file mode 100644 index 5462871f..00000000 --- a/ui/src/views/HtmlInjectionAdd.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - - - diff --git a/ui/src/views/HtmlInjectionCreationModal.vue b/ui/src/views/HtmlInjectionCreationModal.vue new file mode 100644 index 00000000..ca0a306b --- /dev/null +++ b/ui/src/views/HtmlInjectionCreationModal.vue @@ -0,0 +1,58 @@ + + + + diff --git a/ui/src/views/HtmlInjectionEditionModal.vue b/ui/src/views/HtmlInjectionEditionModal.vue new file mode 100644 index 00000000..f257fd5b --- /dev/null +++ b/ui/src/views/HtmlInjectionEditionModal.vue @@ -0,0 +1,52 @@ + + + + diff --git a/ui/src/views/HtmlInjectionForm.vue b/ui/src/views/HtmlInjectionForm.vue new file mode 100644 index 00000000..ded8ffc6 --- /dev/null +++ b/ui/src/views/HtmlInjectionForm.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/ui/src/views/HtmlInjectionList.vue b/ui/src/views/HtmlInjectionList.vue index 8687556a..bdf9c8d4 100644 --- a/ui/src/views/HtmlInjectionList.vue +++ b/ui/src/views/HtmlInjectionList.vue @@ -1,5 +1,5 @@