mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-06 05:28:29 -04:00
theme: add WCAG data
This commit is contained in:
@@ -40,6 +40,7 @@ func HandleList(conn *models.Conn, req models.Request) {
|
||||
SourceDir: t.SourceDir,
|
||||
Installed: installed,
|
||||
FirstParty: isFirstParty(t.Author),
|
||||
WCAG: t.WCAG,
|
||||
}
|
||||
addVariantsInfo(&info, t.Variants)
|
||||
result[i] = info
|
||||
|
||||
@@ -45,6 +45,7 @@ func HandleSearch(conn *models.Conn, req models.Request) {
|
||||
Description: t.Description,
|
||||
Installed: installed,
|
||||
FirstParty: isFirstParty(t.Author),
|
||||
WCAG: t.WCAG,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package themes
|
||||
|
||||
import (
|
||||
"github.com/AvengeMedia/DankMaterialShell/core/internal/themes"
|
||||
)
|
||||
|
||||
type VariantInfo struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
@@ -32,16 +36,17 @@ type VariantsInfo struct {
|
||||
}
|
||||
|
||||
type ThemeInfo struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Version string `json:"version"`
|
||||
Author string `json:"author,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
PreviewPath string `json:"previewPath,omitempty"`
|
||||
SourceDir string `json:"sourceDir,omitempty"`
|
||||
Installed bool `json:"installed,omitempty"`
|
||||
FirstParty bool `json:"firstParty,omitempty"`
|
||||
HasUpdate bool `json:"hasUpdate,omitempty"`
|
||||
HasVariants bool `json:"hasVariants,omitempty"`
|
||||
Variants *VariantsInfo `json:"variants,omitempty"`
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Version string `json:"version"`
|
||||
Author string `json:"author,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
PreviewPath string `json:"previewPath,omitempty"`
|
||||
SourceDir string `json:"sourceDir,omitempty"`
|
||||
Installed bool `json:"installed,omitempty"`
|
||||
FirstParty bool `json:"firstParty,omitempty"`
|
||||
HasUpdate bool `json:"hasUpdate,omitempty"`
|
||||
HasVariants bool `json:"hasVariants,omitempty"`
|
||||
Variants *VariantsInfo `json:"variants,omitempty"`
|
||||
WCAG *themes.ThemeWCAG `json:"wcag,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user