From 51c28d96838a743d2ba4fd679d92e8e15b536a19 Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Sat, 27 Apr 2024 16:05:06 +0300 Subject: [PATCH 1/9] Don't show loading indicators when refreshing the system status (#30712) Signed-off-by: Yarden Shoham Co-authored-by: wxiaoguang Co-authored-by: silverwind --- templates/admin/dashboard.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index 589fc5048a..3445433d53 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -76,7 +76,8 @@ {{ctx.Locale.Tr "admin.dashboard.system_status"}} {{/* TODO: make these stats work in multi-server deployments, likely needs per-server stats in DB */}} -
+
+
{{template "admin/system_status" .}}
From b93c87b6fe025408777d9f2091d29941e439e58c Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 27 Apr 2024 15:35:26 +0200 Subject: [PATCH 2/9] Issue card improvements (#30687) Fixes https://github.com/go-gitea/gitea/issues/30682 and does a few improvements: - Use gap instead of margin/padding - Don't render empty image div - Remove `right floated` class that did nothing Screenshot 2024-04-24 at 20 21 20 --------- Co-authored-by: KN4CK3R --- templates/repo/issue/card.tmpl | 25 +++++++++++++++---------- web_src/css/repo/issue-card.css | 2 +- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/templates/repo/issue/card.tmpl b/templates/repo/issue/card.tmpl index bb9340bb2e..4a0ac050aa 100644 --- a/templates/repo/issue/card.tmpl +++ b/templates/repo/issue/card.tmpl @@ -1,13 +1,16 @@ {{with .Issue}} {{if eq $.Page.Project.CardType 1}}{{/* Images and Text*/}} + {{$attachments := index $.Page.issuesAttachmentMap .ID}} + {{if $attachments}}
- {{range (index $.Page.issuesAttachmentMap .ID)}} + {{range $attachments}} {{.Name}} {{end}}
+ {{end}} {{end}} -
-
+
+
{{template "shared/issueicon" .}}
@@ -18,7 +21,7 @@ {{end}}
-
+
{{if not $.Page.Repository}}{{.Repo.FullName}}{{end}}#{{.Index}} {{$timeStr := TimeSinceUnix .GetLastEventTimestamp ctx.Locale}} @@ -59,13 +62,15 @@
{{if or .Labels .Assignees}} -
- {{range .Labels}} - {{RenderLabel ctx ctx.Locale .}} - {{end}} -
+
+
+ {{range .Labels}} + {{RenderLabel ctx ctx.Locale .}} + {{end}} +
+
diff --git a/web_src/css/repo/issue-card.css b/web_src/css/repo/issue-card.css index b9368df4f6..609b1b3dbd 100644 --- a/web_src/css/repo/issue-card.css +++ b/web_src/css/repo/issue-card.css @@ -1,6 +1,7 @@ .issue-card { display: flex; flex-direction: column; + gap: 4px; align-items: start; border-radius: var(--border-radius); padding: 8px 10px; @@ -17,7 +18,6 @@ .issue-card-title { flex: 1; font-size: 14px; - margin-left: 4px; } .issue-card.sortable-chosen .issue-card-title { From 6d2a307ad8af7d686f1c3a3706ff0f2df895658a Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 27 Apr 2024 22:02:07 +0800 Subject: [PATCH 3/9] Rename migration package name for 1.22-rc1 (#30730) Ref: Propose to restart 1.22 release #30501 --- models/migrations/migrations.go | 15 ++++++++------- models/migrations/{v1_23 => v1_22}/v294.go | 2 +- models/migrations/{v1_23 => v1_22}/v294_test.go | 2 +- models/migrations/{v1_23 => v1_22}/v295.go | 2 +- models/migrations/{v1_23 => v1_22}/v296.go | 2 +- models/migrations/{v1_23 => v1_22}/v297.go | 2 +- models/migrations/{v1_23 => v1_22}/v298.go | 2 +- 7 files changed, 14 insertions(+), 13 deletions(-) rename models/migrations/{v1_23 => v1_22}/v294.go (98%) rename models/migrations/{v1_23 => v1_22}/v294_test.go (98%) rename models/migrations/{v1_23 => v1_22}/v295.go (96%) rename models/migrations/{v1_23 => v1_22}/v296.go (95%) rename models/migrations/{v1_23 => v1_22}/v297.go (94%) rename models/migrations/{v1_23 => v1_22}/v298.go (90%) diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index 220d8c2331..4501585250 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -21,7 +21,6 @@ import ( "code.gitea.io/gitea/models/migrations/v1_20" "code.gitea.io/gitea/models/migrations/v1_21" "code.gitea.io/gitea/models/migrations/v1_22" - "code.gitea.io/gitea/models/migrations/v1_23" "code.gitea.io/gitea/models/migrations/v1_6" "code.gitea.io/gitea/models/migrations/v1_7" "code.gitea.io/gitea/models/migrations/v1_8" @@ -574,18 +573,20 @@ var migrations = []Migration{ // v293 -> v294 NewMigration("Ensure every project has exactly one default column", v1_22.CheckProjectColumnsConsistency), - // Gitea 1.22.0 ends at 294 + // Gitea 1.22.0-rc0 ends at 294 // v294 -> v295 - NewMigration("Add unique index for project issue table", v1_23.AddUniqueIndexForProjectIssue), + NewMigration("Add unique index for project issue table", v1_22.AddUniqueIndexForProjectIssue), // v295 -> v296 - NewMigration("Add commit status summary table", v1_23.AddCommitStatusSummary), + NewMigration("Add commit status summary table", v1_22.AddCommitStatusSummary), // v296 -> v297 - NewMigration("Add missing field of commit status summary table", v1_23.AddCommitStatusSummary2), + NewMigration("Add missing field of commit status summary table", v1_22.AddCommitStatusSummary2), // v297 -> v298 - NewMigration("Add everyone_access_mode for repo_unit", v1_23.AddRepoUnitEveryoneAccessMode), + NewMigration("Add everyone_access_mode for repo_unit", v1_22.AddRepoUnitEveryoneAccessMode), // v298 -> v299 - NewMigration("Drop wrongly created table o_auth2_application", v1_23.DropWronglyCreatedTable), + NewMigration("Drop wrongly created table o_auth2_application", v1_22.DropWronglyCreatedTable), + + // Gitea 1.22.0-rc1 ends at 299 } // GetCurrentDBVersion returns the current db version diff --git a/models/migrations/v1_23/v294.go b/models/migrations/v1_22/v294.go similarity index 98% rename from models/migrations/v1_23/v294.go rename to models/migrations/v1_22/v294.go index f2a54f6d23..20e261fb1b 100644 --- a/models/migrations/v1_23/v294.go +++ b/models/migrations/v1_22/v294.go @@ -1,7 +1,7 @@ // Copyright 2024 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -package v1_23 //nolint +package v1_22 //nolint import ( "fmt" diff --git a/models/migrations/v1_23/v294_test.go b/models/migrations/v1_22/v294_test.go similarity index 98% rename from models/migrations/v1_23/v294_test.go rename to models/migrations/v1_22/v294_test.go index d9a44ad866..82a3bcd602 100644 --- a/models/migrations/v1_23/v294_test.go +++ b/models/migrations/v1_22/v294_test.go @@ -1,7 +1,7 @@ // Copyright 2024 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -package v1_23 //nolint +package v1_22 //nolint import ( "slices" diff --git a/models/migrations/v1_23/v295.go b/models/migrations/v1_22/v295.go similarity index 96% rename from models/migrations/v1_23/v295.go rename to models/migrations/v1_22/v295.go index 9a2003cfc1..17bdadb4ad 100644 --- a/models/migrations/v1_23/v295.go +++ b/models/migrations/v1_22/v295.go @@ -1,7 +1,7 @@ // Copyright 2024 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -package v1_23 //nolint +package v1_22 //nolint import "xorm.io/xorm" diff --git a/models/migrations/v1_23/v296.go b/models/migrations/v1_22/v296.go similarity index 95% rename from models/migrations/v1_23/v296.go rename to models/migrations/v1_22/v296.go index 495ae2ab23..1ecacab95f 100644 --- a/models/migrations/v1_23/v296.go +++ b/models/migrations/v1_22/v296.go @@ -1,7 +1,7 @@ // Copyright 2024 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -package v1_23 //nolint +package v1_22 //nolint import "xorm.io/xorm" diff --git a/models/migrations/v1_23/v297.go b/models/migrations/v1_22/v297.go similarity index 94% rename from models/migrations/v1_23/v297.go rename to models/migrations/v1_22/v297.go index e79f04cf9c..7d4b506925 100644 --- a/models/migrations/v1_23/v297.go +++ b/models/migrations/v1_22/v297.go @@ -1,7 +1,7 @@ // Copyright 2024 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -package v1_23 //nolint +package v1_22 //nolint import ( "code.gitea.io/gitea/models/perm" diff --git a/models/migrations/v1_23/v298.go b/models/migrations/v1_22/v298.go similarity index 90% rename from models/migrations/v1_23/v298.go rename to models/migrations/v1_22/v298.go index 8761a05d3d..b9f3b95ade 100644 --- a/models/migrations/v1_23/v298.go +++ b/models/migrations/v1_22/v298.go @@ -1,7 +1,7 @@ // Copyright 2024 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -package v1_23 //nolint +package v1_22 //nolint import "xorm.io/xorm" From 8de2992ffba8cc627757ecea1e002a55581113d2 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 27 Apr 2024 22:32:00 +0800 Subject: [PATCH 4/9] Make Ctrl+Enter work for issue/comment edit (#30720) Fix #30710 --- templates/repo/diff/box.tmpl | 4 ++-- templates/repo/issue/view_content.tmpl | 6 +++--- web_src/js/features/comp/QuickSubmit.js | 7 ++++++- web_src/js/features/repo-issue-edit.js | 4 ++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 92a3163642..641de294fd 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -235,7 +235,7 @@ {{if and (not $.Repository.IsArchived) (not .DiffNotAvailable)}} diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 8316df2ee1..d40134ed08 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -146,7 +146,7 @@