Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ecff47d

Browse files
author
徐新华
committed
modify download
1 parent fe3270c commit ecff47d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

http/controller/download.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (self DownloadController) RegisterRoute(g *echo.Group) {
3636
func (DownloadController) GoDl(ctx echo.Context) error {
3737
downloads := logic.DefaultDownload.FindAll(context.EchoContext(ctx))
3838

39-
featured := make([]*model.Download, 0, 4)
39+
featured := make([]*model.Download, 0, 5)
4040
stables := make(map[string][]*model.Download)
4141
stableVersions := make([]string, 0, 2)
4242
unstables := make(map[string][]*model.Download)
@@ -52,7 +52,7 @@ func (DownloadController) GoDl(ctx echo.Context) error {
5252
}
5353
stables[version] = append(stables[version], download)
5454

55-
if download.IsRecommend && len(featured) < 4 {
55+
if download.IsRecommend && len(featured) < 5 {
5656
featured = append(featured, download)
5757
}
5858
} else if download.Category == model.DLUnstable {

template/download/go.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,15 @@ <h3 id="featured">推荐下载 <a class="permalink" href="#featured">¶</a></h3>
3636
<div class="reqs">Windows 7 or later, Intel 64-bit 处理器</div>
3737
{{else if eq .OS "Linux"}}
3838
<div class="platform">Linux</div>
39-
<div class="reqs">Linux 2.6.23 or later, Intel 64-bit 处理器</div>
39+
<div class="reqs">Linux 2.6.32 or later, Intel 64-bit 处理器</div>
4040
{{else if eq .OS "macOS"}}
4141
<div class="platform">Apple macOS</div>
42+
{{if eq .Arch "x86-64"}}
4243
<div class="reqs">macOS 10.13 or later, Intel 64-bit 处理器</div>
44+
{{else}}
45+
<div class="reqs">macOS 11 or later, Apple 64-bit 处理器</div>
46+
{{end}}
47+
4348
{{else}}
4449
<div class="platform">源码</div>
4550
{{end}}

0 commit comments

Comments
 (0)