Compare commits

...

16 Commits

Author SHA1 Message Date
jmiller b7f9743ade Merge pull request 'rc: fix dashboard icon' (#203) from rc/05.03.06 into main 2026-05-26 04:39:15 +00:00
jmiller c236c4e018 Merge pull request 'fix(ui): replace missing octicon-dashboard icon' (#202) from fix/missing-dashboard-icon into dev
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 20s
2026-05-26 04:39:00 +00:00
Jonathan Miller b79b48b760 fix(ui): replace missing octicon-dashboard with octicon-meter
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 2s
octicon-dashboard doesn't exist in Gitea's SVG set, causing the
icon to render as raw text. octicon-meter is the equivalent gauge icon.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 23:38:53 -05:00
jmiller 22a529dfd8 Merge pull request 'rc: admin nav CSS fix' (#201) from rc/05.03.05 into main 2026-05-26 04:30:31 +00:00
jmiller 09dc64eef0 Merge pull request 'fix(ui): admin sidebar left-align CSS' (#200) from fix/admin-nav-css into dev
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 22s
2026-05-26 04:30:13 +00:00
Jonathan Miller d541a07263 fix(ui): left-align admin sidebar — fix justify-content and text-align
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 2s
Changed details.toggleable-item summary from justify-content:
space-between to gap + margin-left: auto on the chevron. Added
.flex-container-nav .item rule to force left alignment on all
menu items including standalone links.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 23:29:52 -05:00
jmiller 2eee4bbf1c Merge pull request 'rc: admin nav left align' (#199) from rc/05.03.04 into main 2026-05-26 03:57:55 +00:00
jmiller 2dea95a431 Merge pull request 'fix(ui): force left-align admin sidebar' (#198) from fix/admin-nav-left-align into dev
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 21s
2026-05-26 03:57:36 +00:00
Jonathan Miller f69212859a fix(ui): force left-align on admin sidebar menu via inline style
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 2s
The compiled CSS bundle doesn't pick up the flexcontainer.css change.
Use inline style with !important on the menu container to override
Fomantic UI's default center alignment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 22:57:30 -05:00
jmiller 3828411311 Merge pull request 'rc: admin nav alignment' (#197) from rc/05.03.03 into main 2026-05-26 03:48:02 +00:00
jmiller 447a45ec15 Merge pull request 'fix(ui): left-align admin sidebar menu items' (#196) from fix/admin-nav-alignment into dev
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 25s
2026-05-26 03:47:43 +00:00
Jonathan Miller f19fd9683f fix(ui): left-align all admin sidebar menu items
Branch Policy Check / Verify merge target (pull_request) Successful in 2s
PR RC Release / Build RC Release (pull_request) Successful in 2s
Fomantic UI's vertical menu centers text by default. Added
text-align: left to .flex-container-nav menu items so all
admin sidebar entries align consistently.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 22:47:36 -05:00
jmiller 039ab896cc Merge pull request 'rc: per-file checksums + login logo fix' (#195) from rc/05.03.02 into main 2026-05-26 03:37:00 +00:00
jmiller 65660863d6 Merge pull request 'fix: per-file sha256 checksums' (#194) from fix/checksum-per-file into dev
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 21s
2026-05-26 03:36:45 +00:00
Jonathan Miller 198ae92579 fix: generate per-file [filename].sha256 instead of single manifest
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 2s
Each release attachment now gets its own .sha256 checksum file
(e.g. asset.zip.sha256) instead of a single checksums.sha256 manifest.
Old .sha256 files are cleaned up before regenerating.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-25 22:35:51 -05:00
jmiller bc4eae2e0f Merge pull request 'rc: login logo default none' (#193) from rc/05.03.01 into main 2026-05-26 03:28:57 +00:00
4 changed files with 37 additions and 28 deletions
+24 -25
View File
@@ -9,6 +9,7 @@ import (
"crypto/sha256"
"fmt"
"io"
"strings"
repo_model "git.mokoconsulting.tech/MokoConsulting/MokoGitea/models/repo"
"git.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/log"
@@ -17,9 +18,8 @@ import (
)
// GenerateReleaseChecksums computes SHA256 checksums for all attachments
// on a release and adds a checksums.sha256 manifest file as an attachment.
// on a release and creates a [filename].sha256 file for each one.
func GenerateReleaseChecksums(ctx context.Context, rel *repo_model.Release) error {
// Load attachments into rel.Attachments
if err := repo_model.GetReleaseAttachments(ctx, rel); err != nil {
return fmt.Errorf("GetReleaseAttachments: %w", err)
}
@@ -28,20 +28,19 @@ func GenerateReleaseChecksums(ctx context.Context, rel *repo_model.Release) erro
return nil
}
// Remove existing checksums file if present
// Remove existing .sha256 files
for _, a := range rel.Attachments {
if a.Name == "checksums.sha256" {
if strings.HasSuffix(a.Name, ".sha256") {
if err := repo_model.DeleteAttachment(ctx, a, true); err != nil {
log.Warn("Failed to delete old checksums.sha256: %v", err)
log.Warn("Failed to delete old %s: %v", a.Name, err)
}
break
}
}
// Compute SHA256 for each attachment
var manifest bytes.Buffer
// Compute SHA256 for each non-checksum attachment and create individual .sha256 files
created := 0
for _, a := range rel.Attachments {
if a.Name == "checksums.sha256" {
if strings.HasSuffix(a.Name, ".sha256") {
continue
}
@@ -59,24 +58,24 @@ func GenerateReleaseChecksums(ctx context.Context, rel *repo_model.Release) erro
}
fr.Close()
fmt.Fprintf(&manifest, "%x %s\n", h.Sum(nil), a.Name)
checksumContent := fmt.Sprintf("%x %s\n", h.Sum(nil), a.Name)
checksumReader := bytes.NewBufferString(checksumContent)
checksumAttach := &repo_model.Attachment{
RepoID: rel.RepoID,
ReleaseID: rel.ID,
Name: a.Name + ".sha256",
}
if _, err := attachment_service.NewAttachment(ctx, checksumAttach, checksumReader, int64(len(checksumContent))); err != nil {
log.Warn("Failed to create %s: %v", checksumAttach.Name, err)
continue
}
created++
}
if manifest.Len() == 0 {
return nil
if created > 0 {
log.Info("Generated %d .sha256 checksum files for release %s (repo %d)", created, rel.TagName, rel.RepoID)
}
// Create the checksums.sha256 attachment
checksumAttach := &repo_model.Attachment{
RepoID: rel.RepoID,
ReleaseID: rel.ID,
Name: "checksums.sha256",
}
if _, err := attachment_service.NewAttachment(ctx, checksumAttach, &manifest, int64(manifest.Len())); err != nil {
return fmt.Errorf("create checksums.sha256 attachment: %w", err)
}
log.Info("Generated checksums.sha256 for release %s (repo %d)", rel.TagName, rel.RepoID)
return nil
}
+2 -2
View File
@@ -1,12 +1,12 @@
<div class="flex-container-nav">
<div class="ui fluid vertical menu">
<div class="ui fluid vertical menu" style="text-align: left !important;">
<div class="header item">{{ctx.Locale.Tr "admin.settings"}}</div>
<details class="item toggleable-item" {{if or .PageIsAdminDashboard .PageIsAdminSelfCheck}}open{{end}}>
<summary>{{svg "octicon-tools" 16}} {{ctx.Locale.Tr "admin.maintenance"}}</summary>
<div class="menu">
<a class="{{if .PageIsAdminDashboard}}active {{end}}item" href="{{AppSubUrl}}/-/admin">
{{svg "octicon-dashboard" 16}} {{ctx.Locale.Tr "admin.dashboard"}}
{{svg "octicon-meter" 16}} {{ctx.Locale.Tr "admin.dashboard"}}
</a>
<a class="{{if .PageIsAdminSelfCheck}}active {{end}}item" href="{{AppSubUrl}}/-/admin/self_check">
{{svg "octicon-check-circle" 16}} {{ctx.Locale.Tr "admin.self_check"}}
+4
View File
@@ -11,6 +11,10 @@
width: 240px;
}
.flex-container-nav .ui.menu .item {
text-align: left;
}
/* wide sidebar on the right, used in frontpage */
.flex-container-sidebar {
width: 35%;
+7 -1
View File
@@ -9,8 +9,8 @@ details.toggleable-item .menu {
details.toggleable-item summary {
display: flex;
justify-content: space-between;
align-items: center;
gap: 0.5em;
padding: 0.92857143em 1.14285714em;
}
@@ -20,6 +20,7 @@ details.toggleable-item summary::-webkit-details-marker /* Safari */ {
}
details.toggleable-item summary::after {
margin-left: auto;
transition: transform 0.25s ease;
content: "";
width: 14px;
@@ -35,3 +36,8 @@ details.toggleable-item summary::after {
details.toggleable-item[open] summary::after {
transform: rotate(90deg);
}
.flex-container-nav .ui.menu .item {
text-align: left !important;
justify-content: flex-start !important;
}