feat: Add Developer information to AppInfo structure and update processXgen
- Introduce Developer struct to encapsulate developer details such as ID, Name, Info, Email, and Homepage. - Update processXgen to include developer information in the generated settings map, enhancing app metadata.
This commit is contained in:
parent
5965460c3f
commit
645861d7a1
2 changed files with 23 additions and 8 deletions
|
|
@ -84,10 +84,20 @@ type AppInfo struct {
|
|||
Static Static `json:"public,omitempty"`
|
||||
Optional map[string]interface{} `json:"optional,omitempty"`
|
||||
Moapi Moapi `json:"moapi,omitempty"`
|
||||
Developer Developer `json:"developer,omitempty"`
|
||||
AfterLoad string `json:"afterLoad,omitempty"` // Process executed after the app is loaded
|
||||
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
|
||||
type Moapi struct {
|
||||
Channel string `json:"channel,omitempty"`
|
||||
|
|
|
|||
|
|
@ -580,15 +580,20 @@ func processXgen(process *process.Process) interface{} {
|
|||
xgenSetting := map[string]interface{}{
|
||||
"name": Setting.Name,
|
||||
"description": Setting.Description,
|
||||
"developer": share.App.Developer,
|
||||
"version": Setting.Version,
|
||||
"theme": Setting.Theme,
|
||||
"lang": Setting.Lang,
|
||||
"mode": mode,
|
||||
"apiPrefix": "__yao",
|
||||
"token": Setting.Token,
|
||||
"optional": Setting.Optional,
|
||||
"login": xgenLogin,
|
||||
"agent": agent,
|
||||
"yao": map[string]interface{}{
|
||||
"version": share.VERSION,
|
||||
"prversion": share.PRVERSION,
|
||||
},
|
||||
"theme": Setting.Theme,
|
||||
"lang": Setting.Lang,
|
||||
"mode": mode,
|
||||
"apiPrefix": "__yao",
|
||||
"token": Setting.Token,
|
||||
"optional": Setting.Optional,
|
||||
"login": xgenLogin,
|
||||
"agent": agent,
|
||||
}
|
||||
|
||||
if Setting.Logo != "" {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue