From d842fb4683976d5f21edcef77ffde7760decb8fd Mon Sep 17 00:00:00 2001 From: Takagi <1103069291@qq.com> Date: Tue, 7 May 2024 17:57:20 +0800 Subject: [PATCH] feat: support moment user center (#68) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind feature #### What this PR does / why we need it: 支持在个人中心发布瞬间 #### How to test it? 在个人中心发布瞬间,并测试相关权限是否正常。 #### Which issue(s) this PR fixes: Fixes #47 Fixes https://github.com/halo-sigs/plugin-moments/issues/53 #### Does this PR introduce a user-facing change? ```release-note 适配在个人中心发布瞬间 ``` --- build.gradle | 1 + console/src/components/FilterDropdown.vue | 92 ++++ console/src/components/MomentEdit.vue | 78 ++-- console/src/components/MomentItem.vue | 89 ++-- console/src/components/TagFilterDropdown.vue | 18 +- console/src/components/TextEditor.vue | 9 +- console/src/composables/use-tag.ts | 39 ++ .../src/extensions/tags/TagsExtensionView.vue | 29 +- console/src/extensions/tags/index.ts | 10 +- console/src/index.ts | 19 + console/src/styles/index.scss | 20 +- console/src/types/index.ts | 1 + console/src/uc/MomentEdit.vue | 395 ++++++++++++++++++ console/src/uc/MomentItem.vue | 168 ++++++++ console/src/uc/MomentsList.vue | 230 ++++++++++ console/src/uc/TagFilterDropdown.vue | 112 +++++ console/src/views/MomentsList.vue | 90 ++-- src/main/java/run/halo/moments/Moment.java | 13 +- .../java/run/halo/moments/MomentEndpoint.java | 23 +- .../java/run/halo/moments/MomentQuery.java | 26 +- .../run/halo/moments/MomentReconciler.java | 8 + .../java/run/halo/moments/MomentsPlugin.java | 8 + .../finders/impl/MomentFinderImpl.java | 21 +- .../halo/moments/service/MomentService.java | 8 +- .../run/halo/moments/service/RoleService.java | 15 + .../service/impl/DefaultRoleService.java | 103 +++++ .../service/impl/MomentServiceImpl.java | 21 +- .../run/halo/moments/uc/UcMomentEndpoint.java | 216 ++++++++++ .../run/halo/moments/util/AuthorityUtils.java | 42 ++ .../resources/extensions/roleTemplate.yaml | 74 +++- 30 files changed, 1786 insertions(+), 192 deletions(-) create mode 100644 console/src/components/FilterDropdown.vue create mode 100644 console/src/composables/use-tag.ts create mode 100644 console/src/uc/MomentEdit.vue create mode 100644 console/src/uc/MomentItem.vue create mode 100644 console/src/uc/MomentsList.vue create mode 100644 console/src/uc/TagFilterDropdown.vue create mode 100644 src/main/java/run/halo/moments/service/RoleService.java create mode 100644 src/main/java/run/halo/moments/service/impl/DefaultRoleService.java create mode 100644 src/main/java/run/halo/moments/uc/UcMomentEndpoint.java create mode 100644 src/main/java/run/halo/moments/util/AuthorityUtils.java diff --git a/build.gradle b/build.gradle index 131cb2e..62a2313 100644 --- a/build.gradle +++ b/build.gradle @@ -46,4 +46,5 @@ build { halo { version = '2.12.0' + debug = true; } diff --git a/console/src/components/FilterDropdown.vue b/console/src/components/FilterDropdown.vue new file mode 100644 index 0000000..1ba369b --- /dev/null +++ b/console/src/components/FilterDropdown.vue @@ -0,0 +1,92 @@ + + + + diff --git a/console/src/components/MomentEdit.vue b/console/src/components/MomentEdit.vue index 9fb7625..986ad66 100644 --- a/console/src/components/MomentEdit.vue +++ b/console/src/components/MomentEdit.vue @@ -1,15 +1,16 @@