Merge pull request #923 from trheyi/main

feat: Add Developer information to AppInfo structure and update proce…
This commit is contained in:
Max 2025-04-09 23:07:08 +08:00 committed by GitHub
commit 951da60267
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 8 deletions

View file

@ -84,10 +84,20 @@ type AppInfo struct {
Static Static `json:"public,omitempty"` Static Static `json:"public,omitempty"`
Optional map[string]interface{} `json:"optional,omitempty"` Optional map[string]interface{} `json:"optional,omitempty"`
Moapi Moapi `json:"moapi,omitempty"` Moapi Moapi `json:"moapi,omitempty"`
Developer Developer `json:"developer,omitempty"`
AfterLoad string `json:"afterLoad,omitempty"` // Process executed after the app is loaded AfterLoad string `json:"afterLoad,omitempty"` // Process executed after the app is loaded
AfterMigrate string `json:"afterMigrate,omitempty"` // Process executed after the app is migrated AfterMigrate string `json:"afterMigrate,omitempty"` // Process executed after the app is migrated
} }
// Developer The developer informations
type Developer struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Info string `json:"info,omitempty"`
Email string `json:"email,omitempty"`
Homepage string `json:"homepage,omitempty"`
}
// Moapi AIGC App Store API // Moapi AIGC App Store API
type Moapi struct { type Moapi struct {
Channel string `json:"channel,omitempty"` Channel string `json:"channel,omitempty"`

View file

@ -580,15 +580,20 @@ func processXgen(process *process.Process) interface{} {
xgenSetting := map[string]interface{}{ xgenSetting := map[string]interface{}{
"name": Setting.Name, "name": Setting.Name,
"description": Setting.Description, "description": Setting.Description,
"developer": share.App.Developer,
"version": Setting.Version, "version": Setting.Version,
"theme": Setting.Theme, "yao": map[string]interface{}{
"lang": Setting.Lang, "version": share.VERSION,
"mode": mode, "prversion": share.PRVERSION,
"apiPrefix": "__yao", },
"token": Setting.Token, "theme": Setting.Theme,
"optional": Setting.Optional, "lang": Setting.Lang,
"login": xgenLogin, "mode": mode,
"agent": agent, "apiPrefix": "__yao",
"token": Setting.Token,
"optional": Setting.Optional,
"login": xgenLogin,
"agent": agent,
} }
if Setting.Logo != "" { if Setting.Logo != "" {