feat: add issues field for plugin and theme manifest (#5755)

#### What type of PR is this?

/area core
/area ui
/kind feature
/kind api-change

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

为主题和插件的定义文件添加 issues 字段,用于填写问题反馈地址。方便使用者可以清楚的知道可以在哪里反馈问题。

<img width="767" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/b7dfce3f-8362-4964-82b8-cc018b85bb82">


#### Which issue(s) this PR fixes:

Fixes #5715 

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

```release-note
为主题和插件的定义文件添加问题反馈(issues)字段
```
pull/5705/head
Ryan Wang 2024-04-26 15:20:31 +08:00 committed by GitHub
parent f2b883f2e9
commit ee76f19572
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 54 additions and 0 deletions

View File

@ -16464,6 +16464,9 @@
"homepage": { "homepage": {
"type": "string" "type": "string"
}, },
"issues": {
"type": "string"
},
"license": { "license": {
"type": "array", "type": "array",
"items": { "items": {
@ -19471,6 +19474,9 @@
"homepage": { "homepage": {
"type": "string" "type": "string"
}, },
"issues": {
"type": "string"
},
"license": { "license": {
"type": "array", "type": "array",
"items": { "items": {

View File

@ -78,6 +78,8 @@ public class Plugin extends AbstractExtension {
private String repo; private String repo;
private String issues;
private String description; private String description;
private List<License> license; private List<License> license;

View File

@ -61,6 +61,8 @@ public class Theme extends AbstractExtension {
private String repo; private String repo;
private String issues;
private String version; private String version;
@Deprecated(forRemoval = true, since = "2.2.0") @Deprecated(forRemoval = true, since = "2.2.0")

View File

@ -175,6 +175,19 @@ const handleReloadTheme = async () => {
{{ $t("core.common.text.none") }} {{ $t("core.common.text.none") }}
</span> </span>
</VDescriptionItem> </VDescriptionItem>
<VDescriptionItem :label="$t('core.theme.detail.fields.issues')">
<a
v-if="selectedTheme?.spec.issues"
:href="selectedTheme.spec.issues"
class="hover:text-gray-600"
target="_blank"
>
{{ selectedTheme.spec.issues }}
</a>
<span v-else>
{{ $t("core.common.text.none") }}
</span>
</VDescriptionItem>
<VDescriptionItem :label="$t('core.theme.detail.fields.license')"> <VDescriptionItem :label="$t('core.theme.detail.fields.license')">
<ul <ul
v-if=" v-if="

View File

@ -147,6 +147,19 @@ const pluginRoleTemplateGroups = computed<RoleTemplateGroup[]>(() => {
{{ $t("core.common.text.none") }} {{ $t("core.common.text.none") }}
</span> </span>
</VDescriptionItem> </VDescriptionItem>
<VDescriptionItem :label="$t('core.plugin.detail.fields.issues')">
<a
v-if="plugin?.spec.issues"
:href="plugin.spec.issues"
class="hover:text-gray-600"
target="_blank"
>
{{ plugin.spec.issues }}
</a>
<span v-else>
{{ $t("core.common.text.none") }}
</span>
</VDescriptionItem>
<VDescriptionItem :label="$t('core.plugin.detail.fields.license')"> <VDescriptionItem :label="$t('core.plugin.detail.fields.license')">
<ul <ul
v-if="plugin?.spec.license && plugin?.spec.license.length" v-if="plugin?.spec.license && plugin?.spec.license.length"

View File

@ -62,6 +62,12 @@ export interface PluginSpec {
* @memberof PluginSpec * @memberof PluginSpec
*/ */
'homepage'?: string; 'homepage'?: string;
/**
*
* @type {string}
* @memberof PluginSpec
*/
'issues'?: string;
/** /**
* *
* @type {Array<License>} * @type {Array<License>}

View File

@ -65,6 +65,12 @@ export interface ThemeSpec {
* @memberof ThemeSpec * @memberof ThemeSpec
*/ */
'homepage'?: string; 'homepage'?: string;
/**
*
* @type {string}
* @memberof ThemeSpec
*/
'issues'?: string;
/** /**
* *
* @type {Array<License>} * @type {Array<License>}

View File

@ -730,6 +730,7 @@ core:
plugin_requires: Plugin Requires plugin_requires: Plugin Requires
description: Description description: Description
license: License license: License
issues: Issues feedback
settings: settings:
title: Theme settings title: Theme settings
custom_templates: custom_templates:
@ -882,6 +883,7 @@ core:
homepage: Homepage homepage: Homepage
repo: Source Repository repo: Source Repository
load_location: Storage Location load_location: Storage Location
issues: Issues feedback
loader: loader:
toast: toast:
entry_load_failed: Failed to load plugins entry file entry_load_failed: Failed to load plugins entry file

View File

@ -700,6 +700,7 @@ core:
plugin_requires: 插件依赖 plugin_requires: 插件依赖
description: 描述 description: 描述
license: 协议 license: 协议
issues: 问题反馈
settings: settings:
title: 主题设置 title: 主题设置
custom_templates: custom_templates:
@ -840,6 +841,7 @@ core:
homepage: 网站 homepage: 网站
repo: 源码仓库 repo: 源码仓库
load_location: 存储位置 load_location: 存储位置
issues: 问题反馈
loader: loader:
toast: toast:
entry_load_failed: 加载插件入口文件失败 entry_load_failed: 加载插件入口文件失败

View File

@ -680,6 +680,7 @@ core:
plugin_requires: 插件依賴 plugin_requires: 插件依賴
description: 描述 description: 描述
license: 協議 license: 協議
issues: 問題回饋
settings: settings:
title: 主題設置 title: 主題設置
custom_templates: custom_templates:
@ -820,6 +821,7 @@ core:
homepage: 網站 homepage: 網站
repo: 源碼倉庫 repo: 源碼倉庫
load_location: 存儲位置 load_location: 存儲位置
issues: 問題回饋
loader: loader:
toast: toast:
entry_load_failed: 讀取插件入口文件失敗 entry_load_failed: 讀取插件入口文件失敗