Browse Source

refactor: plugin author field (#737)

#### What type of PR is this?

/kind improvement
/milestone 2.0

#### What this PR does / why we need it:

修改插件的 author 字段为对象形式。适配 https://github.com/halo-dev/halo/pull/2806

#### Special notes for your reviewer:

None

#### Does this PR introduce a user-facing change?

```release-note
None
```
pull/738/head^2
Ryan Wang 2 years ago committed by GitHub
parent
commit
debaec537e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      package.json
  2. 8
      pnpm-lock.yaml
  3. 9
      src/modules/system/plugins/PluginDetail.vue
  4. 6
      src/modules/system/plugins/components/PluginListItem.vue

2
package.json

@ -32,7 +32,7 @@
"@formkit/themes": "^1.0.0-beta.12",
"@formkit/utils": "^1.0.0-beta.12",
"@formkit/vue": "^1.0.0-beta.12",
"@halo-dev/api-client": "^0.0.58",
"@halo-dev/api-client": "^0.0.60",
"@halo-dev/components": "workspace:*",
"@halo-dev/console-shared": "workspace:*",
"@halo-dev/richtext-editor": "^0.0.0-alpha.16",

8
pnpm-lock.yaml

@ -12,7 +12,7 @@ importers:
'@formkit/themes': ^1.0.0-beta.12
'@formkit/utils': ^1.0.0-beta.12
'@formkit/vue': ^1.0.0-beta.12
'@halo-dev/api-client': ^0.0.58
'@halo-dev/api-client': ^0.0.60
'@halo-dev/components': workspace:*
'@halo-dev/console-shared': workspace:*
'@halo-dev/richtext-editor': ^0.0.0-alpha.16
@ -106,7 +106,7 @@ importers:
'@formkit/themes': 1.0.0-beta.12-e579559_tailwindcss@3.2.4
'@formkit/utils': 1.0.0-beta.12-e579559
'@formkit/vue': 1.0.0-beta.12-e579559_ior6jr3fpijijuwpr34w2i25va
'@halo-dev/api-client': 0.0.58
'@halo-dev/api-client': 0.0.60
'@halo-dev/components': link:packages/components
'@halo-dev/console-shared': link:packages/shared
'@halo-dev/richtext-editor': 0.0.0-alpha.16_vue@3.2.45
@ -1966,8 +1966,8 @@ packages:
- windicss
dev: false
/@halo-dev/api-client/0.0.58:
resolution: {integrity: sha512-CGDsHYrtVXD47Lt3S+KYJkyFZsrO85KE8wcuVb2y1iFLspTkKAPxD20Fuhf4TJYS/FVfjEi/esvU4sptTdLVjQ==}
/@halo-dev/api-client/0.0.60:
resolution: {integrity: sha512-HAmJ1BDZxHj2Xp41oNOqZG/1vaR6r4EbBAUQ7ayvUY8SGJMHtJD9dyhCn7k23q6G7FmzFKFNGxajovsjBEM+yg==}
dev: false
/@halo-dev/richtext-editor/0.0.0-alpha.16_vue@3.2.45:

9
src/modules/system/plugins/PluginDetail.vue

@ -116,9 +116,14 @@ watchEffect(() => {
>
<dt class="text-sm font-medium text-gray-900">提供方</dt>
<dd class="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0">
<a :href="plugin?.spec.homepage" target="_blank">
{{ plugin?.spec.author }}
<a
v-if="plugin?.spec.author"
:href="plugin?.spec.author.website"
target="_blank"
>
{{ plugin?.spec.author.name }}
</a>
<span v-else></span>
</dd>
</div>
<div

6
src/modules/system/plugins/components/PluginListItem.vue

@ -90,14 +90,14 @@ const onUpgradeModalClose = () => {
<VStatusDot v-tooltip="`删除中`" state="warning" animate />
</template>
</VEntityField>
<VEntityField>
<VEntityField v-if="plugin?.spec.author">
<template #description>
<a
:href="plugin?.spec.homepage"
:href="plugin?.spec.author.website"
class="hidden text-sm text-gray-500 hover:text-gray-900 sm:block"
target="_blank"
>
@{{ plugin?.spec.author }}
@{{ plugin?.spec.author.name }}
</a>
</template>
</VEntityField>

Loading…
Cancel
Save