diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e242438..25cff57 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: dorny/paths-filter@v4 id: changes with: @@ -34,7 +34,7 @@ jobs: if: steps.changes.outputs.src == 'true' run: | bun install - bun bundle:ci + bun ci - name: Upload css assets if: steps.build.outcome == 'success' diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cf20109..a64be79 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -18,13 +18,13 @@ jobs: - vitest - build steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: oven-sh/setup-bun@v2 with: bun-version: "1.3.14" - - uses: actions/cache@v4 + - uses: actions/cache@v6 with: path: | node_modules @@ -33,17 +33,37 @@ jobs: - run: bun install - - if: matrix.check == 'eslint' - run: bun eslint . + - name: Lint + if: matrix.check == 'eslint' + run: bun lint - - if: matrix.check == 'prettier' - run: bun prettier --check . + - name: Format check + if: matrix.check == 'prettier' + run: bun fmt --check - - if: matrix.check == 'tsgo' - run: bunx --bun tsgo -b + - name: Type check + if: matrix.check == 'tsgo' + run: bun tsgo -b - - if: matrix.check == 'vitest' + - name: Test + if: matrix.check == 'vitest' run: bun vitest --run - - if: matrix.check == 'build' + - name: Build + id: build + if: matrix.check == 'build' run: bun bundle + + - name: Upload css assets + if: steps.build.outcome == 'success' + uses: actions/upload-artifact@v7 + with: + name: themes + path: dist/*.css + + - name: Upload templates assets + if: steps.build.outcome == 'success' + uses: actions/upload-artifact@v7 + with: + name: templates + path: templates diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 32425cf..9936953 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: oven-sh/setup-bun@v2 with: bun-version: "1.3.14" diff --git a/CHANGELOG.md b/CHANGELOG.md index 186c3bd..3e8e4c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### 🌈 Style - Reduce the displacement when the button is clicked. +- Remove the shadow of the administrator interface button. #### Adaptation for version 1.27 @@ -9,12 +10,19 @@ - Fix some border corner issues. - Fix the horizontal alignment issue of check boxes in some drop-down menus. - Optimize heat map style. +- Optimize transparency when stacking avatars. +- Synchronize the color of branches in Git commit graph. +- Synchronize PR operation comment panel style. #### More GitHub-like style - Fine tune the spacing of elements in menu sub items. - Optimize the spacing of warehouse themes on exploration pages. +- Increase the corner angle of the pop-up window. +- Synchronize the style of the search bar. +- Synchronize workflow summary style. ### 🐞 Fix +- Fix filter button overlaps with profile menu. #39 - Fix the issue where the branch menu under the manual workflow pop-up window is obscured. diff --git a/gitea/templates/repo/commit_sign_badge.tmpl b/gitea/templates/repo/commit_sign_badge.tmpl index f63e4ec..bf8185f 100644 --- a/gitea/templates/repo/commit_sign_badge.tmpl +++ b/gitea/templates/repo/commit_sign_badge.tmpl @@ -64,10 +64,10 @@ so this template should be kept as small as possible, DO NOT put large component {{- if $verified -}} {{- if and $signingUser $signingUser.ID -}} {{svg "gitea-lock"}} - {{ctx.AvatarUtils.Avatar $signingUser 16}} + {{ctx.AvatarUtils.Avatar $signingUser 20}} {{- else -}} {{svg "gitea-lock-cog"}} - {{ctx.AvatarUtils.AvatarByEmail $signingEmail "" 16}} + {{ctx.AvatarUtils.AvatarByEmail $signingEmail "" 20}} {{- end -}} {{- else -}} {{svg "gitea-unlock"}} diff --git a/gitea/templates/repo/commits_list.tmpl b/gitea/templates/repo/commits_list.tmpl index a072230..7a99bc7 100644 --- a/gitea/templates/repo/commits_list.tmpl +++ b/gitea/templates/repo/commits_list.tmpl @@ -2,27 +2,21 @@ - + - + {{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}} - {{range .Commits}} + {{range $commit := $.Commits}} + {{$gitCommit := $commit.GitCommit}} + {{$commitID := $gitCommit.ID.String}} - {{if .Committer}} - - {{else}} - - {{end}} +
{{ctx.Locale.Tr "repo.commits.author"}}{{ctx.Locale.Tr "repo.commits.author"}} {{StringUtils.ToUpper $.Repository.ObjectFormatName}}{{ctx.Locale.Tr "repo.commits.message"}}{{ctx.Locale.Tr "repo.commits.message"}} {{ctx.Locale.Tr "repo.commits.date"}}
- - {{- if .User -}} - {{- ctx.AvatarUtils.Avatar .User 20 "tw-mr-2" -}} - {{- .User.GetShortDisplayNameLinkHTML -}} - {{- else -}} - {{- ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 20 "tw-mr-2" -}} - {{- .Author.Name -}} - {{- end -}} - + {{ctx.RenderUtils.AvatarStackWithNames $commit.AvatarStackData}} {{$commitBaseLink := ""}} @@ -30,51 +24,51 @@ {{$commitBaseLink = printf "%s/wiki/commit" $commitRepoLink}} {{else if $.PageIsPullCommits}} {{$commitBaseLink = printf "%s/pulls/%d/commits" $commitRepoLink $.Issue.Index}} - {{else if $.Reponame}} + {{else}} {{$commitBaseLink = printf "%s/commit" $commitRepoLink}} {{end}} - {{template "repo/commit_sign_badge" dict "Commit" . "CommitBaseLink" $commitBaseLink "CommitSignVerification" .Verification}} + {{template "repo/commit_sign_badge" dict "Commit" $gitCommit "CommitBaseLink" $commitBaseLink "CommitSignVerification" .Verification}} {{if $.PageIsWiki}} - {{.Summary | ctx.RenderUtils.RenderEmoji}} + + {{$gitCommit.MessageTitle | ctx.RenderUtils.RenderEmoji}} + {{else}} - {{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String)}} - {{ctx.RenderUtils.RenderCommitMessageLinkSubject .Message $commitLink $.Repository}} + {{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape $commitID)}} + + {{ctx.RenderUtils.RenderCommitMessageLinkSubject $gitCommit.MessageUTF8 $commitLink $.Repository}} + {{end}} - {{if IsMultilineCommitMessage .Message}} + {{if $gitCommit.MessageBody}} {{end}} {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}} - {{if IsMultilineCommitMessage .Message}} -
{{ctx.RenderUtils.RenderCommitBody .Message $.Repository}}
+ {{if $gitCommit.MessageBody}} +
{{ctx.RenderUtils.RenderCommitBody $gitCommit.MessageUTF8 $.Repository}}
{{end}} {{if $.CommitsTagsMap}} - {{range (index $.CommitsTagsMap .ID.String)}} + {{range (index $.CommitsTagsMap $commitID)}} {{- template "repo/tag/name" dict "AdditionalClasses" "tw-py-0" "RepoLink" $.Repository.Link "TagName" .TagName "IsRelease" (not .IsTag) -}} {{end}} {{end}}
{{DateUtils.TimeSince .Committer.When}}{{DateUtils.TimeSince .Author.When}}{{DateUtils.TimeSince $gitCommit.Committer.When}} - + {{/* at the moment, wiki doesn't support these "view" links like "view at history point" */}} {{if not $.PageIsWiki}} {{/* view single file diff */}} {{if $.FileTreePath}} {{svg "octicon-file-diff"}} {{end}} {{/* view at history point */}} - {{$viewCommitLink := printf "%s/src/commit/%s" $commitRepoLink (PathEscape .ID.String)}} + {{$viewCommitLink := printf "%s/src/commit/%s" $commitRepoLink (PathEscape $commitID)}} {{if $.FileTreePath}}{{$viewCommitLink = printf "%s/%s" $viewCommitLink (PathEscapeSegments $.FileTreePath)}}{{end}} {{svg "octicon-file-code"}} {{end}} diff --git a/gitea/templates/repo/view_content.tmpl b/gitea/templates/repo/view_content.tmpl index 3413c09..77e051d 100644 --- a/gitea/templates/repo/view_content.tmpl +++ b/gitea/templates/repo/view_content.tmpl @@ -92,7 +92,7 @@ {{end}} - {{if IsMultilineCommitMessage .Message}} -
{{ctx.RenderUtils.RenderCommitBody .Message $.Repository}}
+ {{if $gitCommit.MessageBody}} +
{{ctx.RenderUtils.RenderCommitBody $gitCommit.MessageUTF8 $.Repository}}
{{end}} {{/* 提交者信息 */}} @@ -44,7 +35,7 @@
{{/* 标签 */}} {{if $.CommitsTagsMap}} - {{range (index $.CommitsTagsMap .ID.String)}} + {{range (index $.CommitsTagsMap $commitID)}} {{- template "repo/tag/name" dict "AdditionalClasses" "gitea-github-theme-tag" "RepoLink" $.Repository.Link "TagName" .TagName "IsRelease" (not .IsTag) -}} {{end}} {{end}} @@ -53,24 +44,24 @@ {{$commitBaseLink = printf "%s/wiki/commit" $commitRepoLink}} {{else if $.PageIsPullCommits}} {{$commitBaseLink = printf "%s/pulls/%d/commits" $commitRepoLink $.Issue.Index}} - {{else if $.Reponame}} + {{else}} {{$commitBaseLink = printf "%s/commit" $commitRepoLink}} {{end}} - {{template "repo/commit_sign_badge" dict "Commit" . "CommitBaseLink" $commitBaseLink "CommitSignVerification" .Verification}} + {{template "repo/commit_sign_badge" dict "Commit" $gitCommit "CommitBaseLink" $commitBaseLink "CommitSignVerification" .Verification}}
{{/* 操作 */}}
- + {{/* at the moment, wiki doesn't support these "view" links like "view at history point" */}} {{if not $.PageIsWiki}} {{/* view single file diff */}} {{if $.FileTreePath}} {{svg "octicon-file-diff"}} {{end}} {{/* view at history point */}} - {{$viewCommitLink := printf "%s/src/commit/%s" $commitRepoLink (PathEscape .ID.String)}} + {{$viewCommitLink := printf "%s/src/commit/%s" $commitRepoLink (PathEscape $commitID)}} {{if $.FileTreePath}}{{$viewCommitLink = printf "%s/%s" $viewCommitLink (PathEscapeSegments $.FileTreePath)}}{{end}} {{svg "octicon-code"}} {{end}} diff --git a/templates/repo/view_content.tmpl b/templates/repo/view_content.tmpl index 0a3aa71..895fa38 100644 --- a/templates/repo/view_content.tmpl +++ b/templates/repo/view_content.tmpl @@ -92,7 +92,7 @@