mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-19 00:01:16 -04:00
Compare commits
7 Commits
64c0a6a4e2
...
daaf0ad473
Author | SHA1 | Date | |
---|---|---|---|
|
daaf0ad473 | ||
|
9fc24a8f5e | ||
|
a1029cb2ca | ||
|
134c7636ef | ||
|
88271167d6 | ||
|
a8086f6148 | ||
|
f4f6885c1f |
@ -17,13 +17,13 @@ menu:
|
|||||||
|
|
||||||
# Database Preparation
|
# Database Preparation
|
||||||
|
|
||||||
You need a database to use Gitea. Gitea supports PostgreSQL (>=10), MySQL (>=5.7), SQLite, and MSSQL (>=2008R2 SP3). This page will guide into preparing database. Only PostgreSQL and MySQL will be covered here since those database engines are widely-used in production. If you plan to use SQLite, you can ignore this chapter.
|
You need a database to use Gitea. Gitea supports PostgreSQL (>=10), MySQL (>=5.7), MariaDB, SQLite, and MSSQL (>=2008R2 SP3). This page will guide into preparing database. Only PostgreSQL and MySQL will be covered here since those database engines are widely-used in production. If you plan to use SQLite, you can ignore this chapter.
|
||||||
|
|
||||||
Database instance can be on same machine as Gitea (local database setup), or on different machine (remote database).
|
Database instance can be on same machine as Gitea (local database setup), or on different machine (remote database).
|
||||||
|
|
||||||
Note: All steps below requires that the database engine of your choice is installed on your system. For remote database setup, install the server application on database instance and client program on your Gitea server. The client program is used to test connection to the database from Gitea server, while Gitea itself use database driver provided by Go to accomplish the same thing. In addition, make sure you use same engine version for both server and client for some engine features to work. For security reason, protect `root` (MySQL) or `postgres` (PostgreSQL) database superuser with secure password. The steps assumes that you run Linux for both database and Gitea servers.
|
Note: All steps below requires that the database engine of your choice is installed on your system. For remote database setup, install the server application on database instance and client program on your Gitea server. The client program is used to test connection to the database from Gitea server, while Gitea itself use database driver provided by Go to accomplish the same thing. In addition, make sure you use same engine version for both server and client for some engine features to work. For security reason, protect `root` (MySQL) or `postgres` (PostgreSQL) database superuser with secure password. The steps assumes that you run Linux for both database and Gitea servers.
|
||||||
|
|
||||||
## MySQL
|
## MySQL/MariaDB
|
||||||
|
|
||||||
1. For remote database setup, you will need to make MySQL listen to your IP address. Edit `bind-address` option on `/etc/mysql/my.cnf` on database instance to:
|
1. For remote database setup, you will need to make MySQL listen to your IP address. Edit `bind-address` option on `/etc/mysql/my.cnf` on database instance to:
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ Note: All steps below requires that the database engine of your choice is instal
|
|||||||
|
|
||||||
```sql
|
```sql
|
||||||
SET old_passwords=0;
|
SET old_passwords=0;
|
||||||
CREATE USER 'gitea' IDENTIFIED BY 'gitea';
|
CREATE USER 'gitea'@'%' IDENTIFIED BY 'gitea';
|
||||||
```
|
```
|
||||||
|
|
||||||
For remote database:
|
For remote database:
|
||||||
|
@ -3507,6 +3507,7 @@ runners.status.idle = Idle
|
|||||||
runners.status.active = Active
|
runners.status.active = Active
|
||||||
runners.status.offline = Offline
|
runners.status.offline = Offline
|
||||||
runners.version = Version
|
runners.version = Version
|
||||||
|
runners.reset_registration_token = Reset registration token
|
||||||
runners.reset_registration_token_success = Runner registration token reset successfully
|
runners.reset_registration_token_success = Runner registration token reset successfully
|
||||||
|
|
||||||
runs.all_workflows = All Workflows
|
runs.all_workflows = All Workflows
|
||||||
|
@ -287,7 +287,7 @@ func editFilePost(ctx *context.Context, form forms.EditRepoFileForm, isNewFile b
|
|||||||
Operation: operation,
|
Operation: operation,
|
||||||
FromTreePath: ctx.Repo.TreePath,
|
FromTreePath: ctx.Repo.TreePath,
|
||||||
TreePath: form.TreePath,
|
TreePath: form.TreePath,
|
||||||
ContentReader: strings.NewReader(strings.ReplaceAll(form.Content, "\r", "")),
|
ContentReader: strings.NewReader(form.Content),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Signoff: form.Signoff,
|
Signoff: form.Signoff,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div class="ui secondary filter menu gt-ac gt-mx-0">
|
<div class="ui secondary filter menu gt-ac gt-mx-0">
|
||||||
<form class="ui form ignore-dirty gt-f1">
|
<form class="ui form ignore-dirty gt-f1">
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
|
||||||
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
|
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<div class="ui secondary filter menu gt-ac gt-mx-0">
|
<div class="ui secondary filter menu gt-ac gt-mx-0">
|
||||||
<form class="ui form ignore-dirty gt-f1">
|
<form class="ui form ignore-dirty gt-f1">
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
|
||||||
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
|
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<div class="ui attached segment">
|
<div class="ui attached segment">
|
||||||
<form class="ui form ignore-dirty">
|
<form class="ui form ignore-dirty">
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Query "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Query "AutoFocus" true}}
|
||||||
<select class="ui dropdown" name="type">
|
<select class="ui dropdown" name="type">
|
||||||
<option value="">{{.locale.Tr "packages.filter.type"}}</option>
|
<option value="">{{.locale.Tr "packages.filter.type"}}</option>
|
||||||
<option value="all">{{.locale.Tr "packages.filter.type.all"}}</option>
|
<option value="all">{{.locale.Tr "packages.filter.type.all"}}</option>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div class="ui secondary filter menu gt-ac gt-mx-0">
|
<div class="ui secondary filter menu gt-ac gt-mx-0">
|
||||||
<form class="ui form ignore-dirty gt-f1">
|
<form class="ui form ignore-dirty gt-f1">
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
|
||||||
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
|
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
<input type="hidden" name="action" value="adopt">
|
<input type="hidden" name="action" value="adopt">
|
||||||
<input type="hidden" name="q" value="{{$.Keyword}}">
|
<input type="hidden" name="q" value="{{$.Keyword}}">
|
||||||
<input type="hidden" name="page" value="{{$.CurrentPage}}">
|
<input type="hidden" name="page" value="{{$.CurrentPage}}">
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale)}}
|
{{template "base/modal_actions_confirm"}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<button class="ui button red show-modal gt-p-3" data-modal="#delete-unadopted-modal-{{$dirI}}">{{svg "octicon-x"}} {{$.locale.Tr "repo.delete_preexisting_label"}}</button>
|
<button class="ui button red show-modal gt-p-3" data-modal="#delete-unadopted-modal-{{$dirI}}">{{svg "octicon-x"}} {{$.locale.Tr "repo.delete_preexisting_label"}}</button>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<input type="hidden" name="action" value="delete">
|
<input type="hidden" name="action" value="delete">
|
||||||
<input type="hidden" name="q" value="{{$.Keyword}}">
|
<input type="hidden" name="q" value="{{$.Keyword}}">
|
||||||
<input type="hidden" name="page" value="{{$.CurrentPage}}">
|
<input type="hidden" name="page" value="{{$.CurrentPage}}">
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonColors" "yellow")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonColors" "yellow")}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
<!-- Search Text -->
|
<!-- Search Text -->
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
|
||||||
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
|
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
{{/*
|
{{/*
|
||||||
Template Attributes:
|
|
||||||
* locale
|
|
||||||
|
|
||||||
Two buttons (negative, positive):
|
Two buttons (negative, positive):
|
||||||
* ModalButtonTypes: "yes" (default) or "confirm"
|
* ModalButtonTypes: "yes" (default) or "confirm"
|
||||||
* ModalButtonColors: "primary" (default) / "blue" / "yellow"
|
* ModalButtonColors: "primary" (default) / "blue" / "yellow"
|
||||||
@ -17,11 +14,11 @@ The ".ok.button" and ".cancel.button" selectors are also used by Fomantic Modal
|
|||||||
{{if .ModalButtonDangerText}}
|
{{if .ModalButtonDangerText}}
|
||||||
<button class="ui danger red ok button">{{.ModalButtonDangerText}}</button>
|
<button class="ui danger red ok button">{{.ModalButtonDangerText}}</button>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{$textNegitive := .locale.Tr "modal.no"}}
|
{{$textNegitive := ctx.Locale.Tr "modal.no"}}
|
||||||
{{$textPositive := .locale.Tr "modal.yes"}}
|
{{$textPositive := ctx.Locale.Tr "modal.yes"}}
|
||||||
{{if eq .ModalButtonTypes "confirm"}}
|
{{if eq .ModalButtonTypes "confirm"}}
|
||||||
{{$textNegitive = .locale.Tr "modal.cancel"}}
|
{{$textNegitive = ctx.Locale.Tr "modal.cancel"}}
|
||||||
{{$textPositive = .locale.Tr "modal.confirm"}}
|
{{$textPositive = ctx.Locale.Tr "modal.confirm"}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .ModalButtonCancelText}}{{$textNegitive = .ModalButtonCancelText}}{{end}}
|
{{if .ModalButtonCancelText}}{{$textNegitive = .ModalButtonCancelText}}{{end}}
|
||||||
{{if .ModalButtonOkText}}{{$textPositive = .ModalButtonOkText}}{{end}}
|
{{if .ModalButtonOkText}}{{$textPositive = .ModalButtonOkText}}{{end}}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<form class="ui form ignore-dirty">
|
<form class="ui form ignore-dirty">
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true "Disabled" .CodeIndexerUnavailable}}
|
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true "Disabled" .CodeIndexerUnavailable}}
|
||||||
<div class="ui dropdown selection {{if .CodeIndexerUnavailable}} disabled{{end}}" data-tooltip-content="{{.locale.Tr "explore.search.type.tooltip"}}">
|
<div class="ui dropdown selection {{if .CodeIndexerUnavailable}} disabled{{end}}" data-tooltip-content="{{.locale.Tr "explore.search.type.tooltip"}}">
|
||||||
<input name="t" type="hidden" value="{{.queryType}}"{{if .CodeIndexerUnavailable}} disabled{{end}}>{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
<input name="t" type="hidden" value="{{.queryType}}"{{if .CodeIndexerUnavailable}} disabled{{end}}>{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="text">{{.locale.Tr (printf "explore.search.%s" (or .queryType "fuzzy"))}}</div>
|
<div class="text">{{.locale.Tr (printf "explore.search.%s" (or .queryType "fuzzy"))}}</div>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<div class="header">Form dialog (layout 1)</div>
|
<div class="header">Form dialog (layout 1)</div>
|
||||||
<form class="content" method="post">
|
<form class="content" method="post">
|
||||||
<div class="ui input gt-w-100"><input name="user_input"></div>
|
<div class="ui input gt-w-100"><input name="user_input"></div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonTypes" "confirm")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<form method="post">
|
<form method="post">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="ui input gt-w-100"><input name="user_input"></div>
|
<div class="ui input gt-w-100"><input name="user_input"></div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonTypes" "confirm")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="ui input gt-w-100"><input name="user_input"></div>
|
<div class="ui input gt-w-100"><input name="user_input"></div>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonTypes" "confirm")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<div class="ui input gt-w-100"><input name="user_input"></div>
|
<div class="ui input gt-w-100"><input name="user_input"></div>
|
||||||
</div>
|
</div>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonTypes" "confirm")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -45,25 +45,25 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
very long aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
very long aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
</div>
|
</div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale)}}
|
{{template "base/modal_actions_confirm"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui g-modal-confirm modal" id="test-modal-confirm">
|
<div class="ui g-modal-confirm modal" id="test-modal-confirm">
|
||||||
<div class="header">Confirm dialog</div>
|
<div class="header">Confirm dialog</div>
|
||||||
<div class="content">hello, this is the modal dialog content</div>
|
<div class="content">hello, this is the modal dialog content</div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonTypes" "confirm")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui g-modal-confirm modal" id="test-modal-blue">
|
<div class="ui g-modal-confirm modal" id="test-modal-blue">
|
||||||
<div class="header">Blue dialog</div>
|
<div class="header">Blue dialog</div>
|
||||||
<div class="content">hello, this is the modal dialog content</div>
|
<div class="content">hello, this is the modal dialog content</div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonColors" "blue")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonColors" "blue")}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui g-modal-confirm modal" id="test-modal-yellow">
|
<div class="ui g-modal-confirm modal" id="test-modal-yellow">
|
||||||
<div class="header">yellow dialog</div>
|
<div class="header">yellow dialog</div>
|
||||||
<div class="content">hello, this is the modal dialog content</div>
|
<div class="content">hello, this is the modal dialog content</div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonColors" "yellow")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonColors" "yellow")}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui g-modal-confirm modal" id="test-modal-danger">
|
<div class="ui g-modal-confirm modal" id="test-modal-danger">
|
||||||
|
@ -171,6 +171,7 @@
|
|||||||
<span class="text">simple</span>
|
<span class="text">simple</span>
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
|
<div class="ui icon search input"><i class="icon">{{svg "octicon-search"}}</i><input type="text" value="search input in menu"></div>
|
||||||
<div class="item">item</div>
|
<div class="item">item</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<input type="hidden" name="sort" value="{{$.SortType}}">
|
<input type="hidden" name="sort" value="{{$.SortType}}">
|
||||||
<input type="hidden" name="language" value="{{$.Language}}">
|
<input type="hidden" name="language" value="{{$.Language}}">
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
|
||||||
{{if .PageIsExploreRepositories}}
|
{{if .PageIsExploreRepositories}}
|
||||||
<input type="hidden" name="only_show_relevant" value="{{.OnlyShowRelevant}}">
|
<input type="hidden" name="only_show_relevant" value="{{.OnlyShowRelevant}}">
|
||||||
{{else}}
|
{{else}}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div class="ui secondary filter menu gt-ac gt-mx-0">
|
<div class="ui secondary filter menu gt-ac gt-mx-0">
|
||||||
<form class="ui form ignore-dirty gt-f1">
|
<form class="ui form ignore-dirty gt-f1">
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
|
||||||
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
|
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{{template "base/alert" .}}
|
{{template "base/alert" .}}
|
||||||
<form class="ui form ignore-dirty">
|
<form class="ui form ignore-dirty">
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Query "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Query "AutoFocus" true}}
|
||||||
<select class="ui dropdown" name="type">
|
<select class="ui dropdown" name="type">
|
||||||
<option value="">{{.locale.Tr "packages.filter.type"}}</option>
|
<option value="">{{.locale.Tr "packages.filter.type"}}</option>
|
||||||
<option value="all">{{.locale.Tr "packages.filter.type.all"}}</option>
|
<option value="all">{{.locale.Tr "packages.filter.type.all"}}</option>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<p><a href="{{.PackageDescriptor.PackageWebLink}}">{{.PackageDescriptor.Package.Name}}</a> / <strong>{{.locale.Tr "packages.versions"}}</strong></p>
|
<p><a href="{{.PackageDescriptor.PackageWebLink}}">{{.PackageDescriptor.Package.Name}}</a> / <strong>{{.locale.Tr "packages.versions"}}</strong></p>
|
||||||
<form class="ui form ignore-dirty">
|
<form class="ui form ignore-dirty">
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Query "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Query "AutoFocus" true}}
|
||||||
<select class="ui dropdown" name="sort">
|
<select class="ui dropdown" name="sort">
|
||||||
<option value="version_asc"{{if eq .Sort "version_asc"}} selected="selected"{{end}}>{{.locale.Tr "filter.string.asc"}}</option>
|
<option value="version_asc"{{if eq .Sort "version_asc"}} selected="selected"{{end}}>{{.locale.Tr "filter.string.asc"}}</option>
|
||||||
<option value="version_desc"{{if eq .Sort "version_desc"}} selected="selected"{{end}}>{{.locale.Tr "filter.string.desc"}}</option>
|
<option value="version_desc"{{if eq .Sort "version_desc"}} selected="selected"{{end}}>{{.locale.Tr "filter.string.desc"}}</option>
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<form class="list-header-search ui form ignore-dirty">
|
<form class="list-header-search ui form ignore-dirty">
|
||||||
<div class="ui small search fluid action input">
|
<div class="ui small search fluid action input">
|
||||||
<input type="hidden" name="state" value="{{$.State}}">
|
<input type="hidden" name="state" value="{{$.State}}">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Keyword}}
|
{{template "shared/searchinput" dict "Value" .Keyword}}
|
||||||
<button class="ui small icon button" type="submit" aria-label="{{.locale.Tr "explore.search"}}">
|
<button class="ui small icon button" type="submit" aria-label="{{.locale.Tr "explore.search"}}">
|
||||||
{{svg "octicon-search"}}
|
{{svg "octicon-search"}}
|
||||||
</button>
|
</button>
|
||||||
|
@ -142,7 +142,7 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<label id="default-project-column-content"></label>
|
<label id="default-project-column-content"></label>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" ctx.Locale "ModalButtonTypes" "confirm")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui g-modal-confirm modal" id="delete-project-column-modal-{{.ID}}">
|
<div class="ui g-modal-confirm modal" id="delete-project-column-modal-{{.ID}}">
|
||||||
@ -154,7 +154,7 @@
|
|||||||
{{ctx.Locale.Tr "repo.projects.column.deletion_desc"}}
|
{{ctx.Locale.Tr "repo.projects.column.deletion_desc"}}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" ctx.Locale "ModalButtonTypes" "confirm")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
{{range .Runs}}
|
{{range .Runs}}
|
||||||
<div class="flex-item gt-ac">
|
<div class="flex-item gt-ac">
|
||||||
<div class="flex-item-leading">
|
<div class="flex-item-leading">
|
||||||
{{template "repo/actions/status" (dict "status" .Status.String "locale" $.locale)}}
|
{{template "repo/actions/status" (dict "status" .Status.String)}}
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-item-main">
|
<div class="flex-item-main">
|
||||||
<a class="flex-item-title" title="{{.Title}}" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
|
<a class="flex-item-title" title="{{.Title}}" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
{{- $className = .className -}}
|
{{- $className = .className -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<span class="gt-df gt-ac" data-tooltip-content="{{.locale.Tr (printf "actions.status.%s" .status)}}">
|
<span class="gt-df gt-ac" data-tooltip-content="{{ctx.Locale.Tr (printf "actions.status.%s" .status)}}">
|
||||||
{{if eq .status "success"}}
|
{{if eq .status "success"}}
|
||||||
{{svg "octicon-check-circle-fill" $size (printf "text green %s" $className)}}
|
{{svg "octicon-check-circle-fill" $size (printf "text green %s" $className)}}
|
||||||
{{else if eq .status "skipped"}}
|
{{else if eq .status "skipped"}}
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
{{if $.EscapeStatus.Escaped}}
|
{{if $.EscapeStatus.Escaped}}
|
||||||
<td class="lines-escape">
|
<td class="lines-escape">
|
||||||
{{if $row.EscapeStatus.Escaped}}
|
{{if $row.EscapeStatus.Escaped}}
|
||||||
<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $row "locale" $.locale}}"></button>
|
<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $row}}"></button>
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -236,7 +236,7 @@
|
|||||||
<input id="new_branch_name" name="new_branch_name" required>
|
<input id="new_branch_name" name="new_branch_name" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonTypes" "confirm")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -258,7 +258,7 @@
|
|||||||
<input name="to" required>
|
<input name="to" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonTypes" "confirm")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/footer" .}}
|
{{template "base/footer" .}}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
{{template "repo/commit_status" .}}
|
{{template "repo/commit_status" .}}
|
||||||
<span class="ui gt-ml-3 gt-f1">{{.Context}} <span class="text grey">{{.Description}}</span></span>
|
<span class="ui gt-ml-3 gt-f1">{{.Context}} <span class="text grey">{{.Description}}</span></span>
|
||||||
{{if .TargetURL}}
|
{{if .TargetURL}}
|
||||||
<a class="gt-ml-3" href="{{.TargetURL}}" target="_blank" rel="noopener noreferrer">{{$.root.locale.Tr "repo.pulls.status_checks_details"}}</a>
|
<a class="gt-ml-3" href="{{.TargetURL}}" target="_blank" rel="noopener noreferrer">{{ctx.Locale.Tr "repo.pulls.status_checks_details"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -22,22 +22,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="7" class="lines-code lines-code-old ">{{$inlineDiff := $.section.GetComputedInlineDiffFor $line $.locale}}{{/*
|
<td colspan="7" class="lines-code lines-code-old ">{{$inlineDiff := $.section.GetComputedInlineDiffFor $line $.locale}}{{/*
|
||||||
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.locale}}</td>
|
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}</td>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{$inlineDiff := $.section.GetComputedInlineDiffFor $line $.locale}}
|
{{$inlineDiff := $.section.GetComputedInlineDiffFor $line $.locale}}
|
||||||
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{$.FileNameHash}}L{{$line.LeftIdx}}{{end}}"></span></td>
|
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{$.FileNameHash}}L{{$line.LeftIdx}}{{end}}"></span></td>
|
||||||
<td class="blob-excerpt lines-escape lines-escape-old">{{if and $line.LeftIdx $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.locale}}"></button>{{end}}</td>
|
<td class="blob-excerpt lines-escape lines-escape-old">{{if and $line.LeftIdx $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}</td>
|
||||||
<td class="blob-excerpt lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="gt-mono" data-type-marker=""></span>{{end}}</td>
|
<td class="blob-excerpt lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="gt-mono" data-type-marker=""></span>{{end}}</td>
|
||||||
<td class="blob-excerpt lines-code lines-code-old">{{/*
|
<td class="blob-excerpt lines-code lines-code-old">{{/*
|
||||||
*/}}{{if $line.LeftIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.locale}}{{else}}{{/*
|
*/}}{{if $line.LeftIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{else}}{{/*
|
||||||
*/}}<code class="code-inner"></code>{{/*
|
*/}}<code class="code-inner"></code>{{/*
|
||||||
*/}}{{end}}{{/*
|
*/}}{{end}}{{/*
|
||||||
*/}}</td>
|
*/}}</td>
|
||||||
<td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{$.FileNameHash}}R{{$line.RightIdx}}{{end}}"></span></td>
|
<td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{$.FileNameHash}}R{{$line.RightIdx}}{{end}}"></span></td>
|
||||||
<td class="blob-excerpt lines-escape lines-escape-new">{{if and $line.RightIdx $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.locale}}"></button>{{end}}</td>
|
<td class="blob-excerpt lines-escape lines-escape-new">{{if and $line.RightIdx $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}</td>
|
||||||
<td class="blob-excerpt lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="gt-mono" data-type-marker=""></span>{{end}}</td>
|
<td class="blob-excerpt lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="gt-mono" data-type-marker=""></span>{{end}}</td>
|
||||||
<td class="blob-excerpt lines-code lines-code-new">{{/*
|
<td class="blob-excerpt lines-code lines-code-new">{{/*
|
||||||
*/}}{{if $line.RightIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.locale}}{{else}}{{/*
|
*/}}{{if $line.RightIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{else}}{{/*
|
||||||
*/}}<code class="code-inner"></code>{{/*
|
*/}}<code class="code-inner"></code>{{/*
|
||||||
*/}}{{end}}{{/*
|
*/}}{{end}}{{/*
|
||||||
*/}}</td>
|
*/}}</td>
|
||||||
@ -72,9 +72,9 @@
|
|||||||
<td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{$.FileNameHash}}R{{$line.RightIdx}}{{end}}"></span></td>
|
<td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{$.FileNameHash}}R{{$line.RightIdx}}{{end}}"></span></td>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{$inlineDiff := $.section.GetComputedInlineDiffFor $line $.locale}}
|
{{$inlineDiff := $.section.GetComputedInlineDiffFor $line $.locale}}
|
||||||
<td class="blob-excerpt lines-escape">{{if $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.locale}}"></button>{{end}}</td>
|
<td class="blob-excerpt lines-escape">{{if $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}</td>
|
||||||
<td class="blob-excerpt lines-type-marker"><span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td>
|
<td class="blob-excerpt lines-type-marker"><span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td>
|
||||||
<td class="blob-excerpt lines-code{{if (not $line.RightIdx)}} lines-code-old{{end}}"><code {{if $inlineDiff.EscapeStatus.Escaped}}class="code-inner has-escaped" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.locale}}"{{else}}class="code-inner"{{end}}>{{$inlineDiff.Content}}</code></td>
|
<td class="blob-excerpt lines-code{{if (not $line.RightIdx)}} lines-code-old{{end}}"><code {{if $inlineDiff.EscapeStatus.Escaped}}class="code-inner has-escaped" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"{{else}}class="code-inner"{{end}}>{{$inlineDiff.Content}}</code></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -225,7 +225,6 @@
|
|||||||
<template id="issue-comment-editor-template">
|
<template id="issue-comment-editor-template">
|
||||||
<div class="ui comment form">
|
<div class="ui comment form">
|
||||||
{{template "shared/combomarkdowneditor" (dict
|
{{template "shared/combomarkdowneditor" (dict
|
||||||
"locale" $.locale
|
|
||||||
"MarkdownPreviewUrl" (print $.Repository.Link "/markup")
|
"MarkdownPreviewUrl" (print $.Repository.Link "/markup")
|
||||||
"MarkdownPreviewContext" $.RepoLink
|
"MarkdownPreviewContext" $.RepoLink
|
||||||
"TextareaName" "content"
|
"TextareaName" "content"
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
<input type="hidden" name="diff_base_cid">
|
<input type="hidden" name="diff_base_cid">
|
||||||
|
|
||||||
{{template "shared/combomarkdowneditor" (dict
|
{{template "shared/combomarkdowneditor" (dict
|
||||||
"locale" $.root.locale
|
|
||||||
"MarkdownPreviewUrl" (print $.root.Repository.Link "/markup")
|
"MarkdownPreviewUrl" (print $.root.Repository.Link "/markup")
|
||||||
"MarkdownPreviewContext" $.root.RepoLink
|
"MarkdownPreviewContext" $.root.RepoLink
|
||||||
"TextareaName" "content"
|
"TextareaName" "content"
|
||||||
@ -21,22 +20,22 @@
|
|||||||
)}}
|
)}}
|
||||||
|
|
||||||
<div class="field footer gt-mx-3">
|
<div class="field footer gt-mx-3">
|
||||||
<span class="markup-info">{{svg "octicon-markup"}} {{$.root.locale.Tr "repo.diff.comment.markdown_info"}}</span>
|
<span class="markup-info">{{svg "octicon-markup"}} {{ctx.Locale.Tr "repo.diff.comment.markdown_info"}}</span>
|
||||||
<div class="gt-text-right">
|
<div class="gt-text-right">
|
||||||
{{if $.reply}}
|
{{if $.reply}}
|
||||||
<button class="ui submit primary tiny button btn-reply" type="submit">{{$.root.locale.Tr "repo.diff.comment.reply"}}</button>
|
<button class="ui submit primary tiny button btn-reply" type="submit">{{ctx.Locale.Tr "repo.diff.comment.reply"}}</button>
|
||||||
<input type="hidden" name="reply" value="{{$.reply}}">
|
<input type="hidden" name="reply" value="{{$.reply}}">
|
||||||
<input type="hidden" name="single_review" value="true">
|
<input type="hidden" name="single_review" value="true">
|
||||||
{{else}}
|
{{else}}
|
||||||
{{if $.root.CurrentReview}}
|
{{if $.root.CurrentReview}}
|
||||||
<button name="pending_review" type="submit" class="ui submit primary tiny button btn-add-comment">{{$.root.locale.Tr "repo.diff.comment.add_review_comment"}}</button>
|
<button name="pending_review" type="submit" class="ui submit primary tiny button btn-add-comment">{{ctx.Locale.Tr "repo.diff.comment.add_review_comment"}}</button>
|
||||||
{{else}}
|
{{else}}
|
||||||
<button name="pending_review" type="submit" class="ui submit primary tiny button btn-start-review">{{$.root.locale.Tr "repo.diff.comment.start_review"}}</button>
|
<button name="pending_review" type="submit" class="ui submit primary tiny button btn-start-review">{{ctx.Locale.Tr "repo.diff.comment.start_review"}}</button>
|
||||||
<button name="single_review" value="true" type="submit" class="ui submit tiny basic button btn-add-single">{{$.root.locale.Tr "repo.diff.comment.add_single_comment"}}</button>
|
<button name="single_review" value="true" type="submit" class="ui submit tiny basic button btn-add-single">{{ctx.Locale.Tr "repo.diff.comment.add_single_comment"}}</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if or (not $.HasComments) $.hidden}}
|
{{if or (not $.HasComments) $.hidden}}
|
||||||
<button type="button" class="ui submit tiny basic button btn-cancel cancel-code-comment">{{$.root.locale.Tr "cancel"}}</button>
|
<button type="button" class="ui submit tiny basic button btn-cancel cancel-code-comment">{{ctx.Locale.Tr "cancel"}}</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,35 +16,35 @@
|
|||||||
{{.OriginalAuthor}}
|
{{.OriginalAuthor}}
|
||||||
</span>
|
</span>
|
||||||
<span class="text grey muted-links">
|
<span class="text grey muted-links">
|
||||||
{{$.root.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
|
{{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
|
||||||
</span>
|
</span>
|
||||||
<span class="text migrate">
|
<span class="text migrate">
|
||||||
{{if $.root.Repository.OriginalURL}}
|
{{if $.root.Repository.OriginalURL}}
|
||||||
({{$.root.locale.Tr "repo.migrated_from" ($.root.Repository.OriginalURL | Escape) ($.root.Repository.GetOriginalURLHostname | Escape) | Safe}})
|
({{ctx.Locale.Tr "repo.migrated_from" ($.root.Repository.OriginalURL | Escape) ($.root.Repository.GetOriginalURLHostname | Escape) | Safe}})
|
||||||
{{end}}
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="text grey muted-links">
|
<span class="text grey muted-links">
|
||||||
{{template "shared/user/namelink" .Poster}}
|
{{template "shared/user/namelink" .Poster}}
|
||||||
{{$.root.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
|
{{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
|
||||||
</span>
|
</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div class="comment-header-right actions gt-df gt-ac">
|
<div class="comment-header-right actions gt-df gt-ac">
|
||||||
{{if .Invalidated}}
|
{{if .Invalidated}}
|
||||||
{{$referenceUrl := printf "%s#%s" $.root.Issue.Link .HashTag}}
|
{{$referenceUrl := printf "%s#%s" $.root.Issue.Link .HashTag}}
|
||||||
<a href="{{AppSubUrl}}{{$referenceUrl}}" class="ui label basic small" data-tooltip-content="{{$.root.locale.Tr "repo.issues.review.outdated_description"}}">
|
<a href="{{AppSubUrl}}{{$referenceUrl}}" class="ui label basic small" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}">
|
||||||
{{$.root.locale.Tr "repo.issues.review.outdated"}}
|
{{ctx.Locale.Tr "repo.issues.review.outdated"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if and .Review}}
|
{{if and .Review}}
|
||||||
{{if eq .Review.Type 0}}
|
{{if eq .Review.Type 0}}
|
||||||
<div class="ui label basic small yellow pending-label" data-tooltip-content="{{$.root.locale.Tr "repo.issues.review.pending.tooltip" ($.root.locale.Tr "repo.diff.review") ($.root.locale.Tr "repo.diff.review.approve") ($.root.locale.Tr "repo.diff.review.comment") ($.root.locale.Tr "repo.diff.review.reject")}}">
|
<div class="ui label basic small yellow pending-label" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.pending.tooltip" (ctx.Locale.Tr "repo.diff.review") (ctx.Locale.Tr "repo.diff.review.approve") (ctx.Locale.Tr "repo.diff.review.comment") (ctx.Locale.Tr "repo.diff.review.reject")}}">
|
||||||
{{$.root.locale.Tr "repo.issues.review.pending"}}
|
{{ctx.Locale.Tr "repo.issues.review.pending"}}
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="ui label basic small">
|
<div class="ui label basic small">
|
||||||
{{$.root.locale.Tr "repo.issues.review.review"}}
|
{{ctx.Locale.Tr "repo.issues.review.review"}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
@ -57,7 +57,7 @@
|
|||||||
{{if .RenderedContent}}
|
{{if .RenderedContent}}
|
||||||
{{.RenderedContent|Str2html}}
|
{{.RenderedContent|Str2html}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="no-content">{{$.root.locale.Tr "repo.issues.no_content"}}</span>
|
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
|
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
{{if .diff.EscapeStatus.HasInvisible}}{{.locale.Tr "repo.invisible_runes_line"}} {{end}}{{/*
|
{{if .diff.EscapeStatus.HasInvisible}}{{ctx.Locale.Tr "repo.invisible_runes_line"}} {{end}}{{/*
|
||||||
*/}}{{if .diff.EscapeStatus.HasAmbiguous}}{{.locale.Tr "repo.ambiguous_runes_line"}}{{end}}
|
*/}}{{if .diff.EscapeStatus.HasAmbiguous}}{{ctx.Locale.Tr "repo.ambiguous_runes_line"}}{{end}}
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
{{template "shared/combomarkdowneditor" (dict
|
{{template "shared/combomarkdowneditor" (dict
|
||||||
"locale" $.locale
|
|
||||||
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
|
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
|
||||||
"MarkdownPreviewContext" .RepoLink
|
"MarkdownPreviewContext" .RepoLink
|
||||||
"TextareaName" "content"
|
"TextareaName" "content"
|
||||||
|
@ -34,40 +34,40 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</td>{{$inlineDiff := $section.GetComputedInlineDiffFor $line $.root.locale}}
|
</td>{{$inlineDiff := $section.GetComputedInlineDiffFor $line $.root.locale}}
|
||||||
<td class="lines-escape lines-escape-old">{{if $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.root.locale}}"></button>{{end}}</td>
|
<td class="lines-escape lines-escape-old">{{if $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}</td>
|
||||||
<td colspan="6" class="lines-code lines-code-old ">{{/*
|
<td colspan="6" class="lines-code lines-code-old ">{{/*
|
||||||
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.root.locale}}{{/*
|
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/*
|
||||||
*/}}</td>
|
*/}}</td>
|
||||||
{{else if and (eq .GetType 3) $hasmatch}}{{/* DEL */}}
|
{{else if and (eq .GetType 3) $hasmatch}}{{/* DEL */}}
|
||||||
{{$match := index $section.Lines $line.Match}}
|
{{$match := index $section.Lines $line.Match}}
|
||||||
{{- $leftDiff := ""}}{{if $line.LeftIdx}}{{$leftDiff = $section.GetComputedInlineDiffFor $line $.root.locale}}{{end}}
|
{{- $leftDiff := ""}}{{if $line.LeftIdx}}{{$leftDiff = $section.GetComputedInlineDiffFor $line $.root.locale}}{{end}}
|
||||||
{{- $rightDiff := ""}}{{if $match.RightIdx}}{{$rightDiff = $section.GetComputedInlineDiffFor $match $.root.locale}}{{end}}
|
{{- $rightDiff := ""}}{{if $match.RightIdx}}{{$rightDiff = $section.GetComputedInlineDiffFor $match $.root.locale}}{{end}}
|
||||||
<td class="lines-num lines-num-old del-code" data-line-num="{{$line.LeftIdx}}"><span rel="diff-{{$file.NameHash}}L{{$line.LeftIdx}}"></span></td>
|
<td class="lines-num lines-num-old del-code" data-line-num="{{$line.LeftIdx}}"><span rel="diff-{{$file.NameHash}}L{{$line.LeftIdx}}"></span></td>
|
||||||
<td class="lines-escape del-code lines-escape-old">{{if $line.LeftIdx}}{{if $leftDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $leftDiff "locale" $.root.locale}}"></button>{{end}}{{end}}</td>
|
<td class="lines-escape del-code lines-escape-old">{{if $line.LeftIdx}}{{if $leftDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $leftDiff}}"></button>{{end}}{{end}}</td>
|
||||||
<td class="lines-type-marker lines-type-marker-old del-code"><span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td>
|
<td class="lines-type-marker lines-type-marker-old del-code"><span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td>
|
||||||
<td class="lines-code lines-code-old del-code">{{/*
|
<td class="lines-code lines-code-old del-code">{{/*
|
||||||
*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/*
|
*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/*
|
||||||
*/}}<button type="button" aria-label="{{$.root.locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-left{{if (not $line.CanComment)}} gt-invisible{{end}}" data-side="left" data-idx="{{$line.LeftIdx}}">{{/*
|
*/}}<button type="button" aria-label="{{ctx.Locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-left{{if (not $line.CanComment)}} gt-invisible{{end}}" data-side="left" data-idx="{{$line.LeftIdx}}">{{/*
|
||||||
*/}}{{svg "octicon-plus"}}{{/*
|
*/}}{{svg "octicon-plus"}}{{/*
|
||||||
*/}}</button>{{/*
|
*/}}</button>{{/*
|
||||||
*/}}{{end}}{{/*
|
*/}}{{end}}{{/*
|
||||||
*/}}{{if $line.LeftIdx}}{{/*
|
*/}}{{if $line.LeftIdx}}{{/*
|
||||||
*/}}{{template "repo/diff/section_code" dict "diff" $leftDiff "locale" $.root.locale}}{{/*
|
*/}}{{template "repo/diff/section_code" dict "diff" $leftDiff}}{{/*
|
||||||
*/}}{{else}}{{/*
|
*/}}{{else}}{{/*
|
||||||
*/}}<code class="code-inner"></code>{{/*
|
*/}}<code class="code-inner"></code>{{/*
|
||||||
*/}}{{end}}{{/*
|
*/}}{{end}}{{/*
|
||||||
*/}}</td>
|
*/}}</td>
|
||||||
<td class="lines-num lines-num-new add-code" data-line-num="{{if $match.RightIdx}}{{$match.RightIdx}}{{end}}"><span rel="{{if $match.RightIdx}}diff-{{$file.NameHash}}R{{$match.RightIdx}}{{end}}"></span></td>
|
<td class="lines-num lines-num-new add-code" data-line-num="{{if $match.RightIdx}}{{$match.RightIdx}}{{end}}"><span rel="{{if $match.RightIdx}}diff-{{$file.NameHash}}R{{$match.RightIdx}}{{end}}"></span></td>
|
||||||
<td class="lines-escape add-code lines-escape-new">{{if $match.RightIdx}}{{if $rightDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $rightDiff "locale" $.root.locale}}"></button>{{end}}{{end}}</td>
|
<td class="lines-escape add-code lines-escape-new">{{if $match.RightIdx}}{{if $rightDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $rightDiff}}"></button>{{end}}{{end}}</td>
|
||||||
<td class="lines-type-marker lines-type-marker-new add-code">{{if $match.RightIdx}}<span class="gt-mono" data-type-marker="{{$match.GetLineTypeMarker}}"></span>{{end}}</td>
|
<td class="lines-type-marker lines-type-marker-new add-code">{{if $match.RightIdx}}<span class="gt-mono" data-type-marker="{{$match.GetLineTypeMarker}}"></span>{{end}}</td>
|
||||||
<td class="lines-code lines-code-new add-code">{{/*
|
<td class="lines-code lines-code-new add-code">{{/*
|
||||||
*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/*
|
*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/*
|
||||||
*/}}<button type="button" aria-label="{{$.root.locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-right{{if (not $match.CanComment)}} gt-invisible{{end}}" data-side="right" data-idx="{{$match.RightIdx}}">{{/*
|
*/}}<button type="button" aria-label="{{ctx.Locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-right{{if (not $match.CanComment)}} gt-invisible{{end}}" data-side="right" data-idx="{{$match.RightIdx}}">{{/*
|
||||||
*/}}{{svg "octicon-plus"}}{{/*
|
*/}}{{svg "octicon-plus"}}{{/*
|
||||||
*/}}</button>{{/*
|
*/}}</button>{{/*
|
||||||
*/}}{{end}}{{/*
|
*/}}{{end}}{{/*
|
||||||
*/}}{{if $match.RightIdx}}{{/*
|
*/}}{{if $match.RightIdx}}{{/*
|
||||||
*/}}{{template "repo/diff/section_code" dict "diff" $rightDiff "locale" $.root.locale}}{{/*
|
*/}}{{template "repo/diff/section_code" dict "diff" $rightDiff}}{{/*
|
||||||
*/}}{{else}}{{/*
|
*/}}{{else}}{{/*
|
||||||
*/}}<code class="code-inner"></code>{{/*
|
*/}}<code class="code-inner"></code>{{/*
|
||||||
*/}}{{end}}{{/*
|
*/}}{{end}}{{/*
|
||||||
@ -75,31 +75,31 @@
|
|||||||
{{else}}
|
{{else}}
|
||||||
{{$inlineDiff := $section.GetComputedInlineDiffFor $line $.root.locale}}
|
{{$inlineDiff := $section.GetComputedInlineDiffFor $line $.root.locale}}
|
||||||
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{$file.NameHash}}L{{$line.LeftIdx}}{{end}}"></span></td>
|
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{$file.NameHash}}L{{$line.LeftIdx}}{{end}}"></span></td>
|
||||||
<td class="lines-escape lines-escape-old">{{if $line.LeftIdx}}{{if $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.root.locale}}"></button>{{end}}{{end}}</td>
|
<td class="lines-escape lines-escape-old">{{if $line.LeftIdx}}{{if $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}{{end}}</td>
|
||||||
<td class="lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span>{{end}}</td>
|
<td class="lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span>{{end}}</td>
|
||||||
<td class="lines-code lines-code-old">{{/*
|
<td class="lines-code lines-code-old">{{/*
|
||||||
*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 2))}}{{/*
|
*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 2))}}{{/*
|
||||||
*/}}<button type="button" aria-label="{{$.root.locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-left{{if (not $line.CanComment)}} gt-invisible{{end}}" data-side="left" data-idx="{{$line.LeftIdx}}">{{/*
|
*/}}<button type="button" aria-label="{{ctx.Locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-left{{if (not $line.CanComment)}} gt-invisible{{end}}" data-side="left" data-idx="{{$line.LeftIdx}}">{{/*
|
||||||
*/}}{{svg "octicon-plus"}}{{/*
|
*/}}{{svg "octicon-plus"}}{{/*
|
||||||
*/}}</button>{{/*
|
*/}}</button>{{/*
|
||||||
*/}}{{end}}{{/*
|
*/}}{{end}}{{/*
|
||||||
*/}}{{if $line.LeftIdx}}{{/*
|
*/}}{{if $line.LeftIdx}}{{/*
|
||||||
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.root.locale}}{{/*
|
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/*
|
||||||
*/}}{{else}}{{/*
|
*/}}{{else}}{{/*
|
||||||
*/}}<code class="code-inner"></code>{{/*
|
*/}}<code class="code-inner"></code>{{/*
|
||||||
*/}}{{end}}{{/*
|
*/}}{{end}}{{/*
|
||||||
*/}}</td>
|
*/}}</td>
|
||||||
<td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{$file.NameHash}}R{{$line.RightIdx}}{{end}}"></span></td>
|
<td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{$file.NameHash}}R{{$line.RightIdx}}{{end}}"></span></td>
|
||||||
<td class="lines-escape lines-escape-new">{{if $line.RightIdx}}{{if $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.root.locale}}"></button>{{end}}{{end}}</td>
|
<td class="lines-escape lines-escape-new">{{if $line.RightIdx}}{{if $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}{{end}}</td>
|
||||||
<td class="lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span>{{end}}</td>
|
<td class="lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span>{{end}}</td>
|
||||||
<td class="lines-code lines-code-new">{{/*
|
<td class="lines-code lines-code-new">{{/*
|
||||||
*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 3))}}{{/*
|
*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 3))}}{{/*
|
||||||
*/}}<button type="button" aria-label="{{$.root.locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-right{{if (not $line.CanComment)}} gt-invisible{{end}}" data-side="right" data-idx="{{$line.RightIdx}}">{{/*
|
*/}}<button type="button" aria-label="{{ctx.Locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-right{{if (not $line.CanComment)}} gt-invisible{{end}}" data-side="right" data-idx="{{$line.RightIdx}}">{{/*
|
||||||
*/}}{{svg "octicon-plus"}}{{/*
|
*/}}{{svg "octicon-plus"}}{{/*
|
||||||
*/}}</button>{{/*
|
*/}}</button>{{/*
|
||||||
*/}}{{end}}{{/*
|
*/}}{{end}}{{/*
|
||||||
*/}}{{if $line.RightIdx}}{{/*
|
*/}}{{if $line.RightIdx}}{{/*
|
||||||
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.root.locale}}{{/*
|
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/*
|
||||||
*/}}{{else}}{{/*
|
*/}}{{else}}{{/*
|
||||||
*/}}<code class="code-inner"></code>{{/*
|
*/}}<code class="code-inner"></code>{{/*
|
||||||
*/}}{{end}}{{/*
|
*/}}{{end}}{{/*
|
||||||
|
@ -41,22 +41,22 @@
|
|||||||
{{$inlineDiff := $section.GetComputedInlineDiffFor $line $.root.locale -}}
|
{{$inlineDiff := $section.GetComputedInlineDiffFor $line $.root.locale -}}
|
||||||
<td class="lines-escape">
|
<td class="lines-escape">
|
||||||
{{- if $inlineDiff.EscapeStatus.Escaped -}}
|
{{- if $inlineDiff.EscapeStatus.Escaped -}}
|
||||||
<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.root.locale}}"></button>
|
<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</td>
|
</td>
|
||||||
<td class="lines-type-marker"><span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td>
|
<td class="lines-type-marker"><span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td>
|
||||||
{{if eq .GetType 4}}
|
{{if eq .GetType 4}}
|
||||||
<td class="chroma lines-code blob-hunk">{{/*
|
<td class="chroma lines-code blob-hunk">{{/*
|
||||||
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.root.locale}}{{/*
|
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/*
|
||||||
*/}}</td>
|
*/}}</td>
|
||||||
{{else}}
|
{{else}}
|
||||||
<td class="chroma lines-code{{if (not $line.RightIdx)}} lines-code-old{{end}}">{{/*
|
<td class="chroma lines-code{{if (not $line.RightIdx)}} lines-code-old{{end}}">{{/*
|
||||||
*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/*
|
*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/*
|
||||||
*/}}<button type="button" aria-label="{{$.root.locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}{{if (not $line.CanComment)}} gt-invisible{{end}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">{{/*
|
*/}}<button type="button" aria-label="{{ctx.Locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}{{if (not $line.CanComment)}} gt-invisible{{end}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">{{/*
|
||||||
*/}}{{svg "octicon-plus"}}{{/*
|
*/}}{{svg "octicon-plus"}}{{/*
|
||||||
*/}}</button>{{/*
|
*/}}</button>{{/*
|
||||||
*/}}{{end}}{{/*
|
*/}}{{end}}{{/*
|
||||||
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.root.locale}}{{/*
|
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/*
|
||||||
*/}}</td>
|
*/}}</td>
|
||||||
{{end}}
|
{{end}}
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -34,12 +34,13 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div class="ui bottom attached active tab segment" data-tab="write">
|
<div class="ui bottom attached active tab segment" data-tab="write">
|
||||||
<textarea id="edit_area" name="content" class="gt-hidden" data-id="repo-{{.Repository.Name}}-{{.TreePath}}"
|
<textarea id="edit_area" name="content" class="gt-hidden"
|
||||||
|
data-id="repo-{{.Repository.Name}}-{{.TreePath}}"
|
||||||
data-url="{{.Repository.Link}}/markup"
|
data-url="{{.Repository.Link}}/markup"
|
||||||
data-context="{{.RepoLink}}"
|
data-context="{{.RepoLink}}"
|
||||||
data-previewable-extensions="{{.PreviewableExtensions}}"
|
data-previewable-extensions="{{.PreviewableExtensions}}"
|
||||||
data-line-wrap-extensions="{{.LineWrapExtensions}}">
|
data-line-wrap-extensions="{{.LineWrapExtensions}}"
|
||||||
{{.FileContent}}</textarea>
|
data-initial-value="{{JsonUtils.EncodeToString .FileContent}}"></textarea>
|
||||||
<div class="editor-loading is-loading"></div>
|
<div class="editor-loading is-loading"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui bottom attached tab segment markup" data-tab="preview">
|
<div class="ui bottom attached tab segment markup" data-tab="preview">
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
{{template "shared/combomarkdowneditor" (dict
|
{{template "shared/combomarkdowneditor" (dict
|
||||||
"locale" $.locale
|
|
||||||
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
|
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
|
||||||
"MarkdownPreviewContext" .RepoLink
|
"MarkdownPreviewContext" .RepoLink
|
||||||
"TextareaName" "content"
|
"TextareaName" "content"
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
{{if $useMarkdownEditor}}
|
{{if $useMarkdownEditor}}
|
||||||
{{template "shared/combomarkdowneditor" (dict
|
{{template "shared/combomarkdowneditor" (dict
|
||||||
"locale" .root.locale
|
|
||||||
"ContainerClasses" "gt-hidden"
|
"ContainerClasses" "gt-hidden"
|
||||||
"MarkdownPreviewUrl" (print .root.RepoLink "/markup")
|
"MarkdownPreviewUrl" (print .root.RepoLink "/markup")
|
||||||
"MarkdownPreviewContext" .root.RepoLink
|
"MarkdownPreviewContext" .root.RepoLink
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<form class="list-header-search ui form ignore-dirty">
|
<form class="list-header-search ui form ignore-dirty">
|
||||||
<div class="ui small search fluid action input">
|
<div class="ui small search fluid action input">
|
||||||
<input type="hidden" name="state" value="{{$.State}}">
|
<input type="hidden" name="state" value="{{$.State}}">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Keyword}}
|
{{template "shared/searchinput" dict "Value" .Keyword}}
|
||||||
<button class="ui small icon button" type="submit" aria-label="{{.locale.Tr "explore.search"}}">
|
<button class="ui small icon button" type="submit" aria-label="{{.locale.Tr "explore.search"}}">
|
||||||
{{svg "octicon-search"}}
|
{{svg "octicon-search"}}
|
||||||
</button>
|
</button>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<input type="hidden" name="project" value="{{$.ProjectID}}">
|
<input type="hidden" name="project" value="{{$.ProjectID}}">
|
||||||
<input type="hidden" name="assignee" value="{{$.AssigneeID}}">
|
<input type="hidden" name="assignee" value="{{$.AssigneeID}}">
|
||||||
<input type="hidden" name="poster" value="{{$.PosterID}}">
|
<input type="hidden" name="poster" value="{{$.PosterID}}">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Keyword}}
|
{{template "shared/searchinput" dict "Value" .Keyword}}
|
||||||
{{if .PageIsIssueList}}
|
{{if .PageIsIssueList}}
|
||||||
<button id="issue-list-quick-goto" class="ui small icon button gt-hidden" data-tooltip-content="{{.locale.Tr "explore.go_to"}}" data-repo-link="{{.RepoLink}}">{{svg "octicon-hash"}}</button>
|
<button id="issue-list-quick-goto" class="ui small icon button gt-hidden" data-tooltip-content="{{.locale.Tr "explore.go_to"}}" data-repo-link="{{.RepoLink}}">{{svg "octicon-hash"}}</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -47,8 +47,8 @@
|
|||||||
{{template "repo/issue/view_content/show_role" dict "ShowRole" .Issue.ShowRole "IgnorePoster" true}}
|
{{template "repo/issue/view_content/show_role" dict "ShowRole" .Issue.ShowRole "IgnorePoster" true}}
|
||||||
{{if not $.Repository.IsArchived}}
|
{{if not $.Repository.IsArchived}}
|
||||||
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}}
|
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}}
|
||||||
{{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" .Issue "delete" false "issue" true "diff" false "IsCommentPoster" $.IsIssuePoster}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" .Issue "delete" false "issue" true "diff" false "IsCommentPoster" $.IsIssuePoster}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui attached segment comment-body" role="article">
|
<div class="ui attached segment comment-body" role="article">
|
||||||
@ -147,7 +147,6 @@
|
|||||||
<div class="ui comment form">
|
<div class="ui comment form">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
{{template "shared/combomarkdowneditor" (dict
|
{{template "shared/combomarkdowneditor" (dict
|
||||||
"locale" $.locale
|
|
||||||
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
|
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
|
||||||
"MarkdownPreviewContext" .RepoLink
|
"MarkdownPreviewContext" .RepoLink
|
||||||
"TextareaName" "content"
|
"TextareaName" "content"
|
||||||
|
@ -53,8 +53,8 @@
|
|||||||
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
|
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
|
||||||
{{if not $.Repository.IsArchived}}
|
{{if not $.Repository.IsArchived}}
|
||||||
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
|
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
|
||||||
{{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui attached segment comment-body" role="article">
|
<div class="ui attached segment comment-body" role="article">
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
{{.ctxData.CsrfTokenHtml}}
|
{{.ctxData.CsrfTokenHtml}}
|
||||||
</form>
|
</form>
|
||||||
<div class="header">{{.ctxData.locale.Tr "repo.issues.del_time"}}</div>
|
<div class="header">{{.ctxData.locale.Tr "repo.issues.del_time"}}</div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" .ctxData.locale)}}
|
{{template "base/modal_actions_confirm"}}
|
||||||
</div>
|
</div>
|
||||||
<button class="ui icon button compact mini issue-delete-time" data-id="{{.comment.Time.ID}}" data-tooltip-content="{{.ctxData.locale.Tr "repo.issues.del_time"}}">
|
<button class="ui icon button compact mini issue-delete-time" data-id="{{.comment.Time.ID}}" data-tooltip-content="{{.ctxData.locale.Tr "repo.issues.del_time"}}">
|
||||||
{{svg "octicon-trash"}}
|
{{svg "octicon-trash"}}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
{{if .ctxData.IsSigned}}
|
|
||||||
<div class="item action ui dropdown jump pointing top right context-dropdown">
|
<div class="item action ui dropdown jump pointing top right context-dropdown">
|
||||||
<a class="context-menu muted">
|
<a class="context-menu muted">
|
||||||
{{svg "octicon-kebab-horizontal"}}
|
{{svg "octicon-kebab-horizontal"}}
|
||||||
@ -11,17 +10,18 @@
|
|||||||
{{$referenceUrl = printf "%s/files#%s" .ctxData.Issue.Link .item.HashTag}}
|
{{$referenceUrl = printf "%s/files#%s" .ctxData.Issue.Link .item.HashTag}}
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="item context js-aria-clickable" data-clipboard-text-type="url" data-clipboard-text="{{$referenceUrl}}">{{.ctxData.locale.Tr "repo.issues.context.copy_link"}}</div>
|
<div class="item context js-aria-clickable" data-clipboard-text-type="url" data-clipboard-text="{{$referenceUrl}}">{{.ctxData.locale.Tr "repo.issues.context.copy_link"}}</div>
|
||||||
<div class="item context js-aria-clickable quote-reply {{if .diff}}quote-reply-diff{{end}}" data-target="{{.item.HashTag}}-raw">{{.ctxData.locale.Tr "repo.issues.context.quote_reply"}}</div>
|
{{if and .ctxData.IsSigned (not .ctxData.Repository.IsArchived)}}
|
||||||
{{if not .ctxData.UnitIssuesGlobalDisabled}}
|
<div class="item context js-aria-clickable quote-reply {{if .diff}}quote-reply-diff{{end}}" data-target="{{.item.HashTag}}-raw">{{.ctxData.locale.Tr "repo.issues.context.quote_reply"}}</div>
|
||||||
<div class="item context js-aria-clickable reference-issue" data-target="{{.item.HashTag}}-raw" data-modal="#reference-issue-modal" data-poster="{{.item.Poster.GetDisplayName}}" data-poster-username="{{.item.Poster.Name}}" data-reference="{{$referenceUrl}}">{{.ctxData.locale.Tr "repo.issues.context.reference_issue"}}</div>
|
{{if not .ctxData.UnitIssuesGlobalDisabled}}
|
||||||
{{end}}
|
<div class="item context js-aria-clickable reference-issue" data-target="{{.item.HashTag}}-raw" data-modal="#reference-issue-modal" data-poster="{{.item.Poster.GetDisplayName}}" data-poster-username="{{.item.Poster.Name}}" data-reference="{{$referenceUrl}}">{{.ctxData.locale.Tr "repo.issues.context.reference_issue"}}</div>
|
||||||
{{if or .ctxData.Permission.IsAdmin .IsCommentPoster .ctxData.HasIssuesOrPullsWritePermission}}
|
{{end}}
|
||||||
<div class="divider"></div>
|
{{if or .ctxData.Permission.IsAdmin .IsCommentPoster .ctxData.HasIssuesOrPullsWritePermission}}
|
||||||
<div class="item context js-aria-clickable edit-content">{{.ctxData.locale.Tr "repo.issues.context.edit"}}</div>
|
<div class="divider"></div>
|
||||||
{{if .delete}}
|
<div class="item context js-aria-clickable edit-content">{{.ctxData.locale.Tr "repo.issues.context.edit"}}</div>
|
||||||
<div class="item context js-aria-clickable delete-comment" data-comment-id={{.item.HashTag}} data-url="{{.ctxData.RepoLink}}/comments/{{.item.ID}}/delete" data-locale="{{.ctxData.locale.Tr "repo.issues.delete_comment_confirm"}}">{{.ctxData.locale.Tr "repo.issues.context.delete"}}</div>
|
{{if .delete}}
|
||||||
|
<div class="item context js-aria-clickable delete-comment" data-comment-id={{.item.HashTag}} data-url="{{.ctxData.RepoLink}}/comments/{{.item.ID}}/delete" data-locale="{{.ctxData.locale.Tr "repo.issues.delete_comment_confirm"}}">{{.ctxData.locale.Tr "repo.issues.context.delete"}}</div>
|
||||||
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
|
||||||
|
@ -373,7 +373,7 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if and .ShowMergeInstructions .Issue.PullRequest.HeadRepo (not .Issue.PullRequest.HasMerged) (not .Issue.IsClosed)}}
|
{{if and .ShowMergeInstructions .Issue.PullRequest.HeadRepo (not .Issue.PullRequest.HasMerged) (not .Issue.IsClosed)}}
|
||||||
{{template "repo/issue/view_content/pull_merge_instruction" (dict "locale" .locale "Issue" .Issue)}}
|
{{template "repo/issue/view_content/pull_merge_instruction" .Issue.PullRequest}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<div class="instruct-toggle"> {{$.locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div>
|
<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div>
|
||||||
<div class="instruct-content gt-mt-3 gt-hidden">
|
<div class="instruct-content gt-mt-3 gt-hidden">
|
||||||
<div><h3 class="gt-dib">{{$.locale.Tr "step1"}}</h3> {{$.locale.Tr "repo.pulls.merge_instruction_step1_desc"}}</div>
|
<div><h3 class="gt-dib">{{ctx.Locale.Tr "step1"}}</h3> {{ctx.Locale.Tr "repo.pulls.merge_instruction_step1_desc"}}</div>
|
||||||
<div class="ui secondary segment">
|
<div class="ui secondary segment">
|
||||||
{{if eq $.Issue.PullRequest.Flow 0}}
|
{{if eq .Flow 0}}
|
||||||
<div>git checkout -b {{if ne $.Issue.PullRequest.HeadRepo.ID $.Issue.PullRequest.BaseRepo.ID}}{{$.Issue.PullRequest.HeadRepo.OwnerName}}-{{end}}{{$.Issue.PullRequest.HeadBranch}} {{$.Issue.PullRequest.BaseBranch}}</div>
|
<div>git checkout -b {{if ne .HeadRepo.ID .BaseRepo.ID}}{{.HeadRepo.OwnerName}}-{{end}}{{.HeadBranch}} {{.BaseBranch}}</div>
|
||||||
<div>git pull {{if ne $.Issue.PullRequest.HeadRepo.ID $.Issue.PullRequest.BaseRepo.ID}}<gitea-origin-url data-url="{{$.Issue.PullRequest.HeadRepo.Link}}"></gitea-origin-url>{{else}}origin{{end}} {{$.Issue.PullRequest.HeadBranch}}</div>
|
<div>git pull {{if ne .HeadRepo.ID .BaseRepo.ID}}<gitea-origin-url data-url="{{.HeadRepo.Link}}"></gitea-origin-url>{{else}}origin{{end}} {{.HeadBranch}}</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div>git fetch origin {{$.Issue.PullRequest.GetGitRefName}}:{{$.Issue.PullRequest.HeadBranch}}</div>
|
<div>git fetch origin {{.GetGitRefName}}:{{.HeadBranch}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div><h3 class="gt-dib">{{$.locale.Tr "step2"}}</h3> {{$.locale.Tr "repo.pulls.merge_instruction_step2_desc"}}</div>
|
<div><h3 class="gt-dib">{{ctx.Locale.Tr "step2"}}</h3> {{ctx.Locale.Tr "repo.pulls.merge_instruction_step2_desc"}}</div>
|
||||||
<div class="ui secondary segment">
|
<div class="ui secondary segment">
|
||||||
<div>git checkout {{$.Issue.PullRequest.BaseBranch}}</div>
|
<div>git checkout {{.BaseBranch}}</div>
|
||||||
<div>git merge --no-ff {{if ne $.Issue.PullRequest.HeadRepo.ID $.Issue.PullRequest.BaseRepo.ID}}{{$.Issue.PullRequest.HeadRepo.OwnerName}}-{{end}}{{$.Issue.PullRequest.HeadBranch}}</div>
|
<div>git merge --no-ff {{if ne .HeadRepo.ID .BaseRepo.ID}}{{.HeadRepo.OwnerName}}-{{end}}{{.HeadBranch}}</div>
|
||||||
<div>git push origin {{$.Issue.PullRequest.BaseBranch}}</div>
|
<div>git push origin {{.BaseBranch}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
{{template "shared/combomarkdowneditor" (dict
|
{{template "shared/combomarkdowneditor" (dict
|
||||||
"locale" $.locale
|
|
||||||
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
|
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
|
||||||
"MarkdownPreviewContext" .RepoLink
|
"MarkdownPreviewContext" .RepoLink
|
||||||
"TextareaName" "content"
|
"TextareaName" "content"
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<form class="ui form" action="{{$.Link}}/delete/{{.Oid}}" method="post">
|
<form class="ui form" action="{{$.Link}}/delete/{{.Oid}}" method="post">
|
||||||
{{$.CsrfTokenHtml}}
|
{{$.CsrfTokenHtml}}
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonColors" "yellow")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonColors" "yellow")}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<div class="ui detail icon button">
|
<div class="ui detail icon button">
|
||||||
{{if .verification.Verified}}
|
{{if .verification.Verified}}
|
||||||
<div title="{{if eq .verification.TrustStatus "trusted"}}{{else if eq .verification.TrustStatus "untrusted"}}{{$.root.locale.Tr "repo.commits.signed_by_untrusted_user"}}: {{else}}{{$.root.locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: {{end}}{{.verification.Reason}}">
|
<div title="{{if eq .verification.TrustStatus "trusted"}}{{else if eq .verification.TrustStatus "untrusted"}}{{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user"}}: {{else}}{{ctx.Locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: {{end}}{{.verification.Reason}}">
|
||||||
{{if ne .verification.SigningUser.ID 0}}
|
{{if ne .verification.SigningUser.ID 0}}
|
||||||
{{svg "gitea-lock"}}
|
{{svg "gitea-lock"}}
|
||||||
{{ctx.AvatarUtils.Avatar .verification.SigningUser 28 "signature"}}
|
{{ctx.AvatarUtils.Avatar .verification.SigningUser 28 "signature"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<span title="{{$.root.locale.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog"}}</span>
|
<span title="{{ctx.Locale.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog"}}</span>
|
||||||
{{ctx.AvatarUtils.AvatarByEmail .verification.SigningEmail "" 28 "signature"}}
|
{{ctx.AvatarUtils.AvatarByEmail .verification.SigningEmail "" 28 "signature"}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span title="{{$.root.locale.Tr .verification.Reason}}">{{svg "gitea-unlock"}}</span>
|
<span title="{{ctx.Locale.Tr .verification.Reason}}">{{svg "gitea-unlock"}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,20 +3,20 @@
|
|||||||
<div class="ui warning message unicode-escape-prompt gt-text-left">
|
<div class="ui warning message unicode-escape-prompt gt-text-left">
|
||||||
<button class="close icon hide-panel button" data-panel-closest=".message">{{svg "octicon-x" 16 "close inside"}}</button>
|
<button class="close icon hide-panel button" data-panel-closest=".message">{{svg "octicon-x" 16 "close inside"}}</button>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
{{$.root.locale.Tr "repo.invisible_runes_header"}}
|
{{ctx.Locale.Tr "repo.invisible_runes_header"}}
|
||||||
</div>
|
</div>
|
||||||
<p>{{$.root.locale.Tr "repo.invisible_runes_description" | Str2html}}</p>
|
<p>{{ctx.Locale.Tr "repo.invisible_runes_description" | Str2html}}</p>
|
||||||
{{if .EscapeStatus.HasAmbiguous}}
|
{{if .EscapeStatus.HasAmbiguous}}
|
||||||
<p>{{$.root.locale.Tr "repo.ambiguous_runes_description" | Str2html}}</p>
|
<p>{{ctx.Locale.Tr "repo.ambiguous_runes_description" | Str2html}}</p>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{else if .EscapeStatus.HasAmbiguous}}
|
{{else if .EscapeStatus.HasAmbiguous}}
|
||||||
<div class="ui warning message unicode-escape-prompt gt-text-left">
|
<div class="ui warning message unicode-escape-prompt gt-text-left">
|
||||||
<button class="close icon hide-panel button" data-panel-closest=".message">{{svg "octicon-x" 16 "close inside"}}</button>
|
<button class="close icon hide-panel button" data-panel-closest=".message">{{svg "octicon-x" 16 "close inside"}}</button>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
{{$.root.locale.Tr "repo.ambiguous_runes_header"}}
|
{{ctx.Locale.Tr "repo.ambiguous_runes_header"}}
|
||||||
</div>
|
</div>
|
||||||
<p>{{$.root.locale.Tr "repo.ambiguous_runes_description" | Str2html}}</p>
|
<p>{{ctx.Locale.Tr "repo.ambiguous_runes_description" | Str2html}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
{{$content = .locale.Tr "repo.wiki.welcome"}}
|
{{$content = .locale.Tr "repo.wiki.welcome"}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{template "shared/combomarkdowneditor" (dict
|
{{template "shared/combomarkdowneditor" (dict
|
||||||
"locale" $.locale
|
|
||||||
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
|
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
|
||||||
"MarkdownPreviewContext" .RepoLink
|
"MarkdownPreviewContext" .RepoLink
|
||||||
"TextareaName" "content"
|
"TextareaName" "content"
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<div class="runner-basic-info">
|
<div class="runner-basic-info">
|
||||||
<div class="field gt-dib gt-mr-4">
|
<div class="field gt-dib gt-mr-4">
|
||||||
<label>{{.locale.Tr "actions.runners.status"}}</label>
|
<label>{{.locale.Tr "actions.runners.status"}}</label>
|
||||||
<span class="runner-status-{{if .Runner.IsOnline}}online{{else}}offline{{end}}">{{.Runner.StatusLocaleName $.locale}}</span>
|
<span class="ui {{if .Runner.IsOnline}}green{{else}}basic{{end}} label">{{.Runner.StatusLocaleName $.locale}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="field gt-dib gt-mr-4">
|
<div class="field gt-dib gt-mr-4">
|
||||||
<label>{{.locale.Tr "actions.runners.last_online"}}</label>
|
<label>{{.locale.Tr "actions.runners.last_online"}}</label>
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
<div class="runner-container">
|
<div class="runner-container">
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.locale.Tr "actions.runners.runner_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
|
{{ctx.Locale.Tr "actions.runners.runner_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}})
|
||||||
<div class="ui right">
|
<div class="ui right">
|
||||||
<div class="ui top right pointing dropdown">
|
<div class="ui top right pointing dropdown">
|
||||||
<button class="ui primary tiny button">
|
<button class="ui primary tiny button">
|
||||||
{{.locale.Tr "actions.runners.new"}}
|
{{ctx.Locale.Tr "actions.runners.new"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
</button>
|
</button>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
{{/* TODO: replece the document link when there's a better one than the README of act_runner */}}
|
<a href="https://docs.gitea.com/usage/actions/act-runner">{{ctx.Locale.Tr "actions.runners.new_notice"}}</a>
|
||||||
<a href="https://gitea.com/gitea/act_runner/src/branch/main/README.md">{{.locale.Tr "actions.runners.new_notice"}}</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
@ -19,13 +18,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ui input">
|
<div class="ui input">
|
||||||
<input type="text" value="{{.RegistrationToken}}">
|
<input type="text" value="{{.RegistrationToken}}">
|
||||||
<button class="ui basic label button" aria-label="{{.locale.Tr "copy"}}" data-clipboard-text="{{.RegistrationToken}}">
|
<button class="ui basic label button" aria-label="{{ctx.Locale.Tr "copy"}}" data-clipboard-text="{{.RegistrationToken}}">
|
||||||
{{svg "octicon-copy" 14}}
|
{{svg "octicon-copy" 14}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<a href="{{$.Link}}/reset_registration_token">Reset registration token</a>
|
<a href="{{$.Link}}/reset_registration_token">{{ctx.Locale.Tr "actions.runners.reset_registration_token"}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -36,8 +35,8 @@
|
|||||||
<form class="ui form ignore-dirty" id="user-list-search-form" action="{{$.Link}}">
|
<form class="ui form ignore-dirty" id="user-list-search-form" action="{{$.Link}}">
|
||||||
<!-- Search Text -->
|
<!-- Search Text -->
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
|
||||||
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
|
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -46,22 +45,22 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-sortt-asc="online" data-sortt-desc="offline">
|
<th data-sortt-asc="online" data-sortt-desc="offline">
|
||||||
{{.locale.Tr "actions.runners.status"}}
|
{{ctx.Locale.Tr "actions.runners.status"}}
|
||||||
{{SortArrow "online" "offline" .SortType false}}
|
{{SortArrow "online" "offline" .SortType false}}
|
||||||
</th>
|
</th>
|
||||||
<th data-sortt-asc="newest" data-sortt-desc="oldest">
|
<th data-sortt-asc="newest" data-sortt-desc="oldest">
|
||||||
{{.locale.Tr "actions.runners.id"}}
|
{{ctx.Locale.Tr "actions.runners.id"}}
|
||||||
{{SortArrow "oldest" "newest" .SortType false}}
|
{{SortArrow "oldest" "newest" .SortType false}}
|
||||||
</th>
|
</th>
|
||||||
<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically">
|
<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically">
|
||||||
{{.locale.Tr "actions.runners.name"}}
|
{{ctx.Locale.Tr "actions.runners.name"}}
|
||||||
{{SortArrow "alphabetically" "reversealphabetically" .SortType false}}
|
{{SortArrow "alphabetically" "reversealphabetically" .SortType false}}
|
||||||
</th>
|
</th>
|
||||||
<th>{{.locale.Tr "actions.runners.version"}}</th>
|
<th>{{ctx.Locale.Tr "actions.runners.version"}}</th>
|
||||||
<th>{{.locale.Tr "actions.runners.owner_type"}}</th>
|
<th>{{ctx.Locale.Tr "actions.runners.owner_type"}}</th>
|
||||||
<th>{{.locale.Tr "actions.runners.labels"}}</th>
|
<th>{{ctx.Locale.Tr "actions.runners.labels"}}</th>
|
||||||
<th>{{.locale.Tr "actions.runners.last_online"}}</th>
|
<th>{{ctx.Locale.Tr "actions.runners.last_online"}}</th>
|
||||||
<th>{{.locale.Tr "edit"}}</th>
|
<th>{{ctx.Locale.Tr "edit"}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -69,16 +68,16 @@
|
|||||||
{{range .Runners}}
|
{{range .Runners}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<span class="runner-status-{{if .IsOnline}}online{{else}}offline{{end}}">{{.StatusLocaleName $.locale}}</span>
|
<span class="ui {{if .IsOnline}}green{{else}}basic{{end}} label">{{.StatusLocaleName $.locale}}</span>
|
||||||
</td>
|
</td>
|
||||||
<td>{{.ID}}</td>
|
<td>{{.ID}}</td>
|
||||||
<td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td>
|
<td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td>
|
||||||
<td>{{if .Version}}{{.Version}}{{else}}{{$.locale.Tr "unknown"}}{{end}}</td>
|
<td>{{if .Version}}{{.Version}}{{else}}{{ctx.Locale.Tr "unknown"}}{{end}}</td>
|
||||||
<td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString $.locale}}</span></td>
|
<td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString $.locale}}</span></td>
|
||||||
<td class="runner-tags">
|
<td class="runner-tags">
|
||||||
{{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}}
|
{{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}}
|
||||||
</td>
|
</td>
|
||||||
<td>{{if .LastOnline}}{{TimeSinceUnix .LastOnline $.locale}}{{else}}{{$.locale.Tr "never"}}{{end}}</td>
|
<td>{{if .LastOnline}}{{TimeSinceUnix .LastOnline $.locale}}{{else}}{{ctx.Locale.Tr "never"}}{{end}}</td>
|
||||||
<td class="runner-ops">
|
<td class="runner-ops">
|
||||||
{{if .Editable $.RunnerOwnerID $.RunnerRepoID}}
|
{{if .Editable $.RunnerOwnerID $.RunnerRepoID}}
|
||||||
<a href="{{$.Link}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
|
<a href="{{$.Link}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
|
||||||
@ -88,7 +87,7 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="center aligned" colspan="6">{{.locale.Tr "actions.runners.none"}}</td>
|
<td class="center aligned" colspan="8">{{ctx.Locale.Tr "actions.runners.none"}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{{/*
|
{{/*
|
||||||
Template Attributes:
|
Template Attributes:
|
||||||
* locale: passed through for localization
|
|
||||||
* ContainerId: id attribute for the container element
|
* ContainerId: id attribute for the container element
|
||||||
* ContainerClasses: additional classes for the container element
|
* ContainerClasses: additional classes for the container element
|
||||||
* MarkdownPreviewUrl: preview url for the preview tab
|
* MarkdownPreviewUrl: preview url for the preview tab
|
||||||
@ -15,34 +14,34 @@ Template Attributes:
|
|||||||
<div {{if .ContainerId}}id="{{.ContainerId}}"{{end}} class="combo-markdown-editor {{.ContainerClasses}}" data-dropzone-parent-container="{{.DropzoneParentContainer}}">
|
<div {{if .ContainerId}}id="{{.ContainerId}}"{{end}} class="combo-markdown-editor {{.ContainerClasses}}" data-dropzone-parent-container="{{.DropzoneParentContainer}}">
|
||||||
{{if .MarkdownPreviewUrl}}
|
{{if .MarkdownPreviewUrl}}
|
||||||
<div class="ui top tabular menu">
|
<div class="ui top tabular menu">
|
||||||
<a class="active item" data-tab-for="markdown-writer">{{.locale.Tr "write"}}</a>
|
<a class="active item" data-tab-for="markdown-writer">{{ctx.Locale.Tr "write"}}</a>
|
||||||
<a class="item" data-tab-for="markdown-previewer" data-preview-url="{{.MarkdownPreviewUrl}}" data-preview-context="{{.MarkdownPreviewContext}}">{{.locale.Tr "preview"}}</a>
|
<a class="item" data-tab-for="markdown-previewer" data-preview-url="{{.MarkdownPreviewUrl}}" data-preview-context="{{.MarkdownPreviewContext}}">{{ctx.Locale.Tr "preview"}}</a>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="ui tab active" data-tab-panel="markdown-writer">
|
<div class="ui tab active" data-tab-panel="markdown-writer">
|
||||||
<markdown-toolbar>
|
<markdown-toolbar>
|
||||||
<div class="markdown-toolbar-group">
|
<div class="markdown-toolbar-group">
|
||||||
<md-header class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.heading.tooltip"}}">{{svg "octicon-heading"}}</md-header>
|
<md-header class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.heading.tooltip"}}">{{svg "octicon-heading"}}</md-header>
|
||||||
<md-bold class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.bold.tooltip"}}">{{svg "octicon-bold"}}</md-bold>
|
<md-bold class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.bold.tooltip"}}">{{svg "octicon-bold"}}</md-bold>
|
||||||
<md-italic class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.italic.tooltip"}}">{{svg "octicon-italic"}}</md-italic>
|
<md-italic class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.italic.tooltip"}}">{{svg "octicon-italic"}}</md-italic>
|
||||||
</div>
|
</div>
|
||||||
<div class="markdown-toolbar-group">
|
<div class="markdown-toolbar-group">
|
||||||
<md-quote class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.quote.tooltip"}}">{{svg "octicon-quote"}}</md-quote>
|
<md-quote class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.quote.tooltip"}}">{{svg "octicon-quote"}}</md-quote>
|
||||||
<md-code class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.code.tooltip"}}">{{svg "octicon-code"}}</md-code>
|
<md-code class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.code.tooltip"}}">{{svg "octicon-code"}}</md-code>
|
||||||
<md-link class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.link.tooltip"}}">{{svg "octicon-link"}}</md-link>
|
<md-link class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.link.tooltip"}}">{{svg "octicon-link"}}</md-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="markdown-toolbar-group">
|
<div class="markdown-toolbar-group">
|
||||||
<md-unordered-list class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.list.unordered.tooltip"}}">{{svg "octicon-list-unordered"}}</md-unordered-list>
|
<md-unordered-list class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.list.unordered.tooltip"}}">{{svg "octicon-list-unordered"}}</md-unordered-list>
|
||||||
<md-ordered-list class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.list.ordered.tooltip"}}">{{svg "octicon-list-ordered"}}</md-ordered-list>
|
<md-ordered-list class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.list.ordered.tooltip"}}">{{svg "octicon-list-ordered"}}</md-ordered-list>
|
||||||
<md-task-list class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.list.task.tooltip"}}">{{svg "octicon-tasklist"}}</md-task-list>
|
<md-task-list class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.list.task.tooltip"}}">{{svg "octicon-tasklist"}}</md-task-list>
|
||||||
</div>
|
</div>
|
||||||
<div class="markdown-toolbar-group">
|
<div class="markdown-toolbar-group">
|
||||||
<md-mention class="markdown-toolbar-button" data-tooltip-content="{{.locale.Tr "editor.buttons.mention.tooltip"}}">{{svg "octicon-mention"}}</md-mention>
|
<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="{{.locale.Tr "editor.buttons.ref.tooltip"}}">{{svg "octicon-cross-reference"}}</md-ref>
|
<md-ref class="markdown-toolbar-button" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.ref.tooltip"}}">{{svg "octicon-cross-reference"}}</md-ref>
|
||||||
</div>
|
</div>
|
||||||
<div class="markdown-toolbar-group">
|
<div class="markdown-toolbar-group">
|
||||||
<button class="markdown-toolbar-button markdown-switch-monospace" role="switch" data-enable-text="{{.locale.Tr "editor.buttons.enable_monospace_font"}}" data-disable-text="{{.locale.Tr "editor.buttons.disable_monospace_font"}}">{{svg "octicon-typography"}}</button>
|
<button class="markdown-toolbar-button markdown-switch-monospace" role="switch" data-enable-text="{{ctx.Locale.Tr "editor.buttons.enable_monospace_font"}}" data-disable-text="{{ctx.Locale.Tr "editor.buttons.disable_monospace_font"}}">{{svg "octicon-typography"}}</button>
|
||||||
<button class="markdown-toolbar-button markdown-switch-easymde" data-tooltip-content="{{.locale.Tr "editor.buttons.switch_to_legacy.tooltip"}}">{{svg "octicon-arrow-switch"}}</button>
|
<button class="markdown-toolbar-button markdown-switch-easymde" data-tooltip-content="{{ctx.Locale.Tr "editor.buttons.switch_to_legacy.tooltip"}}">{{svg "octicon-arrow-switch"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</markdown-toolbar>
|
</markdown-toolbar>
|
||||||
<text-expander keys=": @" suffix="">
|
<text-expander keys=": @" suffix="">
|
||||||
@ -55,6 +54,6 @@ Template Attributes:
|
|||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui tab markup" data-tab-panel="markdown-previewer">
|
<div class="ui tab markup" data-tab-panel="markdown-previewer">
|
||||||
{{.locale.Tr "loading"}}
|
{{ctx.Locale.Tr "loading"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1 +1 @@
|
|||||||
<input type="search" spellcheck="false" name="q" maxlength="255" placeholder="{{.locale.Tr "explore.search"}}…"{{if .Value}} value="{{.Value}}"{{end}}{{if .AutoFocus}} autofocus{{end}}{{if .Disabled}} disabled{{end}}>
|
<input type="search" spellcheck="false" name="q" maxlength="255" placeholder="{{ctx.Locale.Tr "explore.search"}}…"{{if .Value}} value="{{.Value}}"{{end}}{{if .AutoFocus}} autofocus{{end}}{{if .Disabled}} disabled{{end}}>
|
||||||
|
@ -76,6 +76,6 @@
|
|||||||
></textarea>
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonTypes" "confirm")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
></textarea>
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonTypes" "confirm")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}},{{end}}]">
|
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}},{{end}}]">
|
||||||
<input type="hidden" name="sort" value="{{$.SortType}}">
|
<input type="hidden" name="sort" value="{{$.SortType}}">
|
||||||
<input type="hidden" name="state" value="{{$.State}}">
|
<input type="hidden" name="state" value="{{$.State}}">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" $.Keyword}}
|
{{template "shared/searchinput" dict "Value" $.Keyword}}
|
||||||
<button id="issue-list-quick-goto" class="ui small icon button gt-hidden" data-tooltip-content="{{.locale.Tr "explore.go_to"}}">{{svg "octicon-hash"}}</button>
|
<button id="issue-list-quick-goto" class="ui small icon button gt-hidden" data-tooltip-content="{{.locale.Tr "explore.go_to"}}">{{svg "octicon-hash"}}</button>
|
||||||
<button class="ui small icon button" aria-label="{{.locale.Tr "explore.search"}}">{{svg "octicon-search"}}</button>
|
<button class="ui small icon button" aria-label="{{.locale.Tr "explore.search"}}">{{svg "octicon-search"}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}},{{end}}]">
|
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}},{{end}}]">
|
||||||
<input type="hidden" name="sort" value="{{$.SortType}}">
|
<input type="hidden" name="sort" value="{{$.SortType}}">
|
||||||
<input type="hidden" name="state" value="{{$.State}}">
|
<input type="hidden" name="state" value="{{$.State}}">
|
||||||
{{template "shared/searchinput" dict "locale" .locale "Value" $.Keyword}}
|
{{template "shared/searchinput" dict "Value" $.Keyword}}
|
||||||
<button class="ui small icon button" type="submit" aria-label="{{.locale.Tr "explore.search"}}">{{svg "octicon-search"}}</button>
|
<button class="ui small icon button" type="submit" aria-label="{{.locale.Tr "explore.search"}}">{{svg "octicon-search"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -109,7 +109,7 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<p>{{.locale.Tr "settings.access_token_deletion_desc"}}</p>
|
<p>{{.locale.Tr "settings.access_token_deletion_desc"}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonColors" "yellow")}}
|
{{template "base/modal_actions_confirm" (dict "ModalButtonColors" "yellow")}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{template "user/settings/layout_footer" .}}
|
{{template "user/settings/layout_footer" .}}
|
||||||
|
@ -18,12 +18,6 @@
|
|||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.runner-container .runner-status-online {
|
|
||||||
padding: 0.3em 0.5em;
|
|
||||||
background-color: var(--color-green);
|
|
||||||
color: var(--color-white);
|
|
||||||
}
|
|
||||||
|
|
||||||
.runner-container .runner-new-text {
|
.runner-container .runner-new-text {
|
||||||
color: var(--color-white);
|
color: var(--color-white);
|
||||||
}
|
}
|
||||||
|
@ -86,6 +86,7 @@ text-expander .suggestions {
|
|||||||
border-radius: var(--border-radius);
|
border-radius: var(--border-radius);
|
||||||
border: 1px solid var(--color-secondary);
|
border: 1px solid var(--color-secondary);
|
||||||
box-shadow: 0 .5rem 1rem var(--color-shadow);
|
box-shadow: 0 .5rem 1rem var(--color-shadow);
|
||||||
|
z-index: 100; /* needs to be > 20 to be on top of dropzone's .dz-details */
|
||||||
}
|
}
|
||||||
|
|
||||||
text-expander .suggestions li {
|
text-expander .suggestions li {
|
||||||
|
@ -62,7 +62,7 @@ export async function createMonaco(textarea, filename, editorOpts) {
|
|||||||
const monaco = await import(/* webpackChunkName: "monaco" */'monaco-editor');
|
const monaco = await import(/* webpackChunkName: "monaco" */'monaco-editor');
|
||||||
|
|
||||||
initLanguages(monaco);
|
initLanguages(monaco);
|
||||||
let {language, ...other} = editorOpts;
|
let {language, eol, ...other} = editorOpts;
|
||||||
if (!language) language = getLanguage(filename);
|
if (!language) language = getLanguage(filename);
|
||||||
|
|
||||||
const container = document.createElement('div');
|
const container = document.createElement('div');
|
||||||
@ -105,14 +105,28 @@ export async function createMonaco(textarea, filename, editorOpts) {
|
|||||||
monaco.languages.register({id: 'vs.editor.nullLanguage'});
|
monaco.languages.register({id: 'vs.editor.nullLanguage'});
|
||||||
monaco.languages.setLanguageConfiguration('vs.editor.nullLanguage', {});
|
monaco.languages.setLanguageConfiguration('vs.editor.nullLanguage', {});
|
||||||
|
|
||||||
|
// We encode the initial value in JSON on the backend to prevent browsers from
|
||||||
|
// discarding the \r during HTML parsing:
|
||||||
|
// https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream
|
||||||
|
const value = JSON.parse(textarea.getAttribute('data-initial-value') || '""');
|
||||||
|
textarea.value = value;
|
||||||
|
textarea.removeAttribute('data-initial-value');
|
||||||
|
|
||||||
const editor = monaco.editor.create(container, {
|
const editor = monaco.editor.create(container, {
|
||||||
value: textarea.value,
|
value,
|
||||||
theme: 'gitea',
|
theme: 'gitea',
|
||||||
language,
|
language,
|
||||||
...other,
|
...other,
|
||||||
});
|
});
|
||||||
|
|
||||||
const model = editor.getModel();
|
const model = editor.getModel();
|
||||||
|
|
||||||
|
// Monaco performs auto-detection of dominant EOL in the file, biased towards LF for
|
||||||
|
// empty files. If there is an editorconfig value, override this detected value.
|
||||||
|
if (eol in monaco.editor.EndOfLineSequence) {
|
||||||
|
model.setEOL(monaco.editor.EndOfLineSequence[eol]);
|
||||||
|
}
|
||||||
|
|
||||||
model.onDidChangeContent(() => {
|
model.onDidChangeContent(() => {
|
||||||
textarea.value = editor.getValue();
|
textarea.value = editor.getValue();
|
||||||
textarea.dispatchEvent(new Event('change')); // seems to be needed for jquery-are-you-sure
|
textarea.dispatchEvent(new Event('change')); // seems to be needed for jquery-are-you-sure
|
||||||
@ -187,5 +201,6 @@ function getEditorConfigOptions(ec) {
|
|||||||
opts.trimAutoWhitespace = ec.trim_trailing_whitespace === true;
|
opts.trimAutoWhitespace = ec.trim_trailing_whitespace === true;
|
||||||
opts.insertSpaces = ec.indent_style === 'space';
|
opts.insertSpaces = ec.indent_style === 'space';
|
||||||
opts.useTabStops = ec.indent_style === 'tab';
|
opts.useTabStops = ec.indent_style === 'tab';
|
||||||
|
opts.eol = ec.end_of_line?.toUpperCase();
|
||||||
return opts;
|
return opts;
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,9 @@ export function initGiteaFomantic() {
|
|||||||
$.fn.dropdown.settings.fullTextSearch = 'exact';
|
$.fn.dropdown.settings.fullTextSearch = 'exact';
|
||||||
// Do not use "cursor: pointer" for dropdown labels
|
// Do not use "cursor: pointer" for dropdown labels
|
||||||
$.fn.dropdown.settings.className.label += ' gt-cursor-default';
|
$.fn.dropdown.settings.className.label += ' gt-cursor-default';
|
||||||
|
// The default selector has a bug: if there is a "search input" in the "menu", Fomantic will only "focus the input" but not "toggle the menu" when the "dropdown icon" is clicked.
|
||||||
|
// Actually, the "search input in menu" shouldn't be considered as the dropdown's input
|
||||||
|
$.fn.dropdown.settings.selector.search = '> input.search, :not(.menu) > .search > input, :not(.menu) input.search';
|
||||||
// Always use Gitea's SVG icons
|
// Always use Gitea's SVG icons
|
||||||
$.fn.dropdown.settings.templates.label = function(_value, text, preserveHTML, className) {
|
$.fn.dropdown.settings.templates.label = function(_value, text, preserveHTML, className) {
|
||||||
const escape = $.fn.dropdown.settings.templates.escape;
|
const escape = $.fn.dropdown.settings.templates.escape;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user