1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-26 12:18:36 +00:00

Refactor dropdown ellipsis (#34123)

Remove legacy `truncated-item-container` and `truncated-item-name`.
This commit is contained in:
wxiaoguang
2025-04-05 11:21:11 +08:00
committed by GitHub
parent 7a09bc904a
commit ee6929d96b
21 changed files with 117 additions and 129 deletions

View File

@@ -12,23 +12,23 @@
<div id="create-repo-error-message" class="ui negative message tw-text-center tw-hidden"></div>
<div class="inline required field {{if .Err_Owner}}error{{end}}">
<label>{{ctx.Locale.Tr "repo.owner"}}</label>
<div class="ui selection dropdown" id="repo_owner_dropdown">
<div class="ui selection dropdown ellipsis-text-items" id="repo_owner_dropdown">
<input type="hidden" name="uid" value="{{.ContextUser.ID}}">
<span class="text truncated-item-name"></span>
<span class="text"></span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu">
<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}" title="{{.SignedUser.Name}}"
<div class="item" data-value="{{.SignedUser.ID}}" title="{{.SignedUser.Name}}"
{{if not .CanCreateRepoInDoer}}
data-create-repo-disallowed-prompt="{{ctx.Locale.TrN .MaxCreationLimit "repo.form.reach_limit_of_creation_1" "repo.form.reach_limit_of_creation_n" .MaxCreationLimitOfDoer}}"
{{end}}
>
{{ctx.AvatarUtils.Avatar .SignedUser 28 "mini"}}
<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
{{.SignedUser.ShortName 40}}
</div>
{{range .Orgs}}
<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
<div class="item" data-value="{{.ID}}" title="{{.Name}}">
{{ctx.AvatarUtils.Avatar . 28 "mini"}}
<span class="truncated-item-name">{{.ShortName 40}}</span>
{{.ShortName 40}}
</div>
{{end}}
</div>