Introduce flex-list & flex-item elements for Gitea UI (#25790)

This PR introduces a new UI element type for Gitea called `flex-item`.
It consists of a horizontal card with a leading, main and trailing part:


![grafik](https://github.com/go-gitea/gitea/assets/47871822/395dd3f3-3906-4481-8f65-be6ac0acbe03)

The idea behind it is that in Gitea UI, we have many cases where we use
this kind of layout, but it is achieved in many different ways:
  - grid layout
  - `.ui.list` with additional hacky flexbox
- `.ui.key.list` - looks to me like a style set originally created for
ssh/gpg key list, was used in many other places
  - `.issue.list` - created for issue cards, used in many other places
  - ...

This new style is based on `.issue.list`, specifically the refactoring
of it done in #25750.

In this PR, the new element is introduced and lots of templates are
being refactored to use that style. This allows to remove a lot of
page-specific css, makes many of the elements responsive or simply
provides a cleaner/better-looking way to present information.

A devtest section with the new style is also available.

<details>
<summary>Screenshots (left: before, right: after)</summary>

![Bildschirmfoto vom 2023-07-09
21-01-21](https://github.com/go-gitea/gitea/assets/47871822/545b7da5-b300-475f-bd6d-b7d836950bb5)
![Bildschirmfoto vom 2023-07-09
21-01-56](https://github.com/go-gitea/gitea/assets/47871822/b6f70415-6795-4f71-a5ea-117d56107ea1)
![Bildschirmfoto vom 2023-07-09
21-02-45](https://github.com/go-gitea/gitea/assets/47871822/47407121-3f2a-4778-8f6d-ad2687c2e7b3)
![Bildschirmfoto vom 2023-07-09
21-03-44](https://github.com/go-gitea/gitea/assets/47871822/76167aaf-c3b2-46f6-9ffd-709f20aa6a34)
![Bildschirmfoto vom 2023-07-09
21-04-52](https://github.com/go-gitea/gitea/assets/47871822/af8fdde5-711e-4524-99cf-fb5d68af85b9)
![Bildschirmfoto vom 2023-07-09
21-05-25](https://github.com/go-gitea/gitea/assets/47871822/ae406946-e3e4-4109-abfe-b3588a07b468)
![Bildschirmfoto vom 2023-07-09
21-06-35](https://github.com/go-gitea/gitea/assets/47871822/2dbacc04-24d6-4f91-9e42-e16d6e4b5f1f)
![Bildschirmfoto vom 2023-07-09
21-09-03](https://github.com/go-gitea/gitea/assets/47871822/d3ca4e56-a72f-4179-adc8-98bfd638025b)
![Bildschirmfoto vom 2023-07-09
21-09-44](https://github.com/go-gitea/gitea/assets/47871822/df1fa689-499c-4e54-b6fb-3b81644b725f)
![Bildschirmfoto vom 2023-07-09
21-10-27](https://github.com/go-gitea/gitea/assets/47871822/b21cac71-a85a-4c8c-bb99-ab90373d8e09)
![Bildschirmfoto vom 2023-07-09
21-11-12](https://github.com/go-gitea/gitea/assets/47871822/89be39cf-0af9-4f2d-9fca-42f9eb5e7824)
![Bildschirmfoto vom 2023-07-09
21-12-01](https://github.com/go-gitea/gitea/assets/47871822/079579ea-1ecb-49c0-b32b-b59ed957caec)
![Bildschirmfoto vom 2023-07-09
21-17-44](https://github.com/go-gitea/gitea/assets/47871822/61ac6ec4-a319-4d5c-9c99-2e02a77295ba)
![Bildschirmfoto vom 2023-07-09
21-18-27](https://github.com/go-gitea/gitea/assets/47871822/5b55b73f-6244-47f7-a3e6-c5e4a7474585)
![Bildschirmfoto vom 2023-07-09
21-19-18](https://github.com/go-gitea/gitea/assets/47871822/c1b7c22e-3e5a-46d4-b8d6-5560db478c0b)
![Bildschirmfoto vom 2023-07-09
21-29-13](https://github.com/go-gitea/gitea/assets/47871822/82ffca8d-ab2e-4a18-9954-5b685bf6a422)
![Bildschirmfoto vom 2023-07-09
21-30-11](https://github.com/go-gitea/gitea/assets/47871822/ad2fdccc-2be8-41bb-bfdc-a084aa387b61)
![Bildschirmfoto vom 2023-07-09
21-32-44](https://github.com/go-gitea/gitea/assets/47871822/2d298ba7-d084-48b5-a139-f86d56262110)
![Bildschirmfoto vom 2023-07-09
21-33-28](https://github.com/go-gitea/gitea/assets/47871822/4cbd838e-9de8-4ad0-8ed9-438da5c9a5cb)


</details>

---------

Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
Denys Konovalov 2023-08-01 00:13:42 +02:00 committed by GitHub
parent fc6c3d626e
commit b9baed2c74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 955 additions and 1020 deletions

View file

@ -253,5 +253,63 @@
{{template "shared/combomarkdowneditor" .}} {{template "shared/combomarkdowneditor" .}}
</div> </div>
<script src="{{AssetUrlPrefix}}/js/devtest.js?v={{AssetVersion}}"></script> <script src="{{AssetUrlPrefix}}/js/devtest.js?v={{AssetVersion}}"></script>
<div>
<h1>Flex List</h1>
<div class="flex-list">
<div class="flex-item">
<div class="flex-item-leading">
{{svg "octicon-info" 32}}
</div>
<div class="flex-item-main">
<div class="flex-item-title">
Flex Item
<span class="ui basic label">
with label
</span>
</div>
<div class="flex-item-body">
consists of leading/main/trailing part
</div>
<div class="flex-item-body">
main part contains title and (multiple) body lines
</div>
</div>
<div class="flex-item-trailing">
<button class="ui tiny red button">
{{svg "octicon-warning" 12}} Button
</button>
<button class="ui tiny green button">
{{svg "octicon-info" 12}} Button
</button>
</div>
</div>
<div class="flex-item">
<div class="flex-item-leading">
{{svg "octicon-repo" 32}}
</div>
<div class="flex-item-main">
<div class="flex-item-header">
<div class="flex-item-title">
<a class="text primary" href="{{$.Link}}">
gitea-org / gitea
</a>
<span data-tooltip-content="{{$.locale.Tr "repo.fork"}}">{{svg "octicon-repo-forked"}}</span>
</div>
<div class="flex-item-trailing">
<a class="muted" href="{{$.Link}}">
<span class="flex-text-inline"><i class="color-icon gt-mr-3" style="background-color: aqua"></i>Go</span>
</a>
<a class="text grey flex-text-inline" href="{{$.Link}}">{{svg "octicon-star" 16}}45000</a>
<a class="text grey flex-text-inline" href="{{$.Link}}">{{svg "octicon-git-branch" 16}}1234</a>
</div>
</div>
<div class="flex-item-body">
when inside header, the trailing part will wrap below the title
</div>
</div>
</div>
</div>
</div>
</div> </div>
{{template "base/footer" .}} {{template "base/footer" .}}

View file

@ -1,38 +1 @@
{{template "base/head" .}} {{template "explore/users" .}}
<div role="main" aria-label="{{.Title}}" class="page-content explore users">
{{template "explore/navbar" .}}
<div class="ui container">
{{template "explore/search" .}}
<div class="ui user list">
{{range .Users}}
<div class="item">
{{avatar $.Context .}}
<div class="content">
<span class="header">
<a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}
{{if .Visibility.IsPrivate}}
<span class="ui basic label">{{$.locale.Tr "repo.desc.private"}}</span>
{{end}}
</span>
<div class="description">
{{if .Location}}
{{svg "octicon-location"}} {{.Location}}
{{end}}
{{if and .Website}}
{{svg "octicon-link"}}
<a href="{{.Website}}" rel="nofollow">{{.Website}}</a>
{{end}}
{{svg "octicon-calendar"}} {{$.locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix) | Safe}}
</div>
</div>
</div>
{{else}}
<div>{{$.locale.Tr "explore.org_no_results"}}</div>
{{end}}
</div>
{{template "base/paginate" .}}
</div>
</div>
{{template "base/footer" .}}

View file

@ -1,16 +1,21 @@
<div class="ui repository list"> <div class="flex-list">
{{range .Repos}} {{range .Repos}}
<div class="item"> <div class="flex-item">
<div class="ui header gt-df gt-ac"> <div class="flex-item-leading">
<div class="repo-title"> {{$avatar := (repoAvatar . 32)}}
{{$avatar := (repoAvatar . 32 "gt-mr-3")}}
{{if $avatar}} {{if $avatar}}
{{$avatar}} {{$avatar}}
{{else}}
{{template "repo/icon" .}}
{{end}} {{end}}
<a class="name" href="{{.Link}}"> </div>
<div class="flex-item-main">
<div class="flex-item-header">
<div class="flex-item-title">
<a class="text primary name" href="{{.Link}}">
{{if or $.PageIsExplore $.PageIsProfileStarList}}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}} {{if or $.PageIsExplore $.PageIsProfileStarList}}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}}
</a> </a>
<div class="labels gt-df gt-ac gt-fw gt-mr-3"> <span class="label-list">
{{if .IsArchived}} {{if .IsArchived}}
<span class="ui basic label">{{$.locale.Tr "repo.desc.archived"}}</span> <span class="ui basic label">{{$.locale.Tr "repo.desc.archived"}}</span>
{{end}} {{end}}
@ -31,36 +36,37 @@
{{end}} {{end}}
{{end}} {{end}}
{{end}} {{end}}
</span>
{{if .IsFork}} {{if .IsFork}}
<span class="gt-df" data-tooltip-content="{{$.locale.Tr "repo.fork"}}">{{svg "octicon-repo-forked"}}</span> <span data-tooltip-content="{{$.locale.Tr "repo.fork"}}">{{svg "octicon-repo-forked"}}</span>
{{else if .IsMirror}} {{else if .IsMirror}}
<span class="gt-df" data-tooltip-content="{{$.locale.Tr "mirror"}}">{{svg "octicon-mirror"}}</span> <span data-tooltip-content="{{$.locale.Tr "mirror"}}">{{svg "octicon-mirror"}}</span>
{{end}} {{end}}
</div> </div>
</div> <div class="flex-item-trailing">
<div class="gt-font-13 gt-df gt-ac text grey">
{{if .PrimaryLanguage}} {{if .PrimaryLanguage}}
<a class="muted" href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}"> <a class="muted" href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}">
<span class="gt-df gt-ac gt-mr-3"><i class="color-icon gt-mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{.PrimaryLanguage.Language}}</span> <span class="flex-text-inline"><i class="color-icon gt-mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{.PrimaryLanguage.Language}}</span>
</a> </a>
{{end}} {{end}}
{{if not $.DisableStars}} {{if not $.DisableStars}}
<a class="text grey gt-df gt-ac gt-mr-3" href="{{.Link}}/stars">{{svg "octicon-star" 16 "gt-mr-3"}}{{.NumStars}}</a> <a class="text grey flex-text-inline" href="{{.Link}}/stars">{{svg "octicon-star" 16}}{{.NumStars}}</a>
{{end}} {{end}}
<a class="text grey gt-df gt-ac gt-mr-3" href="{{.Link}}/forks">{{svg "octicon-git-branch" 16 "gt-mr-3"}}{{.NumForks}}</a> <a class="text grey flex-text-inline" href="{{.Link}}/forks">{{svg "octicon-git-branch" 16}}{{.NumForks}}</a>
</div> </div>
</div> </div>
<div class="description">
{{$description := .DescriptionHTML $.Context}} {{$description := .DescriptionHTML $.Context}}
{{if $description}}<p>{{$description}}</p>{{end}} {{if $description}}
<div class="flex-item-body">{{$description}}</div>
{{end}}
{{if .Topics}} {{if .Topics}}
<div class="gt-df gt-fw gt-gap-2 gt-mb-3"> <div class="label-list">
{{range .Topics}} {{range .Topics}}
{{if ne . ""}}<a class="ui label" href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1">{{.}}</a>{{end}} {{if ne . ""}}<a class="ui label" href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1">{{.}}</a>{{end}}
{{end}} {{end}}
</div> </div>
{{end}} {{end}}
<p class="time">{{$.locale.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.locale}}</p> <div class="flex-item-body">{{$.locale.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.locale}}</div>
</div> </div>
</div> </div>
{{else}} {{else}}

View file

@ -4,26 +4,35 @@
<div class="ui container"> <div class="ui container">
{{template "explore/search" .}} {{template "explore/search" .}}
<div class="ui user list"> <div class="flex-list">
{{range .Users}} {{range .Users}}
<div class="item"> <div class="flex-item flex-item-center">
{{avatar $.Context .}} <div class="flex-item-leading">
<div class="content"> {{avatar $.Context . 48}}
<span class="header"><a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}</span> </div>
<div class="description"> <div class="flex-item-main">
<div class="flex-item-title">
{{template "shared/user/name" .}}
{{if .Visibility.IsPrivate}}
<span class="ui basic tiny label">{{$.locale.Tr "repo.desc.private"}}</span>
{{end}}
</div>
<div class="flex-item-body">
{{if .Location}} {{if .Location}}
{{svg "octicon-location"}} {{.Location}} <span class="flex-text-inline">{{svg "octicon-location"}}{{.Location}}</span>
{{end}} {{end}}
{{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}} {{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}}
<span class="flex-text-inline">
{{svg "octicon-mail"}} {{svg "octicon-mail"}}
<a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a> <a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a>
</span>
{{end}} {{end}}
{{svg "octicon-calendar"}} {{$.locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix) | Safe}} <span class="flex-text-inline">{{svg "octicon-calendar"}}{{$.locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix) | Safe}}</span>
</div> </div>
</div> </div>
</div> </div>
{{else}} {{else}}
<div>{{$.locale.Tr "explore.user_no_results"}}</div> <div class="flex-item">{{$.locale.Tr "explore.user_no_results"}}</div>
{{end}} {{end}}
</div> </div>

View file

@ -1,49 +1,31 @@
{{template "base/head" .}} {{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content organization members"> <div role="main" aria-label="{{.Title}}" class="page-content organization">
{{template "org/header" .}} {{template "org/header" .}}
<div class="ui container"> <div class="ui container">
{{template "base/alert" .}} {{template "base/alert" .}}
<div class="list"> <div class="flex-list">
{{range .Members}} {{range .Members}}
<div class="item ui grid">
<div class="ui four wide column gt-df">
<a href="{{.HomeLink}}">{{avatar $.Context . 48}}</a>
<div>
<div class="meta"><a href="{{.HomeLink}}">{{.Name}}</a></div>
<div class="meta">{{.FullName}}</div>
</div>
</div>
<div class="ui four wide column center">
<div class="meta">
{{$.locale.Tr "org.members.membership_visibility"}}
</div>
<div class="meta">
{{$isPublic := index $.MembersIsPublicMember .ID}} {{$isPublic := index $.MembersIsPublicMember .ID}}
{{if $isPublic}} <div class="flex-item {{if $.PublicOnly}}flex-item-center{{end}}">
<strong>{{$.locale.Tr "org.members.public"}}</strong> <div class="flex-item-leading">
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{$.locale.Tr "org.members.public_helper"}}</a>){{end}} <a href="{{.HomeLink}}">{{avatar $.Context . 48}}</a>
{{else}} </div>
<strong>{{$.locale.Tr "org.members.private"}}</strong> <div class="flex-item-main">
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{$.locale.Tr "org.members.private_helper"}}</a>){{end}} <div class="flex-item-title">
{{template "shared/user/name" .}}
{{if not $isPublic}}
<span class="ui basic tiny label">{{$.locale.Tr "org.members.private"}}</span>
{{end}} {{end}}
</div> </div>
</div>
{{if not $.PublicOnly}} {{if not $.PublicOnly}}
<div class="ui three wide column center"> <div class="flex-item-body">
<div class="meta">
{{$.locale.Tr "org.members.member_role"}} {{$.locale.Tr "org.members.member_role"}}
<strong class="flex-text-inline">{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}}</strong>
</div> </div>
<div class="meta">
<strong>{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}}</strong>
</div>
</div>
<div class="ui two wide column center">
{{if $.IsOrganizationOwner}} {{if $.IsOrganizationOwner}}
<div class="meta"> <div class="flex-item-body">
{{$.locale.Tr "admin.users.2fa"}} {{$.locale.Tr "admin.users.2fa"}}
</div>
<div class="meta">
<strong> <strong>
{{if index $.MembersTwoFaStatus .ID}} {{if index $.MembersTwoFaStatus .ID}}
<span class="text green">{{svg "octicon-check"}}</span> <span class="text green">{{svg "octicon-check"}}</span>
@ -53,20 +35,26 @@
</strong> </strong>
</div> </div>
{{end}} {{end}}
</div>
{{end}} {{end}}
<div class="ui three wide column gt-df gt-ac gt-je"> </div>
<div class="text right"> <div class="flex-item-trailing">
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}
{{if $isPublic}}
<a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{svg "octicon-eye-closed" 12 "icon"}}{{$.locale.Tr "org.members.public_helper"}}</a>
{{else}}
<a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{svg "octicon-eye" 12 "icon"}}{{$.locale.Tr "org.members.private_helper"}}</a>
{{end}}
{{end}}
{{if eq $.SignedUser.ID .ID}} {{if eq $.SignedUser.ID .ID}}
<form> <form>
<button class="ui red small button delete-button" data-modal-id="leave-organization" <button class="ui red tiny button delete-button" data-modal-id="leave-organization"
data-url="{{$.OrgLink}}/members/action/leave" data-datauid="{{.ID}}" data-url="{{$.OrgLink}}/members/action/leave" data-datauid="{{.ID}}"
data-name="{{.DisplayName}}" data-name="{{.DisplayName}}"
data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.leave"}}</button> data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.leave"}}</button>
</form> </form>
{{else if $.IsOrganizationOwner}} {{else if $.IsOrganizationOwner}}
<form> <form>
<button class="ui red small button delete-button" data-modal-id="remove-organization-member" <button class="ui red tiny button delete-button" data-modal-id="remove-organization-member"
data-url="{{$.OrgLink}}/members/action/remove" data-datauid="{{.ID}}" data-url="{{$.OrgLink}}/members/action/remove" data-datauid="{{.ID}}"
data-name="{{.DisplayName}}" data-name="{{.DisplayName}}"
data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.remove"}}</button> data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.remove"}}</button>
@ -74,7 +62,6 @@
{{end}} {{end}}
</div> </div>
</div> </div>
</div>
{{end}} {{end}}
</div> </div>

View file

@ -21,13 +21,19 @@
</form> </form>
</div> </div>
{{end}} {{end}}
<div class="ui bottom attached table segment members"> <div class="ui attached segment">
<div class="flex-list">
{{range .Team.Members}} {{range .Team.Members}}
<div class="item gt-df gt-ac gt-fw"> <div class="flex-item flex-item-center">
<a href="{{.HomeLink}}">{{avatar $.Context . 48 "gt-mr-3 gt-mb-0"}}</a> <div class="flex-item-leading">
<a class="gt-f1" href="{{.HomeLink}}"> <a href="{{.HomeLink}}">{{avatar $.Context . 32}}</a>
<strong>{{.DisplayName}}</strong> </div>
</a> <div class="flex-item-main">
<div class="flex-item-title">
{{template "shared/user/name" .}}
</div>
</div>
<div class="flex-item-trailing">
{{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}} {{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}}
<form> <form>
<button class="ui red button delete-button" data-modal-id="remove-team-member" <button class="ui red button delete-button" data-modal-id="remove-team-member"
@ -37,12 +43,14 @@
</form> </form>
{{end}} {{end}}
</div> </div>
</div>
{{else}} {{else}}
<div class="item"> <div class="flex-item">
<span class="text grey italic">{{$.locale.Tr "org.teams.members.none"}}</span> <span class="text grey italic">{{$.locale.Tr "org.teams.members.none"}}</span>
</div> </div>
{{end}} {{end}}
</div> </div>
</div>
{{if and .Invites $.IsOrganizationOwner}} {{if and .Invites $.IsOrganizationOwner}}
<h4 class="ui top attached header">{{$.locale.Tr "org.teams.invite_team_member.list"}}</h4> <h4 class="ui top attached header">{{$.locale.Tr "org.teams.invite_team_member.list"}}</h4>
<div class="ui bottom attached table segment members"> <div class="ui bottom attached table segment members">

View file

@ -25,21 +25,24 @@
</div> </div>
</div> </div>
{{end}} {{end}}
<div class="ui bottom attached table segment repositories"> <div class="ui attached segment">
<div class="flex-list">
{{range .Team.Repos}} {{range .Team.Repos}}
<div class="item gt-df gt-ac gt-fw"> <div class="flex-item flex-item-center">
{{if .IsPrivate}} <div class="flex-item-leading">
{{svg "octicon-lock" 16 "gt-mr-3"}} {{$avatar := (repoAvatar . 32)}}
{{else if .IsFork}} {{if $avatar}}
{{svg "octicon-repo-forked" 16 "gt-mr-3"}} {{$avatar}}
{{else if .IsMirror}}
{{svg "octicon-mirror" 16 "gt-mr-3"}}
{{else}} {{else}}
{{svg "octicon-repo" 16 "gt-mr-3"}} {{template "repo/icon" .}}
{{end}} {{end}}
<a class="member gt-f1" href="{{$.Org.HomeLink}}/{{.Name | PathEscape}}"> </div>
<strong>{{$.Org.Name}}/{{.Name}}</strong> <div class="flex-item-main">
<a class="flex-item-title text primary" href="{{$.Org.HomeLink}}/{{.Name | PathEscape}}">
{{$.Org.Name}}/{{.Name}}
</a> </a>
</div>
<div class="flex-item-trailing">
{{if $canAddRemove}} {{if $canAddRemove}}
<form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove"> <form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
@ -47,8 +50,9 @@
</form> </form>
{{end}} {{end}}
</div> </div>
</div>
{{else}} {{else}}
<div class="item"> <div class="flex-item">
<span class="text grey italic">{{$.locale.Tr "org.teams.repos.none"}}</span> <span class="text grey italic">{{$.locale.Tr "org.teams.repos.none"}}</span>
</div> </div>
{{end}} {{end}}
@ -56,6 +60,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>
{{template "base/footer" .}} {{template "base/footer" .}}

View file

@ -5,10 +5,41 @@
</div> </div>
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui key list"> <div class="flex-list">
{{range .CleanupRules}} {{range .CleanupRules}}
<div class="item"> <div class="flex-item">
<div class="right floated content"> <div class="flex-item-leading">
{{svg .Type.SVGName 32}}
</div>
<div class="flex-item-main">
<div class="flex-item-title">
<a class="item" href="{{$.Link}}/rules/{{.ID}}">{{.Type.Name}}</a>
</div>
<div class="flex-item-body">
<i>{{if .Enabled}}{{$.locale.Tr "enabled"}}{{else}}{{$.locale.Tr "disabled"}}{{end}}</i>
</div>
{{if .KeepCount}}
<div class="flex-item-body">
<i>{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count"}}:</i> {{if eq .KeepCount 1}}{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count.1"}}{{else}}{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" .KeepCount}}{{end}}
</div>
{{end}}
{{if .KeepPattern}}
<div class="flex-item-body">
<i>{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.pattern"}}:</i> {{StringUtils.EllipsisString .KeepPattern 100}}
</div>
{{end}}
{{if .RemoveDays}}
<div class="flex-item-body">
<i>{{$.locale.Tr "packages.owner.settings.cleanuprules.remove.days"}}:</i> {{$.locale.Tr "tool.days" .RemoveDays}}
</div>
{{end}}
{{if .RemovePattern}}
<div class="flex-item-body">
<i>{{$.locale.Tr "packages.owner.settings.cleanuprules.remove.pattern"}}:</i> {{StringUtils.EllipsisString .RemovePattern 100}}
</div>
{{end}}
</div>
<div class="flex-item-trailing">
<div class="ui dropdown tiny basic button"> <div class="ui dropdown tiny basic button">
{{svg "octicon-kebab-horizontal"}} {{svg "octicon-kebab-horizontal"}}
<div class="menu"> <div class="menu">
@ -17,15 +48,6 @@
</div> </div>
</div> </div>
</div> </div>
<i class="icon">{{svg .Type.SVGName 36}}</i>
<div class="content">
<a class="item" href="{{$.Link}}/rules/{{.ID}}"><strong>{{.Type.Name}}</strong></a>
<div><i>{{if .Enabled}}{{$.locale.Tr "enabled"}}{{else}}{{$.locale.Tr "disabled"}}{{end}}</i></div>
{{if .KeepCount}}<div><i>{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count"}}:</i> {{if eq .KeepCount 1}}{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count.1"}}{{else}}{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" .KeepCount}}{{end}}</div>{{end}}
{{if .KeepPattern}}<div><i>{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.pattern"}}:</i> {{StringUtils.EllipsisString .KeepPattern 100}}</div>{{end}}
{{if .RemoveDays}}<div><i>{{$.locale.Tr "packages.owner.settings.cleanuprules.remove.days"}}:</i> {{$.locale.Tr "tool.days" .RemoveDays}}</div>{{end}}
{{if .RemovePattern}}<div><i>{{$.locale.Tr "packages.owner.settings.cleanuprules.remove.pattern"}}:</i> {{StringUtils.EllipsisString .RemovePattern 100}}</div>{{end}}
</div>
</div> </div>
{{else}} {{else}}
<div class="item">{{.locale.Tr "packages.owner.settings.cleanuprules.none"}}</div> <div class="item">{{.locale.Tr "packages.owner.settings.cleanuprules.none"}}</div>

View file

@ -12,15 +12,15 @@
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button> <button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
</div> </div>
</form> </form>
<div class="ui {{if .PackageDescriptors}}issue list{{end}}"> <div class="{{if .PackageDescriptors}}flex-list{{end}} gt-pt-4">
{{range .PackageDescriptors}} {{range .PackageDescriptors}}
<li class="item"> <div class="flex-item">
<div class="issue-item-main"> <div class="flex-item-main">
<div class="issue-item-title"> <div class="flex-item-title">
<a class="title" href="{{.FullWebLink}}">{{.Package.Name}}</a> <a href="{{.FullWebLink}}">{{.Package.Name}}</a>
<span class="ui label">{{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}}</span> <span class="ui label">{{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}}</span>
</div> </div>
<div class="issue-item-body"> <div class="flex-item-body">
{{$timeStr := TimeSinceUnix .Version.CreatedUnix $.locale}} {{$timeStr := TimeSinceUnix .Version.CreatedUnix $.locale}}
{{$hasRepositoryAccess := false}} {{$hasRepositoryAccess := false}}
{{if .Repository}} {{if .Repository}}
@ -33,10 +33,10 @@
{{end}} {{end}}
</div> </div>
</div> </div>
</li> </div>
{{else}} {{else}}
{{if not .HasPackages}} {{if not .HasPackages}}
<div class="gt-pt-5 empty center"> <div class="empty center">
{{svg "octicon-package" 48}} {{svg "octicon-package" 48}}
<h2>{{.locale.Tr "packages.empty"}}</h2> <h2>{{.locale.Tr "packages.empty"}}</h2>
{{if and .Repository .CanWritePackages}} {{if and .Repository .CanWritePackages}}

View file

@ -18,18 +18,16 @@
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button> <button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
</div> </div>
</form> </form>
<div class="ui {{if .PackageDescriptors}}issue list{{end}}"> <div class="{{if .PackageDescriptors}}flex-list{{end}} gt-pt-4">
{{range .PackageDescriptors}} {{range .PackageDescriptors}}
<li class="item"> <div class="flex-item">
<div class="issue-item-main"> <div class="flex-item-main">
<div class="issue-item-title"> <a class="flex-item-title" href="{{.FullWebLink}}">{{.Version.LowerVersion}}</a>
<a class="title" href="{{.FullWebLink}}">{{.Version.LowerVersion}}</a> <div class="flex-item-body">
</div>
<div class="issue-item-body">
{{$.locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix $.locale) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}} {{$.locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix $.locale) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}}
</div> </div>
</div> </div>
</li> </div>
{{else}} {{else}}
<p>{{.locale.Tr "packages.filter.no_result"}}</p> <p>{{.locale.Tr "packages.filter.no_result"}}</p>
{{end}} {{end}}

View file

@ -1,4 +1,4 @@
<div class="issue list gt-m-0"> <div class="flex-list gt-m-0">
{{if eq (len .Runs) 0}} {{if eq (len .Runs) 0}}
<div class="empty center"> <div class="empty center">
{{svg "octicon-no-entry" 48}} {{svg "octicon-no-entry" 48}}
@ -6,17 +6,15 @@
</div> </div>
{{end}} {{end}}
{{range .Runs}} {{range .Runs}}
<li class="item action-item"> <div class="flex-item flex-item-center">
<div class="issue-item-left issue-item-icon"> <div class="flex-item-leading">
{{template "repo/actions/status" (dict "status" .Status.String "locale" $.locale)}} {{template "repo/actions/status" (dict "status" .Status.String "locale" $.locale)}}
</div> </div>
<div class="issue-item-main action-item-main"> <div class="flex-item-main">
<div class="issue-item-title"> <a class="flex-item-title" title="{{.Title}}" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
<a class="index gt-no-underline title action-item-title" title="{{.Title}}" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
{{- .Title -}} {{- .Title -}}
</a> </a>
</div> <div class="flex-item-body">
<div class="issue-item-body">
<b>{{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}}</b> <b>{{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}}</b>
: {{$.locale.Tr "actions.runs.commit"}} : {{$.locale.Tr "actions.runs.commit"}}
<a href="{{$.RepoLink}}/commit/{{.CommitSHA}}">{{ShortSha .CommitSHA}}</a> <a href="{{$.RepoLink}}/commit/{{.CommitSHA}}">{{ShortSha .CommitSHA}}</a>
@ -24,18 +22,18 @@
<a href="{{.TriggerUser.HomeLink}}">{{.TriggerUser.GetDisplayName}}</a> <a href="{{.TriggerUser.HomeLink}}">{{.TriggerUser.GetDisplayName}}</a>
</div> </div>
</div> </div>
<div class="action-item-center"> <div class="flex-item-trailing">
{{if .RefLink}} {{if .RefLink}}
<a class="ui label gt-px-2 gt-mx-0" href="{{.RefLink}}">{{.PrettyRef}}</a> <a class="ui label gt-px-2 gt-mx-0" href="{{.RefLink}}">{{.PrettyRef}}</a>
{{else}} {{else}}
<span class="ui label gt-px-2 gt-mx-0">{{.PrettyRef}}</span> <span class="ui label gt-px-2 gt-mx-0">{{.PrettyRef}}</span>
{{end}} {{end}}
</div> </div>
<div class="action-item-right"> <div class="run-list-item-right">
<div class="flex-text-block">{{svg "octicon-calendar" 16}}{{TimeSinceUnix .Updated $.locale}}</div> <div class="run-list-meta">{{svg "octicon-calendar" 16}}{{TimeSinceUnix .Updated $.locale}}</div>
<div class="flex-text-block">{{svg "octicon-stopwatch" 16}}{{.Duration}}</div> <div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{.Duration}}</div>
</div>
</div> </div>
</li>
{{end}} {{end}}
</div> </div>
{{template "base/paginate" .}} {{template "base/paginate" .}}

View file

@ -8,7 +8,9 @@
{{if $avatar}} {{if $avatar}}
{{$avatar}} {{$avatar}}
{{else}} {{else}}
<div class="gt-mr-3">
{{template "repo/icon" .}} {{template "repo/icon" .}}
</div>
{{end}} {{end}}
<a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a> <a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>
<div class="gt-mx-2">/</div> <div class="gt-mx-2">/</div>

View file

@ -1,4 +1,4 @@
<div class="repo-icon gt-mr-3"> <div class="repo-icon">
{{if $.IsTemplate}} {{if $.IsTemplate}}
{{svg "octicon-repo-template" 32}} {{svg "octicon-repo-template" 32}}
{{else}} {{else}}

View file

@ -38,27 +38,28 @@
</div> </div>
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached segment">
<div class="ui grid padded"> <div class="flex-list">
<div class="sixteen wide column">
<table class="ui single line table padded">
<tbody>
{{range .ProtectedBranches}} {{range .ProtectedBranches}}
<tr> <div class="flex-item flex-item-center">
<td><div class="ui basic primary label">{{.RuleName}}</div></td> <div class="flex-item-main">
<td class="right aligned"> <div class="flex-item-title">
<a class="rm ui button" href="{{$.Repository.Link}}/settings/branches/edit?rule_name={{.RuleName}}">{{$.locale.Tr "repo.settings.edit_protected_branch"}}</a> <div class="ui basic primary label">{{.RuleName}}</div>
<button class="ui red tiny button delete-button" data-url="{{$.Repository.Link}}/settings/branches/{{.ID}}/delete" data-id="{{.ID}}">
{{$.locale.Tr "repo.settings.protected_branch.delete_rule"}}</button>
</td>
</tr>
{{else}}
<tr class="center aligned"><td>{{.locale.Tr "repo.settings.no_protected_branch"}}</td></tr>
{{end}}
</tbody>
</table>
</div> </div>
</div> </div>
<div class="flex-item-trailing">
<a class="rm ui tiny button" href="{{$.Repository.Link}}/settings/branches/edit?rule_name={{.RuleName}}">{{$.locale.Tr "repo.settings.edit_protected_branch"}}</a>
<button class="ui red tiny button delete-button" data-url="{{$.Repository.Link}}/settings/branches/{{.ID}}/delete" data-id="{{.ID}}">
{{$.locale.Tr "repo.settings.protected_branch.delete_rule"}}
</button>
</div>
</div>
{{else}}
<div class="flex-item center aligned">
{{.locale.Tr "repo.settings.no_protected_branch"}}
</div>
{{end}}
</div>
</div> </div>
{{end}} {{end}}
</div> </div>

View file

@ -4,16 +4,20 @@
{{.locale.Tr "repo.settings.collaboration"}} {{.locale.Tr "repo.settings.collaboration"}}
</h4> </h4>
{{if .Collaborators}} {{if .Collaborators}}
<div class="ui attached segment collaborator list"> <div class="ui attached segment">
<div class="flex-list">
{{range .Collaborators}} {{range .Collaborators}}
<div class="item ui grid"> <div class="flex-item flex-item-center">
<div class="ui five wide column"> <div class="flex-item-leading">
<a href="{{.HomeLink}}"> <a href="{{.HomeLink}}">{{avatar $.Context . 32}}</a>
{{avatar $.Context .}}
{{.DisplayName}}
</a>
</div> </div>
<div class="ui eight wide computer five wide mobile column"> <div class="flex-item-main">
<div class="flex-item-title">
{{template "shared/user/name" .}}
</div>
</div>
<div class="flex-item-trailing">
<div class="flex-text-block">
{{svg "octicon-shield-lock"}} {{svg "octicon-shield-lock"}}
<div class="ui inline dropdown access-mode" data-url="{{$.Link}}/access_mode" data-uid="{{.ID}}" data-last-value="{{printf "%d" .Collaboration.Mode}}"> <div class="ui inline dropdown access-mode" data-url="{{$.Link}}/access_mode" data-uid="{{.ID}}" data-last-value="{{printf "%d" .Collaboration.Mode}}">
<div class="text">{{if eq .Collaboration.Mode 1}}{{$.locale.Tr "repo.settings.collaboration.read"}}{{else if eq .Collaboration.Mode 2}}{{$.locale.Tr "repo.settings.collaboration.write"}}{{else if eq .Collaboration.Mode 3}}{{$.locale.Tr "repo.settings.collaboration.admin"}}{{else}}{{$.locale.Tr "repo.settings.collaboration.undefined"}}{{end}}</div> <div class="text">{{if eq .Collaboration.Mode 1}}{{$.locale.Tr "repo.settings.collaboration.read"}}{{else if eq .Collaboration.Mode 2}}{{$.locale.Tr "repo.settings.collaboration.write"}}{{else if eq .Collaboration.Mode 3}}{{$.locale.Tr "repo.settings.collaboration.admin"}}{{else}}{{$.locale.Tr "repo.settings.collaboration.undefined"}}{{end}}</div>
@ -25,7 +29,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="ui two wide column">
<button class="ui red tiny button inline text-thin delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"> <button class="ui red tiny button inline text-thin delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
{{$.locale.Tr "repo.settings.delete_collaborator"}} {{$.locale.Tr "repo.settings.delete_collaborator"}}
</button> </button>
@ -33,6 +36,7 @@
</div> </div>
{{end}} {{end}}
</div> </div>
</div>
{{end}} {{end}}
<div class="ui bottom attached segment"> <div class="ui bottom attached segment">
<form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post"> <form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post">
@ -54,28 +58,27 @@
</h4> </h4>
{{$allowedToChangeTeams := (or (.Org.RepoAdminChangeTeamAccess) (.Permission.IsOwner))}} {{$allowedToChangeTeams := (or (.Org.RepoAdminChangeTeamAccess) (.Permission.IsOwner))}}
{{if .Teams}} {{if .Teams}}
<div class="ui attached segment collaborator list"> <div class="ui attached segment">
<div class="flex-list">
{{range $t, $team := .Teams}} {{range $t, $team := .Teams}}
<div class="item ui grid"> <div class="flex-item">
<div class="ui five wide column"> <div class="flex-item-main">
<a href="{{AppSubUrl}}/org/{{$.OrgName|PathEscape}}/teams/{{.LowerName|PathEscape}}"> <a class="flex-item-title text primary" href="{{AppSubUrl}}/org/{{$.OrgName|PathEscape}}/teams/{{.LowerName|PathEscape}}">
{{.Name}} {{.Name}}
</a> </a>
</div> <div class="flex-item-body flex-text-block">
<div class="ui eight wide computer five wide mobile column" data-tooltip-content="{{$.locale.Tr "repo.settings.change_team_permission_tip"}}">
{{svg "octicon-shield-lock"}} {{svg "octicon-shield-lock"}}
<div class="ui inline dropdown"> {{if eq .AccessMode 1}}{{$.locale.Tr "repo.settings.collaboration.read"}}{{else if eq .AccessMode 2}}{{$.locale.Tr "repo.settings.collaboration.write"}}{{else if eq .AccessMode 3}}{{$.locale.Tr "repo.settings.collaboration.admin"}}{{else if eq .AccessMode 4}}{{$.locale.Tr "repo.settings.collaboration.owner"}}{{else}}{{$.locale.Tr "repo.settings.collaboration.undefined"}}{{end}}
<div class="text">{{if eq .AccessMode 1}}{{$.locale.Tr "repo.settings.collaboration.read"}}{{else if eq .AccessMode 2}}{{$.locale.Tr "repo.settings.collaboration.write"}}{{else if eq .AccessMode 3}}{{$.locale.Tr "repo.settings.collaboration.admin"}}{{else if eq .AccessMode 4}}{{$.locale.Tr "repo.settings.collaboration.owner"}}{{else}}{{$.locale.Tr "repo.settings.collaboration.undefined"}}{{end}}</div>
</div> </div>
{{if or (eq .AccessMode 1) (eq .AccessMode 2)}} {{if or (eq .AccessMode 1) (eq .AccessMode 2)}}
{{$first := true}} {{$first := true}}
<div class="description"> <div class="flex-item-body" data-tooltip-content="{{$.locale.Tr "repo.settings.change_team_permission_tip"}}">
Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled $.Context $unit.Type) ($team.UnitEnabled $.Context $unit.Type)}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{$.locale.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}} Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled $.Context $unit.Type) ($team.UnitEnabled $.Context $unit.Type)}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{$.locale.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}}
</div> </div>
{{end}} {{end}}
</div> </div>
{{if $allowedToChangeTeams}} {{if $allowedToChangeTeams}}
<div class="ui two wide column" {{if .IncludesAllRepositories}} data-tooltip-content="{{$.locale.Tr "repo.settings.delete_team_tip"}}"{{end}}> <div class="flex-item-trailing" {{if .IncludesAllRepositories}} data-tooltip-content="{{$.locale.Tr "repo.settings.delete_team_tip"}}"{{end}}>
<button class="ui red tiny button inline text-thin delete-button {{if .IncludesAllRepositories}}disabled{{end}}" data-url="{{$.Link}}/team/delete" data-id="{{.ID}}"> <button class="ui red tiny button inline text-thin delete-button {{if .IncludesAllRepositories}}disabled{{end}}" data-url="{{$.Link}}/team/delete" data-id="{{.ID}}">
{{$.locale.Tr "repo.settings.delete_collaborator"}} {{$.locale.Tr "repo.settings.delete_collaborator"}}
</button> </button>
@ -84,6 +87,7 @@
</div> </div>
{{end}} {{end}}
</div> </div>
</div>
{{end}} {{end}}
<div class="ui bottom attached segment"> <div class="ui bottom attached segment">
{{if $allowedToChangeTeams}} {{if $allowedToChangeTeams}}

View file

@ -43,26 +43,26 @@
</form> </form>
</div> </div>
{{if .Deploykeys}} {{if .Deploykeys}}
<div class="ui key list"> <div class="flex-list">
{{range .Deploykeys}} {{range .Deploykeys}}
<div class="item"> <div class="flex-item">
<div class="right floated content"> <div class="flex-item-leading">
<span class="text {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-tooltip-content="{{$.locale.Tr "settings.key_state_desc"}}"{{end}}>{{svg "octicon-key" 32}}</span>
</div>
<div class="flex-item-main">
<div class="flex-item-title">{{.Name}}</div>
<div class="flex-item-body">
{{.Fingerprint}}
</div>
<div class="flex-item-body">
<i>{{$.locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}}{{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="text green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}} - <span>{{$.locale.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{$.locale.Tr "settings.can_write_info"}} {{end}}</span></i>
</div>
</div>
<div class="flex-item-trailing">
<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"> <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
{{$.locale.Tr "settings.delete_key"}} {{$.locale.Tr "settings.delete_key"}}
</button> </button>
</div> </div>
<div class="left floated content">
<i class="text {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-tooltip-content="{{$.locale.Tr "settings.key_state_desc"}}"{{end}}>{{svg "octicon-key" 32}}</i>
</div>
<div class="content">
<strong>{{.Name}}</strong>
<div class="print meta">
{{.Fingerprint}}
</div>
<div class="activity meta">
<i>{{$.locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}}{{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}} - <span>{{$.locale.Tr "settings.can_read_info"}}{{if not .IsReadOnly}} / {{$.locale.Tr "settings.can_write_info"}} {{end}}</span></i>
</div>
</div>
</div> </div>
{{end}} {{end}}
</div> </div>

View file

@ -692,33 +692,42 @@
<h4 class="ui top attached error header"> <h4 class="ui top attached error header">
{{.locale.Tr "repo.settings.danger_zone"}} {{.locale.Tr "repo.settings.danger_zone"}}
</h4> </h4>
<div class="ui attached error table danger segment"> <div class="ui attached error danger segment">
<div class="flex-list">
{{if .Repository.IsMirror}} {{if .Repository.IsMirror}}
<div class="item"> <div class="flex-item">
<div class="ui right"> <div class="flex-item-main">
<div class="flex-item-title">{{.locale.Tr "repo.settings.convert"}}</div>
<div class="flex-item-body">{{.locale.Tr "repo.settings.convert_desc"}}</div>
</div>
<div class="flex-item-trailing">
<button class="ui basic red show-modal button" data-modal="#convert-mirror-repo-modal">{{.locale.Tr "repo.settings.convert"}}</button> <button class="ui basic red show-modal button" data-modal="#convert-mirror-repo-modal">{{.locale.Tr "repo.settings.convert"}}</button>
</div> </div>
<div>
<h5>{{.locale.Tr "repo.settings.convert"}}</h5>
<p>{{.locale.Tr "repo.settings.convert_desc"}}</p>
</div> </div>
</div>
<div class="divider"></div>
{{end}} {{end}}
{{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}} {{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}}
<div class="item"> <div class="flex-item">
<div class="ui right"> <div class="flex-item-main">
<div class="flex-item-title">{{.locale.Tr "repo.settings.convert_fork"}}</div>
<div class="flex-item-body">{{.locale.Tr "repo.settings.convert_fork_desc"}}</div>
</div>
<div class="flex-item-trailing">
<button class="ui basic red show-modal button" data-modal="#convert-fork-repo-modal">{{.locale.Tr "repo.settings.convert_fork"}}</button> <button class="ui basic red show-modal button" data-modal="#convert-fork-repo-modal">{{.locale.Tr "repo.settings.convert_fork"}}</button>
</div> </div>
<div>
<h5>{{.locale.Tr "repo.settings.convert_fork"}}</h5>
<p>{{.locale.Tr "repo.settings.convert_fork_desc"}}</p>
</div> </div>
</div>
<div class="divider"></div>
{{end}} {{end}}
<div class="item"> <div class="flex-item">
<div class="ui right"> <div class="flex-item-main">
<div class="flex-item-title">{{.locale.Tr "repo.settings.transfer"}}</div>
<div class="flex-item-body">
{{if .RepoTransfer}}
{{.locale.Tr "repo.settings.transfer_started" .RepoTransfer.Recipient.DisplayName}}
{{else}}
{{.locale.Tr "repo.settings.transfer_desc"}}
{{end}}
</div>
</div>
<div class="flex-item-trailing">
{{if .RepoTransfer}} {{if .RepoTransfer}}
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
@ -729,47 +738,39 @@
<button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.locale.Tr "repo.settings.transfer"}}</button> <button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.locale.Tr "repo.settings.transfer"}}</button>
{{end}} {{end}}
</div> </div>
<div>
<h5>{{.locale.Tr "repo.settings.transfer"}}</h5>
{{if .RepoTransfer}}
<p>{{.locale.Tr "repo.settings.transfer_started" .RepoTransfer.Recipient.DisplayName}}</p>
{{else}}
<p>{{.locale.Tr "repo.settings.transfer_desc"}}</p>
{{end}}
</div> </div>
</div>
{{if .Permission.CanRead $.UnitTypeWiki}} {{if .Permission.CanRead $.UnitTypeWiki}}
<div class="divider"></div> <div class="flex-item">
<div class="flex-item-main">
<div class="item"> <div class="flex-item-title">{{.locale.Tr "repo.settings.wiki_delete"}}</div>
<div class="ui right"> <div class="flex-item-body">{{.locale.Tr "repo.settings.wiki_delete_desc"}}</div>
</div>
<div class="flex-item-trailing">
<button class="ui basic red show-modal button" data-modal="#delete-wiki-modal">{{.locale.Tr "repo.settings.wiki_delete"}}</button> <button class="ui basic red show-modal button" data-modal="#delete-wiki-modal">{{.locale.Tr "repo.settings.wiki_delete"}}</button>
</div> </div>
<div>
<h5>{{.locale.Tr "repo.settings.wiki_delete"}}</h5>
<p>{{.locale.Tr "repo.settings.wiki_delete_desc"}}</p>
</div>
</div> </div>
{{end}} {{end}}
<div class="flex-item">
<div class="divider"></div> <div class="flex-item-main">
<div class="flex-item-title">{{.locale.Tr "repo.settings.delete"}}</div>
<div class="item"> <div class="flex-item-body">{{.locale.Tr "repo.settings.delete_desc"}}</div>
<div class="ui right"> </div>
<div class="flex-item-trailing">
<button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{.locale.Tr "repo.settings.delete"}}</button> <button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{.locale.Tr "repo.settings.delete"}}</button>
</div> </div>
<div>
<h5>{{.locale.Tr "repo.settings.delete"}}</h5>
<p>{{.locale.Tr "repo.settings.delete_desc"}}</p>
</div> </div>
</div>
{{if not .Repository.IsMirror}} {{if not .Repository.IsMirror}}
<div class="divider"></div> <div class="flex-item flex-item-center">
<div class="flex-item-main">
<div class="item"> {{if .Repository.IsArchived}}
<div class="ui right"> <div class="flex-item-title">{{.locale.Tr "repo.settings.unarchive.header"}}</div>
<div class="flex-item-body">{{.locale.Tr "repo.settings.unarchive.text"}}</div>
{{else}}
<div class="flex-item-title">{{.locale.Tr "repo.settings.archive.header"}}</div>
<div class="flex-item-body">{{.locale.Tr "repo.settings.archive.text"}}</div>
{{end}}
</div>
<div class="flex-item-trailing">
<button class="ui basic red show-modal button" data-modal="#archive-repo-modal"> <button class="ui basic red show-modal button" data-modal="#archive-repo-modal">
{{if .Repository.IsArchived}} {{if .Repository.IsArchived}}
{{.locale.Tr "repo.settings.unarchive.button"}} {{.locale.Tr "repo.settings.unarchive.button"}}
@ -778,18 +779,10 @@
{{end}} {{end}}
</button> </button>
</div> </div>
<div>
{{if .Repository.IsArchived}}
<h5>{{.locale.Tr "repo.settings.unarchive.header"}}</h5>
<p>{{.locale.Tr "repo.settings.unarchive.text"}}</p>
{{else}}
<h5>{{.locale.Tr "repo.settings.archive.header"}}</h5>
<p>{{.locale.Tr "repo.settings.archive.text"}}</p>
{{end}}
</div>
</div> </div>
{{end}} {{end}}
</div> </div>
</div>
{{end}} {{end}}
</div> </div>
{{template "repo/settings/layout_footer" .}} {{template "repo/settings/layout_footer" .}}

View file

@ -1,19 +1,19 @@
<div class="issue list"> <div id="issue-list" class="flex-list gt-pt-4">
{{$approvalCounts := .ApprovalCounts}} {{$approvalCounts := .ApprovalCounts}}
{{range .Issues}} {{range .Issues}}
<li class="item"> <div class="flex-item flex-item-baseline">
<div class="issue-item-left"> <div class="flex-item-leading gt-ac">
{{if $.CanWriteIssuesOrPulls}} {{if $.CanWriteIssuesOrPulls}}
<input type="checkbox" autocomplete="off" class="issue-checkbox gt-mt-2 gt-mr-4" data-issue-id={{.ID}} aria-label="{{$.locale.Tr "repo.issues.action_check"}} &quot;{{.Title}}&quot;"> <input type="checkbox" autocomplete="off" class="issue-checkbox gt-mr-4" data-issue-id={{.ID}} aria-label="{{$.locale.Tr "repo.issues.action_check"}} &quot;{{.Title}}&quot;">
{{end}} {{end}}
<div class="issue-item-icon"> <div class="flex-item-icon">
{{template "shared/issueicon" .}} {{template "shared/issueicon" .}}
</div> </div>
</div> </div>
<div class="issue-item-main"> <div class="flex-item-main">
<div class="issue-item-header"> <div class="flex-item-header">
<div class="issue-item-title"> <div class="flex-item-title">
<a class="title gt-no-underline issue-title" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">{{RenderEmoji $.Context .Title | RenderCodeBlock}}</a> <a class="gt-no-underline issue-title" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">{{RenderEmoji $.Context .Title | RenderCodeBlock}}</a>
{{if .IsPull}} {{if .IsPull}}
{{if (index $.CommitStatuses .PullRequest.ID)}} {{if (index $.CommitStatuses .PullRequest.ID)}}
{{template "repo/commit_statuses" dict "Status" (index $.CommitLastStatus .PullRequest.ID) "Statuses" (index $.CommitStatuses .PullRequest.ID) "root" $}} {{template "repo/commit_statuses" dict "Status" (index $.CommitLastStatus .PullRequest.ID) "Statuses" (index $.CommitStatuses .PullRequest.ID) "root" $}}
@ -26,7 +26,7 @@
</span> </span>
</div> </div>
{{if or .TotalTrackedTime .Assignees .NumComments}} {{if or .TotalTrackedTime .Assignees .NumComments}}
<div class="issue-item-right"> <div class="flex-item-trailing">
{{if .TotalTrackedTime}} {{if .TotalTrackedTime}}
<div class="text grey flex-text-block"> <div class="text grey flex-text-block">
{{svg "octicon-clock" 16}} {{svg "octicon-clock" 16}}
@ -52,7 +52,7 @@
</div> </div>
{{end}} {{end}}
</div> </div>
<div class="issue-item-body"> <div class="flex-item-body">
<a class="index" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}"> <a class="index" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
{{if eq $.listType "dashboard"}} {{if eq $.listType "dashboard"}}
{{.Repo.FullName}}#{{.Index}} {{.Repo.FullName}}#{{.Index}}
@ -149,7 +149,7 @@
{{end}} {{end}}
</div> </div>
</div> </div>
</li> </div>
{{end}} {{end}}
{{if .IssueIndexerUnavailable}} {{if .IssueIndexerUnavailable}}
<div class="ui error message"> <div class="ui error message">

View file

@ -12,21 +12,23 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{if .Secrets}} {{if .Secrets}}
<div class="ui key list"> <div class="flex-list">
{{range $i, $v := .Secrets}} {{range .Secrets}}
<div class="item gt-df gt-ac gt-fw {{if gt $i 0}} gt-py-4{{end}}"> <div class="flex-item flex-item-center">
<div class="content gt-f1 gt-df gt-js"> <div class="flex-item-leading">
<div class="content"> {{svg "octicon-key" 32}}
<i>{{svg "octicon-key" 32}}</i>
</div> </div>
<div class="content gt-ml-3 gt-ellipsis"> <div class="flex-item-main">
<strong>{{$v.Name}}</strong> <div class="flex-item-title">
<div class="print meta">******</div> {{.Name}}
</div>
<div class="flex-item-body">
******
</div> </div>
</div> </div>
<div class="content"> <div class="flex-item-trailing">
<span class="color-text-light-2 gt-mr-5"> <span class="color-text-light-2">
{{$.locale.Tr "settings.added_on" (DateTime "short" $v.CreatedUnix) | Safe}} {{$.locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}}
</span> </span>
<button class="ui btn interact-bg link-action gt-p-3" <button class="ui btn interact-bg link-action gt-p-3"
data-url="{{$.Link}}/delete?id={{.ID}}" data-url="{{$.Link}}/delete?id={{.ID}}"

View file

@ -0,0 +1,5 @@
{{if .FullName}}
{{.FullName}} <span>(<a class="text primary" href="{{.HomeLink}}">{{.Name}}</a>)</span>
{{else}}
<a class="text primary" href="{{.HomeLink}}">{{.Name}}</a>
{{end}}

View file

@ -14,30 +14,37 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{if .Variables}} {{if .Variables}}
<div class="ui list"> <div class="flex-list">
{{range $i, $v := .Variables}} {{range .Variables}}
<div class="item gt-df gt-ac gt-fw {{if gt $i 0}} gt-py-4{{end}}"> <div class="flex-item flex-item-center">
<div class="content gt-f1 gt-ellipsis"> <div class="flex-item-leading">
<strong>{{$v.Name}}</strong> {{svg "octicon-pencil" 32}}
<div class="print meta gt-ellipsis">{{$v.Data}}</div>
</div> </div>
<div class="content"> <div class="flex-item-main">
<span class="color-text-light-2 gt-mr-5"> <div class="flex-item-title">
{{$.locale.Tr "settings.added_on" (DateTime "short" $v.CreatedUnix) | Safe}} {{.Name}}
</div>
<div class="flex-item-body">
{{.Data}}
</div>
</div>
<div class="flex-item-trailing">
<span class="color-text-light-2">
{{$.locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}}
</span> </span>
<button class="btn interact-bg gt-p-3 show-modal" <button class="btn interact-bg gt-p-3 show-modal"
data-tooltip-content="{{$.locale.Tr "variables.edit"}}" data-tooltip-content="{{$.locale.Tr "variables.edit"}}"
data-modal="#edit-variable-modal" data-modal="#edit-variable-modal"
data-modal-form.action="{{$.Link}}/{{$v.ID}}/edit" data-modal-form.action="{{$.Link}}/{{.ID}}/edit"
data-modal-header="{{$.locale.Tr "actions.variables.edit"}}" data-modal-header="{{$.locale.Tr "actions.variables.edit"}}"
data-modal-dialog-variable-name="{{$v.Name}}" data-modal-dialog-variable-name="{{.Name}}"
data-modal-dialog-variable-data="{{$v.Data}}" data-modal-dialog-variable-data="{{.Data}}"
> >
{{svg "octicon-pencil"}} {{svg "octicon-pencil"}}
</button> </button>
<button class="btn interact-bg gt-p-3 link-action" <button class="btn interact-bg gt-p-3 link-action"
data-tooltip-content="{{$.locale.Tr "actions.variables.deletion"}}" data-tooltip-content="{{$.locale.Tr "actions.variables.deletion"}}"
data-url="{{$.Link}}/{{$v.ID}}/delete" data-url="{{$.Link}}/{{.ID}}/delete"
data-modal-confirm="{{$.locale.Tr "actions.variables.deletion.description"}}" data-modal-confirm="{{$.locale.Tr "actions.variables.deletion.description"}}"
> >
{{svg "octicon-trash"}} {{svg "octicon-trash"}}

View file

@ -1,12 +1,11 @@
{{range .Feeds}} <div id="activity-feed" class="flex-list">
<div class="news"> {{range .Feeds}}
<div class="ui left"> <div class="flex-item">
<div class="flex-item-leading">
{{avatarByAction $.Context .}} {{avatarByAction $.Context .}}
</div> </div>
<div class="ui grid"> <div class="flex-item-main gt-gap-3">
<div class="ui fourteen wide column"> <div>
<div class="{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}push news{{end}}">
<p>
{{if gt .ActUser.ID 0}} {{if gt .ActUser.ID 0}}
<a href="{{AppSubUrl}}/{{.GetActUserName | PathEscape}}" title="{{.GetDisplayNameTitle}}">{{.GetDisplayName}}</a> <a href="{{AppSubUrl}}/{{.GetActUserName | PathEscape}}" title="{{.GetDisplayNameTitle}}">{{.GetDisplayName}}</a>
{{else}} {{else}}
@ -79,24 +78,26 @@
{{$reviewer := index .GetIssueInfos 1}} {{$reviewer := index .GetIssueInfos 1}}
{{$.locale.Tr "action.review_dismissed" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) $reviewer | Str2html}} {{$.locale.Tr "action.review_dismissed" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) $reviewer | Str2html}}
{{end}} {{end}}
</p> </div>
{{if or (eq .GetOpType 5) (eq .GetOpType 18)}} {{if or (eq .GetOpType 5) (eq .GetOpType 18)}}
<div class="content"> <div class="gt-pl-5">
<ul>
{{$push := ActionContent2Commits .}} {{$push := ActionContent2Commits .}}
{{$repoLink := .GetRepoLink}} {{$repoLink := .GetRepoLink}}
{{range $push.Commits}} {{range $push.Commits}}
{{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}} {{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
<li> <div class="flex-item">
{{avatarHTML ($push.AvatarLink $.Context .AuthorEmail) 16 "gt-mr-2" .AuthorName}} {{avatarHTML ($push.AvatarLink $.Context .AuthorEmail) 16 "" .AuthorName}}
<a class="commit-id gt-mr-2" href="{{$commitLink}}">{{ShortSha .Sha1}}</a> <a class="commit-id" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
<span class="text truncate light grey"> <span class="text truncate light grey">
{{RenderCommitMessage $.Context .Message $repoLink $.ComposeMetas}} {{RenderCommitMessage $.Context .Message $repoLink $.ComposeMetas}}
</span> </span>
</li> </div>
{{end}}
{{if and (gt $push.Len 1) $push.CompareURL}}
<div class="flex-item">
<a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{$.locale.Tr "action.compare_commits" $push.Len}} »</a>
</div>
{{end}} {{end}}
{{if and (gt $push.Len 1) $push.CompareURL}}<li><a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{$.locale.Tr "action.compare_commits" $push.Len}} »</a></li>{{end}}
</ul>
</div> </div>
{{else if eq .GetOpType 6}} {{else if eq .GetOpType 6}}
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span> <span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span>
@ -105,24 +106,23 @@
{{else if or (eq .GetOpType 10) (eq .GetOpType 21) (eq .GetOpType 22) (eq .GetOpType 23)}} {{else if or (eq .GetOpType 10) (eq .GetOpType 21) (eq .GetOpType 22) (eq .GetOpType 23)}}
<a href="{{.GetCommentLink}}" class="text truncate issue title">{{.GetIssueTitle | RenderEmoji $.Context | RenderCodeBlock}}</a> <a href="{{.GetCommentLink}}" class="text truncate issue title">{{.GetIssueTitle | RenderEmoji $.Context | RenderCodeBlock}}</a>
{{$comment := index .GetIssueInfos 1}} {{$comment := index .GetIssueInfos 1}}
{{if gt (len $comment) 0}}<p class="text light grey">{{$comment | RenderEmoji $.Context}}</p>{{end}} {{if gt (len $comment) 0}}
<div class="flex-item-body">{{$comment | RenderEmoji $.Context | RenderCodeBlock}}</div>
{{end}}
{{else if eq .GetOpType 11}} {{else if eq .GetOpType 11}}
<p class="text light grey">{{index .GetIssueInfos 1}}</p> <div class="flex-item-body">{{index .GetIssueInfos 1}}</div>
{{else if or (eq .GetOpType 12) (eq .GetOpType 13) (eq .GetOpType 14) (eq .GetOpType 15)}} {{else if or (eq .GetOpType 12) (eq .GetOpType 13) (eq .GetOpType 14) (eq .GetOpType 15)}}
<span class="text truncate issue title">{{.GetIssueTitle | RenderEmoji $.Context | RenderCodeBlock}}</span> <span class="text truncate issue title">{{.GetIssueTitle | RenderEmoji $.Context | RenderCodeBlock}}</span>
{{else if eq .GetOpType 25}} {{else if eq .GetOpType 25}}
<p class="text light grey">{{$.locale.Tr "action.review_dismissed_reason"}}</p> <div class="flex-item-body">{{$.locale.Tr "action.review_dismissed_reason"}}</div>
<p class="text light grey">{{index .GetIssueInfos 2 | RenderEmoji $.Context}}</p> <div class="flex-item-body">{{index .GetIssueInfos 2 | RenderEmoji $.Context}}</div>
{{end}} {{end}}
<p class="text italic light grey">{{TimeSince .GetCreate $.locale}}</p> <div class="flex-item-body">{{TimeSince .GetCreate $.locale}}</div>
</div>
<div class="flex-item-trailing">
{{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32}}
</div> </div>
</div> </div>
<div class="ui two wide right aligned column"> {{end}}
<span class="text grey">{{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32}}</span> {{template "base/paginate" .}}
</div> </div>
</div>
<div class="divider"></div>
</div>
{{end}}
{{template "base/paginate" .}}

View file

@ -4,21 +4,20 @@
{{.locale.Tr "settings.manage_access_token"}} {{.locale.Tr "settings.manage_access_token"}}
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui key list"> <div class="flex-list">
<div class="item"> <div class="flex-item">
{{.locale.Tr "settings.tokens_desc"}} {{.locale.Tr "settings.tokens_desc"}}
</div> </div>
{{range .Tokens}} {{range .Tokens}}
<div class="item"> <div class="flex-item">
<div class="right floated content"> <div class="flex-item-leading">
<button class="ui red tiny button delete-button" data-modal-id="delete-token" data-url="{{$.Link}}/delete" data-id="{{.ID}}"> <span class="text {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-tooltip-content="{{$.locale.Tr "settings.token_state_desc"}}"{{end}}>
{{svg "octicon-trash" 16 "gt-mr-2"}} {{svg "fontawesome-send" 32}}
{{$.locale.Tr "settings.delete_token"}} </span>
</button>
</div> </div>
<i class="text {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-tooltip-content="{{$.locale.Tr "settings.token_state_desc"}}"{{end}}>{{svg "fontawesome-send" 36}}</i> <div class="flex-item-main">
<div class="content"> <details>
<details><summary><strong>{{.Name}}</strong></summary> <summary><span class="flex-item-title">{{.Name}}</span></summary>
<p class="gt-my-2"> <p class="gt-my-2">
{{$.locale.Tr "settings.repo_and_org_access"}}: {{$.locale.Tr "settings.repo_and_org_access"}}:
{{if .DisplayPublicOnly}} {{if .DisplayPublicOnly}}
@ -36,10 +35,16 @@
{{end}} {{end}}
</ul> </ul>
</details> </details>
<div class="activity meta"> <div class="flex-item-body">
<i>{{$.locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}}{{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i> <i>{{$.locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}}{{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="text green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
</div> </div>
</div> </div>
<div class="flex-item-trailing">
<button class="ui red tiny button delete-button" data-modal-id="delete-token" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
{{svg "octicon-trash" 16 "gt-mr-2"}}
{{$.locale.Tr "settings.delete_token"}}
</button>
</div>
</div> </div>
{{end}} {{end}}
</div> </div>

View file

@ -1,24 +1,31 @@
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui key list"> <div class="flex-list">
<div class="item"> <div class="flex-item">
{{.locale.Tr "settings.oauth2_application_create_description"}} {{.locale.Tr "settings.oauth2_application_create_description"}}
</div> </div>
{{range $app := .Applications}} {{range .Applications}}
<div class="item"> <div class="flex-item">
<div class="right floated content"> <div class="flex-item-leading">
<a href="{{$.Link}}/oauth2/{{$app.ID}}" class="ui primary tiny button"> {{svg "octicon-apps" 32}}
</div>
<div class="flex-item-main">
<div class="flex-item-title">{{.Name}}</div>
<div class="flex-item-body">
{{$.locale.Tr "settings.oauth2_client_id"}}
<span class="ui label">{{.ClientID}}</span>
</div>
</div>
<div class="flex-item-trailing">
<a href="{{$.Link}}/oauth2/{{.ID}}" class="ui primary tiny button">
{{svg "octicon-pencil" 16 "gt-mr-2"}} {{svg "octicon-pencil" 16 "gt-mr-2"}}
{{$.locale.Tr "settings.oauth2_application_edit"}} {{$.locale.Tr "settings.oauth2_application_edit"}}
</a> </a>
<button class="ui red tiny button delete-button" data-modal-id="remove-gitea-oauth2-application" <button class="ui red tiny button delete-button" data-modal-id="remove-gitea-oauth2-application"
data-url="{{$.Link}}/oauth2/{{$app.ID}}/delete"> data-url="{{$.Link}}/oauth2/{{.ID}}/delete">
{{svg "octicon-trash" 16 "gt-mr-2"}} {{svg "octicon-trash" 16 "gt-mr-2"}}
{{$.locale.Tr "settings.delete_key"}} {{$.locale.Tr "settings.delete_key"}}
</button> </button>
</div> </div>
<div class="content">
<strong>{{$app.Name}}</strong>
</div>
</div> </div>
{{end}} {{end}}
</div> </div>

View file

@ -2,27 +2,27 @@
{{.locale.Tr "settings.authorized_oauth2_applications"}} {{.locale.Tr "settings.authorized_oauth2_applications"}}
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui key list"> <div class="flex-list">
<div class="item"> <div class="flex-item">
{{.locale.Tr "settings.authorized_oauth2_applications_description"}} {{.locale.Tr "settings.authorized_oauth2_applications_description"}}
</div> </div>
{{range $grant := .Grants}} {{range .Grants}}
<div class="item"> <div class="flex-item">
<div class="right floated content"> <div class="flex-item-leading">
{{svg "octicon-key" 32}}
</div>
<div class="flex-item-main">
<div class="flex-item-title">{{.Application.Name}}</div>
<div class="flex-item-body">
<i>{{$.locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}}</i>
</div>
</div>
<div class="flex-item-trailing">
<button class="ui red tiny button delete-button" data-modal-id="revoke-gitea-oauth2-grant" <button class="ui red tiny button delete-button" data-modal-id="revoke-gitea-oauth2-grant"
data-url="{{AppSubUrl}}/user/settings/applications/oauth2/{{$grant.ApplicationID}}/revoke/{{$grant.ID}}"> data-url="{{AppSubUrl}}/user/settings/applications/oauth2/{{.ApplicationID}}/revoke/{{.ID}}">
{{$.locale.Tr "settings.revoke_key"}} {{$.locale.Tr "settings.revoke_key"}}
</button> </button>
</div> </div>
<div class="left floated content">
{{svg "octicon-key"}}
</div>
<div class="content">
<strong>{{$grant.Application.Name}}</strong>
<div class="activity meta">
<i>{{$.locale.Tr "settings.added_on" (DateTime "short" $grant.CreatedUnix) | Safe}}</i>
</div>
</div>
</div> </div>
{{end}} {{end}}
</div> </div>

View file

@ -39,13 +39,33 @@
</button> </button>
</form> </form>
</div> </div>
<div class="ui key list gt-mt-0"> <div class="flex-list">
<div class="item"> <div class="flex-item">
{{.locale.Tr "settings.gpg_desc"}} {{.locale.Tr "settings.gpg_desc"}}
</div> </div>
{{range .GPGKeys}} {{range .GPGKeys}}
<div class="item"> <div class="flex-item">
<div class="right floated content"> <div class="flex-item-leading">
<span class="text {{if or .ExpiredUnix.IsZero ($.PageStartTime.Before .ExpiredUnix.AsTime)}}green{{end}}">{{svg "octicon-key" 32}}</span>
</div>
<div class="flex-item-main">
{{if .Verified}}
<span class="flex-text-block" data-tooltip-content="{{$.locale.Tr "settings.gpg_key_verified_long"}}">{{svg "octicon-verified"}} <strong>{{$.locale.Tr "settings.gpg_key_verified"}}</strong></span>
{{end}}
{{if gt (len .Emails) 0}}
<span class="flex-text-block" data-tooltip-content="{{$.locale.Tr "settings.gpg_key_matched_identities_long"}}">{{svg "octicon-mail"}} {{$.locale.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}<strong>{{.Email}} </strong>{{end}}</span>
{{end}}
<div class="flex-item-body">
<b>{{$.locale.Tr "settings.key_id"}}:</b> {{.PaddedKeyID}}
<b>{{$.locale.Tr "settings.subkeys"}}:</b> {{range .SubsKey}} {{.PaddedKeyID}} {{end}}
</div>
<div class="flex-item-body">
<i>{{$.locale.Tr "settings.added_on" (DateTime "short" .AddedUnix) | Safe}}</i>
-
<i>{{if not .ExpiredUnix.IsZero}}{{$.locale.Tr "settings.valid_until_date" (DateTime "short" .ExpiredUnix) | Safe}}{{else}}{{$.locale.Tr "settings.valid_forever"}}{{end}}</i>
</div>
</div>
<div class="flex-item-trailing">
<button class="ui red tiny button delete-button" data-modal-id="delete-gpg" data-url="{{$.Link}}/delete?type=gpg" data-id="{{.ID}}"> <button class="ui red tiny button delete-button" data-modal-id="delete-gpg" data-url="{{$.Link}}/delete?type=gpg" data-id="{{.ID}}">
{{$.locale.Tr "settings.delete_key"}} {{$.locale.Tr "settings.delete_key"}}
</button> </button>
@ -53,26 +73,6 @@
<a class="ui primary tiny button" href="{{$.Link}}?verify_gpg={{.KeyID}}">{{$.locale.Tr "settings.gpg_key_verify"}}</a> <a class="ui primary tiny button" href="{{$.Link}}?verify_gpg={{.KeyID}}">{{$.locale.Tr "settings.gpg_key_verify"}}</a>
{{end}} {{end}}
</div> </div>
<div class="left floated content">
<span class="text {{if or .ExpiredUnix.IsZero ($.PageStartTime.Before .ExpiredUnix.AsTime)}}green{{end}}">{{svg "octicon-key" 32}}</span>
</div>
<div class="content">
{{if .Verified}}
<span data-tooltip-content="{{$.locale.Tr "settings.gpg_key_verified_long"}}">{{svg "octicon-verified"}} <strong>{{$.locale.Tr "settings.gpg_key_verified"}}</strong></span>
{{end}}
{{if gt (len .Emails) 0}}
<span data-tooltip-content="{{$.locale.Tr "settings.gpg_key_matched_identities_long"}}">{{svg "octicon-mail"}} {{$.locale.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}<strong>{{.Email}} </strong>{{end}}</span>
{{end}}
<div class="print meta">
<b>{{$.locale.Tr "settings.key_id"}}:</b> {{.PaddedKeyID}}
<b>{{$.locale.Tr "settings.subkeys"}}:</b> {{range .SubsKey}} {{.PaddedKeyID}} {{end}}
</div>
<div class="activity meta">
<i>{{$.locale.Tr "settings.added_on" (DateTime "short" .AddedUnix) | Safe}}</i>
-
<i>{{if not .ExpiredUnix.IsZero}}{{$.locale.Tr "settings.valid_until_date" (DateTime "short" .ExpiredUnix) | Safe}}{{else}}{{$.locale.Tr "settings.valid_forever"}}{{end}}</i>
</div>
</div>
</div> </div>
{{if and (not .Verified) (eq $.VerifyingID .KeyID)}} {{if and (not .Verified) (eq $.VerifyingID .KeyID)}}
<div class="ui segment"> <div class="ui segment">

View file

@ -10,24 +10,26 @@
</div> </div>
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui key list"> <div class="flex-list">
<div class="item"> <div class="flex-item">
{{.locale.Tr "settings.principal_desc"}} {{.locale.Tr "settings.principal_desc"}}
</div> </div>
{{range .Principals}} {{range .Principals}}
<div class="item"> <div class="flex-item">
<div class="right floated content"> <div class="flex-item-leading">
<span class="text {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-tooltip-content="{{$.locale.Tr "settings.principal_state_desc"}}"{{end}}>{{svg "octicon-key" 32}}</span>
</div>
<div class="flex-item-main">
<div class="flex-item-title">{{.Name}}</div>
<div class="flex-item-body">
<i>{{$.locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}}{{svg "octicon-info" 16}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
</div>
</div>
<div class="flex-item-trailing">
<button class="ui red tiny button delete-button" data-modal-id="delete-principal" data-url="{{$.Link}}/delete?type=principal" data-id="{{.ID}}"> <button class="ui red tiny button delete-button" data-modal-id="delete-principal" data-url="{{$.Link}}/delete?type=principal" data-id="{{.ID}}">
{{$.locale.Tr "settings.delete_key"}} {{$.locale.Tr "settings.delete_key"}}
</button> </button>
</div> </div>
<i class="text {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-tooltip-content="{{$.locale.Tr "settings.principal_state_desc"}}"{{end}}>{{svg "octicon-key" 36}}</i>
<div class="content">
<strong>{{.Name}}</strong>
<div class="activity meta">
<i>{{$.locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}}{{svg "octicon-info" 16}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
</div>
</div>
</div> </div>
{{end}} {{end}}
</div> </div>

View file

@ -27,40 +27,39 @@
</button> </button>
</form> </form>
</div> </div>
<div class="ui key list gt-mt-0"> <div id="keys-ssh" class="flex-list">
<div class="item"> <div class="flex-item">
{{.locale.Tr "settings.ssh_desc"}} {{.locale.Tr "settings.ssh_desc"}}
</div> </div>
{{if .DisableSSH}} {{if .DisableSSH}}
<div class="item"> <div class="flex-item">
{{.locale.Tr "settings.ssh_signonly"}} {{.locale.Tr "settings.ssh_signonly"}}
</div> </div>
{{end}} {{end}}
{{range $index, $key := .Keys}} {{range $index, $key := .Keys}}
<div class="item"> <div class="flex-item">
<div class="right floated content"> <div class="flex-item-leading">
<span class="text {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-tooltip-content="{{$.locale.Tr "settings.key_state_desc"}}"{{end}}>{{svg "octicon-key" 32}}</span>
</div>
<div class="flex-item-main">
{{if .Verified}}
<div class="flex-item-title flex-text-block" data-tooltip-content="{{$.locale.Tr "settings.ssh_key_verified_long"}}">{{svg "octicon-verified"}}{{$.locale.Tr "settings.ssh_key_verified"}}</div>
{{end}}
<div class="flex-item-title">{{.Name}}</div>
<div class="flex-item-body">
{{.Fingerprint}}
</div>
<div class="flex-item-body">
<i>{{$.locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}}{{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="text green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
</div>
</div>
<div class="flex-item-trailing">
<button class="ui red tiny button delete-button{{if index $.ExternalKeys $index}} disabled{{end}}" data-modal-id="delete-ssh" data-url="{{$.Link}}/delete?type=ssh" data-id="{{.ID}}"{{if index $.ExternalKeys $index}} title="{{$.locale.Tr "settings.ssh_externally_managed"}}"{{end}}> <button class="ui red tiny button delete-button{{if index $.ExternalKeys $index}} disabled{{end}}" data-modal-id="delete-ssh" data-url="{{$.Link}}/delete?type=ssh" data-id="{{.ID}}"{{if index $.ExternalKeys $index}} title="{{$.locale.Tr "settings.ssh_externally_managed"}}"{{end}}>
{{$.locale.Tr "settings.delete_key"}} {{$.locale.Tr "settings.delete_key"}}
</button> </button>
{{if and (not .Verified) (ne $.VerifyingFingerprint .Fingerprint)}} {{if and (not .Verified) (ne $.VerifyingFingerprint .Fingerprint)}}
<a class="ui primary tiny button" href="{{$.Link}}?verify_ssh={{.Fingerprint}}">{{$.locale.Tr "settings.ssh_key_verify"}}</a> <a class="ui primary tiny button" href="{{$.Link}}?verify_ssh={{.Fingerprint}}">{{$.locale.Tr "settings.ssh_key_verify"}}</a>
{{end}} {{end}}
</div>
<div class="left floated content">
<span class="text {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-tooltip-content="{{$.locale.Tr "settings.key_state_desc"}}"{{end}}>{{svg "octicon-key" 32}}</span>
</div>
<div class="content">
{{if .Verified}}
<span data-tooltip-content="{{$.locale.Tr "settings.ssh_key_verified_long"}}">{{svg "octicon-verified"}} <strong>{{$.locale.Tr "settings.ssh_key_verified"}}</strong></span>
{{end}}
<strong>{{.Name}}</strong>
<div class="print meta">
{{.Fingerprint}}
</div>
<div class="activity meta">
<i>{{$.locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}}{{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
</div>
</div> </div>
</div> </div>
{{if and (not .Verified) (eq $.VerifyingFingerprint .Fingerprint)}} {{if and (not .Verified) (eq $.VerifyingFingerprint .Fingerprint)}}

View file

@ -10,10 +10,19 @@
</h4> </h4>
<div class="ui attached segment orgs"> <div class="ui attached segment orgs">
{{if .Orgs}} {{if .Orgs}}
<div class="ui middle aligned divided list"> <div class="flex-list">
{{range .Orgs}} {{range .Orgs}}
<div class="item"> <div class="flex-item">
<div class="right floated content"> <div class="flex-item-leading">
{{avatar $.Context . 28 "mini"}}
</div>
<div class="flex-item-main">
<div class="flex-item-title">{{template "shared/user/name" .}}</div>
<div class="flex-text-body">
{{.Description}}
</div>
</div>
<div class="flex-item-trailing">
<form> <form>
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<button class="ui red button delete-button" data-modal-id="leave-organization" <button class="ui red button delete-button" data-modal-id="leave-organization"
@ -23,10 +32,6 @@
</button> </button>
</form> </form>
</div> </div>
<div class="content gt-df gt-ac gt-gap-3">
{{avatar $.Context . 28 "mini"}}
<a class="muted" href="{{.HomeLink}}">{{.Name}}</a>
</div>
</div> </div>
{{end}} {{end}}
</div> </div>

View file

@ -21,22 +21,30 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui key list"> <div class="flex-list">
<div class="item"> <div class="flex-item">
{{.locale.Tr "settings.manage_account_links_desc"}} {{.locale.Tr "settings.manage_account_links_desc"}}
</div> </div>
{{range $loginSource, $provider := .AccountLinks}} {{range $loginSource, $provider := .AccountLinks}}
<div class="item gt-df gt-ac"> <div class="flex-item">
<div class="gt-f1"> {{$providerData := index $.OAuth2Providers $loginSource.Name}}
<span data-tooltip-content="{{$provider}}"> <div class="flex-item-leading">
{{$loginSource.Name}} {{$providerData.IconHTML}}
{{if $loginSource.IsActive}}<span class="text primary">{{$.locale.Tr "repo.settings.active"}}</span>{{end}}
</span>
</div> </div>
<div class="flex-item-main">
<span class="flex-item-title" data-tooltip-content="{{$provider}}">
{{$loginSource.Name}}
</span>
{{if $loginSource.IsActive}}
<span class="flex-text-body text primary">{{$.locale.Tr "repo.settings.active"}}</span>
{{end}}
</div>
<div class="flex-item-trailing">
<button class="ui red tiny button delete-button" data-modal-id="delete-account-link" data-url="{{AppSubUrl}}/user/settings/security/account_link" data-id="{{$loginSource.ID}}"> <button class="ui red tiny button delete-button" data-modal-id="delete-account-link" data-url="{{AppSubUrl}}/user/settings/security/account_link" data-id="{{$loginSource.ID}}">
{{$.locale.Tr "settings.delete_key"}} {{$.locale.Tr "settings.delete_key"}}
</button> </button>
</div> </div>
</div>
{{end}} {{end}}
</div> </div>

View file

@ -2,18 +2,19 @@
{{.locale.Tr "settings.manage_openid"}} {{.locale.Tr "settings.manage_openid"}}
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui openid list"> <div class="flex-list">
<div class="item"> <div class="flex-item">
{{.locale.Tr "settings.openid_desc"}} {{.locale.Tr "settings.openid_desc"}}
</div> </div>
{{range .OpenIDs}} {{range .OpenIDs}}
<div class="item"> <div class="flex-item flex-item-center">
<div class="right floated content"> <div class="flex-item-leading">
<button class="ui red tiny button delete-button" data-modal-id="delete-openid" data-url="{{AppSubUrl}}/user/settings/security/openid/delete" data-id="{{.ID}}"> {{svg "fontawesome-openid" 20}}
{{$.locale.Tr "settings.delete_key"}}
</button>
</div> </div>
<div class="right floated content"> <div class="flex-item-main">
<div class="flex-item-title">{{.URI}}</div>
</div>
<div class="flex-item-trailing">
<form action="{{AppSubUrl}}/user/settings/security/openid/toggle_visibility" method="post"> <form action="{{AppSubUrl}}/user/settings/security/openid/toggle_visibility" method="post">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input name="id" type="hidden" value="{{.ID}}"> <input name="id" type="hidden" value="{{.ID}}">
@ -29,9 +30,9 @@
</button> </button>
{{end}} {{end}}
</form> </form>
</div> <button class="ui red tiny button delete-button" data-modal-id="delete-openid" data-url="{{AppSubUrl}}/user/settings/security/openid/delete" data-id="{{.ID}}">
<div class="content"> {{$.locale.Tr "settings.delete_key"}}
<strong>{{.URI}}</strong> </button>
</div> </div>
</div> </div>
{{end}} {{end}}

View file

@ -2,18 +2,21 @@
<div class="ui attached segment"> <div class="ui attached segment">
<p>{{.locale.Tr "settings.webauthn_desc" | Str2html}}</p> <p>{{.locale.Tr "settings.webauthn_desc" | Str2html}}</p>
{{template "user/auth/webauthn_error" .}} {{template "user/auth/webauthn_error" .}}
<div class="ui key list"> <div class="flex-list">
{{range .WebAuthnCredentials}} {{range .WebAuthnCredentials}}
<div class="item"> <div class="flex-item">
<div class="right floated content"> <div class="flex-item-leading">
{{svg "octicon-key" 32}}
</div>
<div class="flex-item-main">
<div class="flex-item-title">{{.Name}}</div>
<span class="flex-item-body time">{{TimeSinceUnix .CreatedUnix $.locale}}</span>
</div>
<div class="flex-item-trailing">
<button class="ui red tiny button delete-button" data-modal-id="delete-registration" data-url="{{$.Link}}/webauthn/delete" data-id="{{.ID}}"> <button class="ui red tiny button delete-button" data-modal-id="delete-registration" data-url="{{$.Link}}/webauthn/delete" data-id="{{.ID}}">
{{$.locale.Tr "settings.delete_key"}} {{$.locale.Tr "settings.delete_key"}}
</button> </button>
</div> </div>
<div class="content">
<strong>{{.Name}}</strong>
</div>
<span class="time">{{TimeSinceUnix .CreatedUnix $.locale}}</span>
</div> </div>
{{end}} {{end}}
</div> </div>

View file

@ -387,7 +387,7 @@ func TestLDAPUserSSHKeySync(t *testing.T) {
htmlDoc := NewHTMLParser(t, resp.Body) htmlDoc := NewHTMLParser(t, resp.Body)
divs := htmlDoc.doc.Find(".key.list .print.meta") divs := htmlDoc.doc.Find("#keys-ssh .flex-item .flex-item-body:not(:last-child)")
syncedKeys := make([]string, divs.Length()) syncedKeys := make([]string, divs.Length())
for i := 0; i < divs.Length(); i++ { for i := 0; i < divs.Length(); i++ {

View file

@ -30,9 +30,9 @@ import (
) )
func getIssuesSelection(t testing.TB, htmlDoc *HTMLDoc) *goquery.Selection { func getIssuesSelection(t testing.TB, htmlDoc *HTMLDoc) *goquery.Selection {
issueList := htmlDoc.doc.Find(".issue.list") issueList := htmlDoc.doc.Find("#issue-list")
assert.EqualValues(t, 1, issueList.Length()) assert.EqualValues(t, 1, issueList.Length())
return issueList.Find("li").Find(".title") return issueList.Find(".flex-item").Find(".issue-title")
} }
func getIssue(t *testing.T, repoID int64, issueSelection *goquery.Selection) *issues_model.Issue { func getIssue(t *testing.T, repoID int64, issueSelection *goquery.Selection) *issues_model.Issue {

View file

@ -58,7 +58,7 @@ func testPrivateActivityHelperEnablePrivateActivity(t *testing.T) {
} }
func testPrivateActivityHelperHasVisibleActivitiesInHTMLDoc(htmlDoc *HTMLDoc) bool { func testPrivateActivityHelperHasVisibleActivitiesInHTMLDoc(htmlDoc *HTMLDoc) bool {
return htmlDoc.doc.Find(".feeds").Find(".news").Length() > 0 return htmlDoc.doc.Find("#activity-feed").Find(".flex-item").Length() > 0
} }
func testPrivateActivityHelperHasVisibleActivitiesFromSession(t *testing.T, session *TestSession) bool { func testPrivateActivityHelperHasVisibleActivitiesFromSession(t *testing.T, session *TestSession) bool {

View file

@ -24,7 +24,7 @@ func TestSettingShowUserEmailExplore(t *testing.T) {
resp := session.MakeRequest(t, req, http.StatusOK) resp := session.MakeRequest(t, req, http.StatusOK)
htmlDoc := NewHTMLParser(t, resp.Body) htmlDoc := NewHTMLParser(t, resp.Body)
assert.Contains(t, assert.Contains(t,
htmlDoc.doc.Find(".ui.user.list").Text(), htmlDoc.doc.Find(".explore.users").Text(),
"user34@example.com", "user34@example.com",
) )
@ -34,7 +34,7 @@ func TestSettingShowUserEmailExplore(t *testing.T) {
resp = session.MakeRequest(t, req, http.StatusOK) resp = session.MakeRequest(t, req, http.StatusOK)
htmlDoc = NewHTMLParser(t, resp.Body) htmlDoc = NewHTMLParser(t, resp.Body)
assert.NotContains(t, assert.NotContains(t,
htmlDoc.doc.Find(".ui.user.list").Text(), htmlDoc.doc.Find(".explore.users").Text(),
"user34@example.com", "user34@example.com",
) )

View file

@ -52,3 +52,18 @@
background-color: var(--color-yellow); background-color: var(--color-yellow);
color: var(--color-white); color: var(--color-white);
} }
.run-list-item-right {
flex: 0 0 15%;
display: flex;
flex-direction: column;
gap: 3px;
color: var(--color-text-light);
}
.run-list-item-right .run-list-meta {
display: flex;
flex-wrap: nowrap;
gap: .25rem;
align-items: center;
}

View file

@ -96,61 +96,13 @@
} }
} }
.feeds .news li { .feeds .commit-id {
display: flex;
align-items: baseline;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
.feeds .news li img {
align-self: flex-start;
}
.feeds .news li > * + * {
margin-left: 0.35rem;
}
.feeds .news > .ui.grid {
margin-left: auto;
margin-right: auto;
}
.feeds .news .left .ui.avatar {
margin-top: 13px;
}
.feeds .news .time-since {
font-size: 13px;
}
.feeds .news .issue.title {
width: 80%;
margin: 0 0 1em;
}
.feeds .news .push.news .content ul {
line-height: 18px;
font-size: 13px;
list-style: none;
padding-left: 10px;
}
.feeds .news .push.news .content ul .text.truncate {
width: 80%;
}
.feeds .news .commit-id {
font-family: var(--fonts-monospace); font-family: var(--fonts-monospace);
} }
.feeds .news code { .feeds code {
padding: 2px 4px; padding: 2px 4px;
border-radius: 3px; border-radius: 3px;
background-color: var(--color-markup-code-block); background-color: var(--color-markup-code-block);
word-break: break-all; word-break: break-all;
} }
.feeds .news:last-of-type .divider {
display: none !important;
}

View file

@ -10,33 +10,6 @@
margin-right: 5px; margin-right: 5px;
} }
.ui.repository.list .item {
padding-bottom: 1.5rem;
}
.ui.repository.list .item:not(:first-child) {
border-top: 1px solid var(--color-secondary);
padding-top: 1.5rem;
}
.ui.repository.list .item .ui.header {
font-size: 1.5rem;
margin-bottom: 0.5rem;
}
.ui.repository.list .item .ui.header .name {
word-break: break-all;
}
.ui.repository.list .item .time {
font-size: 12px;
}
.ui.repository.list .repo-title .labels {
word-break: normal;
flex-shrink: 0;
}
.ui.repository.branches .info { .ui.repository.branches .info {
font-size: 12px; font-size: 12px;
color: var(--color-text-light); color: var(--color-text-light);
@ -58,27 +31,3 @@
.ui.repository.branches table .ui.popup { .ui.repository.branches table .ui.popup {
text-align: left; text-align: left;
} }
.ui.user.list .item {
padding-bottom: 25px;
display: flex;
}
.ui.user.list .item:not(:first-child) {
border-top: 1px solid var(--color-secondary);
padding-top: 25px;
}
.ui.user.list .item img.ui.avatar {
width: 40px;
height: 40px;
margin-right: 10px;
}
.ui.user.list .item .description {
margin-top: 5px;
}
.ui.user.list .item .description .svg:not(:first-child) {
margin-left: 5px;
}

View file

@ -13,7 +13,7 @@
@import "./modules/svg.css"; @import "./modules/svg.css";
@import "./modules/flexcontainer.css"; @import "./modules/flexcontainer.css";
@import "./shared/issuelist.css"; @import "./shared/flex-list.css";
@import "./shared/milestone.css"; @import "./shared/milestone.css";
@import "./shared/repoorg.css"; @import "./shared/repoorg.css";
@import "./shared/settings.css"; @import "./shared/settings.css";

View file

@ -133,7 +133,6 @@
padding: 10px 15px; padding: 10px 15px;
} }
.organization.teams .members .ui.avatar,
.organization.profile .members .ui.avatar { .organization.profile .members .ui.avatar {
width: 48px; width: 48px;
height: 48px; height: 48px;
@ -161,25 +160,6 @@
height: 100%; height: 100%;
} }
.organization.members .list .item {
margin-left: 0;
margin-right: 0;
border-bottom: 1px solid var(--color-secondary);
}
.organization.members .list .item .ui.avatar {
width: 48px;
height: 48px;
margin-right: 1rem;
align-self: flex-start;
}
.organization.members .list .item .meta {
line-height: 24px;
word-break: break-word;
min-width: 2em;
}
.organization.teams .detail .item { .organization.teams .detail .item {
padding: 10px 15px; padding: 10px 15px;
} }
@ -188,22 +168,6 @@
border-bottom: 1px solid var(--color-secondary); border-bottom: 1px solid var(--color-secondary);
} }
.organization.teams .repositories .item,
.organization.teams .members .item {
padding: 10px 19px;
}
.organization.teams .repositories .item:not(:last-child),
.organization.teams .members .item:not(:last-child) {
border-bottom: 1px solid var(--color-secondary);
}
.organization.teams .repositories .item .button,
.organization.teams .members .item .button {
padding: 9px 10px;
margin: 0;
}
.org-team-navbar .active.item { .org-team-navbar .active.item {
background: var(--color-box-body) !important; background: var(--color-box-body) !important;
} }

View file

@ -584,15 +584,6 @@
min-width: 100px; min-width: 100px;
} }
.repository.options .danger .item {
padding: 20px 15px;
}
.repository.options .danger .ui.divider {
margin: 0;
border-color: var(--color-error-border);
}
.repository.new.issue .comment.form .comment .avatar { .repository.new.issue .comment.form .comment .avatar {
width: 3em; width: 3em;
} }
@ -1927,15 +1918,6 @@
flex-wrap: wrap; flex-wrap: wrap;
} }
.repository.settings.collaboration .collaborator.list {
padding: 0;
}
.repository.settings.collaboration .collaborator.list > .item {
margin: 0;
line-height: 2;
}
.repository.settings.collaboration #repo-collab-form #search-user-box .results { .repository.settings.collaboration #repo-collab-form #search-user-box .results {
left: 7px; left: 7px;
} }
@ -2389,15 +2371,6 @@
padding: 10px 0 0; padding: 10px 0 0;
} }
.settings .list.key .meta {
padding-top: 5px;
color: var(--color-text-light-2);
}
.settings .list.collaborator > .item {
padding: 0;
}
.ui.vertical.menu .header.item { .ui.vertical.menu .header.item {
font-size: 1.1em; font-size: 1.1em;
background: var(--color-box-header); background: var(--color-box-header);

View file

@ -32,3 +32,36 @@
order: 2 !important; order: 2 !important;
} }
} }
#issue-list .flex-item-body .branches {
display: inline-flex;
}
#issue-list .flex-item-body .branches .branch {
background-color: var(--color-secondary-alpha-40);
border-radius: 3px;
padding: 0 4px;
}
#issue-list .flex-item-body .branches .truncated-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 10em;
}
#issue-list .flex-item-body .checklist progress {
margin-left: 2px;
width: 80px;
height: 6px;
display: inline-block;
border-radius: 3px;
}
#issue-list .flex-item-body .checklist progress::-webkit-progress-value {
background-color: var(--color-secondary-dark-4);
}
#issue-list .flex-item-body .checklist progress::-moz-progress-bar {
background-color: var(--color-secondary-dark-4);
}

View file

@ -0,0 +1,94 @@
.flex-list {
list-style: none;
}
.flex-item {
display: flex;
gap: 8px;
align-items: flex-start;
}
.flex-item:not(:last-child) {
padding-bottom: 8px;
}
.flex-item-baseline {
align-items: baseline;
}
.flex-item-center {
align-items: center;
}
.flex-item .flex-item-leading {
display: flex;
align-items: flex-start;
}
.flex-item .flex-item-main {
display: flex;
flex-direction: column;
flex-grow: 1;
min-width: 0;
}
.flex-item-header {
display: flex;
gap: .25rem;
justify-content: space-between;
flex-wrap: wrap;
}
.flex-item a:not(.label, .button):hover {
color: var(--color-primary) !important;
}
.flex-item .flex-item-icon svg {
margin-top: 1px;
}
.flex-item .flex-item-trailing {
display: flex;
gap: 0.5rem;
align-items: center;
flex-grow: 0;
flex-wrap: wrap;
justify-content: end;
flex-shrink: 2;
}
.flex-item .flex-item-title {
display: inline-flex;
flex-wrap: wrap;
align-items: center;
gap: .25rem;
max-width: 100%;
color: var(--color-text);
font-size: 16px;
min-width: 0;
font-weight: var(--font-weight-semibold);
}
.flex-item .flex-item-title a {
color: var(--color-text);
overflow-wrap: anywhere;
}
.flex-item .flex-item-body {
font-size: 13px;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: .25rem;
color: var(--color-text-light-2);
}
.flex-item .flex-item-body a {
color: inherit;
overflow-wrap: anywhere;
}
.flex-list > .flex-item + .flex-item {
border-top: 1px solid var(--color-secondary);
padding-top: 8px;
}

View file

@ -1,134 +0,0 @@
.issue.list {
list-style: none;
margin-top: 1rem;
}
.issue.list .item {
display: flex;
align-items: baseline;
padding: 8px 0;
}
.issue.list .item .issue-item-left {
display: flex;
align-items: flex-start;
}
.issue.list .item .issue-item-main {
display: flex;
flex-direction: column;
width: 100%;
}
.issue.list .item .issue-item-header {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.issue.list a:not(.label):hover {
color: var(--color-primary) !important;
}
.issue.list > .item .issue-item-icon svg {
margin-right: 0.75rem;
margin-top: 1px;
}
.issue.list .item .issue-item-right {
display: flex;
gap: 0.5rem;
}
.issue.list > .action-item {
align-items: normal;
}
.issue.list > .item .action-item-center {
display: flex;
align-items: center;
padding-left: 4px;
padding-right: 12px;
}
.issue.list > .item .action-item-right {
flex: 0 0 15%;
display: flex;
flex-direction: column;
gap: 3px;
color: var(--color-text-light);
}
.issue.list > .item .issue-item-title {
max-width: 100%;
color: var(--color-text);
font-size: 16px;
min-width: 0;
font-weight: var(--font-weight-semibold);
}
.issue.list > .item .issue-item-title a.index {
max-width: fit-content;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
word-break: break-all;
}
.issue.list > .item .title {
color: var(--color-text);
overflow-wrap: anywhere;
}
.issue.list > .item .issue-item-body {
font-size: 13px;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: .25rem;
color: var(--color-text-light-2);
}
.issue.list > .item .issue-item-body a {
color: inherit;
word-break: break-word;
}
.issue.list > .item .issue-item-body .checklist progress {
margin-left: 2px;
width: 80px;
height: 6px;
display: inline-block;
border-radius: 3px;
}
.issue.list > .item .issue-item-body .checklist progress::-webkit-progress-value {
background-color: var(--color-secondary-dark-4);
}
.issue.list > .item .issue-item-body .checklist progress::-moz-progress-bar {
background-color: var(--color-secondary-dark-4);
}
.issue.list .branches {
display: inline-flex;
}
.issue.list .branches .branch {
background-color: var(--color-secondary-alpha-40);
border-radius: 3px;
padding: 0 4px;
}
.issue.list .branches .truncated-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 10em;
}
.issue.list > .item + .item {
border-top: 1px solid var(--color-secondary);
}

View file

@ -58,15 +58,6 @@
} }
} }
.user.profile .ui.repository.list {
margin-top: 25px;
}
.user.profile .ui.repository.list .repo-title .labels {
word-break: normal;
flex-shrink: 0;
}
.user.profile #loading-heatmap { .user.profile #loading-heatmap {
margin-bottom: 1em; margin-bottom: 1em;
} }