mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-20 05:58:07 +01:00
🎨 改进集市已下载包更新 https://github.com/siyuan-note/siyuan/issues/5807
This commit is contained in:
parent
9bc71a9f2c
commit
3bb1427492
12 changed files with 32 additions and 9 deletions
|
|
@ -96,6 +96,7 @@
|
|||
"releaseDate": "Release Date",
|
||||
"pkgSize": "Package size",
|
||||
"installSize": "Install Size",
|
||||
"installDate": "Install Date",
|
||||
"optimizeTypography": "Optimize typography",
|
||||
"dragPosition": "Drag image to reposition",
|
||||
"exportPDF0": "Page Size",
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@
|
|||
"releaseDate": "Fecha de lanzamiento",
|
||||
"pkgSize": "Tamaño del paquete",
|
||||
"installSize": "Tamaño de instalación",
|
||||
"installDate": "Fecha de instalación",
|
||||
"optimizeTypography": "Insertar un espacio entre el chino y el occidental",
|
||||
"dragPosition": "Arrastrar imagen para reposicionarla",
|
||||
"exportPDF0": "Tamaño de la página",
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@
|
|||
"releaseDate": "Date de sortie",
|
||||
"pkgSize": "Taille du package",
|
||||
"installSize": "Taille d'installation",
|
||||
"installDate": "Date d'installation",
|
||||
"optimizeTypography": "Optimiser la typographie",
|
||||
"dragPosition": "Faites glisser l'image pour la repositionner",
|
||||
"exportPDF0": "Taille de la page",
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@
|
|||
"releaseDate": "發布日期",
|
||||
"pkgSize": "包大小",
|
||||
"installSize": "安裝大小",
|
||||
"installDate": "安裝日期",
|
||||
"optimizeTypography": "優化排版",
|
||||
"dragPosition": "拖動圖像重新定位",
|
||||
"exportPDF0": "頁面大小",
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@
|
|||
"releaseDate": "发布日期",
|
||||
"pkgSize": "包大小",
|
||||
"installSize": "安装大小",
|
||||
"installDate": "安装日期",
|
||||
"optimizeTypography": "优化排版",
|
||||
"dragPosition": "上下拖动图片以调整位置",
|
||||
"exportPDF0": "页面大小",
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ export const bazaar = {
|
|||
<div class="fn__hr--b"></div>
|
||||
<div class="ft__on-surface ft__smaller" style="line-height: 20px;">${window.siyuan.languages.currentVer}<br>v${data.version}</div>
|
||||
<div class="fn__hr"></div>
|
||||
<div class="ft__on-surface ft__smaller" style="line-height: 20px;">${window.siyuan.languages.releaseDate}<br>${data.hUpdated}</div>
|
||||
<div class="ft__on-surface ft__smaller" style="line-height: 20px;">${isDownloaded ? window.siyuan.languages.installDate : window.siyuan.languages.releaseDate}<br>${isDownloaded ? data.hInstallDate : data.hUpdated}</div>
|
||||
<div class="fn__hr"></div>
|
||||
<div class="ft__on-surface ft__smaller" style="line-height: 20px;">${isDownloaded ? window.siyuan.languages.installSize : window.siyuan.languages.pkgSize}<br>${isDownloaded ? data.hInstallSize : data.hSize}</div>
|
||||
<div class="fn__hr--b"></div>
|
||||
|
|
|
|||
1
app/src/types/index.d.ts
vendored
1
app/src/types/index.d.ts
vendored
|
|
@ -496,5 +496,6 @@ declare interface IBazaarItem {
|
|||
modes: string[]
|
||||
hSize: string
|
||||
hInstallSize: string
|
||||
hInstallDate: string
|
||||
hUpdated: string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,8 +135,12 @@ func InstalledIcons() (ret []*Icon) {
|
|||
icon.RepoURL = icon.URL
|
||||
icon.PreviewURL = "/appearance/icons/" + dirName + "/preview.png"
|
||||
icon.PreviewURLThumb = "/appearance/icons/" + dirName + "/preview.png"
|
||||
icon.Updated = iconDir.ModTime().Format("2006-01-02 15:04:05")
|
||||
icon.HUpdated = formatUpdated(icon.Updated)
|
||||
info, statErr := os.Stat(filepath.Join(installPath, "README.md"))
|
||||
if nil != statErr {
|
||||
logging.LogWarnf("stat install theme README.md failed: %s", statErr)
|
||||
continue
|
||||
}
|
||||
icon.HInstallDate = info.ModTime().Format("2006-01-02")
|
||||
installSize, _ := util.SizeOfDirectory(installPath)
|
||||
icon.InstallSize = installSize
|
||||
icon.HInstallSize = humanize.Bytes(uint64(installSize))
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ type Package struct {
|
|||
HSize string `json:"hSize"`
|
||||
InstallSize int64 `json:"installSize"`
|
||||
HInstallSize string `json:"hInstallSize"`
|
||||
HInstallDate string `json:"hInstallDate"`
|
||||
HUpdated string `json:"hUpdated"`
|
||||
Downloads int `json:"downloads"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,8 +135,12 @@ func InstalledTemplates() (ret []*Template) {
|
|||
template.RepoURL = template.URL
|
||||
template.PreviewURL = "/templates/" + dirName + "/preview.png"
|
||||
template.PreviewURLThumb = "/templates/" + dirName + "/preview.png"
|
||||
template.Updated = templateDir.ModTime().Format("2006-01-02 15:04:05")
|
||||
template.HUpdated = formatUpdated(template.Updated)
|
||||
info, statErr := os.Stat(filepath.Join(installPath, "README.md"))
|
||||
if nil != statErr {
|
||||
logging.LogWarnf("stat install theme README.md failed: %s", statErr)
|
||||
continue
|
||||
}
|
||||
template.HInstallDate = info.ModTime().Format("2006-01-02")
|
||||
installSize, _ := util.SizeOfDirectory(installPath)
|
||||
template.InstallSize = installSize
|
||||
template.HInstallSize = humanize.Bytes(uint64(installSize))
|
||||
|
|
|
|||
|
|
@ -138,8 +138,12 @@ func InstalledThemes() (ret []*Theme) {
|
|||
theme.RepoURL = theme.URL
|
||||
theme.PreviewURL = "/appearance/themes/" + dirName + "/preview.png"
|
||||
theme.PreviewURLThumb = "/appearance/themes/" + dirName + "/preview.png"
|
||||
theme.Updated = themeDir.ModTime().Format("2006-01-02 15:04:05")
|
||||
theme.HUpdated = formatUpdated(theme.Updated)
|
||||
info, statErr := os.Stat(filepath.Join(installPath, "README.md"))
|
||||
if nil != statErr {
|
||||
logging.LogWarnf("stat install theme README.md failed: %s", statErr)
|
||||
continue
|
||||
}
|
||||
theme.HInstallDate = info.ModTime().Format("2006-01-02")
|
||||
installSize, _ := util.SizeOfDirectory(installPath)
|
||||
theme.InstallSize = installSize
|
||||
theme.HInstallSize = humanize.Bytes(uint64(installSize))
|
||||
|
|
|
|||
|
|
@ -133,8 +133,12 @@ func InstalledWidgets() (ret []*Widget) {
|
|||
widget.RepoURL = widget.URL
|
||||
widget.PreviewURL = "/widgets/" + dirName + "/preview.png"
|
||||
widget.PreviewURLThumb = "/widgets/" + dirName + "/preview.png"
|
||||
widget.Updated = widgetDir.ModTime().Format("2006-01-02 15:04:05")
|
||||
widget.HUpdated = formatUpdated(widget.Updated)
|
||||
info, statErr := os.Stat(filepath.Join(installPath, "README.md"))
|
||||
if nil != statErr {
|
||||
logging.LogWarnf("stat install theme README.md failed: %s", statErr)
|
||||
continue
|
||||
}
|
||||
widget.HInstallDate = info.ModTime().Format("2006-01-02")
|
||||
installSize, _ := util.SizeOfDirectory(installPath)
|
||||
widget.InstallSize = installSize
|
||||
widget.HInstallSize = humanize.Bytes(uint64(installSize))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue