0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-06-21 23:17:38 +02:00

Style improvement

This commit is contained in:
pomidorry 2026-06-09 13:00:25 +03:00
parent 553e389943
commit 8dadbb759b
2 changed files with 56 additions and 10 deletions

View File

@ -8,8 +8,8 @@
<div class="inline field ssh-key-fingerprint-only tw-hidden">
<label>{{ctx.Locale.Tr "repo.migrate.ssh_key_owner_label"}}</label>
<div class="inline-right">
<span>{{ctx.Locale.Tr "repo.migrate.ssh_key_owner_personal" .SignedUser.Name}}</span>
<code class="tw-text-12">{{.SignedUserSSHFingerprint}}</code>
<span class="ssh-key-label">{{ctx.Locale.Tr "repo.migrate.ssh_key_owner_personal" .SignedUser.Name}}</span>
<code class="ssh-key-fingerprint">{{.SignedUserSSHFingerprint}}</code>
</div>
</div>
<div class="inline field ssh-key-owner-selector tw-hidden"
@ -23,16 +23,12 @@
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu">
<div class="item" data-value="0" data-text="{{ctx.Locale.Tr "repo.migrate.ssh_key_owner_org_default"}}">
<div class="tw-flex tw-flex-col tw-gap-1">
<span>{{ctx.Locale.Tr "repo.migrate.ssh_key_owner_org_default"}}</span>
<code class="item-fingerprint tw-text-12"></code>
</div>
<span class="ssh-key-label">{{ctx.Locale.Tr "repo.migrate.ssh_key_owner_org_default"}}</span>
<code class="item-fingerprint ssh-key-fingerprint"></code>
</div>
<div class="item" data-value="{{.SignedUser.ID}}" data-text="{{ctx.Locale.Tr "repo.migrate.ssh_key_owner_personal" .SignedUser.Name}}">
<div class="tw-flex tw-flex-col tw-gap-1">
<span>{{ctx.Locale.Tr "repo.migrate.ssh_key_owner_personal" .SignedUser.Name}}</span>
<code class="item-fingerprint tw-text-12">{{.SignedUserSSHFingerprint}}</code>
</div>
<span class="ssh-key-label">{{ctx.Locale.Tr "repo.migrate.ssh_key_owner_personal" .SignedUser.Name}}</span>
<code class="item-fingerprint ssh-key-fingerprint">{{.SignedUserSSHFingerprint}}</code>
</div>
</div>
</div>

View File

@ -1968,6 +1968,56 @@ tbody.commit-list {
height: 4em;
}
/* SSH key authentication UI on the repository migration form.
The fingerprint reads as secondary metadata beneath the key label
small monospace muted text, never an inline-code chip.
All rules are scoped to .ssh-key-fingerprint-only / .ssh-key-owner-selector
so nothing leaks into the global stylesheet. */
.ssh-key-fingerprint-only .inline-right {
gap: 2px;
}
.ssh-key-fingerprint-only .ssh-key-label,
.ssh-key-owner-selector .ssh-key-label {
line-height: 1.4;
}
.ssh-key-fingerprint-only .ssh-key-fingerprint,
.ssh-key-owner-selector .ssh-key-fingerprint {
font-family: var(--fonts-monospace);
font-size: 11.5px;
line-height: 1.4;
color: var(--color-text-light-2);
background: transparent !important;
padding: 0 !important;
border: 0 !important;
letter-spacing: 0.01em;
word-break: break-all;
}
.ssh-key-owner-selector .menu > .item {
padding: 10px 14px !important;
margin: 0 !important;
border: 0 !important;
border-radius: 0 !important;
box-sizing: border-box;
width: 100%;
}
.ssh-key-owner-selector .menu > .item + .item {
border-top: 1px solid var(--color-secondary) !important;
}
.ssh-key-owner-selector .menu > .item > .ssh-key-label,
.ssh-key-owner-selector .menu > .item > .ssh-key-fingerprint {
display: block;
}
.ssh-key-owner-selector .menu > .item > .ssh-key-fingerprint {
margin-top: 2px;
}
.ssh-key-owner-selector .item-fingerprint:empty {
display: none;
}