Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions api-docs/openapi/v3_0/aggregated.json
Original file line number Diff line number Diff line change
Expand Up @@ -16378,6 +16378,9 @@
"homepage": {
"type": "string"
},
"issues": {
"type": "string"
},
"license": {
"type": "array",
"items": {
Expand Down Expand Up @@ -19373,6 +19376,9 @@
"homepage": {
"type": "string"
},
"issues": {
"type": "string"
},
"license": {
"type": "array",
"items": {
Expand Down
2 changes: 2 additions & 0 deletions api/src/main/java/run/halo/app/core/extension/Plugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public static class PluginSpec {

private String repo;

private String issues;

private String description;

private List<License> license;
Expand Down
2 changes: 2 additions & 0 deletions api/src/main/java/run/halo/app/core/extension/Theme.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public static class ThemeSpec {

private String repo;

private String issues;

private String version;

@Deprecated(forRemoval = true, since = "2.2.0")
Expand Down
13 changes: 13 additions & 0 deletions ui/console-src/modules/interface/themes/ThemeDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,19 @@ const handleReloadTheme = async () => {
{{ $t("core.common.text.none") }}
</span>
</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')">
<ul
v-if="
Expand Down
13 changes: 13 additions & 0 deletions ui/console-src/modules/system/plugins/tabs/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,19 @@ const pluginRoleTemplateGroups = computed<RoleTemplateGroup[]>(() => {
{{ $t("core.common.text.none") }}
</span>
</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')">
<ul
v-if="plugin?.spec.license && plugin?.spec.license.length"
Expand Down
6 changes: 6 additions & 0 deletions ui/packages/api-client/src/models/plugin-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ export interface PluginSpec {
* @memberof PluginSpec
*/
'homepage'?: string;
/**
*
* @type {string}
* @memberof PluginSpec
*/
'issues'?: string;
/**
*
* @type {Array<License>}
Expand Down
6 changes: 6 additions & 0 deletions ui/packages/api-client/src/models/theme-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ export interface ThemeSpec {
* @memberof ThemeSpec
*/
'homepage'?: string;
/**
*
* @type {string}
* @memberof ThemeSpec
*/
'issues'?: string;
/**
*
* @type {Array<License>}
Expand Down
2 changes: 2 additions & 0 deletions ui/src/locales/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,7 @@ core:
plugin_requires: Plugin Requires
description: Description
license: License
issues: Issues feedback
settings:
title: Theme settings
custom_templates:
Expand Down Expand Up @@ -872,6 +873,7 @@ core:
homepage: Homepage
repo: Source Repository
load_location: Storage Location
issues: Issues feedback
loader:
toast:
entry_load_failed: Failed to load plugins entry file
Expand Down
2 changes: 2 additions & 0 deletions ui/src/locales/zh-CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@ core:
plugin_requires: 插件依赖
description: 描述
license: 协议
issues: 问题反馈
settings:
title: 主题设置
custom_templates:
Expand Down Expand Up @@ -830,6 +831,7 @@ core:
homepage: 网站
repo: 源码仓库
load_location: 存储位置
issues: 问题反馈
loader:
toast:
entry_load_failed: 加载插件入口文件失败
Expand Down
2 changes: 2 additions & 0 deletions ui/src/locales/zh-TW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ core:
plugin_requires: 插件依賴
description: 描述
license: 協議
issues: 問題回饋
settings:
title: 主題設置
custom_templates:
Expand Down Expand Up @@ -818,6 +819,7 @@ core:
homepage: 網站
repo: 源碼倉庫
load_location: 存儲位置
issues: 問題回饋
loader:
toast:
entry_load_failed: 讀取插件入口文件失敗
Expand Down