handle feedback

This commit is contained in:
techknowlogick
2026-03-23 14:17:28 -04:00
parent 4c145fe49a
commit a9862b6502
4 changed files with 13 additions and 7 deletions
+6
View File
@@ -6,6 +6,7 @@ package repo
import (
"context"
"strings"
"time"
"code.gitea.io/gitea/models/db"
@@ -34,6 +35,11 @@ type Mirror struct {
RemoteAddress string `xorm:"VARCHAR(2048)"`
}
// IsSSHRemoteAddress returns true if the mirror's remote address uses SSH.
func (m *Mirror) IsSSHRemoteAddress() bool {
return strings.HasPrefix(m.RemoteAddress, "ssh://")
}
func init() {
db.RegisterModel(new(Mirror))
}
+3 -3
View File
@@ -949,14 +949,14 @@
"settings.visibility.limited_tooltip": "Visible only to authenticated users",
"settings.visibility.private": "Private",
"settings.visibility.private_tooltip": "Visible only to members of organizations you have joined",
"settings.mirror_ssh_title": "Repository Mirror SSH Keys",
"settings.mirror_ssh_description": "SSH keys for repository mirroring allow you to authenticate with remote Git repositories using SSH. Each user and organization has their own SSH keypair stored securely.",
"settings.mirror_ssh_title": "Managed SSH Keys",
"settings.mirror_ssh_description": "Managed SSH keys allow you to authenticate with remote Git repositories using SSH for mirroring and migrations. Each user and organization has their own SSH keypair stored securely.",
"settings.mirror_ssh_current_key": "Current SSH Public Key",
"settings.mirror_ssh_fingerprint": "Fingerprint",
"settings.mirror_ssh_generate": "Generate SSH Key",
"settings.mirror_ssh_regenerate": "Regenerate SSH Key",
"settings.mirror_ssh_regenerated": "SSH keypair has been regenerated successfully.",
"settings.mirror_ssh_documentation": "SSH keys are automatically used for SSH-based repository mirrors. Add the public key to your remote Git service (GitHub, GitLab, etc.) to enable authentication.",
"settings.mirror_ssh_documentation": "SSH keys are automatically used for SSH-based repository mirrors and migrations. Add the public key to your remote Git service (GitHub, GitLab, etc.) to enable authentication.",
"settings.mirror_ssh_org_notice": "This SSH key is only for your personal repositories. For organization repositories, you need to configure SSH keys in the organization's settings.",
"repo.new_repo_helper": "A repository contains all project files, including revision history. Already hosting one elsewhere? <a href=\"%s\">Migrate repository.</a>",
"repo.owner": "Owner",
+1 -1
View File
@@ -374,6 +374,6 @@ func RegenerateUserSSHKeypair(ctx *context.Context) {
return
}
ctx.Flash.Success(ctx.Tr("settings.mirror_ssh_key_regenerated"))
ctx.Flash.Success(ctx.Tr("settings.mirror_ssh_regenerated"))
ctx.Redirect(setting.AppSubURL + "/user/settings/keys")
}
+3 -3
View File
@@ -121,10 +121,10 @@
{{if $.PullMirror}}
<div class="fork-flag">
{{ctx.Locale.Tr "repo.mirror_from"}}
{{if not (StringUtils.HasPrefix $.PullMirror.RemoteAddress "ssh://")}}
<a target="_blank" href="{{$.PullMirror.RemoteAddress}}">{{$.PullMirror.RemoteAddress}}</a>
{{else}}
{{if $.PullMirror.IsSSHRemoteAddress}}
<span>{{$.PullMirror.RemoteAddress}}</span>
{{else}}
<a target="_blank" href="{{$.PullMirror.RemoteAddress}}">{{$.PullMirror.RemoteAddress}}</a>
{{end}}
{{if $.PullMirror.UpdatedUnix}}{{ctx.Locale.Tr "repo.mirror_sync"}} {{DateUtils.TimeSince $.PullMirror.UpdatedUnix}}{{end}}
</div>