1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-03-01 03:24:14 +08:00

fix: Fixed the issue where local application descriptions were not di… (#7896)

Refs https://github.com/1Panel-dev/1Panel/issues/7886
This commit is contained in:
zhengkunwang 2025-02-18 14:17:11 +08:00 committed by GitHub
parent 39385ea0a0
commit f3d85d1309
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 5 deletions

View File

@ -78,8 +78,8 @@ type AppProperty struct {
Name string `json:"name"`
Type string `json:"type"`
Tags []string `json:"tags"`
ShortDescZh string `json:"shortDescZh"`
ShortDescEn string `json:"shortDescEn"`
ShortDescZh string `json:"shortDescZh" yaml:"shortDescZh"`
ShortDescEn string `json:"shortDescEn" yaml:"shortDescEn"`
Description Locale `json:"description"`
Key string `json:"key"`
Required []string `json:"Required"`

View File

@ -1163,12 +1163,11 @@ func handleLocalApp(appDir string) (app *model.App, err error) {
app.Website = appDefine.Website
app.Github = appDefine.Github
app.Document = appDefine.Document
if appDefine.ShortDescZh != "" {
appDefine.Description.Zh = appDefine.ShortDescZh
app.ShortDescZh = appDefine.ShortDescZh
}
if appDefine.ShortDescEn != "" {
appDefine.Description.En = appDefine.ShortDescEn
app.ShortDescEn = appDefine.ShortDescEn
}
desc, _ := json.Marshal(appDefine.Description)
app.Description = string(desc)