From cdf93b002d5c5cff929e06f4d8e0658c643b920a Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Fri, 12 Aug 2022 16:15:08 +0800 Subject: [PATCH] feat: refine attachment management page ui Signed-off-by: Ryan Wang --- packages/components/src/icons/icons.ts | 2 + .../contents/attachments/AttachmentList.vue | 465 +++++------------- .../AttachmentAliOSSStrategyEditingModal.vue | 94 ++++ .../components/AttachmentDetailModal.vue | 174 +++++++ .../AttachmentLocalStrategyEditingModal.vue | 50 ++ .../components/AttachmentSelectModal.vue | 73 +++ .../components/AttachmentStrategiesModal.vue | 149 ++++++ .../components/AttachmentUploadModal.vue | 94 ++++ src/modules/contents/posts/PostEditor.vue | 2 +- 9 files changed, 766 insertions(+), 337 deletions(-) create mode 100644 src/modules/contents/attachments/components/AttachmentAliOSSStrategyEditingModal.vue create mode 100644 src/modules/contents/attachments/components/AttachmentDetailModal.vue create mode 100644 src/modules/contents/attachments/components/AttachmentLocalStrategyEditingModal.vue create mode 100644 src/modules/contents/attachments/components/AttachmentSelectModal.vue create mode 100644 src/modules/contents/attachments/components/AttachmentStrategiesModal.vue create mode 100644 src/modules/contents/attachments/components/AttachmentUploadModal.vue diff --git a/packages/components/src/icons/icons.ts b/packages/components/src/icons/icons.ts index fd5e4451..02d54e4b 100644 --- a/packages/components/src/icons/icons.ts +++ b/packages/components/src/icons/icons.ts @@ -40,6 +40,7 @@ import IconGitBranch from "~icons/ri/git-branch-line"; import IconStopCircle from "~icons/ri/stop-circle-line"; import IconForbidLine from "~icons/ri/forbid-line"; import IconCodeBoxLine from "~icons/ri/code-box-line"; +import IconDatabase2Line from "~icons/ri/database-2-line"; export { IconDashboard, @@ -84,4 +85,5 @@ export { IconStopCircle, IconForbidLine, IconCodeBoxLine, + IconDatabase2Line, }; diff --git a/src/modules/contents/attachments/AttachmentList.vue b/src/modules/contents/attachments/AttachmentList.vue index 6b41340f..e191989f 100644 --- a/src/modules/contents/attachments/AttachmentList.vue +++ b/src/modules/contents/attachments/AttachmentList.vue @@ -1,26 +1,27 @@ -
- + +
+
+
+ + {{ folder.name }} +
+ +
+
+
-
-
- +
+
+ +
+

+ {{ attachment.name }} +

+ +
-

- {{ attachment.name }} -

- - -
- + +
    +import { VAlert, VButton, VModal, VSpace } from "@halo-dev/components"; + +defineProps({ + visible: { + type: Boolean, + default: false, + }, +}); + +const emit = defineEmits(["update:visible", "close"]); + +const onVisibleChange = (visible: boolean) => { + emit("update:visible", visible); + if (!visible) { + emit("close"); + } +}; + + diff --git a/src/modules/contents/attachments/components/AttachmentDetailModal.vue b/src/modules/contents/attachments/components/AttachmentDetailModal.vue new file mode 100644 index 00000000..4f038e6c --- /dev/null +++ b/src/modules/contents/attachments/components/AttachmentDetailModal.vue @@ -0,0 +1,174 @@ + + diff --git a/src/modules/contents/attachments/components/AttachmentLocalStrategyEditingModal.vue b/src/modules/contents/attachments/components/AttachmentLocalStrategyEditingModal.vue new file mode 100644 index 00000000..bf6b9e72 --- /dev/null +++ b/src/modules/contents/attachments/components/AttachmentLocalStrategyEditingModal.vue @@ -0,0 +1,50 @@ + + diff --git a/src/modules/contents/attachments/components/AttachmentSelectModal.vue b/src/modules/contents/attachments/components/AttachmentSelectModal.vue new file mode 100644 index 00000000..858e6a2b --- /dev/null +++ b/src/modules/contents/attachments/components/AttachmentSelectModal.vue @@ -0,0 +1,73 @@ + + diff --git a/src/modules/contents/attachments/components/AttachmentStrategiesModal.vue b/src/modules/contents/attachments/components/AttachmentStrategiesModal.vue new file mode 100644 index 00000000..657acd70 --- /dev/null +++ b/src/modules/contents/attachments/components/AttachmentStrategiesModal.vue @@ -0,0 +1,149 @@ + + diff --git a/src/modules/contents/attachments/components/AttachmentUploadModal.vue b/src/modules/contents/attachments/components/AttachmentUploadModal.vue new file mode 100644 index 00000000..f00f86d7 --- /dev/null +++ b/src/modules/contents/attachments/components/AttachmentUploadModal.vue @@ -0,0 +1,94 @@ + + diff --git a/src/modules/contents/posts/PostEditor.vue b/src/modules/contents/posts/PostEditor.vue index 5df11f26..afc1cdff 100644 --- a/src/modules/contents/posts/PostEditor.vue +++ b/src/modules/contents/posts/PostEditor.vue @@ -23,6 +23,6 @@ import {
    - +