diff --git a/docker/gitea/Dockerfile b/docker/gitea/Dockerfile index 29af91a3f7..50e8e4eedf 100644 --- a/docker/gitea/Dockerfile +++ b/docker/gitea/Dockerfile @@ -22,17 +22,17 @@ ################################### #Build stage -FROM docker.io/library/golang:1.15-buster AS build-env +FROM docker.io/library/golang:1.16-buster AS build-env LABEL maintainer="infra-root@openstack.org" -ARG GITEA_VERSION="v1.13.7" +ARG GITEA_VERSION="v1.14.4" ENV TAGS "bindata $TAGS" #Build deps RUN apt-get update && apt-get -y install build-essential git apt-transport-https curl gnupg2 \ && curl -sS https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \ - && echo "deb https://deb.nodesource.com/node_10.x bionic main" | tee /etc/apt/sources.list.d/nodesource.list \ + && echo "deb https://deb.nodesource.com/node_16.x buster main" | tee /etc/apt/sources.list.d/nodesource.list \ && apt-get update \ && apt-get -q --option "Dpkg::Options::=--force-confold" --assume-yes install nodejs \ && mkdir -p ${GOPATH}/src/code.gitea.io/gitea diff --git a/docker/gitea/custom/public/img/opendev-192.png b/docker/gitea/custom/public/img/logo-192.png similarity index 100% rename from docker/gitea/custom/public/img/opendev-192.png rename to docker/gitea/custom/public/img/logo-192.png diff --git a/docker/gitea/custom/public/img/opendev-512.png b/docker/gitea/custom/public/img/logo-512.png similarity index 100% rename from docker/gitea/custom/public/img/opendev-512.png rename to docker/gitea/custom/public/img/logo-512.png diff --git a/docker/gitea/custom/public/img/opendev-lg.png b/docker/gitea/custom/public/img/logo-lg.png similarity index 100% rename from docker/gitea/custom/public/img/opendev-lg.png rename to docker/gitea/custom/public/img/logo-lg.png diff --git a/docker/gitea/custom/public/img/logo-sm.png b/docker/gitea/custom/public/img/logo-sm.png new file mode 100644 index 0000000000..789b7c9073 Binary files /dev/null and b/docker/gitea/custom/public/img/logo-sm.png differ diff --git a/docker/gitea/custom/public/img/logo.svg b/docker/gitea/custom/public/img/logo.svg new file mode 100644 index 0000000000..213491a130 --- /dev/null +++ b/docker/gitea/custom/public/img/logo.svg @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + id="svg2" + version="1.1" + xml:space="preserve" + width="177.285" + height="177.285" + viewBox="0 0 177.28501 177.28501"><metadata + id="metadata8"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs + id="defs6"><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath66"><path + d="m 533,244.125 h 72 V 316 h -72 z" + id="path68" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath82"><path + d="M 471.926,323 H 499 v 28 h -27.074 z" + id="path84" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath92"><path + d="m 502,323 h 27 v 37.035 h -27 z" + id="path94" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath110"><path + d="m 645,324 h 21.719 v 26 H 645 Z" + id="path112" /></clipPath></defs><g + transform="matrix(2.5,0,0,2.5,-1334.6675,-610.3125)" + id="g62"><g + clip-path="url(#clipPath66)" + id="g64"><path + id="path70" + style="fill:#ee265e;fill-opacity:1;fill-rule:nonzero;stroke:none" + d="m 604.781,279.582 c 0,-19.582 -15.875,-35.457 -35.457,-35.457 -19.582,0 -35.457,15.875 -35.457,35.457 0,19.582 15.875,35.457 35.457,35.457 19.582,0 35.457,-15.875 35.457,-35.457" /><path + id="path72" + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" + d="m 546.879,284.004 c 0,-3 2.441,-5.442 5.441,-5.442 3,0 5.442,2.442 5.442,5.442 0,3.004 -2.442,5.441 -5.442,5.441 -3,0 -5.441,-2.437 -5.441,-5.441 m 13.004,0 c 0,-4.168 -3.391,-7.563 -7.563,-7.563 -4.172,0 -7.562,3.395 -7.562,7.563 0,4.172 3.39,7.566 7.562,7.566 4.172,0 7.563,-3.394 7.563,-7.566" /><path + id="path74" + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" + d="m 583.555,289.449 h -5.442 c -3,0 -5.441,-2.441 -5.441,-5.445 0,-3 2.441,-5.442 5.441,-5.442 h 5.442 z m 1.062,-13.008 h -6.504 c -4.172,0 -7.562,3.395 -7.562,7.563 0,4.172 3.39,7.566 7.562,7.566 h 6.504 c 0.586,0 1.059,-0.476 1.059,-1.062 V 277.5 c 0,-0.586 -0.473,-1.059 -1.059,-1.059" /><path + id="path76" + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" + d="m 590.906,285.203 c -0.664,0 -1.199,-0.539 -1.199,-1.199 0,-0.66 0.535,-1.195 1.199,-1.195 0.66,0 1.196,0.535 1.196,1.195 0,0.66 -0.536,1.199 -1.196,1.199 m 0,10.465 c 0.66,0 1.196,0.539 1.196,1.199 0,0.66 -0.536,1.199 -1.196,1.199 -0.664,0 -1.199,-0.539 -1.199,-1.199 0,-0.66 0.535,-1.199 1.199,-1.199 m -52.019,-15.242 c 0.222,-0.227 0.527,-0.352 0.843,-0.352 0.321,0 0.622,0.125 0.848,0.352 0.469,0.469 0.469,1.23 0,1.695 -0.453,0.453 -1.242,0.453 -1.695,0 -0.465,-0.465 -0.465,-1.226 0.004,-1.695 m 10.359,-7.742 c -0.453,0.453 -1.242,0.453 -1.695,0 -0.469,-0.469 -0.469,-1.227 0,-1.696 0.234,-0.234 0.539,-0.351 0.847,-0.351 0.309,0 0.614,0.117 0.848,0.351 0.465,0.469 0.465,1.227 0,1.696 m 45.566,-13.707 h -10.195 c -0.586,0 -1.062,0.476 -1.062,1.062 v 10.043 h -5.512 c -5.828,0 -10.828,3.609 -12.898,8.707 -0.676,-1.652 -1.68,-3.195 -3.02,-4.535 -2.887,-2.887 -6.797,-4.313 -10.836,-4.02 -0.148,-0.265 -0.32,-0.519 -0.543,-0.746 -1.293,-1.293 -3.398,-1.293 -4.695,0 -1.293,1.293 -1.293,3.399 0,4.696 0.629,0.625 1.461,0.972 2.347,0.972 0.887,0 1.719,-0.347 2.348,-0.972 0.52,-0.52 0.82,-1.176 0.922,-1.852 3.344,-0.176 6.566,1.031 8.957,3.422 4.602,4.601 4.602,12.09 0,16.691 -4.602,4.602 -12.086,4.602 -16.687,0 -2.137,-2.136 -3.34,-4.945 -3.438,-7.949 0.594,-0.141 1.137,-0.434 1.578,-0.875 1.293,-1.293 1.293,-3.398 0,-4.695 -1.254,-1.254 -3.441,-1.25 -4.691,0 -1.297,1.297 -1.297,3.402 -0.004,4.695 0.293,0.289 0.629,0.512 0.988,0.672 0.051,3.648 1.481,7.066 4.067,9.652 2.714,2.715 6.277,4.071 9.843,4.071 3.567,0 7.129,-1.356 9.844,-4.071 1.363,-1.363 2.379,-2.937 3.059,-4.621 2.093,5.043 7.066,8.602 12.859,8.602 h 9.73 c 0.446,1.308 1.676,2.262 3.133,2.262 1.828,0 3.317,-1.493 3.317,-3.321 0,-1.832 -1.489,-3.32 -3.317,-3.32 -1.457,0 -2.687,0.949 -3.133,2.258 h -9.73 c -6.508,0 -11.801,-5.293 -11.801,-11.801 0,-6.508 5.293,-11.801 11.801,-11.801 h 6.574 c 0.586,0 1.059,-0.473 1.059,-1.058 v -10.047 h 8.078 v 2.722 l -2.852,0.004 c -0.582,0 -1.058,0.477 -1.058,1.059 v 15.992 c -1.309,0.445 -2.258,1.672 -2.258,3.129 0,1.832 1.488,3.32 3.32,3.32 1.828,0 3.317,-1.488 3.317,-3.32 0,-1.457 -0.95,-2.684 -2.258,-3.129 v -14.93 l 2.847,-0.004 c 0.586,0 1.059,-0.476 1.059,-1.058 v -4.844 c 0,-0.586 -0.473,-1.062 -1.059,-1.062" /></g></g></svg> \ No newline at end of file diff --git a/docker/gitea/custom/templates/base/head_navbar.tmpl b/docker/gitea/custom/templates/base/head_navbar.tmpl index 485da790f1..ea5870f9b1 100644 --- a/docker/gitea/custom/templates/base/head_navbar.tmpl +++ b/docker/gitea/custom/templates/base/head_navbar.tmpl @@ -1,7 +1,7 @@ <div class="ui container" id="navbar"> <div class="item brand" style="justify-content: space-between;"> <a href="{{AppSubUrl}}/"> - <img class="ui mini image" src="{{StaticUrlPrefix}}/img/opendev-sm.png"> + <img class="ui mini image" with="30" height="30" src="{{StaticUrlPrefix}}/img/logo.svg"> </a> <div class="ui basic icon button mobile-only" id="navbar-expand-toggle"> <i class="sidebar icon"></i> @@ -37,7 +37,7 @@ <div class="item"> <div class="ui icon input"> <input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}"> - <i class="search icon"></i> + <i class="icon df ac jc">{{svg "octicon-search" 16}}</i> </div> </div> */}} @@ -47,7 +47,7 @@ <div class="right stackable menu"> <div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted"> <span class="text"> - <img class="ui tiny avatar image" width="24" height="24" src="{{.SignedUser.RelAvatarLink}}"> + {{avatar .SignedUser 24 "tiny"}} <span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span> <span class="mobile-only">{{.SignedUser.Name}}</span> <span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down"}}</span> @@ -67,6 +67,44 @@ </div> {{else if .IsSigned}} <div class="right stackable menu"> + {{$issueURL := Printf "%s/%s/issues/%d" AppSubUrl .ActiveStopwatch.RepoSlug .ActiveStopwatch.IssueIndex}} + <a class="active-stopwatch-trigger item ui label {{if not .ActiveStopwatch}}hidden{{end}}" href="{{$issueURL}}"> + <span class="text"> + <span class="fitted item"> + {{svg "octicon-stopwatch"}} + <span class="red" style="position:absolute; right:-0.6em; top:-0.6em;">{{svg "octicon-dot-fill"}}</span> + </span> + <span class="sr-mobile-only">{{.i18n.Tr "active_stopwatch"}}</span> + </span> + </a> + <div class="ui popup very wide"> + <div class="df ac"> + <a class="stopwatch-link df ac" href="{{$issueURL}}"> + {{svg "octicon-issue-opened"}} + <span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span> + <span class="ui label blue stopwatch-time my-0 mx-4" data-seconds="{{.ActiveStopwatch.Seconds}}"> + {{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}} + </span> + </a> + <form class="stopwatch-commit" method="POST" action="{{$issueURL}}/times/stopwatch/toggle"> + {{.CsrfTokenHtml}} + <button + class="ui button mini compact basic icon fitted poping up" + data-content="{{.i18n.Tr "repo.issues.stop_tracking"}}" + data-position="top right" data-variation="small inverted" + >{{svg "octicon-square-fill"}}</button> + </form> + <form class="stopwatch-cancel" method="POST" action="{{$issueURL}}/times/stopwatch/cancel"> + {{.CsrfTokenHtml}} + <button + class="ui button mini compact basic icon fitted poping up" + data-content="{{.i18n.Tr "repo.issues.cancel_tracking"}}" + data-position="top right" data-variation="small inverted" + >{{svg "octicon-trashcan"}}</button> + </form> + </div> + </div> + <a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted"> <span class="text"> <span class="fitted">{{svg "octicon-bell"}}</span> @@ -89,9 +127,11 @@ <a class="item" href="{{AppSubUrl}}/repo/create"> <span class="fitted">{{svg "octicon-plus"}}</span> {{.i18n.Tr "new_repo"}} </a> - <a class="item" href="{{AppSubUrl}}/repo/migrate"> - <span class="fitted">{{svg "octicon-repo-push"}}</span> {{.i18n.Tr "new_migrate"}} - </a> + {{if not .DisableMigrations}} + <a class="item" href="{{AppSubUrl}}/repo/migrate"> + <span class="fitted">{{svg "octicon-repo-push"}}</span> {{.i18n.Tr "new_migrate"}} + </a> + {{end}} {{if .SignedUser.CanCreateOrganization}} <a class="item" href="{{AppSubUrl}}/org/create"> <span class="fitted">{{svg "octicon-organization"}}</span> {{.i18n.Tr "new_org"}} @@ -102,7 +142,7 @@ <div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted"> <span class="text"> - <img class="ui tiny avatar image" width="24" height="24" src="{{.SignedUser.RelAvatarLink}}"> + {{avatar .SignedUser 24 "tiny"}} <span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span> <span class="mobile-only">{{.SignedUser.Name}}</span> <span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down"}}</span> @@ -133,7 +173,7 @@ <div class="divider"></div> <a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin"> - <i class="icon settings"></i> + {{svg "octicon-server"}} {{.i18n.Tr "admin_panel"}}<!-- Admin Panel --> </a> {{end}} diff --git a/docker/gitea/custom/templates/home.tmpl b/docker/gitea/custom/templates/home.tmpl index f1a3187098..d5dab01456 100644 --- a/docker/gitea/custom/templates/home.tmpl +++ b/docker/gitea/custom/templates/home.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -<div class="home"> +<div class="page-content home"> <div class="ui stackable middle very relaxed page grid"> <div class="sixteen wide center aligned centered column"> <div class="hero" id="opendev"> diff --git a/docker/gitea/custom/templates/pwa/manifest_json.tmpl b/docker/gitea/custom/templates/pwa/manifest_json.tmpl deleted file mode 100644 index 1a8f821ea9..0000000000 --- a/docker/gitea/custom/templates/pwa/manifest_json.tmpl +++ /dev/null @@ -1,31 +0,0 @@ -{ - "short_name": "OpenDev", - "name": "OpenDev", - "icons": [ - { - "src": "{{StaticUrlPrefix}}/img/opendev-lg.png", - "type": "image/png", - "sizes": "880x880" - }, - { - "src": "{{StaticUrlPrefix}}/img/opendev-sm.png", - "type": "image/png", - "sizes": "120x120" - }, - { - "src": "{{StaticUrlPrefix}}/img/opendev-512.png", - "type": "image/png", - "sizes": "512x512" - }, - { - "src": "{{StaticUrlPrefix}}/img/opendev-192.png", - "type": "image/png", - "sizes": "192x192" - } - ], - "start_url": "{{AppSubUrl}}/", - "scope": "{{AppSubUrl}}/", - "background_color": "#FAFAFA", - "display": "standalone", - "theme_color": "{{ThemeColorMetaTag}}" - } diff --git a/docker/gitea/custom/templates/repo/header.tmpl b/docker/gitea/custom/templates/repo/header.tmpl index cc42b92829..c49816c78f 100644 --- a/docker/gitea/custom/templates/repo/header.tmpl +++ b/docker/gitea/custom/templates/repo/header.tmpl @@ -2,44 +2,69 @@ {{with .Repository}} <div class="ui container"> <div class="repo-header"> - <div class="ui huge breadcrumb repo-title"> - {{if .RelAvatarLink}} - <img class="ui avatar image" src="{{.RelAvatarLink}}"> - {{else}} - {{template "repo/header_icon" .}} - {{end}} - <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a> - <div class="divider"> / </div> - <a href="{{$.RepoLink}}">{{.Name}}</a> - {{if .IsTemplate}} - {{if .IsPrivate}} - <span class="ui basic label">{{$.i18n.Tr "repo.desc.private_template"}}</span> + <div class="repo-title-wrap df fc"> + <div class="repo-title"> + {{$avatar := (repoAvatar . 32 "mr-3")}} + {{if $avatar}} + {{$avatar}} {{else}} - {{if .Owner.Visibility.IsPrivate}} - <span class="ui basic label">{{$.i18n.Tr "repo.desc.internal_template"}}</span> - {{end}} + {{template "repo/icon" .}} {{end}} - {{else}} - {{if .IsPrivate}} - <span class="ui basic label">{{$.i18n.Tr "repo.desc.private"}}</span> - {{else}} - {{if .Owner.Visibility.IsPrivate}} - <span class="ui basic label">{{$.i18n.Tr "repo.desc.internal"}}</span> + <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a> + <div class="mx-2">/</div> + <a href="{{$.RepoLink}}">{{.Name}}</a> + <div class="labels df ac fw"> + {{if .IsTemplate}} + {{if .IsPrivate}} + <span class="ui basic label">{{$.i18n.Tr "repo.desc.private_template"}}</span> + {{else}} + {{if .Owner.Visibility.IsPrivate}} + <span class="ui basic label">{{$.i18n.Tr "repo.desc.internal_template"}}</span> + {{end}} + {{end}} + {{else}} + {{if .IsPrivate}} + <span class="ui basic label">{{$.i18n.Tr "repo.desc.private"}}</span> + {{else}} + {{if .Owner.Visibility.IsPrivate}} + <span class="ui basic label">{{$.i18n.Tr "repo.desc.internal"}}</span> + {{end}} + {{end}} {{end}} - {{end}} - {{end}} - {{if .IsArchived}}<span class="ui compact label">{{$.i18n.Tr "repo.desc.archived"}}</span>{{end}} + {{if .IsArchived}} + <span class="ui basic label">{{$.i18n.Tr "repo.desc.archived"}}</span> + {{end}} + </div> + </div> {{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}">{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}</a></div>{{end}} {{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}} {{if .IsGenerated}}<div class="fork-flag">{{$.i18n.Tr "repo.generated_from"}} <a href="{{.TemplateRepo.Link}}">{{SubStr .TemplateRepo.RelLink 1 -1}}</a></div>{{end}} </div> - <!-- Intentionally removed as watching, starring, and forking don't make sense without accounts + <!-- Intentionally removed as transfering, watching, starring, and forking don't make sense without accounts {{if not .IsBeingCreated}} <div class="repo-buttons"> + {{if $.RepoTransfer}} + <form method="post" action="{{$.RepoLink}}/action/accept_transfer?redirect_to={{$.RepoLink}}"> + {{$.CsrfTokenHtml}} + <div class="ui poping up" data-content="{{if $.CanUserAcceptTransfer}}{{$.i18n.Tr "repo.transfer.accept_desc" $.RepoTransfer.Recipient.DisplayName}}{{else}}{{$.i18n.Tr "repo.transfer.no_permission_to_accept"}}{{end}}" data-position="bottom center" data-variation="tiny"> + <button type="submit" class="ui button {{if $.CanUserAcceptTransfer}}green {{end}} ok inverted small"{{if not $.CanUserAcceptTransfer}} disabled{{end}}> + {{$.i18n.Tr "repo.transfer.accept"}} + </button> + </div> + </form> + <form method="post" action="{{$.RepoLink}}/action/reject_transfer?redirect_to={{$.RepoLink}}"> + {{$.CsrfTokenHtml}} + <div class="ui poping up" data-content="{{if $.CanUserAcceptTransfer}}{{$.i18n.Tr "repo.transfer.reject_desc" $.RepoTransfer.Recipient.DisplayName}}{{else}}{{$.i18n.Tr "repo.transfer.no_permission_to_reject"}}{{end}}" data-position="bottom center" data-variation="tiny"> + <button type="submit" class="ui button {{if $.CanUserAcceptTransfer}}red {{end}}ok inverted small"{{if not $.CanUserAcceptTransfer}} disabled{{end}}> + {{$.i18n.Tr "repo.transfer.reject"}} + </button> + </div> + </form> + {{end}} <form method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}"> {{$.CsrfTokenHtml}} <div class="ui labeled button{{if not $.IsSigned}} poping up{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.watch_guest_user" }}" data-position="top center" data-variation="tiny"{{end}}> - <button type="submit" class="ui compact basic button"{{if not $.IsSigned}} disabled{{end}}> + <button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}> {{if $.IsWatchingRepo}}{{svg "octicon-eye-closed" 16}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{svg "octicon-eye"}}{{$.i18n.Tr "repo.watch"}}{{end}} </button> <a class="ui basic label" href="{{.Link}}/watchers"> @@ -50,7 +75,7 @@ <form method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}"> {{$.CsrfTokenHtml}} <div class="ui labeled button{{if not $.IsSigned}} poping up{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.star_guest_user" }}" data-position="top center" data-variation="tiny"{{end}}> - <button type="submit" class="ui compact basic button"{{if not $.IsSigned}} disabled{{end}}> + <button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}> {{if $.IsStaringRepo}}{{svg "octicon-star-fill"}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{svg "octicon-star"}}{{$.i18n.Tr "repo.star"}}{{end}} </button> <a class="ui basic label" href="{{.Link}}/stars"> @@ -59,8 +84,8 @@ </div> </form> {{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}} - <div class="ui labeled button {{if and ($.IsSigned) (not $.CanSignedUserFork)}}disabled-repo-button{{end}}" tabindex="0"> - <a class="ui compact basic button {{if or (not $.IsSigned) (not $.CanSignedUserFork)}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else if $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{ else }} data-content="{{$.i18n.Tr "repo.fork_guest_user" }}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{AppSubUrl}}/repo/fork/{{.ID}}" {{end}} data-position="top center" data-variation="tiny"> + <div class="ui labeled button{{if not $.CanSignedUserFork}} poping up disabled{{end}}"{{if and (not $.CanSignedUserFork) $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{else if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_guest_user"}}"{{end}} data-position="top center" data-variation="tiny" tabindex="0"> + <a class="ui compact small basic button"{{if $.CanSignedUserFork}} href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{end}}> {{svg "octicon-repo-forked"}}{{$.i18n.Tr "repo.fork"}} </a> <a class="ui basic label" href="{{.Link}}/forks"> @@ -85,7 +110,10 @@ {{if .Permission.CanRead $.UnitTypeIssues}} <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues"> - {{svg "octicon-issue-opened"}} {{.i18n.Tr "repo.issues"}} <span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{CountFmt .Repository.NumOpenIssues}}</span> + {{svg "octicon-issue-opened"}} {{.i18n.Tr "repo.issues"}} + {{if .Repository.NumOpenIssues}} + <span class="ui blue small label">{{CountFmt .Repository.NumOpenIssues}}</span> + {{end}} </a> {{end}} @@ -97,7 +125,10 @@ {{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}} <a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls"> - {{svg "octicon-git-pull-request"}} {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{CountFmt .Repository.NumOpenPulls}}</span> + {{svg "octicon-git-pull-request"}} {{.i18n.Tr "repo.pulls"}} + {{if .Repository.NumOpenPulls}} + <span class="ui blue small label">{{CountFmt .Repository.NumOpenPulls}}</span> + {{end}} </a> {{end}} @@ -109,17 +140,19 @@ {{ if and (not .UnitProjectsGlobalDisabled) (.Permission.CanRead $.UnitTypeProjects)}} <a href="{{.RepoLink}}/projects" class="{{ if .IsProjectsPage }}active{{end}} item"> {{svg "octicon-project"}} {{.i18n.Tr "repo.project_board"}} - <span class="ui {{if not .Repository.NumOpenProjects}}gray{{else}}blue{{end}} small label"> - {{CountFmt .Repository.NumOpenProjects}} - </span> + {{if .Repository.NumOpenProjects}} + <span class="ui blue small label">{{CountFmt .Repository.NumOpenProjects}}</span> + {{end}} </a> {{ end }} - <!-- Removed intentionally as tarballs of repos that would normally need an intelligent process to create source artifacts is not a useful feature {{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo) }} <a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases"> - {{svg "octicon-tag"}} {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .NumReleases}}gray{{else}}blue{{end}} small label">{{CountFmt .NumReleases}}</span> + {{svg "octicon-tag"}} {{.i18n.Tr "repo.releases"}} + {{if .NumReleases}} + <span class="ui blue small label">{{CountFmt .NumReleases}}</span> + {{end}} </a> {{end}} --> diff --git a/playbooks/roles/gitea/tasks/main.yaml b/playbooks/roles/gitea/tasks/main.yaml index 5665a1f273..edd17f8c20 100644 --- a/playbooks/roles/gitea/tasks/main.yaml +++ b/playbooks/roles/gitea/tasks/main.yaml @@ -88,7 +88,7 @@ when: root_user_check.status==404 block: - name: Create root user - command: "docker exec -t gitea-docker_gitea-web_1 gitea admin create-user --name root --password {{ gitea_root_password }} --email {{ gitea_root_email }} --admin" + command: "docker exec -t gitea-docker_gitea-web_1 gitea admin user create --name root --password {{ gitea_root_password }} --email {{ gitea_root_email }} --admin" no_log: "{{ gitea_no_log }}" - name: Check if gerrit user exists uri: