feat!: ✨ update to support gitea 1.22
parent
422f0c1fc7
commit
de9c721197
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,15 +1,15 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 160">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 160">
|
||||||
<defs>
|
<defs>
|
||||||
<style>
|
<style>
|
||||||
.a, .b {
|
.a, .b {
|
||||||
fill: #a6c6f7;
|
fill: #a6c6f7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.a {
|
.a {
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</defs>
|
</defs>
|
||||||
<path class="a" d="M432,48V80H320V48h48V0h32V48ZM48,80H80V0H48Zm96,0h32V32H144ZM0,80H32V0H0ZM224,0V32h48V64H224V32H192V80H304V0ZM352,0H320V32h32Z"/>
|
<path class="a" d="M432,48V80H320V48h48V0h32V48ZM48,80H80V0H48Zm96,0h32V32H144ZM0,80H32V0H0ZM224,0V32h48V64H224V32H192V80H304V0ZM352,0H320V32h32Z"/>
|
||||||
<path class="b" d="M352,160H320V80h32Zm48-32V80H368v80h80V128ZM80,80H48v48H80Zm64,0v48H80v32h96V80ZM32,80H0v80H32Zm160,0V96h80v32H216v32h88V80Z"/>
|
<path class="b" d="M352,160H320V80h32Zm48-32V80H368v80h80V128ZM80,80H48v48H80Zm64,0v48H80v32h96V80ZM32,80H0v80H32Zm160,0V96h80v32H216v32h88V80Z"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 517 B |
@ -1,205 +1,214 @@
|
|||||||
{{$notificationUnreadCount := 0}}
|
{{$notificationUnreadCount := 0}}
|
||||||
{{if and .IsSigned .NotificationUnreadCount}}
|
{{if and .IsSigned .NotificationUnreadCount}}
|
||||||
{{$notificationUnreadCount = call .NotificationUnreadCount}}
|
{{$notificationUnreadCount = call .NotificationUnreadCount}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<nav id="navbar" aria-label="{{ctx.Locale.Tr "aria.navbar"}}">
|
<nav id="navbar" aria-label="{{ctx.Locale.Tr "aria.navbar"}}">
|
||||||
<div class="navbar-left ui secondary menu">
|
<div class="navbar-left">
|
||||||
<!-- the logo -->
|
<!-- the logo -->
|
||||||
<a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}">
|
<a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}">
|
||||||
<img height="24" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
|
<img height="20" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
|
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
|
||||||
<div class="ui secondary menu item navbar-mobile-right">
|
<div class="ui secondary menu item navbar-mobile-right only-mobile">
|
||||||
{{if .IsSigned}}
|
{{if and .IsSigned EnableTimetracking .ActiveStopwatch}}
|
||||||
<a id="mobile-notifications-icon" class="item gt-w-auto gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
<a id="mobile-stopwatch-icon" class="active-stopwatch item tw-mx-0" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}" data-seconds="{{.ActiveStopwatch.Seconds}}">
|
||||||
<div class="gt-relative">
|
<div class="tw-relative">
|
||||||
{{svg "octicon-bell"}}
|
{{svg "octicon-stopwatch"}}
|
||||||
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
<span class="header-stopwatch-dot"></span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<button class="item gt-w-auto ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle">{{svg "octicon-three-bars"}}</button>
|
{{if .IsSigned}}
|
||||||
</div>
|
<a id="mobile-notifications-icon" class="item tw-w-auto tw-p-2" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
||||||
|
<div class="tw-relative">
|
||||||
<!-- navbar links non-mobile -->
|
{{svg "octicon-bell"}}
|
||||||
{{if and .IsSigned .MustChangePassword}}
|
<span class="notification_count{{if not $notificationUnreadCount}} tw-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
||||||
{{/* No links */}}
|
</div>
|
||||||
{{else if .IsSigned}}
|
</a>
|
||||||
{{if not .UnitIssuesGlobalDisabled}}
|
{{end}}
|
||||||
<a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{ctx.Locale.Tr "issues"}}</a>
|
<button class="item tw-w-auto ui icon mini button tw-p-2 tw-m-0" id="navbar-expand-toggle" aria-label="{{ctx.Locale.Tr "home.nav_menu"}}">{{svg "octicon-three-bars"}}</button>
|
||||||
{{end}}
|
</div>
|
||||||
{{if not .UnitPullsGlobalDisabled}}
|
|
||||||
<a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{ctx.Locale.Tr "pull_requests"}}</a>
|
<!-- navbar links non-mobile -->
|
||||||
{{end}}
|
{{if and .IsSigned .MustChangePassword}}
|
||||||
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
|
{{/* No links */}}
|
||||||
{{if .ShowMilestonesDashboardPage}}
|
{{else if .IsSigned}}
|
||||||
<a class="item{{if .PageIsMilestonesDashboard}} active{{end}}" href="{{AppSubUrl}}/milestones">{{ctx.Locale.Tr "milestones"}}</a>
|
{{if not .UnitIssuesGlobalDisabled}}
|
||||||
{{end}}
|
<a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{ctx.Locale.Tr "issues"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
|
{{if not .UnitPullsGlobalDisabled}}
|
||||||
{{else if .IsLandingPageOrganizations}}
|
<a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{ctx.Locale.Tr "pull_requests"}}</a>
|
||||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{ctx.Locale.Tr "explore"}}</a>
|
{{end}}
|
||||||
{{else}}
|
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
|
||||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
|
{{if .ShowMilestonesDashboardPage}}
|
||||||
{{end}}
|
<a class="item{{if .PageIsMilestonesDashboard}} active{{end}}" href="{{AppSubUrl}}/milestones">{{ctx.Locale.Tr "milestones"}}</a>
|
||||||
|
{{end}}
|
||||||
{{template "custom/extra_links" .}}
|
{{end}}
|
||||||
|
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
|
||||||
{{if not .IsSigned}}
|
{{else if .IsLandingPageOrganizations}}
|
||||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">{{ctx.Locale.Tr "help"}}</a>
|
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{ctx.Locale.Tr "explore"}}</a>
|
||||||
{{end}}
|
{{else}}
|
||||||
</div>
|
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
|
||||||
|
{{end}}
|
||||||
<!-- the full dropdown menus -->
|
|
||||||
<div class="navbar-right ui secondary menu">
|
{{template "custom/extra_links" .}}
|
||||||
{{if and .IsSigned .MustChangePassword}}
|
|
||||||
<div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
{{if not .IsSigned}}
|
||||||
<span class="text gt-df gt-ac">
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">{{ctx.Locale.Tr "help"}}</a>
|
||||||
{{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
|
{{end}}
|
||||||
<span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span>
|
</div>
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
|
||||||
</span>
|
<!-- the full dropdown menus -->
|
||||||
<div class="menu user-menu">
|
<div class="navbar-right">
|
||||||
<div class="ui header">
|
{{if and .IsSigned .MustChangePassword}}
|
||||||
{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
<div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
||||||
</div>
|
<span class="text tw-flex tw-items-center">
|
||||||
|
{{ctx.AvatarUtils.Avatar .SignedUser 24 "tw-mr-1"}}
|
||||||
<div class="divider"></div>
|
<span class="only-mobile tw-ml-2">{{.SignedUser.Name}}</span>
|
||||||
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
{{svg "octicon-sign-out"}}
|
</span>
|
||||||
{{ctx.Locale.Tr "sign_out"}}
|
<div class="menu user-menu">
|
||||||
</a>
|
<div class="ui header">
|
||||||
</div><!-- end content avatar menu -->
|
{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
||||||
</div><!-- end dropdown avatar menu -->
|
</div>
|
||||||
{{else if .IsSigned}}
|
|
||||||
{{if EnableTimetracking}}
|
<div class="divider"></div>
|
||||||
<a class="active-stopwatch-trigger item gt-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}">
|
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
|
||||||
<div class="gt-relative">
|
{{svg "octicon-sign-out"}}
|
||||||
{{svg "octicon-stopwatch"}}
|
{{ctx.Locale.Tr "sign_out"}}
|
||||||
<span class="header-stopwatch-dot"></span>
|
</a>
|
||||||
</div>
|
</div><!-- end content avatar menu -->
|
||||||
<span class="mobile-only gt-ml-3">{{ctx.Locale.Tr "active_stopwatch"}}</span>
|
</div><!-- end dropdown avatar menu -->
|
||||||
</a>
|
{{else if .IsSigned}}
|
||||||
<div class="active-stopwatch-popup item tippy-target gt-p-3">
|
{{if and EnableTimetracking .ActiveStopwatch}}
|
||||||
<div class="gt-df gt-ac">
|
<a class="item not-mobile active-stopwatch tw-mx-0" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}" data-seconds="{{.ActiveStopwatch.Seconds}}">
|
||||||
<a class="stopwatch-link gt-df gt-ac" href="{{.ActiveStopwatch.IssueLink}}">
|
<div class="tw-relative">
|
||||||
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
|
{{svg "octicon-stopwatch"}}
|
||||||
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
|
<span class="header-stopwatch-dot"></span>
|
||||||
<span class="ui primary label stopwatch-time gt-my-0 gt-mx-4" data-seconds="{{.ActiveStopwatch.Seconds}}">
|
</div>
|
||||||
{{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
|
</a>
|
||||||
</span>
|
{{end}}
|
||||||
</a>
|
|
||||||
<form class="stopwatch-commit" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
|
<a class="item not-mobile tw-mx-0" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
||||||
{{.CsrfTokenHtml}}
|
<div class="tw-relative">
|
||||||
<button
|
{{svg "octicon-bell"}}
|
||||||
type="submit"
|
<span class="notification_count{{if not $notificationUnreadCount}} tw-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
||||||
class="ui button mini compact basic icon"
|
</div>
|
||||||
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.stop_tracking"}}"
|
</a>
|
||||||
>{{svg "octicon-square-fill"}}</button>
|
|
||||||
</form>
|
<div class="ui dropdown jump item tw-mx-0 tw-pr-2" data-tooltip-content="{{ctx.Locale.Tr "create_new"}}">
|
||||||
<form class="stopwatch-cancel" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
|
<span class="text">
|
||||||
{{.CsrfTokenHtml}}
|
{{svg "octicon-plus"}}
|
||||||
<button
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
type="submit"
|
<span class="only-mobile">{{ctx.Locale.Tr "create_new"}}</span>
|
||||||
class="ui button mini compact basic icon"
|
</span>
|
||||||
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.cancel_tracking"}}"
|
<div class="menu">
|
||||||
>{{svg "octicon-trash"}}</button>
|
<a class="item" href="{{AppSubUrl}}/repo/create">
|
||||||
</form>
|
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
|
||||||
</div>
|
</a>
|
||||||
</div>
|
{{if not .DisableMigrations}}
|
||||||
{{end}}
|
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
||||||
|
{{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}
|
||||||
<a class="item not-mobile gt-mx-0" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
</a>
|
||||||
<div class="gt-relative">
|
{{end}}
|
||||||
{{svg "octicon-bell"}}
|
{{if .SignedUser.CanCreateOrganization}}
|
||||||
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
<a class="item" href="{{AppSubUrl}}/org/create">
|
||||||
</div>
|
{{svg "octicon-organization"}} {{ctx.Locale.Tr "new_org"}}
|
||||||
</a>
|
</a>
|
||||||
|
{{end}}
|
||||||
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "create_new"}}">
|
</div><!-- end content create new menu -->
|
||||||
<span class="text">
|
</div><!-- end dropdown menu create new -->
|
||||||
{{svg "octicon-plus"}}
|
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
<div class="ui dropdown jump item tw-mx-0 tw-pr-2" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
||||||
<span class="mobile-only">{{ctx.Locale.Tr "create_new"}}</span>
|
<span class="text tw-flex tw-items-center">
|
||||||
</span>
|
{{ctx.AvatarUtils.Avatar .SignedUser 24 "tw-mr-1"}}
|
||||||
<div class="menu">
|
<span class="only-mobile tw-ml-2">{{.SignedUser.Name}}</span>
|
||||||
<a class="item" href="{{AppSubUrl}}/repo/create">
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
|
</span>
|
||||||
</a>
|
<div class="menu user-menu">
|
||||||
{{if not .DisableMigrations}}
|
<div class="ui header">
|
||||||
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
||||||
{{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}
|
</div>
|
||||||
</a>
|
|
||||||
{{end}}
|
<div class="divider"></div>
|
||||||
{{if .SignedUser.CanCreateOrganization}}
|
<a class="item" href="{{.SignedUser.HomeLink}}">
|
||||||
<a class="item" href="{{AppSubUrl}}/org/create">
|
{{svg "octicon-person"}}
|
||||||
{{svg "octicon-organization"}} {{ctx.Locale.Tr "new_org"}}
|
{{ctx.Locale.Tr "your_profile"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{if not .DisableStars}}
|
||||||
</div><!-- end content create new menu -->
|
<a class="item" href="{{.SignedUser.HomeLink}}?tab=stars">
|
||||||
</div><!-- end dropdown menu create new -->
|
{{svg "octicon-star"}}
|
||||||
|
{{ctx.Locale.Tr "your_starred"}}
|
||||||
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
</a>
|
||||||
<span class="text gt-df gt-ac">
|
{{end}}
|
||||||
{{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
|
<a class="item" href="{{AppSubUrl}}/notifications/subscriptions">
|
||||||
<span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span>
|
{{svg "octicon-bell"}}
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
{{ctx.Locale.Tr "notification.subscriptions"}}
|
||||||
</span>
|
</a>
|
||||||
<div class="menu user-menu">
|
<a class="{{if .PageIsUserSettings}}active {{end}}item" href="{{AppSubUrl}}/user/settings">
|
||||||
<div class="ui header">
|
{{svg "octicon-tools"}}
|
||||||
{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
{{ctx.Locale.Tr "your_settings"}}
|
||||||
</div>
|
</a>
|
||||||
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">
|
||||||
<div class="divider"></div>
|
{{svg "octicon-question"}}
|
||||||
<a class="item" href="{{.SignedUser.HomeLink}}">
|
{{ctx.Locale.Tr "help"}}
|
||||||
{{svg "octicon-person"}}
|
</a>
|
||||||
{{ctx.Locale.Tr "your_profile"}}
|
{{if .IsAdmin}}
|
||||||
</a>
|
<div class="divider"></div>
|
||||||
{{if not .DisableStars}}
|
|
||||||
<a class="item" href="{{.SignedUser.HomeLink}}?tab=stars">
|
<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin">
|
||||||
{{svg "octicon-star"}}
|
{{svg "octicon-server"}}
|
||||||
{{ctx.Locale.Tr "your_starred"}}
|
{{ctx.Locale.Tr "admin_panel"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="item" href="{{AppSubUrl}}/notifications/subscriptions">
|
|
||||||
{{svg "octicon-bell"}}
|
<div class="divider"></div>
|
||||||
{{ctx.Locale.Tr "notification.subscriptions"}}
|
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
|
||||||
</a>
|
{{svg "octicon-sign-out"}}
|
||||||
<a class="{{if .PageIsUserSettings}}active {{end}}item" href="{{AppSubUrl}}/user/settings">
|
{{ctx.Locale.Tr "sign_out"}}
|
||||||
{{svg "octicon-tools"}}
|
</a>
|
||||||
{{ctx.Locale.Tr "your_settings"}}
|
</div><!-- end content avatar menu -->
|
||||||
</a>
|
</div><!-- end dropdown avatar menu -->
|
||||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">
|
{{else}}
|
||||||
{{svg "octicon-question"}}
|
{{if .ShowRegistrationButton}}
|
||||||
{{ctx.Locale.Tr "help"}}
|
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
||||||
</a>
|
{{svg "octicon-person"}} {{ctx.Locale.Tr "register"}}
|
||||||
{{if .IsAdmin}}
|
</a>
|
||||||
<div class="divider"></div>
|
{{end}}
|
||||||
|
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
|
||||||
<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin">
|
{{svg "octicon-sign-in"}} {{ctx.Locale.Tr "sign_in"}}
|
||||||
{{svg "octicon-server"}}
|
</a>
|
||||||
{{ctx.Locale.Tr "admin_panel"}}
|
{{end}}
|
||||||
</a>
|
</div><!-- end full right menu -->
|
||||||
{{end}}
|
|
||||||
|
{{if and .IsSigned EnableTimetracking .ActiveStopwatch}}
|
||||||
<div class="divider"></div>
|
<div class="active-stopwatch-popup tippy-target">
|
||||||
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
|
<div class="tw-flex tw-items-center tw-gap-2 tw-p-3">
|
||||||
{{svg "octicon-sign-out"}}
|
<a class="stopwatch-link tw-flex tw-items-center tw-gap-2 muted" href="{{.ActiveStopwatch.IssueLink}}">
|
||||||
{{ctx.Locale.Tr "sign_out"}}
|
{{svg "octicon-issue-opened" 16}}
|
||||||
</a>
|
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
|
||||||
</div><!-- end content avatar menu -->
|
</a>
|
||||||
</div><!-- end dropdown avatar menu -->
|
<div class="tw-flex tw-gap-1">
|
||||||
{{else}}
|
<form class="stopwatch-commit" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
|
||||||
{{if .ShowRegistrationButton}}
|
{{.CsrfTokenHtml}}
|
||||||
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
<button
|
||||||
{{svg "octicon-person"}} {{ctx.Locale.Tr "register"}}
|
type="submit"
|
||||||
</a>
|
class="ui button mini compact basic icon tw-mr-0"
|
||||||
{{end}}
|
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.stop_tracking"}}"
|
||||||
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
|
>{{svg "octicon-square-fill"}}</button>
|
||||||
{{svg "octicon-sign-in"}} {{ctx.Locale.Tr "sign_in"}}
|
</form>
|
||||||
</a>
|
<form class="stopwatch-cancel" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
|
||||||
{{end}}
|
{{.CsrfTokenHtml}}
|
||||||
</div><!-- end full right menu -->
|
<button
|
||||||
</nav>
|
type="submit"
|
||||||
|
class="ui button mini compact basic icon tw-mr-0"
|
||||||
|
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.cancel_tracking"}}"
|
||||||
|
>{{svg "octicon-trash"}}</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</nav>
|
||||||
|
@ -1,205 +1,214 @@
|
|||||||
{{$notificationUnreadCount := 0}}
|
{{$notificationUnreadCount := 0}}
|
||||||
{{if and .IsSigned .NotificationUnreadCount}}
|
{{if and .IsSigned .NotificationUnreadCount}}
|
||||||
{{$notificationUnreadCount = call .NotificationUnreadCount}}
|
{{$notificationUnreadCount = call .NotificationUnreadCount}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<nav id="navbar" aria-label="{{ctx.Locale.Tr "aria.navbar"}}">
|
<nav id="navbar" aria-label="{{ctx.Locale.Tr "aria.navbar"}}">
|
||||||
<div class="navbar-left ui secondary menu">
|
<div class="navbar-left">
|
||||||
<!-- the logo -->
|
<!-- the logo -->
|
||||||
<a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}">
|
<a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}">
|
||||||
<img height="24" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
|
<img height="20" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
|
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
|
||||||
<div class="ui secondary menu item navbar-mobile-right">
|
<div class="ui secondary menu item navbar-mobile-right only-mobile">
|
||||||
{{if .IsSigned}}
|
{{if and .IsSigned EnableTimetracking .ActiveStopwatch}}
|
||||||
<a id="mobile-notifications-icon" class="item gt-w-auto gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
<a id="mobile-stopwatch-icon" class="active-stopwatch item tw-mx-0" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}" data-seconds="{{.ActiveStopwatch.Seconds}}">
|
||||||
<div class="gt-relative">
|
<div class="tw-relative">
|
||||||
{{svg "octicon-bell"}}
|
{{svg "octicon-stopwatch"}}
|
||||||
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
<span class="header-stopwatch-dot"></span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<button class="item gt-w-auto ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle">{{svg "octicon-three-bars"}}</button>
|
{{if .IsSigned}}
|
||||||
</div>
|
<a id="mobile-notifications-icon" class="item tw-w-auto tw-p-2" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
||||||
|
<div class="tw-relative">
|
||||||
<!-- navbar links non-mobile -->
|
{{svg "octicon-bell"}}
|
||||||
{{if and .IsSigned .MustChangePassword}}
|
<span class="notification_count{{if not $notificationUnreadCount}} tw-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
||||||
{{/* No links */}}
|
</div>
|
||||||
{{else if .IsSigned}}
|
</a>
|
||||||
{{if not .UnitIssuesGlobalDisabled}}
|
{{end}}
|
||||||
<a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{ctx.Locale.Tr "issues"}}</a>
|
<button class="item tw-w-auto ui icon mini button tw-p-2 tw-m-0" id="navbar-expand-toggle" aria-label="{{ctx.Locale.Tr "home.nav_menu"}}">{{svg "octicon-three-bars"}}</button>
|
||||||
{{end}}
|
</div>
|
||||||
{{if not .UnitPullsGlobalDisabled}}
|
|
||||||
<a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{ctx.Locale.Tr "pull_requests"}}</a>
|
<!-- navbar links non-mobile -->
|
||||||
{{end}}
|
{{if and .IsSigned .MustChangePassword}}
|
||||||
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
|
{{/* No links */}}
|
||||||
{{if .ShowMilestonesDashboardPage}}
|
{{else if .IsSigned}}
|
||||||
<a class="item{{if .PageIsMilestonesDashboard}} active{{end}}" href="{{AppSubUrl}}/milestones">{{ctx.Locale.Tr "milestones"}}</a>
|
{{if not .UnitIssuesGlobalDisabled}}
|
||||||
{{end}}
|
<a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{ctx.Locale.Tr "issues"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
|
{{if not .UnitPullsGlobalDisabled}}
|
||||||
{{else if .IsLandingPageOrganizations}}
|
<a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{ctx.Locale.Tr "pull_requests"}}</a>
|
||||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{ctx.Locale.Tr "explore"}}</a>
|
{{end}}
|
||||||
{{else}}
|
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
|
||||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
|
{{if .ShowMilestonesDashboardPage}}
|
||||||
{{end}}
|
<a class="item{{if .PageIsMilestonesDashboard}} active{{end}}" href="{{AppSubUrl}}/milestones">{{ctx.Locale.Tr "milestones"}}</a>
|
||||||
|
{{end}}
|
||||||
{{template "custom/extra_links" .}}
|
{{end}}
|
||||||
|
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
|
||||||
{{if not .IsSigned}}
|
{{else if .IsLandingPageOrganizations}}
|
||||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">{{ctx.Locale.Tr "help"}}</a>
|
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{ctx.Locale.Tr "explore"}}</a>
|
||||||
{{end}}
|
{{else}}
|
||||||
</div>
|
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
|
||||||
|
{{end}}
|
||||||
<!-- the full dropdown menus -->
|
|
||||||
<div class="navbar-right ui secondary menu">
|
{{template "custom/extra_links" .}}
|
||||||
{{if and .IsSigned .MustChangePassword}}
|
|
||||||
<div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
{{if not .IsSigned}}
|
||||||
<span class="text gt-df gt-ac">
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">{{ctx.Locale.Tr "help"}}</a>
|
||||||
{{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
|
{{end}}
|
||||||
<span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span>
|
</div>
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
|
||||||
</span>
|
<!-- the full dropdown menus -->
|
||||||
<div class="menu user-menu">
|
<div class="navbar-right">
|
||||||
<div class="ui header">
|
{{if and .IsSigned .MustChangePassword}}
|
||||||
{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
<div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
||||||
</div>
|
<span class="text tw-flex tw-items-center">
|
||||||
|
{{ctx.AvatarUtils.Avatar .SignedUser 24 "tw-mr-1"}}
|
||||||
<div class="divider"></div>
|
<span class="only-mobile tw-ml-2">{{.SignedUser.Name}}</span>
|
||||||
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
{{svg "octicon-sign-out"}}
|
</span>
|
||||||
{{ctx.Locale.Tr "sign_out"}}
|
<div class="menu user-menu">
|
||||||
</a>
|
<div class="ui header">
|
||||||
</div><!-- end content avatar menu -->
|
{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
||||||
</div><!-- end dropdown avatar menu -->
|
</div>
|
||||||
{{else if .IsSigned}}
|
|
||||||
{{if EnableTimetracking}}
|
<div class="divider"></div>
|
||||||
<a class="active-stopwatch-trigger item gt-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}">
|
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
|
||||||
<div class="gt-relative">
|
{{svg "octicon-sign-out"}}
|
||||||
{{svg "octicon-stopwatch"}}
|
{{ctx.Locale.Tr "sign_out"}}
|
||||||
<span class="header-stopwatch-dot"></span>
|
</a>
|
||||||
</div>
|
</div><!-- end content avatar menu -->
|
||||||
<span class="mobile-only gt-ml-3">{{ctx.Locale.Tr "active_stopwatch"}}</span>
|
</div><!-- end dropdown avatar menu -->
|
||||||
</a>
|
{{else if .IsSigned}}
|
||||||
<div class="active-stopwatch-popup item tippy-target gt-p-3">
|
{{if and EnableTimetracking .ActiveStopwatch}}
|
||||||
<div class="gt-df gt-ac">
|
<a class="item not-mobile active-stopwatch tw-mx-0" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}" data-seconds="{{.ActiveStopwatch.Seconds}}">
|
||||||
<a class="stopwatch-link gt-df gt-ac" href="{{.ActiveStopwatch.IssueLink}}">
|
<div class="tw-relative">
|
||||||
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
|
{{svg "octicon-stopwatch"}}
|
||||||
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
|
<span class="header-stopwatch-dot"></span>
|
||||||
<span class="ui primary label stopwatch-time gt-my-0 gt-mx-4" data-seconds="{{.ActiveStopwatch.Seconds}}">
|
</div>
|
||||||
{{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
|
</a>
|
||||||
</span>
|
{{end}}
|
||||||
</a>
|
|
||||||
<form class="stopwatch-commit" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
|
<a class="item not-mobile tw-mx-0" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
||||||
{{.CsrfTokenHtml}}
|
<div class="tw-relative">
|
||||||
<button
|
{{svg "octicon-bell"}}
|
||||||
type="submit"
|
<span class="notification_count{{if not $notificationUnreadCount}} tw-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
||||||
class="ui button mini compact basic icon"
|
</div>
|
||||||
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.stop_tracking"}}"
|
</a>
|
||||||
>{{svg "octicon-square-fill"}}</button>
|
|
||||||
</form>
|
<div class="ui dropdown jump item tw-mx-0 tw-pr-2" data-tooltip-content="{{ctx.Locale.Tr "create_new"}}">
|
||||||
<form class="stopwatch-cancel" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
|
<span class="text">
|
||||||
{{.CsrfTokenHtml}}
|
{{svg "octicon-plus"}}
|
||||||
<button
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
type="submit"
|
<span class="only-mobile">{{ctx.Locale.Tr "create_new"}}</span>
|
||||||
class="ui button mini compact basic icon"
|
</span>
|
||||||
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.cancel_tracking"}}"
|
<div class="menu">
|
||||||
>{{svg "octicon-trash"}}</button>
|
<a class="item" href="{{AppSubUrl}}/repo/create">
|
||||||
</form>
|
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
|
||||||
</div>
|
</a>
|
||||||
</div>
|
{{if not .DisableMigrations}}
|
||||||
{{end}}
|
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
||||||
|
{{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}
|
||||||
<a class="item not-mobile gt-mx-0" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
</a>
|
||||||
<div class="gt-relative">
|
{{end}}
|
||||||
{{svg "octicon-bell"}}
|
{{if .SignedUser.CanCreateOrganization}}
|
||||||
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
<a class="item" href="{{AppSubUrl}}/org/create">
|
||||||
</div>
|
{{svg "octicon-organization"}} {{ctx.Locale.Tr "new_org"}}
|
||||||
</a>
|
</a>
|
||||||
|
{{end}}
|
||||||
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "create_new"}}">
|
</div><!-- end content create new menu -->
|
||||||
<span class="text">
|
</div><!-- end dropdown menu create new -->
|
||||||
{{svg "octicon-plus"}}
|
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
<div class="ui dropdown jump item tw-mx-0 tw-pr-2" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
||||||
<span class="mobile-only">{{ctx.Locale.Tr "create_new"}}</span>
|
<span class="text tw-flex tw-items-center">
|
||||||
</span>
|
{{ctx.AvatarUtils.Avatar .SignedUser 24 "tw-mr-1"}}
|
||||||
<div class="menu">
|
<span class="only-mobile tw-ml-2">{{.SignedUser.Name}}</span>
|
||||||
<a class="item" href="{{AppSubUrl}}/repo/create">
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
|
</span>
|
||||||
</a>
|
<div class="menu user-menu">
|
||||||
{{if not .DisableMigrations}}
|
<div class="ui header">
|
||||||
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
||||||
{{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}
|
</div>
|
||||||
</a>
|
|
||||||
{{end}}
|
<div class="divider"></div>
|
||||||
{{if .SignedUser.CanCreateOrganization}}
|
<a class="item" href="{{.SignedUser.HomeLink}}">
|
||||||
<a class="item" href="{{AppSubUrl}}/org/create">
|
{{svg "octicon-person"}}
|
||||||
{{svg "octicon-organization"}} {{ctx.Locale.Tr "new_org"}}
|
{{ctx.Locale.Tr "your_profile"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{if not .DisableStars}}
|
||||||
</div><!-- end content create new menu -->
|
<a class="item" href="{{.SignedUser.HomeLink}}?tab=stars">
|
||||||
</div><!-- end dropdown menu create new -->
|
{{svg "octicon-star"}}
|
||||||
|
{{ctx.Locale.Tr "your_starred"}}
|
||||||
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
</a>
|
||||||
<span class="text gt-df gt-ac">
|
{{end}}
|
||||||
{{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
|
<a class="item" href="{{AppSubUrl}}/notifications/subscriptions">
|
||||||
<span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span>
|
{{svg "octicon-bell"}}
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
{{ctx.Locale.Tr "notification.subscriptions"}}
|
||||||
</span>
|
</a>
|
||||||
<div class="menu user-menu">
|
<a class="{{if .PageIsUserSettings}}active {{end}}item" href="{{AppSubUrl}}/user/settings">
|
||||||
<div class="ui header">
|
{{svg "octicon-tools"}}
|
||||||
{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
{{ctx.Locale.Tr "your_settings"}}
|
||||||
</div>
|
</a>
|
||||||
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">
|
||||||
<div class="divider"></div>
|
{{svg "octicon-question"}}
|
||||||
<a class="item" href="{{.SignedUser.HomeLink}}">
|
{{ctx.Locale.Tr "help"}}
|
||||||
{{svg "octicon-person"}}
|
</a>
|
||||||
{{ctx.Locale.Tr "your_profile"}}
|
{{if .IsAdmin}}
|
||||||
</a>
|
<div class="divider"></div>
|
||||||
{{if not .DisableStars}}
|
|
||||||
<a class="item" href="{{.SignedUser.HomeLink}}?tab=stars">
|
<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin">
|
||||||
{{svg "octicon-star"}}
|
{{svg "octicon-server"}}
|
||||||
{{ctx.Locale.Tr "your_starred"}}
|
{{ctx.Locale.Tr "admin_panel"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="item" href="{{AppSubUrl}}/notifications/subscriptions">
|
|
||||||
{{svg "octicon-bell"}}
|
<div class="divider"></div>
|
||||||
{{ctx.Locale.Tr "notification.subscriptions"}}
|
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
|
||||||
</a>
|
{{svg "octicon-sign-out"}}
|
||||||
<a class="{{if .PageIsUserSettings}}active {{end}}item" href="{{AppSubUrl}}/user/settings">
|
{{ctx.Locale.Tr "sign_out"}}
|
||||||
{{svg "octicon-tools"}}
|
</a>
|
||||||
{{ctx.Locale.Tr "your_settings"}}
|
</div><!-- end content avatar menu -->
|
||||||
</a>
|
</div><!-- end dropdown avatar menu -->
|
||||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">
|
{{else}}
|
||||||
{{svg "octicon-question"}}
|
{{if .ShowRegistrationButton}}
|
||||||
{{ctx.Locale.Tr "help"}}
|
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
||||||
</a>
|
{{svg "octicon-person"}} {{ctx.Locale.Tr "register"}}
|
||||||
{{if .IsAdmin}}
|
</a>
|
||||||
<div class="divider"></div>
|
{{end}}
|
||||||
|
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
|
||||||
<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin">
|
{{svg "octicon-sign-in"}} {{ctx.Locale.Tr "sign_in"}}
|
||||||
{{svg "octicon-server"}}
|
</a>
|
||||||
{{ctx.Locale.Tr "admin_panel"}}
|
{{end}}
|
||||||
</a>
|
</div><!-- end full right menu -->
|
||||||
{{end}}
|
|
||||||
|
{{if and .IsSigned EnableTimetracking .ActiveStopwatch}}
|
||||||
<div class="divider"></div>
|
<div class="active-stopwatch-popup tippy-target">
|
||||||
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
|
<div class="tw-flex tw-items-center tw-gap-2 tw-p-3">
|
||||||
{{svg "octicon-sign-out"}}
|
<a class="stopwatch-link tw-flex tw-items-center tw-gap-2 muted" href="{{.ActiveStopwatch.IssueLink}}">
|
||||||
{{ctx.Locale.Tr "sign_out"}}
|
{{svg "octicon-issue-opened" 16}}
|
||||||
</a>
|
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
|
||||||
</div><!-- end content avatar menu -->
|
</a>
|
||||||
</div><!-- end dropdown avatar menu -->
|
<div class="tw-flex tw-gap-1">
|
||||||
{{else}}
|
<form class="stopwatch-commit" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
|
||||||
{{if .ShowRegistrationButton}}
|
{{.CsrfTokenHtml}}
|
||||||
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
<button
|
||||||
{{svg "octicon-person"}} {{ctx.Locale.Tr "register"}}
|
type="submit"
|
||||||
</a>
|
class="ui button mini compact basic icon tw-mr-0"
|
||||||
{{end}}
|
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.stop_tracking"}}"
|
||||||
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
|
>{{svg "octicon-square-fill"}}</button>
|
||||||
{{svg "octicon-sign-in"}} {{ctx.Locale.Tr "sign_in"}}
|
</form>
|
||||||
</a>
|
<form class="stopwatch-cancel" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
|
||||||
{{end}}
|
{{.CsrfTokenHtml}}
|
||||||
</div><!-- end full right menu -->
|
<button
|
||||||
</nav>
|
type="submit"
|
||||||
|
class="ui button mini compact basic icon tw-mr-0"
|
||||||
|
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.cancel_tracking"}}"
|
||||||
|
>{{svg "octicon-trash"}}</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</nav>
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
@use '@lucas-labs/lui-micro/var' as var;
|
@use '@lucas-labs/lui-micro/var' as var;
|
||||||
@use '@lucas-labs/lui-micro/color' as color;
|
@use '@lucas-labs/lui-micro/color' as color;
|
||||||
|
|
||||||
@mixin apply-styles {
|
@mixin apply-styles {
|
||||||
#project-board {
|
#project-board {
|
||||||
.project-column-header {
|
.project-column-header {
|
||||||
.project-column-title {
|
.project-column-title {
|
||||||
.circular.label {
|
.circular.label {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
padding: 0 var.get('measure/.25x') !important;
|
padding: 0 var.get('measure/.25x') !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,193 +1,192 @@
|
|||||||
@use '@lucas-labs/lui-micro/var' as var;
|
@use '@lucas-labs/lui-micro/var' as var;
|
||||||
@use '@lucas-labs/lui-micro/color' as color;
|
@use '@lucas-labs/lui-micro/color' as color;
|
||||||
|
|
||||||
@mixin apply-styles {
|
@mixin apply-styles {
|
||||||
|
|
||||||
#repo-topics {
|
#repo-topics {
|
||||||
row-gap: var.get('measure/.5x');
|
row-gap: var.get('measure/.5x');
|
||||||
margin-top: 0 !important;
|
margin-top: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui.table>tr>td, .ui.table>tbody>tr>td {
|
.ui.table>tr>td, .ui.table>tbody>tr>td {
|
||||||
border-top-color: rgba(#{color.get('theme/blue/base', 'rgb')}, 0.04);
|
border-top-color: rgba(#{color.get('theme/blue/base', 'rgb')}, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-content.repository.file.list > .ui.container.lugit-repo-list-view {
|
.page-content.repository.file.list > .ui.container.lugit-repo-list-view {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row-reverse;
|
flex-direction: row-reverse;
|
||||||
column-gap: 24px;
|
column-gap: 24px;
|
||||||
|
|
||||||
.ui.repo-topic.large.label.topic {
|
.ui.repo-topic.large.label.topic {
|
||||||
background-color: rgba(#{color.get('theme/blue/base', 'rgb')}, 0.3);
|
background-color: rgba(#{color.get('theme/blue/base', 'rgb')}, 0.3);
|
||||||
color: color.get('primary/base');
|
color: color.get('primary/base');
|
||||||
border-radius: var.get('measure/2x');
|
border-radius: var.get('measure/2x');
|
||||||
border: 1px solid rgba(#{color.get('theme/blue/base', 'rgb')}, 0.4);
|
border: 1px solid rgba(#{color.get('theme/blue/base', 'rgb')}, 0.4);
|
||||||
line-height: 14px;
|
line-height: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1100px) {
|
@media (max-width: 1100px) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 var.get('measure/2x');
|
padding: 0 var.get('measure/2x');
|
||||||
|
|
||||||
.lugit-repo-header-data {
|
.lugit-repo-header-data {
|
||||||
min-width: calc(#{var.get('repo-home/sidebar-width')} * 0.87) !important;
|
min-width: calc(#{var.get('repo-home/sidebar-width')} * 0.87) !important;
|
||||||
max-width: calc(#{var.get('repo-home/sidebar-width')} * 0.87) !important;
|
max-width: calc(#{var.get('repo-home/sidebar-width')} * 0.87) !important;
|
||||||
width: calc(#{var.get('repo-home/sidebar-width')} * 0.87) !important;
|
width: calc(#{var.get('repo-home/sidebar-width')} * 0.87) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.repo-button-row {
|
.repo-button-row {
|
||||||
.gt-gap-y-3 {
|
.gt-gap-y-3 {
|
||||||
column-gap: var.get('measure/.5x');
|
column-gap: var.get('measure/.5x');
|
||||||
|
|
||||||
#new-pull-request {
|
#new-pull-request {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
[role=menu] {
|
[role=menu] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#clone-panel {
|
#clone-panel {
|
||||||
#repo-clone-url {
|
#repo-clone-url {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1200px) {
|
@media (max-width: 1200px) {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
column-gap: 0;
|
column-gap: 0;
|
||||||
row-gap: 24px;
|
row-gap: 24px;
|
||||||
|
|
||||||
.lugit-repo-header-data {
|
.lugit-repo-header-data {
|
||||||
min-width: 100%!important;
|
min-width: 100%!important;
|
||||||
max-width: 100%!important;
|
max-width: 100%!important;
|
||||||
width: 100%!important;
|
width: 100%!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#repo-topics {
|
#repo-topics {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#repo-desc {
|
#repo-desc {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
row-gap: var.get('measure/1x');
|
row-gap: var.get('measure/1x');
|
||||||
|
|
||||||
h5 {
|
h5 {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-size: 1.2em !important;
|
font-size: 1.2em !important;
|
||||||
font-style: italic !important;
|
font-style: italic !important;
|
||||||
color: var(--color-text-light-3);
|
color: var(--color-text-light-3);
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.repo-button-row {
|
.repo-button-row {
|
||||||
.gt-gap-y-3 {
|
.gt-gap-y-3 {
|
||||||
column-gap: var.get('measure/.5x');
|
column-gap: var.get('measure/.5x');
|
||||||
}
|
}
|
||||||
|
|
||||||
#clone-panel {
|
#clone-panel {
|
||||||
#repo-clone-url {
|
#repo-clone-url {
|
||||||
width: unset;
|
width: unset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.lugit-repo-header-data {
|
.lugit-repo-header-data {
|
||||||
min-width: var.get('repo-home/sidebar-width');
|
min-width: var.get('repo-home/sidebar-width');
|
||||||
max-width: var.get('repo-home/sidebar-width');
|
max-width: var.get('repo-home/sidebar-width');
|
||||||
width: var.get('repo-home/sidebar-width');
|
width: var.get('repo-home/sidebar-width');
|
||||||
|
|
||||||
#repo-desc {
|
#repo-desc {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
row-gap: var.get('measure/1x');
|
row-gap: var.get('measure/1x');
|
||||||
|
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
h5 {
|
h5 {
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.lugit-repo-content {
|
.lugit-repo-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
row-gap: var.get('measure/1x');
|
row-gap: var.get('measure/1x');
|
||||||
}
|
}
|
||||||
|
|
||||||
#topic_edit {
|
#topic_edit {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
row-gap: var.get('measure/1x');
|
row-gap: var.get('measure/1x');
|
||||||
|
|
||||||
.field.gt-f1.gt-mr-3 {
|
.field.gt-f1.gt-mr-3 {
|
||||||
margin: 0px !important;
|
margin: 0px !important;
|
||||||
|
|
||||||
|
|
||||||
// topic selection editing (task list
|
// topic selection editing (task list
|
||||||
div.fluid.multiple.search.selection.dropdown {
|
div.fluid.multiple.search.selection.dropdown {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
padding: var.get('measure/.25x') var.get('measure/.5x');
|
padding: var.get('measure/.25x') var.get('measure/.5x');
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu {
|
.menu {
|
||||||
top: calc(100% + 1px);
|
top: calc(100% + 1px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown {
|
.dropdown {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cancel, Save buttons
|
// Cancel, Save buttons
|
||||||
+div {
|
+div {
|
||||||
display: flex;
|
display: flex;
|
||||||
column-gap: var.get('measure/1x');
|
column-gap: var.get('measure/1x');
|
||||||
|
|
||||||
button {
|
button {
|
||||||
display: block !important;
|
display: block !important;
|
||||||
margin: 0px !important;
|
margin: 0px !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#repo-topics {
|
#repo-topics {
|
||||||
margin-top: var.get('measure/1x') !important;
|
margin-top: var.get('measure/1x') !important;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue