diff --git a/.golangci.yml b/.golangci.yml index 069dc13c991e..d6ce37f49afa 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -29,7 +29,6 @@ linters: fast: false run: - go: "1.21" timeout: 10m skip-dirs: - node_modules @@ -75,7 +74,6 @@ linters-settings: - name: modifies-value-receiver gofumpt: extra-rules: true - lang-version: "1.21" depguard: rules: main: diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 2209822ff086..a4e777fa1289 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -1221,6 +1221,9 @@ LEVEL = Info ;; For custom reactions, add a tightly cropped square image to public/assets/img/emoji/reaction_name.png ;REACTIONS = +1, -1, laugh, hooray, confused, heart, rocket, eyes ;; +;; Change the number of users that are displayed in reactions tooltip (triggered by mouse hover). +;REACTION_MAX_USER_NUM = 10 +;; ;; Additional Emojis not defined in the utf8 standard ;; By default we support gitea (:gitea:), to add more copy them to public/assets/img/emoji/emoji_name.png and add it to this config. ;; Dont mistake it for Reactions. diff --git a/docs/content/administration/config-cheat-sheet.en-us.md b/docs/content/administration/config-cheat-sheet.en-us.md index 715bd6d325f5..401da352c126 100644 --- a/docs/content/administration/config-cheat-sheet.en-us.md +++ b/docs/content/administration/config-cheat-sheet.en-us.md @@ -223,6 +223,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `REACTIONS`: All available reactions users can choose on issues/prs and comments Values can be emoji alias (:smile:) or a unicode emoji. For custom reactions, add a tightly cropped square image to public/assets/img/emoji/reaction_name.png +- `REACTION_MAX_USER_NUM`: **10**: Change the number of users that are displayed in reactions tooltip (triggered by mouse hover). - `CUSTOM_EMOJIS`: **gitea, codeberg, gitlab, git, github, gogs**: Additional Emojis not defined in the utf8 standard. By default, we support Gitea (:gitea:), to add more copy them to public/assets/img/emoji/emoji_name.png and add it to this config. diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go index 4dfa01d8e2a7..89bb1839e174 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -716,14 +716,11 @@ func checkCitationFile(ctx *context.Context, entry *git.TreeEntry) { return } defer dataRc.Close() - buf := make([]byte, 1024) - n, err := util.ReadAtMost(dataRc, buf) + ctx.PageData["citationFileContent"], err = blob.GetBlobContent(setting.UI.MaxDisplayFileSize) if err != nil { - ctx.ServerError("ReadAtMost", err) + ctx.ServerError("GetBlobContent", err) return } - buf = buf[:n] - ctx.PageData["citationFileContent"] = string(buf) break } } diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 81b2ba1b0bd1..d91dc4394e97 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -5,7 +5,7 @@ {{template "base/alert" .}} {{template "repo/code/recently_pushed_new_branches" .}} {{if and (not .HideRepoInfo) (not .IsBlame)}} -
+
{{$description := .Repository.DescriptionHTML $.Context}} {{if $description}}{{$description | RenderCodeBlock}}{{else if .IsRepositoryAdmin}}{{ctx.Locale.Tr "repo.no_desc"}}{{end}} diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index baa3380c6571..817f20af203e 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -4,7 +4,8 @@ {{$createdStr:= TimeSinceUnix .CreatedUnix ctx.Locale}}