feat: vendor gitea 1.16.2
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<h4 class="ui top attached header">
|
||||
{{ctx.Locale.Tr "actions.general.cross_repo"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form form-fetch-action " action="{{.Link}}" method="post">
|
||||
<!-- Cross-Repository Access -->
|
||||
<div class="help">{{ctx.Locale.Tr "actions.general.cross_repo_desc"}}</div>
|
||||
|
||||
<!-- Allowed Repositories List -->
|
||||
<div class="field tw-mt-4">
|
||||
<h5 class="ui header">
|
||||
{{ctx.Locale.Tr "actions.general.cross_repo_target_repos"}}
|
||||
</h5>
|
||||
<div class="ui attached segment tw-p-2">
|
||||
<div class="ui divided relaxed list flex-items-block muted-links">
|
||||
{{range $repo := .AllowedRepos}}
|
||||
<div class="item">
|
||||
{{template "repo/icon" $repo}}
|
||||
<a class="tw-flex-1" href="{{$repo.Link}}">{{$repo.FullName}}</a>
|
||||
<button class="ui red compact tiny button link-action" type="button" data-url="?cross_repo_remove_target_id={{$repo.ID}}">{{ctx.Locale.Tr "remove"}}</button>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="item">
|
||||
{{ctx.Locale.Tr "org.repos.none"}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5 class="ui header">
|
||||
{{ctx.Locale.Tr "actions.general.cross_repo_add"}}
|
||||
</h5>
|
||||
<div class="flex-text-block">
|
||||
<div data-global-init="initSearchRepoBox" data-uid="{{.OwnerID}}" data-exclusive="true" class="ui search tw-flex-1">
|
||||
<div class="ui input">
|
||||
<input class="prompt" name="cross_repo_add_target_name" required placeholder="{{ctx.Locale.Tr "search.repo_kind"}}" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<button class="ui primary button" type="submit" name="cross_repo_add_target" value="true">{{ctx.Locale.Tr "add"}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{ctx.Locale.Tr "actions.general.permissions"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form form-fetch-action" action="{{.Link}}" method="post" data-global-init="initOwnerActionsPermissionsForm">
|
||||
{{template "shared/actions/permission_mode_select" .}}
|
||||
<div class="divider"></div>
|
||||
{{template "shared/actions/permissions_table" .}}
|
||||
|
||||
<div class="field">
|
||||
<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.update_settings"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,18 @@
|
||||
<div class="field js-permission-mode-section">
|
||||
<label>{{ctx.Locale.Tr "actions.general.token_permissions.mode"}}</label>
|
||||
<div class="help">{{ctx.Locale.Tr "actions.general.token_permissions.mode.desc"}}</div>
|
||||
<div class="field">
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" name="token_permission_mode" value="{{.TokenPermissionModePermissive}}" {{if eq .TokenPermissionMode .TokenPermissionModePermissive}}checked{{end}}>
|
||||
<label>{{ctx.Locale.Tr "actions.general.token_permissions.mode.permissive"}}</label>
|
||||
<div class="help">{{ctx.Locale.Tr "actions.general.token_permissions.mode.permissive.desc"}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" name="token_permission_mode" value="{{.TokenPermissionModeRestricted}}" {{if eq .TokenPermissionMode .TokenPermissionModeRestricted}}checked{{end}}>
|
||||
<label>{{ctx.Locale.Tr "actions.general.token_permissions.mode.restricted"}}</label>
|
||||
<div class="help">{{ctx.Locale.Tr "actions.general.token_permissions.mode.restricted.desc"}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,77 @@
|
||||
<div class="field">
|
||||
<label>{{ctx.Locale.Tr "actions.general.token_permissions.maximum"}}</label>
|
||||
|
||||
<div class="help">
|
||||
{{ctx.Locale.Tr "actions.general.token_permissions.maximum.description"}}
|
||||
<br>
|
||||
{{ctx.Locale.Tr "actions.general.token_permissions.fork_pr_note"}}
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" name="enable_max_permissions" {{if .EnableMaxTokenPermissions}}checked{{end}}>
|
||||
<label>{{ctx.Locale.Tr "actions.general.token_permissions.customize_max_permissions"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="ui celled table js-permissions-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tw-w-2/5">{{ctx.Locale.Tr "units.unit"}}</th>
|
||||
<th class="tw-text-center">{{ctx.Locale.Tr "org.teams.none_access"}}
|
||||
<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.none_access_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span>
|
||||
</th>
|
||||
<th class="tw-text-center">{{ctx.Locale.Tr "org.teams.read_access"}}
|
||||
<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.read_access_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span>
|
||||
</th>
|
||||
<th class="tw-text-center">{{ctx.Locale.Tr "org.teams.write_access"}}
|
||||
<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.write_access_helper"}}">{{svg "octicon-question" 16 "tw-ml-1"}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{template "shared/actions/permissions_table_unit" (dict
|
||||
"UnitType" ctx.Consts.RepoUnitTypeCode
|
||||
"UnitDisplayName" (ctx.Locale.Tr "repo.code")
|
||||
"UnitDisplayDesc" (ctx.Locale.Tr "repo.code.desc")
|
||||
"UnitAccessMode" (index $.MaxTokenPermissions.UnitAccessModes ctx.Consts.RepoUnitTypeCode)
|
||||
)}}
|
||||
{{template "shared/actions/permissions_table_unit" (dict
|
||||
"UnitType" ctx.Consts.RepoUnitTypeIssues
|
||||
"UnitDisplayName" (ctx.Locale.Tr "repo.issues")
|
||||
"UnitDisplayDesc" (ctx.Locale.Tr "repo.issues.desc")
|
||||
"UnitAccessMode" (index $.MaxTokenPermissions.UnitAccessModes ctx.Consts.RepoUnitTypeIssues)
|
||||
)}}
|
||||
{{template "shared/actions/permissions_table_unit" (dict
|
||||
"UnitType" ctx.Consts.RepoUnitTypePullRequests
|
||||
"UnitDisplayName" (ctx.Locale.Tr "repo.pulls")
|
||||
"UnitDisplayDesc" (ctx.Locale.Tr "repo.pulls.desc")
|
||||
"UnitAccessMode" (index $.MaxTokenPermissions.UnitAccessModes ctx.Consts.RepoUnitTypePullRequests)
|
||||
)}}
|
||||
{{template "shared/actions/permissions_table_unit" (dict
|
||||
"UnitType" ctx.Consts.RepoUnitTypeWiki
|
||||
"UnitDisplayName" (ctx.Locale.Tr "repo.wiki")
|
||||
"UnitDisplayDesc" (ctx.Locale.Tr "repo.wiki.desc")
|
||||
"UnitAccessMode" (index $.MaxTokenPermissions.UnitAccessModes ctx.Consts.RepoUnitTypeWiki)
|
||||
)}}
|
||||
{{template "shared/actions/permissions_table_unit" (dict
|
||||
"UnitType" ctx.Consts.RepoUnitTypeReleases
|
||||
"UnitDisplayName" (ctx.Locale.Tr "repo.releases")
|
||||
"UnitDisplayDesc" (ctx.Locale.Tr "repo.releases.desc")
|
||||
"UnitAccessMode" (index $.MaxTokenPermissions.UnitAccessModes ctx.Consts.RepoUnitTypeReleases)
|
||||
)}}
|
||||
{{template "shared/actions/permissions_table_unit" (dict
|
||||
"UnitType" ctx.Consts.RepoUnitTypeProjects
|
||||
"UnitDisplayName" (ctx.Locale.Tr "repo.projects")
|
||||
"UnitDisplayDesc" (ctx.Locale.Tr "repo.projects.desc")
|
||||
"UnitAccessMode" (index $.MaxTokenPermissions.UnitAccessModes ctx.Consts.RepoUnitTypeProjects)
|
||||
)}}
|
||||
{{template "shared/actions/permissions_table_unit" (dict
|
||||
"UnitType" ctx.Consts.RepoUnitTypeActions
|
||||
"UnitDisplayName" (ctx.Locale.Tr "repo.actions")
|
||||
"UnitDisplayDesc" (ctx.Locale.Tr "actions.unit.desc")
|
||||
"UnitAccessMode" (index $.MaxTokenPermissions.UnitAccessModes ctx.Consts.RepoUnitTypeActions)
|
||||
)}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
<tr>
|
||||
<td>
|
||||
<strong>{{.UnitDisplayName}}</strong>
|
||||
<div class="help">{{.UnitDisplayDesc}}</div>
|
||||
</td>
|
||||
<td class="tw-text-center">
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" name="max_unit_access_mode_{{.UnitType}}" value="none" {{if not .UnitAccessMode}}checked{{end}} title="{{ctx.Locale.Tr "org.teams.none_access"}}">
|
||||
<label></label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tw-text-center">
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" name="max_unit_access_mode_{{.UnitType}}" value="read" {{if eq .UnitAccessMode 1}}checked{{end}} title="{{ctx.Locale.Tr "org.teams.read_access"}}">
|
||||
<label></label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tw-text-center">
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" name="max_unit_access_mode_{{.UnitType}}" value="write" {{if eq .UnitAccessMode 2}}checked{{end}} title="{{ctx.Locale.Tr "org.teams.write_access"}}">
|
||||
<label></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -5,19 +5,28 @@
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" method="post">
|
||||
{{template "base/disable_form_autofill"}}
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="runner-basic-info">
|
||||
<div class="field tw-inline-block tw-mr-4">
|
||||
<label>{{ctx.Locale.Tr "actions.runners.status"}}</label>
|
||||
<span class="ui {{if .Runner.IsOnline}}green{{else}}basic{{end}} label">{{.Runner.StatusLocaleName ctx.Locale}}</span>
|
||||
</div>
|
||||
<div class="field tw-inline-block tw-mr-4">
|
||||
<label>{{ctx.Locale.Tr "actions.runners.availability"}}</label>
|
||||
<span class="ui {{if .Runner.IsDisabled}}grey{{else}}green{{end}} label">
|
||||
{{if .Runner.IsDisabled}}
|
||||
{{ctx.Locale.Tr "disabled"}}
|
||||
{{else}}
|
||||
{{ctx.Locale.Tr "enabled"}}
|
||||
{{end}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="field tw-inline-block tw-mr-4">
|
||||
<label>{{ctx.Locale.Tr "actions.runners.last_online"}}</label>
|
||||
<span>{{if .Runner.LastOnline}}{{DateUtils.TimeSince .Runner.LastOnline}}{{else}}{{ctx.Locale.Tr "never"}}{{end}}</span>
|
||||
</div>
|
||||
<div class="field tw-inline-block tw-mr-4">
|
||||
<label>{{ctx.Locale.Tr "actions.runners.labels"}}</label>
|
||||
<span>
|
||||
<span class="flex-text-inline tw-flex-wrap">
|
||||
{{range .Runner.AgentLabels}}
|
||||
<span class="ui label">{{.}}</span>
|
||||
{{end}}
|
||||
@@ -40,6 +49,9 @@
|
||||
|
||||
<div class="field">
|
||||
<button class="ui primary button" data-url="{{.Link}}">{{ctx.Locale.Tr "actions.runners.update_runner"}}</button>
|
||||
<button type="button" class="ui button link-action" data-url="{{.Link}}/update-runner?disabled={{not .Runner.IsDisabled}}">
|
||||
{{if .Runner.IsDisabled}}{{ctx.Locale.Tr "actions.runners.enable_runner"}}{{else}}{{ctx.Locale.Tr "actions.runners.disable_runner"}}{{end}}
|
||||
</button>
|
||||
<button class="ui red button delete-button" data-url="{{.Link}}/delete" data-modal="#runner-delete-modal">
|
||||
{{ctx.Locale.Tr "actions.runners.delete_runner"}}</button>
|
||||
</div>
|
||||
@@ -50,7 +62,7 @@
|
||||
{{ctx.Locale.Tr "actions.runners.task_list"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<table class="ui very basic striped table unstackable">
|
||||
<table class="ui very basic table unstackable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ctx.Locale.Tr "actions.runners.task_list.run"}}</th>
|
||||
@@ -67,7 +79,7 @@
|
||||
<td><span class="ui label task-status-{{.Status.String}}">{{.Status.LocaleString ctx.Locale}}</span></td>
|
||||
<td><a href="{{.GetRepoLink}}" target="_blank">{{.GetRepoName}}</a></td>
|
||||
<td>
|
||||
<strong><a href="{{.GetCommitLink}}" target="_blank">{{ShortSha .CommitSHA}}</a></strong>
|
||||
<a class="ui sha label" href="{{.GetCommitLink}}" target="_blank">{{ShortSha .CommitSHA}}</a>
|
||||
</td>
|
||||
<td>{{if .IsStopped}}
|
||||
<span>{{DateUtils.TimeSince .Stopped}}</span>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table unstackable">
|
||||
<table class="ui very basic table unstackable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortt-asc="online" data-sortt-desc="offline">
|
||||
@@ -66,13 +66,16 @@
|
||||
<tbody>
|
||||
{{range .Runners}}
|
||||
<tr>
|
||||
<td><span class="ui label {{if .IsOnline}}green{{end}}">{{.StatusLocaleName ctx.Locale}}</span></td>
|
||||
<td>
|
||||
<span class="ui label {{if .IsOnline}}green{{end}}">{{.StatusLocaleName ctx.Locale}}</span>
|
||||
{{if .IsDisabled}}<span class="ui grey label">{{ctx.Locale.Tr "actions.runners.disabled"}}</span>{{end}}
|
||||
</td>
|
||||
<td>{{.ID}}</td>
|
||||
<td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td>
|
||||
<td>{{if .Version}}{{.Version}}{{else}}{{ctx.Locale.Tr "unknown"}}{{end}}</td>
|
||||
<td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString ctx.Locale}}</span></td>
|
||||
<td>
|
||||
<span class="flex-text-inline">{{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}}</span>
|
||||
<span class="flex-text-inline tw-flex-wrap">{{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}}</span>
|
||||
</td>
|
||||
<td>{{if .LastOnline}}{{DateUtils.TimeSince .LastOnline}}{{else}}{{ctx.Locale.Tr "never"}}{{end}}</td>
|
||||
<td>
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
* CustomInit: do not initialize the editor automatically
|
||||
* ContainerId: id attribute for the container element
|
||||
* ContainerClasses: additional classes for the container element
|
||||
* MarkdownPreviewInRepo: the repo to preview markdown
|
||||
* MarkdownPreviewContext: preview context (the related url path when rendering) for the preview tab, eg: repo link or user home link
|
||||
* MarkdownPreviewMode: content mode for the editor, eg: wiki, comment or default
|
||||
* MarkdownEditorContext: the context data for the editor, see backend MarkdownEditorContext
|
||||
* TextareaName: name attribute for the textarea
|
||||
* TextareaContent: content for the textarea
|
||||
* TextareaMaxLength: maxlength attribute for the textarea
|
||||
@@ -14,25 +12,26 @@
|
||||
* DisableAutosize: whether to disable automatic height resizing
|
||||
*/}}
|
||||
{{$ariaLabel := or .TextareaAriaLabel .TextareaPlaceholder}}
|
||||
{{$repo := .MarkdownPreviewInRepo}}
|
||||
{{$previewContext := .MarkdownPreviewContext}}
|
||||
{{$previewMode := .MarkdownPreviewMode}}
|
||||
{{$previewUrl := print AppSubUrl "/-/markup"}}
|
||||
{{if $repo}}
|
||||
{{$previewUrl = print $repo.Link "/markup"}}
|
||||
{{end}}
|
||||
{{$editorContext := .MarkdownEditorContext}}
|
||||
{{$previewMode := or $editorContext.PreviewMode ""}}
|
||||
{{$previewContext := or $editorContext.PreviewContext ""}}
|
||||
{{$previewLink := or $editorContext.PreviewLink (print AppSubUrl "/-/markup")}}
|
||||
{{$mentionsLink := or $editorContext.MentionsLink ""}}
|
||||
{{$supportEasyMDE := or (eq $previewMode "comment") (eq $previewMode "wiki")}}
|
||||
<div {{if .ContainerId}}id="{{.ContainerId}}"{{end}} class="combo-markdown-editor {{if .CustomInit}}custom-init{{end}} {{.ContainerClasses}}"
|
||||
data-dropzone-parent-container="{{.DropzoneParentContainer}}"
|
||||
data-content-mode="{{$previewMode}}"
|
||||
data-support-easy-mde="{{$supportEasyMDE}}"
|
||||
data-preview-url="{{$previewUrl}}"
|
||||
data-preview-url="{{$previewLink}}"
|
||||
data-preview-context="{{$previewContext}}"
|
||||
{{if $mentionsLink}}data-mentions-url="{{$mentionsLink}}"{{end}}
|
||||
>
|
||||
{{if ne $previewMode "none"}}
|
||||
<div class="ui top tabular menu">
|
||||
<a class="active item" data-tab-for="markdown-writer">{{template "shared/misc/tabtitle" (ctx.Locale.Tr "write")}}</a>
|
||||
<a class="item" data-tab-for="markdown-previewer">{{template "shared/misc/tabtitle" (ctx.Locale.Tr "preview")}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="ui tab active" data-tab-panel="markdown-writer">
|
||||
<markdown-toolbar>
|
||||
<div class="markdown-toolbar-group">
|
||||
@@ -56,7 +55,7 @@
|
||||
<md-task-list class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.list.task.tooltip"}}">{{svg "octicon-tasklist"}}</md-task-list>
|
||||
<button class="markdown-toolbar-button markdown-button-table-add" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.table.add.tooltip"}}">{{svg "octicon-table"}}</button>
|
||||
</div>
|
||||
{{if eq $previewMode "comment"}}
|
||||
{{if $mentionsLink}}
|
||||
<div class="markdown-toolbar-group">
|
||||
<md-mention class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.mention.tooltip"}}">{{svg "octicon-mention"}}</md-mention>
|
||||
<md-ref class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.ref.tooltip"}}">{{svg "octicon-cross-reference"}}</md-ref>
|
||||
@@ -77,7 +76,7 @@
|
||||
>{{.TextareaContent}}</textarea>
|
||||
</text-expander>
|
||||
<script>
|
||||
if (localStorage?.getItem('markdown-editor-monospace') === 'true') {
|
||||
if (window.localUserSettings.getBoolean('markdown-editor-monospace')) {
|
||||
document.querySelector('.markdown-text-editor').classList.add('tw-font-mono');
|
||||
}
|
||||
</script>
|
||||
@@ -87,9 +86,9 @@
|
||||
</div>
|
||||
<div class="markdown-add-table-panel tippy-target">
|
||||
<div class="ui form tw-p-4 flex-text-block">
|
||||
<input type="number" name="rows" min="1" value="3" size="3" class="tw-w-24" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.table.rows"}}">
|
||||
<input type="number" min="1" value="3" size="3" class="add-table-rows tw-w-24" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.table.rows"}}">
|
||||
x
|
||||
<input type="number" name="cols" min="1" value="3" size="3" class="tw-w-24" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.table.cols"}}">
|
||||
<input type="number" min="1" value="3" size="3" class="add-table-cols tw-w-24" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.table.cols"}}">
|
||||
<button class="ui button primary" type="button">{{ctx.Locale.Tr "editor.buttons.table.add.insert"}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
{{/* the logic should be kept the same as getIssueIcon/getIssueColor in JS code */}}
|
||||
{{/* the logic should be kept the same as getIssueIcon/getIssueColorClass in JS code */}}
|
||||
{{- if .IsPull -}}
|
||||
{{- if not .PullRequest -}}
|
||||
No PullRequest
|
||||
{{- else -}}
|
||||
{{- if .IsClosed -}}
|
||||
{{- if .PullRequest.HasMerged -}}
|
||||
{{- svg "octicon-git-merge" 16 "text purple" -}}
|
||||
{{- svg "octicon-git-merge" 16 "tw-text-purple" -}}
|
||||
{{- else -}}
|
||||
{{- svg "octicon-git-pull-request-closed" 16 "text red" -}}
|
||||
{{- svg "octicon-git-pull-request-closed" 16 "tw-text-red" -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if .PullRequest.IsWorkInProgress ctx -}}
|
||||
{{- svg "octicon-git-pull-request-draft" 16 "text grey" -}}
|
||||
{{- svg "octicon-git-pull-request-draft" 16 "tw-text-text-light" -}}
|
||||
{{- else -}}
|
||||
{{- svg "octicon-git-pull-request" 16 "text green" -}}
|
||||
{{- svg "octicon-git-pull-request" 16 "tw-text-green" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if .IsClosed -}}
|
||||
{{- svg "octicon-issue-closed" 16 "text red" -}}
|
||||
{{- svg "octicon-issue-closed" 16 "tw-text-red" -}}
|
||||
{{- else -}}
|
||||
{{- svg "octicon-issue-opened" 16 "text green" -}}
|
||||
{{- svg "octicon-issue-opened" 16 "tw-text-green" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<div class="flex-item-leading">
|
||||
{{/* using some tw helpers is the only way to align the checkbox */}}
|
||||
<div class="flex-text-inline tw-mt-[2px]">
|
||||
<div class="flex-text-inline tw-mt-[3px]">
|
||||
{{if $.CanWriteIssuesOrPulls}}
|
||||
<input type="checkbox" autocomplete="off" class="issue-checkbox tw-mr-[14px]" data-issue-id={{.ID}} aria-label="{{ctx.Locale.Tr "repo.issues.action_check"}} "{{.Title}}"">
|
||||
{{end}}
|
||||
@@ -29,7 +29,7 @@
|
||||
</span>
|
||||
</div>
|
||||
{{if .TotalTrackedTime}}
|
||||
<div class="text grey flex-text-block">
|
||||
<div class="tw-text-text-light flex-text-block">
|
||||
{{svg "octicon-clock" 16}}
|
||||
{{.TotalTrackedTime | Sec2Hour}}
|
||||
</div>
|
||||
@@ -98,7 +98,7 @@
|
||||
{{end}}
|
||||
{{if ne .DeadlineUnix 0}}
|
||||
<span class="due-date flex-text-inline" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date"}}">
|
||||
<span{{if .IsOverdue}} class="text red"{{end}}>
|
||||
<span{{if .IsOverdue}} class="tw-text-red"{{end}}>
|
||||
{{svg "octicon-calendar" 14}}
|
||||
{{DateUtils.AbsoluteShort .DeadlineUnix}}
|
||||
</span>
|
||||
@@ -138,7 +138,7 @@
|
||||
{{if or .Assignees .NumComments}}
|
||||
<div class="flex-item-trailing">
|
||||
{{if .Assignees}}
|
||||
<div class="text grey">
|
||||
<div class="tw-text-text-light">
|
||||
{{range .Assignees}}
|
||||
<a class="ui assignee tw-no-underline" href="{{.HomeLink}}" data-tooltip-content="{{.GetDisplayName}}">
|
||||
{{ctx.AvatarUtils.Avatar . 20}}
|
||||
@@ -147,7 +147,7 @@
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .NumComments}}
|
||||
<div class="text grey">
|
||||
<div class="tw-text-text-light">
|
||||
<a class="tw-no-underline muted flex-text-block" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
|
||||
{{svg "octicon-comment" 16}}{{.NumComments}}
|
||||
</a>
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
<div class="flex-item-header">
|
||||
<div class="flex-item-title">
|
||||
{{if and $.ShowRepoOwnerOnList .Owner}}
|
||||
<a class="text primary name" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/
|
||||
<a class="tw-text-primary name" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/
|
||||
{{end}}
|
||||
<a class="text primary name" href="{{.Link}}">{{.Name}}</a>
|
||||
<a class="tw-text-primary name" href="{{.Link}}">{{.Name}}</a>
|
||||
<span class="label-list">
|
||||
{{if .IsArchived}}
|
||||
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<!-- Filter -->
|
||||
<div class="item ui small dropdown jump">
|
||||
<span class="text">{{ctx.Locale.Tr "filter"}}</span>
|
||||
<span class="text">{{ctx.Locale.Tr "filter_title"}}</span>
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="menu flex-items-menu">
|
||||
<label class="item"><input type="radio" name="clear-filter"> {{ctx.Locale.Tr "filter.clear"}}</label>
|
||||
|
||||
@@ -24,6 +24,12 @@
|
||||
{{template "shared/search/code/results" .}}
|
||||
{{else if .Keyword}}
|
||||
<div>{{ctx.Locale.Tr "search.no_results"}}</div>
|
||||
{{else}}
|
||||
<div class="empty-placeholder">
|
||||
{{svg "octicon-search" 48}}
|
||||
<h2>{{ctx.Locale.Tr "search.code_empty"}}</h2>
|
||||
<p>{{ctx.Locale.Tr "search.code_empty_description"}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
@@ -9,22 +9,21 @@
|
||||
<div class="ui small fluid action input">
|
||||
{{template "shared/search/input" dict "Value" .Value "Disabled" .Disabled "Placeholder" .Placeholder}}
|
||||
{{if .SearchModes}}
|
||||
<div class="ui small dropdown selection {{if .Disabled}}disabled{{end}}" data-tooltip-content="{{ctx.Locale.Tr "search.type_tooltip"}}">
|
||||
<div class="text"></div> {{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<input name="search_mode" type="hidden" value="
|
||||
{{- if .SelectedSearchMode -}}
|
||||
{{- .SelectedSearchMode -}}
|
||||
{{- else -}}
|
||||
{{- $defaultSearchMode := index .SearchModes 0 -}}
|
||||
{{- $defaultSearchMode.ModeValue -}}
|
||||
{{- end -}}
|
||||
">
|
||||
<div class="menu">
|
||||
{{range $mode := .SearchModes}}
|
||||
<div class="item" data-value="{{$mode.ModeValue}}" data-tooltip-content="{{ctx.Locale.Tr $mode.TooltipTrKey}}">{{ctx.Locale.Tr $mode.TitleTrKey}}</div>
|
||||
{{$selected := index .SearchModes 0}}
|
||||
{{range $mode := .SearchModes}}
|
||||
{{if eq $mode.ModeValue $.SelectedSearchMode}}
|
||||
{{$selected = $mode}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
<div class="ui small dropdown selection {{if .Disabled}}disabled{{end}}" data-tooltip-content="{{ctx.Locale.Tr "search.type_tooltip"}}">
|
||||
<div class="text">{{ctx.Locale.Tr $selected.TitleTrKey}}</div> {{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<input name="search_mode" type="hidden" value="{{$selected.ModeValue}}">
|
||||
<div class="menu">
|
||||
{{range $mode := .SearchModes}}
|
||||
<div class="item" data-value="{{$mode.ModeValue}}" data-tooltip-content="{{ctx.Locale.Tr $mode.TooltipTrKey}}">{{ctx.Locale.Tr $mode.TitleTrKey}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{template "shared/search/button" dict "Disabled" .Disabled "Tooltip" .Tooltip}}
|
||||
</div>
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
<div class="header"></div>
|
||||
<form class="ui form form-fetch-action" method="post">
|
||||
<div class="content">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
{{ctx.Locale.Tr "secrets.description"}}
|
||||
</div>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<a class="author text black tw-font-semibold muted"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>{{if .IsTypeBot}}<span class="ui basic label tw-p-1 tw-align-baseline">bot</span>{{end}}
|
||||
<a class="muted tw-text-text tw-font-semibold"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>{{if .IsTypeBot}} <span class="ui basic label tw-p-1 tw-align-baseline">bot</span>{{end}}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<a class="avatar-with-link" {{if gt .user.ID 0}}href="{{.user.HomeLink}}"{{end}}>{{ctx.AvatarUtils.Avatar .user}}</a>
|
||||
<a class="avatar-with-link" {{if .tooltip}}data-tooltip-content="{{.user.Name}}{{if .user.FullName}} ({{.user.FullName}}){{end}}"{{end}} {{if gt .user.ID 0}}href="{{.user.HomeLink}}"{{end}}>{{ctx.AvatarUtils.Avatar .user (or .size 20)}}</a>
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<div class="ui small modal" id="block-user-modal">
|
||||
<div class="header">{{ctx.Locale.Tr "user.block.title"}}</div>
|
||||
<div class="content">
|
||||
<div class="ui warning message">{{ctx.Locale.Tr "user.block.info"}}</div>
|
||||
<div class="ui warning message">{{ctx.Locale.Tr "user.block.info"}} <a target="_blank" href="https://docs.gitea.com/usage/access-control/blocking-user">{{ctx.Locale.Tr "user.block.info.docs"}}</a></div>
|
||||
<form class="ui form modal-form" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="action" value="block" />
|
||||
<input type="hidden" name="blockee" class="modal-blockee" />
|
||||
<div class="field">
|
||||
<label>{{ctx.Locale.Tr "user.block.user_to_block"}}: <span class="text red modal-blockee-name"></span></label>
|
||||
<label>{{ctx.Locale.Tr "user.block.user_to_block"}}: <span class="tw-text-red modal-blockee-name"></span></label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="block-note">{{ctx.Locale.Tr "user.block.note.title"}}</label>
|
||||
|
||||
@@ -2,19 +2,10 @@
|
||||
{{ctx.Locale.Tr "user.block.title"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{ctx.Locale.Tr "user.block.info_1"}}</p>
|
||||
<ul>
|
||||
<li>{{ctx.Locale.Tr "user.block.info_2"}}</li>
|
||||
<li>{{ctx.Locale.Tr "user.block.info_3"}}</li>
|
||||
<li>{{ctx.Locale.Tr "user.block.info_4"}}</li>
|
||||
<li>{{ctx.Locale.Tr "user.block.info_5"}}</li>
|
||||
<li>{{ctx.Locale.Tr "user.block.info_6"}}</li>
|
||||
<li>{{ctx.Locale.Tr "user.block.info_7"}}</li>
|
||||
</ul>
|
||||
<p>{{ctx.Locale.Tr "user.block.info"}} <a target="_blank" href="https://docs.gitea.com/usage/access-control/blocking-user">{{ctx.Locale.Tr "user.block.info.docs"}}</a></p>
|
||||
</div>
|
||||
<div class="ui segment">
|
||||
<form class="ui form ignore-dirty" action="{{$.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="action" value="block" />
|
||||
<div id="search-user-box" class="field ui fluid search input">
|
||||
<input class="prompt tw-mr-2" name="blockee" placeholder="{{ctx.Locale.Tr "search.user_kind"}}" autocomplete="off" required>
|
||||
@@ -50,7 +41,6 @@
|
||||
<div class="flex-item-trailing">
|
||||
<button class="ui compact mini button show-modal" data-modal="#block-user-note-modal" data-modal-modal-blockee="{{.Blockee.Name}}" data-modal-modal-note="{{.Note}}">{{ctx.Locale.Tr "user.block.note.edit"}}</button>
|
||||
<form action="{{$.Link}}" method="post">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<input type="hidden" name="action" value="unblock" />
|
||||
<input type="hidden" name="blockee" value="{{.Blockee.Name}}" />
|
||||
<button class="ui compact mini button">{{ctx.Locale.Tr "user.block.unblock"}}</button>
|
||||
@@ -66,7 +56,6 @@
|
||||
<div class="header">{{ctx.Locale.Tr "user.block.note.edit"}}</div>
|
||||
<div class="content">
|
||||
<form class="ui form" action="{{$.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="action" value="note" />
|
||||
<input type="hidden" name="blockee" class="modal-blockee" />
|
||||
<div class="field">
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<div class="ui container">
|
||||
<div class="ui vertically grid head">
|
||||
<div class="column">
|
||||
<div class="ui header tw-flex tw-items-center tw-break-anywhere">
|
||||
<div class="ui header flex-text-block tw-break-anywhere">
|
||||
{{ctx.AvatarUtils.Avatar . 100}}
|
||||
<span class="text grey"><a class="muted" href="{{.HomeLink}}">{{.DisplayName}}</a></span>
|
||||
<span class="tw-text-text-light"><a class="muted" href="{{.HomeLink}}">{{.DisplayName}}</a></span>
|
||||
<span class="org-visibility">
|
||||
{{if .Visibility.IsLimited}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
||||
{{if .Visibility.IsPrivate}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
|
||||
|
||||
@@ -21,16 +21,16 @@
|
||||
<div class="tw-mt-2">
|
||||
<a class="muted" href="{{.ContextUser.HomeLink}}?tab=followers">{{svg "octicon-person" 18 "tw-mr-1"}}{{.NumFollowers}} {{ctx.Locale.Tr "user.followers"}}</a> · <a class="muted" href="{{.ContextUser.HomeLink}}?tab=following">{{.NumFollowing}} {{ctx.Locale.Tr "user.following"}}</a>
|
||||
{{if .EnableFeed}}
|
||||
<a href="{{.ContextUser.HomeLink}}.rss"><i class="ui text grey tw-ml-2" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">{{svg "octicon-rss" 18}}</i></a>
|
||||
<a href="{{.ContextUser.HomeLink}}.rss"><i class="ui tw-text-text-light tw-ml-2" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">{{svg "octicon-rss" 18}}</i></a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="extra content tw-break-anywhere">
|
||||
<ul>
|
||||
{{if .UserBlocking}}
|
||||
<li class="text red">{{svg "octicon-circle-slash"}} {{ctx.Locale.Tr "user.block.blocked"}}</li>
|
||||
<li class="tw-text-red">{{svg "octicon-circle-slash"}} {{ctx.Locale.Tr "user.block.blocked"}}</li>
|
||||
{{if .UserBlocking.Note}}
|
||||
<li class="text small red">{{ctx.Locale.Tr "user.block.note"}}: {{.UserBlocking.Note}}</li>
|
||||
<li class="tw-text-xs tw-text-red">{{ctx.Locale.Tr "user.block.note"}}: {{.UserBlocking.Note}}</li>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .ContextUser.Location}}
|
||||
@@ -38,7 +38,7 @@
|
||||
{{svg "octicon-location"}}
|
||||
<span class="tw-flex-1">{{.ContextUser.Location}}</span>
|
||||
{{if .ContextUserLocationMapURL}}
|
||||
<a href="{{.ContextUserLocationMapURL}}" rel="nofollow noreferrer" data-tooltip-content="{{ctx.Locale.Tr "user.show_on_map"}}">
|
||||
<a href="{{.ContextUserLocationMapURL}}" data-tooltip-content="{{ctx.Locale.Tr "user.show_on_map"}}">
|
||||
{{svg "octicon-link-external"}}
|
||||
</a>
|
||||
{{end}}
|
||||
@@ -63,7 +63,7 @@
|
||||
{{if .ContextUser.Website}}
|
||||
<li>
|
||||
{{svg "octicon-link"}}
|
||||
<a target="_blank" rel="noopener noreferrer me" href="{{.ContextUser.Website}}">{{.ContextUser.Website}}</a>
|
||||
<a target="_blank" rel="me" href="{{.ContextUser.Website}}">{{.ContextUser.Website}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
{{if $.RenderedDescription}}
|
||||
@@ -75,7 +75,7 @@
|
||||
{{if .Show}}
|
||||
<li>
|
||||
{{svg "fontawesome-openid"}}
|
||||
<a target="_blank" rel="noopener noreferrer" href="{{.URI}}">{{.URI}}</a>
|
||||
<a target="_blank" href="{{.URI}}">{{.URI}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -100,13 +100,17 @@
|
||||
{{end}}
|
||||
{{if .Badges}}
|
||||
<li>
|
||||
<ul class="user-badges">
|
||||
<div class="user-badges">
|
||||
{{range .Badges}}
|
||||
<li>
|
||||
<span class="user-badge-item">
|
||||
{{if .ImageURL}}
|
||||
<img loading="lazy" width="64" height="64" src="{{.ImageURL}}" alt="{{.Description}}" data-tooltip-content="{{.Description}}">
|
||||
</li>
|
||||
{{else}}
|
||||
<span class="ui label user-badge-chip" data-tooltip-content="{{if .Description}}{{.Description}}{{else}}{{.Slug}}{{end}}">{{.Slug}}</span>
|
||||
{{end}}
|
||||
</span>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{{end}}
|
||||
{{if and .IsSigned (ne .SignedUserID .ContextUser.ID)}}
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
<div class="header"></div>
|
||||
<form class="ui form form-fetch-action" method="post">
|
||||
<div class="content">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
{{ctx.Locale.Tr "actions.variables.description"}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user