mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-25 03:06:10 +01:00
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:
parent
fc6c3d626e
commit
b9baed2c74
|
@ -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" .}}
|
||||||
|
|
|
@ -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" .}}
|
|
||||||
|
|
|
@ -1,66 +1,72 @@
|
||||||
<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}}
|
||||||
{{end}}
|
{{template "repo/icon" .}}
|
||||||
<a class="name" href="{{.Link}}">
|
{{end}}
|
||||||
{{if or $.PageIsExplore $.PageIsProfileStarList}}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}}
|
</div>
|
||||||
</a>
|
<div class="flex-item-main">
|
||||||
<div class="labels gt-df gt-ac gt-fw gt-mr-3">
|
<div class="flex-item-header">
|
||||||
{{if .IsArchived}}
|
<div class="flex-item-title">
|
||||||
<span class="ui basic label">{{$.locale.Tr "repo.desc.archived"}}</span>
|
<a class="text primary name" href="{{.Link}}">
|
||||||
{{end}}
|
{{if or $.PageIsExplore $.PageIsProfileStarList}}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}}
|
||||||
{{if .IsTemplate}}
|
</a>
|
||||||
{{if .IsPrivate}}
|
<span class="label-list">
|
||||||
<span class="ui basic label">{{$.locale.Tr "repo.desc.private_template"}}</span>
|
{{if .IsArchived}}
|
||||||
|
<span class="ui basic label">{{$.locale.Tr "repo.desc.archived"}}</span>
|
||||||
|
{{end}}
|
||||||
|
{{if .IsTemplate}}
|
||||||
|
{{if .IsPrivate}}
|
||||||
|
<span class="ui basic label">{{$.locale.Tr "repo.desc.private_template"}}</span>
|
||||||
|
{{else}}
|
||||||
|
{{if .Owner.Visibility.IsPrivate}}
|
||||||
|
<span class="ui basic label">{{$.locale.Tr "repo.desc.internal_template"}}</span>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{if .Owner.Visibility.IsPrivate}}
|
{{if .IsPrivate}}
|
||||||
<span class="ui basic label">{{$.locale.Tr "repo.desc.internal_template"}}</span>
|
<span class="ui basic label">{{$.locale.Tr "repo.desc.private"}}</span>
|
||||||
|
{{else}}
|
||||||
|
{{if .Owner.Visibility.IsPrivate}}
|
||||||
|
<span class="ui basic label">{{$.locale.Tr "repo.desc.internal"}}</span>
|
||||||
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{else}}
|
</span>
|
||||||
{{if .IsPrivate}}
|
|
||||||
<span class="ui basic label">{{$.locale.Tr "repo.desc.private"}}</span>
|
|
||||||
{{else}}
|
|
||||||
{{if .Owner.Visibility.IsPrivate}}
|
|
||||||
<span class="ui basic label">{{$.locale.Tr "repo.desc.internal"}}</span>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{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 class="flex-item-trailing">
|
||||||
|
{{if .PrimaryLanguage}}
|
||||||
|
<a class="muted" href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}">
|
||||||
|
<span class="flex-text-inline"><i class="color-icon gt-mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{.PrimaryLanguage.Language}}</span>
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
{{if not $.DisableStars}}
|
||||||
|
<a class="text grey flex-text-inline" href="{{.Link}}/stars">{{svg "octicon-star" 16}}{{.NumStars}}</a>
|
||||||
|
{{end}}
|
||||||
|
<a class="text grey flex-text-inline" href="{{.Link}}/forks">{{svg "octicon-git-branch" 16}}{{.NumForks}}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gt-font-13 gt-df gt-ac text grey">
|
|
||||||
{{if .PrimaryLanguage}}
|
|
||||||
<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>
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
{{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>
|
|
||||||
{{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>
|
|
||||||
</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}}
|
||||||
|
|
|
@ -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)}}
|
||||||
{{svg "octicon-mail"}}
|
<span class="flex-text-inline">
|
||||||
<a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a>
|
{{svg "octicon-mail"}}
|
||||||
|
<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>
|
||||||
|
|
||||||
|
|
|
@ -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">
|
{{$isPublic := index $.MembersIsPublicMember .ID}}
|
||||||
<div class="ui four wide column gt-df">
|
<div class="flex-item {{if $.PublicOnly}}flex-item-center{{end}}">
|
||||||
|
<div class="flex-item-leading">
|
||||||
<a href="{{.HomeLink}}">{{avatar $.Context . 48}}</a>
|
<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>
|
||||||
<div class="ui four wide column center">
|
<div class="flex-item-main">
|
||||||
<div class="meta">
|
<div class="flex-item-title">
|
||||||
{{$.locale.Tr "org.members.membership_visibility"}}
|
{{template "shared/user/name" .}}
|
||||||
</div>
|
{{if not $isPublic}}
|
||||||
<div class="meta">
|
<span class="ui basic tiny label">{{$.locale.Tr "org.members.private"}}</span>
|
||||||
{{$isPublic := index $.MembersIsPublicMember .ID}}
|
|
||||||
{{if $isPublic}}
|
|
||||||
<strong>{{$.locale.Tr "org.members.public"}}</strong>
|
|
||||||
{{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}}
|
|
||||||
{{else}}
|
|
||||||
<strong>{{$.locale.Tr "org.members.private"}}</strong>
|
|
||||||
{{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}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{if not $.PublicOnly}}
|
||||||
{{if not $.PublicOnly}}
|
<div class="flex-item-body">
|
||||||
<div class="ui three wide column center">
|
|
||||||
<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,26 +35,31 @@
|
||||||
</strong>
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
{{end}}
|
||||||
{{end}}
|
</div>
|
||||||
<div class="ui three wide column gt-df gt-ac gt-je">
|
<div class="flex-item-trailing">
|
||||||
<div class="text right">
|
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}
|
||||||
{{if eq $.SignedUser.ID .ID}}
|
{{if $isPublic}}
|
||||||
<form>
|
<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>
|
||||||
<button class="ui red small button delete-button" data-modal-id="leave-organization"
|
{{else}}
|
||||||
data-url="{{$.OrgLink}}/members/action/leave" data-datauid="{{.ID}}"
|
<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>
|
||||||
data-name="{{.DisplayName}}"
|
|
||||||
data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.leave"}}</button>
|
|
||||||
</form>
|
|
||||||
{{else if $.IsOrganizationOwner}}
|
|
||||||
<form>
|
|
||||||
<button class="ui red small button delete-button" data-modal-id="remove-organization-member"
|
|
||||||
data-url="{{$.OrgLink}}/members/action/remove" data-datauid="{{.ID}}"
|
|
||||||
data-name="{{.DisplayName}}"
|
|
||||||
data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.remove"}}</button>
|
|
||||||
</form>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
{{end}}
|
||||||
|
{{if eq $.SignedUser.ID .ID}}
|
||||||
|
<form>
|
||||||
|
<button class="ui red tiny button delete-button" data-modal-id="leave-organization"
|
||||||
|
data-url="{{$.OrgLink}}/members/action/leave" data-datauid="{{.ID}}"
|
||||||
|
data-name="{{.DisplayName}}"
|
||||||
|
data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.leave"}}</button>
|
||||||
|
</form>
|
||||||
|
{{else if $.IsOrganizationOwner}}
|
||||||
|
<form>
|
||||||
|
<button class="ui red tiny button delete-button" data-modal-id="remove-organization-member"
|
||||||
|
data-url="{{$.OrgLink}}/members/action/remove" data-datauid="{{.ID}}"
|
||||||
|
data-name="{{.DisplayName}}"
|
||||||
|
data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.remove"}}</button>
|
||||||
|
</form>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -21,27 +21,35 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="ui bottom attached table segment members">
|
<div class="ui attached segment">
|
||||||
{{range .Team.Members}}
|
<div class="flex-list">
|
||||||
<div class="item gt-df gt-ac gt-fw">
|
{{range .Team.Members}}
|
||||||
<a href="{{.HomeLink}}">{{avatar $.Context . 48 "gt-mr-3 gt-mb-0"}}</a>
|
<div class="flex-item flex-item-center">
|
||||||
<a class="gt-f1" href="{{.HomeLink}}">
|
<div class="flex-item-leading">
|
||||||
<strong>{{.DisplayName}}</strong>
|
<a href="{{.HomeLink}}">{{avatar $.Context . 32}}</a>
|
||||||
</a>
|
</div>
|
||||||
{{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}}
|
<div class="flex-item-main">
|
||||||
<form>
|
<div class="flex-item-title">
|
||||||
<button class="ui red button delete-button" data-modal-id="remove-team-member"
|
{{template "shared/user/name" .}}
|
||||||
data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove" data-datauid="{{.ID}}"
|
</div>
|
||||||
data-name="{{.DisplayName}}"
|
</div>
|
||||||
data-data-team-name="{{$.Team.Name}}">{{$.locale.Tr "org.members.remove"}}</button>
|
<div class="flex-item-trailing">
|
||||||
</form>
|
{{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}}
|
||||||
{{end}}
|
<form>
|
||||||
</div>
|
<button class="ui red button delete-button" data-modal-id="remove-team-member"
|
||||||
{{else}}
|
data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove" data-datauid="{{.ID}}"
|
||||||
<div class="item">
|
data-name="{{.DisplayName}}"
|
||||||
<span class="text grey italic">{{$.locale.Tr "org.teams.members.none"}}</span>
|
data-data-team-name="{{$.Team.Name}}">{{$.locale.Tr "org.members.remove"}}</button>
|
||||||
</div>
|
</form>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="flex-item">
|
||||||
|
<span class="text grey italic">{{$.locale.Tr "org.teams.members.none"}}</span>
|
||||||
|
</div>
|
||||||
|
{{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>
|
||||||
|
|
|
@ -25,33 +25,38 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="ui bottom attached table segment repositories">
|
<div class="ui attached segment">
|
||||||
{{range .Team.Repos}}
|
<div class="flex-list">
|
||||||
<div class="item gt-df gt-ac gt-fw">
|
{{range .Team.Repos}}
|
||||||
{{if .IsPrivate}}
|
<div class="flex-item flex-item-center">
|
||||||
{{svg "octicon-lock" 16 "gt-mr-3"}}
|
<div class="flex-item-leading">
|
||||||
{{else if .IsFork}}
|
{{$avatar := (repoAvatar . 32)}}
|
||||||
{{svg "octicon-repo-forked" 16 "gt-mr-3"}}
|
{{if $avatar}}
|
||||||
{{else if .IsMirror}}
|
{{$avatar}}
|
||||||
{{svg "octicon-mirror" 16 "gt-mr-3"}}
|
{{else}}
|
||||||
{{else}}
|
{{template "repo/icon" .}}
|
||||||
{{svg "octicon-repo" 16 "gt-mr-3"}}
|
{{end}}
|
||||||
{{end}}
|
</div>
|
||||||
<a class="member gt-f1" href="{{$.Org.HomeLink}}/{{.Name | PathEscape}}">
|
<div class="flex-item-main">
|
||||||
<strong>{{$.Org.Name}}/{{.Name}}</strong>
|
<a class="flex-item-title text primary" href="{{$.Org.HomeLink}}/{{.Name | PathEscape}}">
|
||||||
</a>
|
{{$.Org.Name}}/{{.Name}}
|
||||||
{{if $canAddRemove}}
|
</a>
|
||||||
<form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove">
|
</div>
|
||||||
{{$.CsrfTokenHtml}}
|
<div class="flex-item-trailing">
|
||||||
<button type="submit" class="ui red small button right" name="repoid" value="{{.ID}}">{{$.locale.Tr "remove"}}</button>
|
{{if $canAddRemove}}
|
||||||
</form>
|
<form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove">
|
||||||
{{end}}
|
{{$.CsrfTokenHtml}}
|
||||||
</div>
|
<button type="submit" class="ui red small button right" name="repoid" value="{{.ID}}">{{$.locale.Tr "remove"}}</button>
|
||||||
{{else}}
|
</form>
|
||||||
<div class="item">
|
{{end}}
|
||||||
<span class="text grey italic">{{$.locale.Tr "org.teams.repos.none"}}</span>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{else}}
|
||||||
|
<div class="flex-item">
|
||||||
|
<span class="text grey italic">{{$.locale.Tr "org.teams.repos.none"}}</span>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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}}
|
||||||
|
|
|
@ -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}}
|
||||||
|
|
|
@ -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 class="flex-item-body">
|
||||||
</div>
|
|
||||||
<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>
|
||||||
</li>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{template "base/paginate" .}}
|
{{template "base/paginate" .}}
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
{{if $avatar}}
|
{{if $avatar}}
|
||||||
{{$avatar}}
|
{{$avatar}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{template "repo/icon" .}}
|
<div class="gt-mr-3">
|
||||||
|
{{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>
|
||||||
|
|
|
@ -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}}
|
||||||
|
|
|
@ -38,26 +38,27 @@
|
||||||
</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">
|
{{range .ProtectedBranches}}
|
||||||
<table class="ui single line table padded">
|
<div class="flex-item flex-item-center">
|
||||||
<tbody>
|
<div class="flex-item-main">
|
||||||
{{range .ProtectedBranches}}
|
<div class="flex-item-title">
|
||||||
<tr>
|
<div class="ui basic primary label">{{.RuleName}}</div>
|
||||||
<td><div class="ui basic primary label">{{.RuleName}}</div></td>
|
</div>
|
||||||
<td class="right aligned">
|
</div>
|
||||||
<a class="rm ui button" href="{{$.Repository.Link}}/settings/branches/edit?rule_name={{.RuleName}}">{{$.locale.Tr "repo.settings.edit_protected_branch"}}</a>
|
<div class="flex-item-trailing">
|
||||||
<button class="ui red tiny button delete-button" data-url="{{$.Repository.Link}}/settings/branches/{{.ID}}/delete" data-id="{{.ID}}">
|
<a class="rm ui tiny button" href="{{$.Repository.Link}}/settings/branches/edit?rule_name={{.RuleName}}">{{$.locale.Tr "repo.settings.edit_protected_branch"}}</a>
|
||||||
{{$.locale.Tr "repo.settings.protected_branch.delete_rule"}}</button>
|
<button class="ui red tiny button delete-button" data-url="{{$.Repository.Link}}/settings/branches/{{.ID}}/delete" data-id="{{.ID}}">
|
||||||
</td>
|
{{$.locale.Tr "repo.settings.protected_branch.delete_rule"}}
|
||||||
</tr>
|
</button>
|
||||||
{{else}}
|
</div>
|
||||||
<tr class="center aligned"><td>{{.locale.Tr "repo.settings.no_protected_branch"}}</td></tr>
|
</div>
|
||||||
{{end}}
|
{{else}}
|
||||||
</tbody>
|
<div class="flex-item center aligned">
|
||||||
</table>
|
{{.locale.Tr "repo.settings.no_protected_branch"}}
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -4,34 +4,38 @@
|
||||||
{{.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">
|
||||||
{{range .Collaborators}}
|
<div class="flex-list">
|
||||||
<div class="item ui grid">
|
{{range .Collaborators}}
|
||||||
<div class="ui five wide column">
|
<div class="flex-item flex-item-center">
|
||||||
<a href="{{.HomeLink}}">
|
<div class="flex-item-leading">
|
||||||
{{avatar $.Context .}}
|
<a href="{{.HomeLink}}">{{avatar $.Context . 32}}</a>
|
||||||
{{.DisplayName}}
|
</div>
|
||||||
</a>
|
<div class="flex-item-main">
|
||||||
</div>
|
<div class="flex-item-title">
|
||||||
<div class="ui eight wide computer five wide mobile column">
|
{{template "shared/user/name" .}}
|
||||||
{{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="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>
|
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
<div class="menu">
|
|
||||||
<div class="item" data-text="{{$.locale.Tr "repo.settings.collaboration.admin"}}" data-value="3">{{$.locale.Tr "repo.settings.collaboration.admin"}}</div>
|
|
||||||
<div class="item" data-text="{{$.locale.Tr "repo.settings.collaboration.write"}}" data-value="2">{{$.locale.Tr "repo.settings.collaboration.write"}}</div>
|
|
||||||
<div class="item" data-text="{{$.locale.Tr "repo.settings.collaboration.read"}}" data-value="1">{{$.locale.Tr "repo.settings.collaboration.read"}}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex-item-trailing">
|
||||||
|
<div class="flex-text-block">
|
||||||
|
{{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="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>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
|
<div class="menu">
|
||||||
|
<div class="item" data-text="{{$.locale.Tr "repo.settings.collaboration.admin"}}" data-value="3">{{$.locale.Tr "repo.settings.collaboration.admin"}}</div>
|
||||||
|
<div class="item" data-text="{{$.locale.Tr "repo.settings.collaboration.write"}}" data-value="2">{{$.locale.Tr "repo.settings.collaboration.write"}}</div>
|
||||||
|
<div class="item" data-text="{{$.locale.Tr "repo.settings.collaboration.read"}}" data-value="1">{{$.locale.Tr "repo.settings.collaboration.read"}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button class="ui red tiny button inline text-thin delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
||||||
|
{{$.locale.Tr "repo.settings.delete_collaborator"}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui two wide column">
|
{{end}}
|
||||||
<button class="ui red tiny button inline text-thin delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
</div>
|
||||||
{{$.locale.Tr "repo.settings.delete_collaborator"}}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="ui bottom attached segment">
|
<div class="ui bottom attached segment">
|
||||||
|
@ -54,35 +58,35 @@
|
||||||
</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">
|
||||||
{{range $t, $team := .Teams}}
|
<div class="flex-list">
|
||||||
<div class="item ui grid">
|
{{range $t, $team := .Teams}}
|
||||||
<div class="ui five wide column">
|
<div class="flex-item">
|
||||||
<a href="{{AppSubUrl}}/org/{{$.OrgName|PathEscape}}/teams/{{.LowerName|PathEscape}}">
|
<div class="flex-item-main">
|
||||||
{{.Name}}
|
<a class="flex-item-title text primary" href="{{AppSubUrl}}/org/{{$.OrgName|PathEscape}}/teams/{{.LowerName|PathEscape}}">
|
||||||
</a>
|
{{.Name}}
|
||||||
</div>
|
</a>
|
||||||
<div class="ui eight wide computer five wide mobile column" data-tooltip-content="{{$.locale.Tr "repo.settings.change_team_permission_tip"}}">
|
<div class="flex-item-body flex-text-block">
|
||||||
{{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>
|
||||||
|
{{if or (eq .AccessMode 1) (eq .AccessMode 2)}}
|
||||||
|
{{$first := true}}
|
||||||
|
<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}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{if or (eq .AccessMode 1) (eq .AccessMode 2)}}
|
{{if $allowedToChangeTeams}}
|
||||||
{{$first := true}}
|
<div class="flex-item-trailing" {{if .IncludesAllRepositories}} data-tooltip-content="{{$.locale.Tr "repo.settings.delete_team_tip"}}"{{end}}>
|
||||||
<div class="description">
|
<button class="ui red tiny button inline text-thin delete-button {{if .IncludesAllRepositories}}disabled{{end}}" data-url="{{$.Link}}/team/delete" data-id="{{.ID}}">
|
||||||
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}}
|
{{$.locale.Tr "repo.settings.delete_collaborator"}}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{if $allowedToChangeTeams}}
|
{{end}}
|
||||||
<div class="ui two wide column" {{if .IncludesAllRepositories}} data-tooltip-content="{{$.locale.Tr "repo.settings.delete_team_tip"}}"{{end}}>
|
</div>
|
||||||
<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"}}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="ui bottom attached segment">
|
<div class="ui bottom attached segment">
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -692,103 +692,96 @@
|
||||||
<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">
|
||||||
{{if .Repository.IsMirror}}
|
<div class="flex-list">
|
||||||
<div class="item">
|
{{if .Repository.IsMirror}}
|
||||||
<div class="ui right">
|
<div class="flex-item">
|
||||||
<button class="ui basic red show-modal button" data-modal="#convert-mirror-repo-modal">{{.locale.Tr "repo.settings.convert"}}</button>
|
<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>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
{{end}}
|
||||||
<h5>{{.locale.Tr "repo.settings.convert"}}</h5>
|
{{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}}
|
||||||
<p>{{.locale.Tr "repo.settings.convert_desc"}}</p>
|
<div class="flex-item">
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{end}}
|
||||||
<div class="divider"></div>
|
<div class="flex-item">
|
||||||
{{end}}
|
<div class="flex-item-main">
|
||||||
{{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}}
|
<div class="flex-item-title">{{.locale.Tr "repo.settings.transfer"}}</div>
|
||||||
<div class="item">
|
<div class="flex-item-body">
|
||||||
<div class="ui right">
|
{{if .RepoTransfer}}
|
||||||
<button class="ui basic red show-modal button" data-modal="#convert-fork-repo-modal">{{.locale.Tr "repo.settings.convert_fork"}}</button>
|
{{.locale.Tr "repo.settings.transfer_started" .RepoTransfer.Recipient.DisplayName}}
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h5>{{.locale.Tr "repo.settings.convert_fork"}}</h5>
|
|
||||||
<p>{{.locale.Tr "repo.settings.convert_fork_desc"}}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
{{end}}
|
|
||||||
<div class="item">
|
|
||||||
<div class="ui right">
|
|
||||||
{{if .RepoTransfer}}
|
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
|
||||||
{{.CsrfTokenHtml}}
|
|
||||||
<input type="hidden" name="action" value="cancel_transfer">
|
|
||||||
<button class="ui red button">{{.locale.Tr "repo.settings.transfer_abort"}}</button>
|
|
||||||
</form>
|
|
||||||
{{else}}
|
|
||||||
<button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.locale.Tr "repo.settings.transfer"}}</button>
|
|
||||||
{{end}}
|
|
||||||
</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>
|
|
||||||
|
|
||||||
{{if .Permission.CanRead $.UnitTypeWiki}}
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
||||||
<div class="item">
|
|
||||||
<div class="ui right">
|
|
||||||
<button class="ui basic red show-modal button" data-modal="#delete-wiki-modal">{{.locale.Tr "repo.settings.wiki_delete"}}</button>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h5>{{.locale.Tr "repo.settings.wiki_delete"}}</h5>
|
|
||||||
<p>{{.locale.Tr "repo.settings.wiki_delete_desc"}}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
||||||
<div class="item">
|
|
||||||
<div class="ui right">
|
|
||||||
<button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{.locale.Tr "repo.settings.delete"}}</button>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h5>{{.locale.Tr "repo.settings.delete"}}</h5>
|
|
||||||
<p>{{.locale.Tr "repo.settings.delete_desc"}}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{if not .Repository.IsMirror}}
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
||||||
<div class="item">
|
|
||||||
<div class="ui right">
|
|
||||||
<button class="ui basic red show-modal button" data-modal="#archive-repo-modal">
|
|
||||||
{{if .Repository.IsArchived}}
|
|
||||||
{{.locale.Tr "repo.settings.unarchive.button"}}
|
|
||||||
{{else}}
|
{{else}}
|
||||||
{{.locale.Tr "repo.settings.archive.button"}}
|
{{.locale.Tr "repo.settings.transfer_desc"}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</button>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="flex-item-trailing">
|
||||||
{{if .Repository.IsArchived}}
|
{{if .RepoTransfer}}
|
||||||
<h5>{{.locale.Tr "repo.settings.unarchive.header"}}</h5>
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
<p>{{.locale.Tr "repo.settings.unarchive.text"}}</p>
|
{{.CsrfTokenHtml}}
|
||||||
|
<input type="hidden" name="action" value="cancel_transfer">
|
||||||
|
<button class="ui red button">{{.locale.Tr "repo.settings.transfer_abort"}}</button>
|
||||||
|
</form>
|
||||||
{{else}}
|
{{else}}
|
||||||
<h5>{{.locale.Tr "repo.settings.archive.header"}}</h5>
|
<button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.locale.Tr "repo.settings.transfer"}}</button>
|
||||||
<p>{{.locale.Tr "repo.settings.archive.text"}}</p>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{if .Permission.CanRead $.UnitTypeWiki}}
|
||||||
|
<div class="flex-item">
|
||||||
|
<div class="flex-item-main">
|
||||||
|
<div class="flex-item-title">{{.locale.Tr "repo.settings.wiki_delete"}}</div>
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
<div class="flex-item">
|
||||||
|
<div class="flex-item-main">
|
||||||
|
<div class="flex-item-title">{{.locale.Tr "repo.settings.delete"}}</div>
|
||||||
|
<div class="flex-item-body">{{.locale.Tr "repo.settings.delete_desc"}}</div>
|
||||||
|
</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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{if not .Repository.IsMirror}}
|
||||||
|
<div class="flex-item flex-item-center">
|
||||||
|
<div class="flex-item-main">
|
||||||
|
{{if .Repository.IsArchived}}
|
||||||
|
<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">
|
||||||
|
{{if .Repository.IsArchived}}
|
||||||
|
{{.locale.Tr "repo.settings.unarchive.button"}}
|
||||||
|
{{else}}
|
||||||
|
{{.locale.Tr "repo.settings.archive.button"}}
|
||||||
|
{{end}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -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"}} "{{.Title}}"">
|
<input type="checkbox" autocomplete="off" class="issue-checkbox gt-mr-4" data-issue-id={{.ID}} aria-label="{{$.locale.Tr "repo.issues.action_check"}} "{{.Title}}"">
|
||||||
{{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">
|
||||||
|
|
|
@ -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 class="flex-item-main">
|
||||||
|
<div class="flex-item-title">
|
||||||
|
{{.Name}}
|
||||||
</div>
|
</div>
|
||||||
<div class="content gt-ml-3 gt-ellipsis">
|
<div class="flex-item-body">
|
||||||
<strong>{{$v.Name}}</strong>
|
******
|
||||||
<div class="print meta">******</div>
|
|
||||||
</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}}"
|
||||||
|
|
5
templates/shared/user/name.tmpl
Normal file
5
templates/shared/user/name.tmpl
Normal 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}}
|
|
@ -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"}}
|
||||||
|
|
|
@ -1,128 +1,128 @@
|
||||||
{{range .Feeds}}
|
<div id="activity-feed" class="flex-list">
|
||||||
<div class="news">
|
{{range .Feeds}}
|
||||||
<div class="ui left">
|
<div class="flex-item">
|
||||||
{{avatarByAction $.Context .}}
|
<div class="flex-item-leading">
|
||||||
</div>
|
{{avatarByAction $.Context .}}
|
||||||
<div class="ui grid">
|
</div>
|
||||||
<div class="ui fourteen wide column">
|
<div class="flex-item-main gt-gap-3">
|
||||||
<div class="{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}push news{{end}}">
|
<div>
|
||||||
<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}}
|
{{.ShortActUserName}}
|
||||||
{{.ShortActUserName}}
|
{{end}}
|
||||||
{{end}}
|
{{if eq .GetOpType 1}}
|
||||||
{{if eq .GetOpType 1}}
|
{{$.locale.Tr "action.create_repo" (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.create_repo" (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 2}}
|
||||||
{{else if eq .GetOpType 2}}
|
{{$.locale.Tr "action.rename_repo" (.GetContent|Escape) (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.rename_repo" (.GetContent|Escape) (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 5}}
|
||||||
{{else if eq .GetOpType 5}}
|
{{if .Content}}
|
||||||
{{if .Content}}
|
{{$.locale.Tr "action.commit_repo" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.commit_repo" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
{{else}}
|
||||||
{{else}}
|
{{$.locale.Tr "action.create_branch" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.create_branch" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
{{end}}
|
||||||
{{end}}
|
{{else if eq .GetOpType 6}}
|
||||||
{{else if eq .GetOpType 6}}
|
{{$index := index .GetIssueInfos 0}}
|
||||||
{{$index := index .GetIssueInfos 0}}
|
{{$.locale.Tr "action.create_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.create_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 7}}
|
||||||
{{else if eq .GetOpType 7}}
|
{{$index := index .GetIssueInfos 0}}
|
||||||
{{$index := index .GetIssueInfos 0}}
|
{{$.locale.Tr "action.create_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.create_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 8}}
|
||||||
{{else if eq .GetOpType 8}}
|
{{$.locale.Tr "action.transfer_repo" .GetContent (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.transfer_repo" .GetContent (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 9}}
|
||||||
{{else if eq .GetOpType 9}}
|
{{$.locale.Tr "action.push_tag" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.push_tag" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 10}}
|
||||||
{{else if eq .GetOpType 10}}
|
{{$index := index .GetIssueInfos 0}}
|
||||||
{{$index := index .GetIssueInfos 0}}
|
{{$.locale.Tr "action.comment_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.comment_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 11}}
|
||||||
{{else if eq .GetOpType 11}}
|
{{$index := index .GetIssueInfos 0}}
|
||||||
{{$index := index .GetIssueInfos 0}}
|
{{$.locale.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 12}}
|
||||||
{{else if eq .GetOpType 12}}
|
{{$index := index .GetIssueInfos 0}}
|
||||||
{{$index := index .GetIssueInfos 0}}
|
{{$.locale.Tr "action.close_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.close_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 13}}
|
||||||
{{else if eq .GetOpType 13}}
|
{{$index := index .GetIssueInfos 0}}
|
||||||
{{$index := index .GetIssueInfos 0}}
|
{{$.locale.Tr "action.reopen_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.reopen_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 14}}
|
||||||
{{else if eq .GetOpType 14}}
|
{{$index := index .GetIssueInfos 0}}
|
||||||
{{$index := index .GetIssueInfos 0}}
|
{{$.locale.Tr "action.close_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.close_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 15}}
|
||||||
{{else if eq .GetOpType 15}}
|
{{$index := index .GetIssueInfos 0}}
|
||||||
{{$index := index .GetIssueInfos 0}}
|
{{$.locale.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 16}}
|
||||||
{{else if eq .GetOpType 16}}
|
{{$index := index .GetIssueInfos 0}}
|
||||||
{{$index := index .GetIssueInfos 0}}
|
{{$.locale.Tr "action.delete_tag" (.GetRepoLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.delete_tag" (.GetRepoLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 17}}
|
||||||
{{else if eq .GetOpType 17}}
|
{{$index := index .GetIssueInfos 0}}
|
||||||
{{$index := index .GetIssueInfos 0}}
|
{{$.locale.Tr "action.delete_branch" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.delete_branch" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 18}}
|
||||||
{{else if eq .GetOpType 18}}
|
{{$.locale.Tr "action.mirror_sync_push" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.mirror_sync_push" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 19}}
|
||||||
{{else if eq .GetOpType 19}}
|
{{$.locale.Tr "action.mirror_sync_create" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.mirror_sync_create" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 20}}
|
||||||
{{else if eq .GetOpType 20}}
|
{{$.locale.Tr "action.mirror_sync_delete" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.mirror_sync_delete" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 21}}
|
||||||
{{else if eq .GetOpType 21}}
|
{{$index := index .GetIssueInfos 0}}
|
||||||
{{$index := index .GetIssueInfos 0}}
|
{{$.locale.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 22}}
|
||||||
{{else if eq .GetOpType 22}}
|
{{$index := index .GetIssueInfos 0}}
|
||||||
{{$index := index .GetIssueInfos 0}}
|
{{$.locale.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 23}}
|
||||||
{{else if eq .GetOpType 23}}
|
{{$index := index .GetIssueInfos 0}}
|
||||||
{{$index := index .GetIssueInfos 0}}
|
{{$.locale.Tr "action.comment_pull" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||||
{{$.locale.Tr "action.comment_pull" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
{{else if eq .GetOpType 24}}
|
||||||
{{else if eq .GetOpType 24}}
|
{{$linkText := .Content | RenderEmoji $.Context}}
|
||||||
{{$linkText := .Content | RenderEmoji $.Context}}
|
{{$.locale.Tr "action.publish_release" (.GetRepoLink|Escape) ((printf "%s/releases/tag/%s" .GetRepoLink .GetTag)|Escape) (.ShortRepoPath|Escape) $linkText | Str2html}}
|
||||||
{{$.locale.Tr "action.publish_release" (.GetRepoLink|Escape) ((printf "%s/releases/tag/%s" .GetRepoLink .GetTag)|Escape) (.ShortRepoPath|Escape) $linkText | Str2html}}
|
{{else if eq .GetOpType 25}}
|
||||||
{{else if eq .GetOpType 25}}
|
{{$index := index .GetIssueInfos 0}}
|
||||||
{{$index := index .GetIssueInfos 0}}
|
{{$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}}
|
|
||||||
</p>
|
|
||||||
{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}
|
|
||||||
<div class="content">
|
|
||||||
<ul>
|
|
||||||
{{$push := ActionContent2Commits .}}
|
|
||||||
{{$repoLink := .GetRepoLink}}
|
|
||||||
{{range $push.Commits}}
|
|
||||||
{{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
|
|
||||||
<li>
|
|
||||||
{{avatarHTML ($push.AvatarLink $.Context .AuthorEmail) 16 "gt-mr-2" .AuthorName}}
|
|
||||||
<a class="commit-id gt-mr-2" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
|
|
||||||
<span class="text truncate light grey">
|
|
||||||
{{RenderCommitMessage $.Context .Message $repoLink $.ComposeMetas}}
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
{{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>
|
|
||||||
{{else if eq .GetOpType 6}}
|
|
||||||
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
|
||||||
{{else if eq .GetOpType 7}}
|
|
||||||
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
|
||||||
{{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>
|
|
||||||
{{$comment := index .GetIssueInfos 1}}
|
|
||||||
{{if gt (len $comment) 0}}<p class="text light grey">{{$comment | RenderEmoji $.Context}}</p>{{end}}
|
|
||||||
{{else if eq .GetOpType 11}}
|
|
||||||
<p class="text light grey">{{index .GetIssueInfos 1}}</p>
|
|
||||||
{{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>
|
|
||||||
{{else if eq .GetOpType 25}}
|
|
||||||
<p class="text light grey">{{$.locale.Tr "action.review_dismissed_reason"}}</p>
|
|
||||||
<p class="text light grey">{{index .GetIssueInfos 2 | RenderEmoji $.Context}}</p>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
<p class="text italic light grey">{{TimeSince .GetCreate $.locale}}</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}
|
||||||
|
<div class="gt-pl-5">
|
||||||
|
{{$push := ActionContent2Commits .}}
|
||||||
|
{{$repoLink := .GetRepoLink}}
|
||||||
|
{{range $push.Commits}}
|
||||||
|
{{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
|
||||||
|
<div class="flex-item">
|
||||||
|
{{avatarHTML ($push.AvatarLink $.Context .AuthorEmail) 16 "" .AuthorName}}
|
||||||
|
<a class="commit-id" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
|
||||||
|
<span class="text truncate light grey">
|
||||||
|
{{RenderCommitMessage $.Context .Message $repoLink $.ComposeMetas}}
|
||||||
|
</span>
|
||||||
|
</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}}
|
||||||
|
</div>
|
||||||
|
{{else if eq .GetOpType 6}}
|
||||||
|
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
||||||
|
{{else if eq .GetOpType 7}}
|
||||||
|
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
||||||
|
{{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>
|
||||||
|
{{$comment := index .GetIssueInfos 1}}
|
||||||
|
{{if gt (len $comment) 0}}
|
||||||
|
<div class="flex-item-body">{{$comment | RenderEmoji $.Context | RenderCodeBlock}}</div>
|
||||||
|
{{end}}
|
||||||
|
{{else if eq .GetOpType 11}}
|
||||||
|
<div class="flex-item-body">{{index .GetIssueInfos 1}}</div>
|
||||||
|
{{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>
|
||||||
|
{{else if eq .GetOpType 25}}
|
||||||
|
<div class="flex-item-body">{{$.locale.Tr "action.review_dismissed_reason"}}</div>
|
||||||
|
<div class="flex-item-body">{{index .GetIssueInfos 2 | RenderEmoji $.Context}}</div>
|
||||||
|
{{end}}
|
||||||
|
<div class="flex-item-body">{{TimeSince .GetCreate $.locale}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui two wide right aligned column">
|
<div class="flex-item-trailing">
|
||||||
<span class="text grey">{{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32}}</span>
|
{{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="divider"></div>
|
{{end}}
|
||||||
</div>
|
{{template "base/paginate" .}}
|
||||||
{{end}}
|
</div>
|
||||||
|
|
||||||
{{template "base/paginate" .}}
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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)}}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -21,21 +21,29 @@
|
||||||
</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}}
|
</div>
|
||||||
</span>
|
<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}}">
|
||||||
|
{{$.locale.Tr "settings.delete_key"}}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<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"}}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,19 +2,20 @@
|
||||||
{{.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">
|
||||||
<form action="{{AppSubUrl}}/user/settings/security/openid/toggle_visibility" method="post">
|
<div class="flex-item-title">{{.URI}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-item-trailing">
|
||||||
|
<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}}">
|
||||||
{{if .Show}}
|
{{if .Show}}
|
||||||
|
@ -28,11 +29,11 @@
|
||||||
{{$.locale.Tr "settings.show_openid"}}
|
{{$.locale.Tr "settings.show_openid"}}
|
||||||
</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}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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++ {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
|
@ -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";
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
94
web_src/css/shared/flex-list.css
Normal file
94
web_src/css/shared/flex-list.css
Normal 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;
|
||||||
|
}
|
|
@ -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);
|
|
||||||
}
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue