mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-24 00:01:26 -04:00
Compare commits
7 Commits
a3348bfc4d
...
0c0d17f17e
Author | SHA1 | Date | |
---|---|---|---|
|
0c0d17f17e | ||
|
247927a9b5 | ||
|
0c72256ab4 | ||
|
08552f0076 | ||
|
eae555ff23 | ||
|
0e1b381ff6 | ||
|
30b46fb6fa |
@ -343,7 +343,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
|||||||
- `SSH_AUTHORIZED_PRINCIPALS_ALLOW`: **off** or **username, email**: \[off, username, email, anything\]: Specify the principals values that users are allowed to use as principal. When set to `anything` no checks are done on the principal string. When set to `off` authorized principal are not allowed to be set.
|
- `SSH_AUTHORIZED_PRINCIPALS_ALLOW`: **off** or **username, email**: \[off, username, email, anything\]: Specify the principals values that users are allowed to use as principal. When set to `anything` no checks are done on the principal string. When set to `off` authorized principal are not allowed to be set.
|
||||||
- `SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE`: **false/true**: Gitea will create a authorized_principals file by default when it is not using the internal ssh server and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is not `off`.
|
- `SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE`: **false/true**: Gitea will create a authorized_principals file by default when it is not using the internal ssh server and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is not `off`.
|
||||||
- `SSH_AUTHORIZED_PRINCIPALS_BACKUP`: **false/true**: Enable SSH Authorized Principals Backup when rewriting all keys, default is true if `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is not `off`.
|
- `SSH_AUTHORIZED_PRINCIPALS_BACKUP`: **false/true**: Enable SSH Authorized Principals Backup when rewriting all keys, default is true if `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is not `off`.
|
||||||
- `SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE`: **{{.AppPath}} --config={{.CustomConf}} serv key-{{.Key.ID}}**: Set the template for the command to passed on authorized keys. Possible keys are: AppPath, AppWorkPath, CustomConf, CustomPath, Key - where Key is a `models/asymkey.PublicKey` and the others are strings which are shellquoted.
|
- `SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE`: **`{{.AppPath}} --config={{.CustomConf}} serv key-{{.Key.ID}}`**: Set the template for the command to passed on authorized keys. Possible keys are: AppPath, AppWorkPath, CustomConf, CustomPath, Key - where Key is a `models/asymkey.PublicKey` and the others are strings which are shellquoted.
|
||||||
- `SSH_SERVER_CIPHERS`: **chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com**: For the built-in SSH server, choose the ciphers to support for SSH connections, for system SSH this setting has no effect.
|
- `SSH_SERVER_CIPHERS`: **chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com**: For the built-in SSH server, choose the ciphers to support for SSH connections, for system SSH this setting has no effect.
|
||||||
- `SSH_SERVER_KEY_EXCHANGES`: **curve25519-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1**: For the built-in SSH server, choose the key exchange algorithms to support for SSH connections, for system SSH this setting has no effect.
|
- `SSH_SERVER_KEY_EXCHANGES`: **curve25519-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1**: For the built-in SSH server, choose the key exchange algorithms to support for SSH connections, for system SSH this setting has no effect.
|
||||||
- `SSH_SERVER_MACS`: **hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1**: For the built-in SSH server, choose the MACs to support for SSH connections, for system SSH this setting has no effect
|
- `SSH_SERVER_MACS`: **hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1**: For the built-in SSH server, choose the MACs to support for SSH connections, for system SSH this setting has no effect
|
||||||
@ -1406,7 +1406,7 @@ Please note that using `self` is not recommended for most cases, as it could mak
|
|||||||
Additionally, it requires you to mirror all the actions you need to your Gitea instance, which may not be worth it.
|
Additionally, it requires you to mirror all the actions you need to your Gitea instance, which may not be worth it.
|
||||||
Therefore, please use `self` only if you understand what you are doing.
|
Therefore, please use `self` only if you understand what you are doing.
|
||||||
|
|
||||||
In earlier versions (<= 1.19), `DEFAULT_ACTIONS_URL` could be set to any custom URLs like `https://gitea.com` or `http://your-git-server,https://gitea.com`, and the default value was `https://gitea.com`.
|
In earlier versions (`<= 1.19`), `DEFAULT_ACTIONS_URL` could be set to any custom URLs like `https://gitea.com` or `http://your-git-server,https://gitea.com`, and the default value was `https://gitea.com`.
|
||||||
However, later updates removed those options, and now the only options are `github` and `self`, with the default value being `github`.
|
However, later updates removed those options, and now the only options are `github` and `self`, with the default value being `github`.
|
||||||
However, if you want to use actions from other git server, you can use a complete URL in `uses` field, it's supported by Gitea (but not GitHub).
|
However, if you want to use actions from other git server, you can use a complete URL in `uses` field, it's supported by Gitea (but not GitHub).
|
||||||
Like `uses: https://gitea.com/actions/checkout@v3` or `uses: http://your-git-server/actions/checkout@v3`.
|
Like `uses: https://gitea.com/actions/checkout@v3` or `uses: http://your-git-server/actions/checkout@v3`.
|
||||||
|
@ -335,7 +335,7 @@ menu:
|
|||||||
- `SSH_AUTHORIZED_PRINCIPALS_ALLOW`: **off** 或 **username, email**:\[off, username, email, anything\]:指定允许用户用作 principal 的值。当设置为 `anything` 时,对 principal 字符串不执行任何检查。当设置为 `off` 时,不允许设置授权的 principal。
|
- `SSH_AUTHORIZED_PRINCIPALS_ALLOW`: **off** 或 **username, email**:\[off, username, email, anything\]:指定允许用户用作 principal 的值。当设置为 `anything` 时,对 principal 字符串不执行任何检查。当设置为 `off` 时,不允许设置授权的 principal。
|
||||||
- `SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE`: **false/true**:当 Gitea 不使用内置 SSH 服务器且 `SSH_AUTHORIZED_PRINCIPALS_ALLOW` 不为 `off` 时,默认情况下 Gitea 会创建一个 authorized_principals 文件。
|
- `SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE`: **false/true**:当 Gitea 不使用内置 SSH 服务器且 `SSH_AUTHORIZED_PRINCIPALS_ALLOW` 不为 `off` 时,默认情况下 Gitea 会创建一个 authorized_principals 文件。
|
||||||
- `SSH_AUTHORIZED_PRINCIPALS_BACKUP`: **false/true**:在重写所有密钥时启用 SSH 授权 principal 备份,默认值为 true(如果 `SSH_AUTHORIZED_PRINCIPALS_ALLOW` 不为 `off`)。
|
- `SSH_AUTHORIZED_PRINCIPALS_BACKUP`: **false/true**:在重写所有密钥时启用 SSH 授权 principal 备份,默认值为 true(如果 `SSH_AUTHORIZED_PRINCIPALS_ALLOW` 不为 `off`)。
|
||||||
- `SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE`: **{{.AppPath}} --config={{.CustomConf}} serv key-{{.Key.ID}}**:设置用于传递授权密钥的命令模板。可能的密钥是:AppPath、AppWorkPath、CustomConf、CustomPath、Key,其中 Key 是 `models/asymkey.PublicKey`,其他是 shellquoted 字符串。
|
- `SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE`: **`{{.AppPath}} --config={{.CustomConf}} serv key-{{.Key.ID}}`**:设置用于传递授权密钥的命令模板。可能的密钥是:AppPath、AppWorkPath、CustomConf、CustomPath、Key,其中 Key 是 `models/asymkey.PublicKey`,其他是 shellquoted 字符串。
|
||||||
- `SSH_SERVER_CIPHERS`: **chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com**:对于内置的 SSH 服务器,选择支持的 SSH 连接的加密方法,对于系统 SSH,此设置无效。
|
- `SSH_SERVER_CIPHERS`: **chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com**:对于内置的 SSH 服务器,选择支持的 SSH 连接的加密方法,对于系统 SSH,此设置无效。
|
||||||
- `SSH_SERVER_KEY_EXCHANGES`: **curve25519-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1**:对于内置 SSH 服务器,选择支持的 SSH 连接的密钥交换算法,对于系统 SSH,此设置无效。
|
- `SSH_SERVER_KEY_EXCHANGES`: **curve25519-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1**:对于内置 SSH 服务器,选择支持的 SSH 连接的密钥交换算法,对于系统 SSH,此设置无效。
|
||||||
- `SSH_SERVER_MACS`: **hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1**:对于内置 SSH 服务器,选择支持的 SSH 连接的 MAC 算法,对于系统 SSH,此设置无效。
|
- `SSH_SERVER_MACS`: **hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1**:对于内置 SSH 服务器,选择支持的 SSH 连接的 MAC 算法,对于系统 SSH,此设置无效。
|
||||||
@ -1343,7 +1343,7 @@ PROXY_HOSTS = *.github.com
|
|||||||
此外,它要求您将所有所需的操作镜像到您的 Gitea 实例,这可能不值得。
|
此外,它要求您将所有所需的操作镜像到您的 Gitea 实例,这可能不值得。
|
||||||
因此,请仅在您了解自己在做什么的情况下使用 `self`。
|
因此,请仅在您了解自己在做什么的情况下使用 `self`。
|
||||||
|
|
||||||
在早期版本(<= 1.19)中,`DEFAULT_ACTIONS_URL` 可以设置为任何自定义 URL,例如 `https://gitea.com` 或 `http://your-git-server,https://gitea.com`,默认值为 `https://gitea.com`。
|
在早期版本(`<= 1.19`)中,`DEFAULT_ACTIONS_URL` 可以设置为任何自定义 URL,例如 `https://gitea.com` 或 `http://your-git-server,https://gitea.com`,默认值为 `https://gitea.com`。
|
||||||
然而,后来的更新删除了这些选项,现在唯一的选项是 `github` 和 `self`,默认值为 `github`。
|
然而,后来的更新删除了这些选项,现在唯一的选项是 `github` 和 `self`,默认值为 `github`。
|
||||||
但是,如果您想要使用其他 Git 服务器中的操作,您可以在 `uses` 字段中使用完整的 URL,Gitea 支持此功能(GitHub 不支持)。
|
但是,如果您想要使用其他 Git 服务器中的操作,您可以在 `uses` 字段中使用完整的 URL,Gitea 支持此功能(GitHub 不支持)。
|
||||||
例如 `uses: https://gitea.com/actions/checkout@v3` 或 `uses: http://your-git-server/actions/checkout@v3`。
|
例如 `uses: https://gitea.com/actions/checkout@v3` 或 `uses: http://your-git-server/actions/checkout@v3`。
|
||||||
|
@ -138,9 +138,9 @@ All Gitea instances have the built-in API and there is no way to disable it comp
|
|||||||
You can, however, disable showing its documentation by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini`.
|
You can, however, disable showing its documentation by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini`.
|
||||||
For more information, refer to Gitea's [API docs](development/api-usage.md).
|
For more information, refer to Gitea's [API docs](development/api-usage.md).
|
||||||
|
|
||||||
You can see the latest API (for example) on <https://try.gitea.io/api/swagger>.
|
You can see the latest API (for example) on https://try.gitea.io/api/swagger
|
||||||
|
|
||||||
You can also see an example of the `swagger.json` file at <https://try.gitea.io/swagger.v1.json>.
|
You can also see an example of the `swagger.json` file at https://try.gitea.io/swagger.v1.json
|
||||||
|
|
||||||
## Adjusting your server for public/private use
|
## Adjusting your server for public/private use
|
||||||
|
|
||||||
|
@ -142,9 +142,9 @@ Gitea不提供内置的Pages服务器。您需要一个专用的域名来提供
|
|||||||
但是,您可以在app.ini的api部分将ENABLE_SWAGGER设置为false,以禁用其文档显示。
|
但是,您可以在app.ini的api部分将ENABLE_SWAGGER设置为false,以禁用其文档显示。
|
||||||
有关更多信息,请参阅Gitea的[API文档](development/api-usage.md)。
|
有关更多信息,请参阅Gitea的[API文档](development/api-usage.md)。
|
||||||
|
|
||||||
您可以在上查看最新的API(例如)<https://try.gitea.io/api/swagger>。
|
您可以在上查看最新的API(例如)https://try.gitea.io/api/swagger
|
||||||
|
|
||||||
您还可以在上查看`swagger.json`文件的示例 <https://try.gitea.io/swagger.v1.json>。
|
您还可以在上查看`swagger.json`文件的示例 https://try.gitea.io/swagger.v1.json
|
||||||
|
|
||||||
## 调整服务器用于公共/私有使用
|
## 调整服务器用于公共/私有使用
|
||||||
|
|
||||||
|
@ -116,8 +116,8 @@ Pre and Post steps don't have their own section in the job log user interface.
|
|||||||
|
|
||||||
Previously (Pre 1.21.0), `[actions].DEFAULT_ACTIONS_URL` defaulted to `https://gitea.com`.
|
Previously (Pre 1.21.0), `[actions].DEFAULT_ACTIONS_URL` defaulted to `https://gitea.com`.
|
||||||
We have since restricted this option to only allow two values (`github` and `self`).
|
We have since restricted this option to only allow two values (`github` and `self`).
|
||||||
When set to `github`, the new default, Gitea will download non-fully-qualified actions from <https://github.com>.
|
When set to `github`, the new default, Gitea will download non-fully-qualified actions from `https://github.com`.
|
||||||
For example, if you use `uses: actions/checkout@v3`, it will download the checkout repository from <https://github.com/actions/checkout.git>.
|
For example, if you use `uses: actions/checkout@v3`, it will download the checkout repository from `https://github.com/actions/checkout.git`.
|
||||||
|
|
||||||
If you want to download an action from another git hoster, you can use an absolute URL, e.g. `uses: https://gitea.com/actions/checkout@v3`.
|
If you want to download an action from another git hoster, you can use an absolute URL, e.g. `uses: https://gitea.com/actions/checkout@v3`.
|
||||||
|
|
||||||
|
@ -2883,6 +2883,7 @@ packages.package_manage_panel = Package Management
|
|||||||
packages.total_size = Total Size: %s
|
packages.total_size = Total Size: %s
|
||||||
packages.unreferenced_size = Unreferenced Size: %s
|
packages.unreferenced_size = Unreferenced Size: %s
|
||||||
packages.cleanup = Clean up expired data
|
packages.cleanup = Clean up expired data
|
||||||
|
packages.cleanup.success = Cleaned up expired data successfully
|
||||||
packages.owner = Owner
|
packages.owner = Owner
|
||||||
packages.creator = Creator
|
packages.creator = Creator
|
||||||
packages.name = Name
|
packages.name = Name
|
||||||
@ -3529,6 +3530,7 @@ runs.actors_no_select = All actors
|
|||||||
runs.status_no_select = All status
|
runs.status_no_select = All status
|
||||||
runs.no_results = No results matched.
|
runs.no_results = No results matched.
|
||||||
runs.no_runs = The workflow has no runs yet.
|
runs.no_runs = The workflow has no runs yet.
|
||||||
|
runs.empty_commit_message = (empty commit message)
|
||||||
|
|
||||||
workflow.disable = Disable Workflow
|
workflow.disable = Disable Workflow
|
||||||
workflow.disable_success = Workflow '%s' disabled successfully.
|
workflow.disable_success = Workflow '%s' disabled successfully.
|
||||||
|
@ -331,6 +331,10 @@ func renderReadmeFile(ctx *context.Context, subfolder string, readmeFile *git.Tr
|
|||||||
|
|
||||||
ctx.Data["FileContent"] = buf.String()
|
ctx.Data["FileContent"] = buf.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !fInfo.isLFSFile && ctx.Repo.CanEnableEditor(ctx, ctx.Doer) {
|
||||||
|
ctx.Data["CanEditReadmeFile"] = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink string) {
|
func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink string) {
|
||||||
|
@ -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 "Value" .Keyword "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Keyword}}
|
||||||
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
|
<button class="ui primary button">{{ctx.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 "Value" .Keyword "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Keyword}}
|
||||||
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
|
<button class="ui primary button">{{ctx.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 "Value" .Query "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Query}}
|
||||||
<select class="ui dropdown" name="type">
|
<select class="ui dropdown" name="type">
|
||||||
<option value="">{{ctx.Locale.Tr "packages.filter.type"}}</option>
|
<option value="">{{ctx.Locale.Tr "packages.filter.type"}}</option>
|
||||||
<option value="all">{{ctx.Locale.Tr "packages.filter.type.all"}}</option>
|
<option value="all">{{ctx.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 "Value" .Keyword "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Keyword}}
|
||||||
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
|
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
<!-- Search Text -->
|
<!-- Search Text -->
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Keyword}}
|
||||||
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
|
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -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 "Value" .Keyword "AutoFocus" true "Disabled" .CodeIndexerUnavailable}}
|
{{template "shared/searchinput" dict "Value" .Keyword "Disabled" .CodeIndexerUnavailable}}
|
||||||
<div class="ui dropdown selection {{if .CodeIndexerUnavailable}} disabled{{end}}" data-tooltip-content="{{ctx.Locale.Tr "explore.search.type.tooltip"}}">
|
<div class="ui dropdown selection {{if .CodeIndexerUnavailable}} disabled{{end}}" data-tooltip-content="{{ctx.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">{{ctx.Locale.Tr (printf "explore.search.%s" (or .queryType "fuzzy"))}}</div>
|
<div class="text">{{ctx.Locale.Tr (printf "explore.search.%s" (or .queryType "fuzzy"))}}</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 "Value" .Keyword "AutoFocus" (not .ProfileReadme)}}
|
{{template "shared/searchinput" dict "Value" .Keyword}}
|
||||||
{{if .PageIsExploreRepositories}}
|
{{if .PageIsExploreRepositories}}
|
||||||
<input type="hidden" name="only_show_relevant" value="{{.OnlyShowRelevant}}">
|
<input type="hidden" name="only_show_relevant" value="{{.OnlyShowRelevant}}">
|
||||||
{{else if .TabName}}
|
{{else if .TabName}}
|
||||||
|
@ -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 "Value" .Keyword "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Keyword}}
|
||||||
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
|
<button class="ui primary button">{{ctx.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 "Value" .Query "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Query}}
|
||||||
<select class="ui dropdown" name="type">
|
<select class="ui dropdown" name="type">
|
||||||
<option value="">{{ctx.Locale.Tr "packages.filter.type"}}</option>
|
<option value="">{{ctx.Locale.Tr "packages.filter.type"}}</option>
|
||||||
<option value="all">{{ctx.Locale.Tr "packages.filter.type.all"}}</option>
|
<option value="all">{{ctx.Locale.Tr "packages.filter.type.all"}}</option>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<p><a href="{{.PackageDescriptor.PackageWebLink}}">{{.PackageDescriptor.Package.Name}}</a> / <strong>{{ctx.Locale.Tr "packages.versions"}}</strong></p>
|
<p><a href="{{.PackageDescriptor.PackageWebLink}}">{{.PackageDescriptor.Package.Name}}</a> / <strong>{{ctx.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 "Value" .Query "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Query}}
|
||||||
<select class="ui dropdown" name="sort">
|
<select class="ui dropdown" name="sort">
|
||||||
<option value="version_asc"{{if eq .Sort "version_asc"}} selected="selected"{{end}}>{{ctx.Locale.Tr "filter.string.asc"}}</option>
|
<option value="version_asc"{{if eq .Sort "version_asc"}} selected="selected"{{end}}>{{ctx.Locale.Tr "filter.string.asc"}}</option>
|
||||||
<option value="version_desc"{{if eq .Sort "version_desc"}} selected="selected"{{end}}>{{ctx.Locale.Tr "filter.string.desc"}}</option>
|
<option value="version_desc"{{if eq .Sort "version_desc"}} selected="selected"{{end}}>{{ctx.Locale.Tr "filter.string.desc"}}</option>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</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}}">
|
||||||
{{- .Title -}}
|
{{if .Title}}{{.Title}}{{else}}{{ctx.Locale.Tr "actions.runs.empty_commit_message"}}{{end}}
|
||||||
</a>
|
</a>
|
||||||
<div class="flex-item-body">
|
<div class="flex-item-body">
|
||||||
<b>{{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}}</b>:
|
<b>{{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}}</b>:
|
||||||
|
@ -61,6 +61,9 @@
|
|||||||
<button class="ui mini basic button unescape-button gt-mr-2 gt-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
|
<button class="ui mini basic button unescape-button gt-mr-2 gt-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
|
||||||
<button class="ui mini basic button escape-button gt-mr-2">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
|
<button class="ui mini basic button escape-button gt-mr-2">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{if and .ReadmeInList .CanEditReadmeFile}}
|
||||||
|
<a class="btn-octicon" data-tooltip-content="{{ctx.Locale.Tr "repo.editor.edit_this_file"}}" href="{{.RepoLink}}/_edit/{{PathEscapeSegments .BranchName}}/{{PathEscapeSegments .TreePath}}/{{PathEscapeSegments .FileName}}">{{svg "octicon-pencil"}}</a>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table unstackable segment">
|
<div class="ui attached table unstackable segment">
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<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 "Value" .Keyword "AutoFocus" true}}
|
{{template "shared/searchinput" dict "Value" .Keyword}}
|
||||||
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
|
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1 +1 @@
|
|||||||
<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}}>
|
<input type="search" spellcheck="false" name="q" maxlength="255" placeholder="{{ctx.Locale.Tr "explore.search"}}…"{{if .Value}} value="{{.Value}}"{{end}}{{if .Disabled}} disabled{{end}}>
|
||||||
|
@ -6,8 +6,9 @@ import {initDiffCommitSelect} from './repo-diff-commitselect.js';
|
|||||||
import {validateTextareaNonEmpty} from './comp/ComboMarkdownEditor.js';
|
import {validateTextareaNonEmpty} from './comp/ComboMarkdownEditor.js';
|
||||||
import {initViewedCheckboxListenerFor, countAndUpdateViewedFiles, initExpandAndCollapseFilesButton} from './pull-view-file.js';
|
import {initViewedCheckboxListenerFor, countAndUpdateViewedFiles, initExpandAndCollapseFilesButton} from './pull-view-file.js';
|
||||||
import {initImageDiff} from './imagediff.js';
|
import {initImageDiff} from './imagediff.js';
|
||||||
|
import {showErrorToast} from '../modules/toast.js';
|
||||||
|
|
||||||
const {csrfToken, pageData} = window.config;
|
const {csrfToken, pageData, i18n} = window.config;
|
||||||
|
|
||||||
function initRepoDiffReviewButton() {
|
function initRepoDiffReviewButton() {
|
||||||
const $reviewBox = $('#review-box');
|
const $reviewBox = $('#review-box');
|
||||||
@ -50,26 +51,34 @@ function initRepoDiffConversationForm() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const formData = new FormData($form[0]);
|
if ($form.hasClass('is-loading')) return;
|
||||||
|
try {
|
||||||
|
$form.addClass('is-loading');
|
||||||
|
const formData = new FormData($form[0]);
|
||||||
|
|
||||||
// if the form is submitted by a button, append the button's name and value to the form data
|
// if the form is submitted by a button, append the button's name and value to the form data
|
||||||
const submitter = e.originalEvent?.submitter;
|
const submitter = e.originalEvent?.submitter;
|
||||||
const isSubmittedByButton = (submitter?.nodeName === 'BUTTON') || (submitter?.nodeName === 'INPUT' && submitter.type === 'submit');
|
const isSubmittedByButton = (submitter?.nodeName === 'BUTTON') || (submitter?.nodeName === 'INPUT' && submitter.type === 'submit');
|
||||||
if (isSubmittedByButton && submitter.name) {
|
if (isSubmittedByButton && submitter.name) {
|
||||||
formData.append(submitter.name, submitter.value);
|
formData.append(submitter.name, submitter.value);
|
||||||
}
|
}
|
||||||
const formDataString = String(new URLSearchParams(formData));
|
const formDataString = String(new URLSearchParams(formData));
|
||||||
const $newConversationHolder = $(await $.post($form.attr('action'), formDataString));
|
const $newConversationHolder = $(await $.post($form.attr('action'), formDataString));
|
||||||
const {path, side, idx} = $newConversationHolder.data();
|
const {path, side, idx} = $newConversationHolder.data();
|
||||||
|
|
||||||
$form.closest('.conversation-holder').replaceWith($newConversationHolder);
|
$form.closest('.conversation-holder').replaceWith($newConversationHolder);
|
||||||
if ($form.closest('tr').data('line-type') === 'same') {
|
if ($form.closest('tr').data('line-type') === 'same') {
|
||||||
$(`[data-path="${path}"] .add-code-comment[data-idx="${idx}"]`).addClass('gt-invisible');
|
$(`[data-path="${path}"] .add-code-comment[data-idx="${idx}"]`).addClass('gt-invisible');
|
||||||
} else {
|
} else {
|
||||||
$(`[data-path="${path}"] .add-code-comment[data-side="${side}"][data-idx="${idx}"]`).addClass('gt-invisible');
|
$(`[data-path="${path}"] .add-code-comment[data-side="${side}"][data-idx="${idx}"]`).addClass('gt-invisible');
|
||||||
|
}
|
||||||
|
$newConversationHolder.find('.dropdown').dropdown();
|
||||||
|
initCompReactionSelector($newConversationHolder);
|
||||||
|
} catch { // here the caught error might be a jQuery AJAX error (thrown by await $.post), which is not good to use for error message handling
|
||||||
|
showErrorToast(i18n.network_error);
|
||||||
|
} finally {
|
||||||
|
$form.removeClass('is-loading');
|
||||||
}
|
}
|
||||||
$newConversationHolder.find('.dropdown').dropdown();
|
|
||||||
initCompReactionSelector($newConversationHolder);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.resolve-conversation', async function (e) {
|
$(document).on('click', '.resolve-conversation', async function (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user