Compare commits

..

No commits in common. "da65b7ad47e8d0d82f47cb24ee9ac2a0ec50dc25" and "c205d559f9c3bc5ef04c8d6b289c9b40480f2abc" have entirely different histories.

59 changed files with 9301 additions and 246 deletions

View File

@ -1267,7 +1267,7 @@ steps:
pull: always pull: always
settings: settings:
auto_tag: false auto_tag: false
tags: ${DRONE_BRANCH##release/v}-nightly-linux-amd64 tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64
repo: gitea/gitea repo: gitea/gitea
build_args: build_args:
- GOPROXY=https://goproxy.io - GOPROXY=https://goproxy.io
@ -1289,7 +1289,7 @@ steps:
settings: settings:
dockerfile: Dockerfile.rootless dockerfile: Dockerfile.rootless
auto_tag: false auto_tag: false
tags: ${DRONE_BRANCH##release/v}-nightly-linux-amd64-rootless tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64-rootless
repo: gitea/gitea repo: gitea/gitea
build_args: build_args:
- GOPROXY=https://goproxy.io - GOPROXY=https://goproxy.io
@ -1306,6 +1306,43 @@ steps:
exclude: exclude:
- pull_request - pull_request
---
kind: pipeline
type: docker
name: docker-linux-arm64-dry-run
platform:
os: linux
arch: arm64
depends_on:
- compliance
trigger:
event:
- pull_request
paths:
exclude:
- "docs/**"
steps:
- name: dryrun
image: plugins/docker:latest
pull: always
settings:
dry_run: true
repo: gitea/gitea
tags: linux-arm64
build_args:
- GOPROXY=https://goproxy.io
environment:
PLUGIN_MIRROR:
from_secret: plugin_mirror
DOCKER_BUILDKIT: 1
when:
event:
- pull_request
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
@ -1572,7 +1609,7 @@ steps:
pull: always pull: always
settings: settings:
auto_tag: false auto_tag: false
tags: ${DRONE_BRANCH##release/v}-nightly-linux-arm64 tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64
repo: gitea/gitea repo: gitea/gitea
build_args: build_args:
- GOPROXY=https://goproxy.io - GOPROXY=https://goproxy.io
@ -1594,7 +1631,7 @@ steps:
settings: settings:
dockerfile: Dockerfile.rootless dockerfile: Dockerfile.rootless
auto_tag: false auto_tag: false
tags: ${DRONE_BRANCH##release/v}-nightly-linux-arm64-rootless tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64-rootless
repo: gitea/gitea repo: gitea/gitea
build_args: build_args:
- GOPROXY=https://goproxy.io - GOPROXY=https://goproxy.io

View File

@ -1,19 +0,0 @@
name: Docker build dry run
on: [pull_request]
jobs:
docker_dryrun:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v4
with:
push: false
tags: gitea/gitea:linux-amd64
build-args: |
GOPROXY=https://goproxy.io

View File

@ -4,8 +4,8 @@ on:
push: push:
paths: paths:
- "docs/**" - "docs/**"
branches: branch:
- main - main
jobs: jobs:
compliance-docs: compliance-docs:
@ -26,6 +26,6 @@ jobs:
with: with:
production-branch: main production-branch: main
publish-dir: docs/public/ publish-dir: docs/public/
site-id: d2260bae-7861-4c02-8646-8f6440b12672
env: env:
NETLIFY_SITE_ID: d2260bae-7861-4c02-8646-8f6440b12672
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

3
.lgtm Normal file
View File

@ -0,0 +1,3 @@
pattern = "(?)LGTM"
self_approval_off = true
ignore_maintainers_file = true

View File

@ -121,7 +121,8 @@ See the [hacking instructions](https://docs.gitea.io/en-us/hacking-on-gitea/).
Changes to Gitea must be reviewed before they are accepted—no matter who Changes to Gitea must be reviewed before they are accepted—no matter who
makes the change, even if they are an owner or a maintainer. We use GitHub's makes the change, even if they are an owner or a maintainer. We use GitHub's
pull request workflow to do that. Every PR is reviewed by at least 2 maintainers. pull request workflow to do that. And, we also use [LGTM](http://lgtm.co)
to ensure every PR is reviewed by at least 2 maintainers.
Please try to make your pull request easy to review for us. And, please read Please try to make your pull request easy to review for us. And, please read
the *[How to get faster PR reviews](https://github.com/kubernetes/community/blob/261cb0fd089b64002c91e8eddceebf032462ccd6/contributors/guide/pull-requests.md#best-practices-for-faster-reviews)* guide; the *[How to get faster PR reviews](https://github.com/kubernetes/community/blob/261cb0fd089b64002c91e8eddceebf032462ccd6/contributors/guide/pull-requests.md#best-practices-for-faster-reviews)* guide;

View File

@ -40,7 +40,7 @@ gitea embedded list [--include-vendored] [patterns...]
The `--include-vendored` flag makes the command include vendored files, which are The `--include-vendored` flag makes the command include vendored files, which are
normally excluded; that is, files from external libraries that are required for Gitea normally excluded; that is, files from external libraries that are required for Gitea
(e.g. [octicons](https://octicons.github.com/), etc). (e.g. [font-awesome](https://fontawesome.com/), [octicons](https://octicons.github.com/), etc).
A list of file search patterns can be provided. Gitea uses [gobwas/glob](https://github.com/gobwas/glob) A list of file search patterns can be provided. Gitea uses [gobwas/glob](https://github.com/gobwas/glob)
for its glob syntax. Here are some examples: for its glob syntax. Here are some examples:

View File

@ -3213,7 +3213,7 @@ error.unit_not_allowed = You are not allowed to access this repository section.
title = Packages title = Packages
desc = Manage repository packages. desc = Manage repository packages.
empty = There are no packages yet. empty = There are no packages yet.
empty.documentation = For more information on the package registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. empty.documentation = For more information on the package registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/usage/packages/overview/">the documentation</a>.
empty.repo = Did you upload a package, but it's not shown here? Go to <a href="%[1]s">package settings</a> and link it to this repo. empty.repo = Did you upload a package, but it's not shown here? Go to <a href="%[1]s">package settings</a> and link it to this repo.
filter.type = Type filter.type = Type
filter.type.all = All filter.type.all = All
@ -3240,77 +3240,77 @@ dependency.id = ID
dependency.version = Version dependency.version = Version
cargo.registry = Setup this registry in the Cargo configuration file (for example <code>~/.cargo/config.toml</code>): cargo.registry = Setup this registry in the Cargo configuration file (for example <code>~/.cargo/config.toml</code>):
cargo.install = To install the package using Cargo, run the following command: cargo.install = To install the package using Cargo, run the following command:
cargo.documentation = For more information on the Cargo registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. cargo.documentation = For more information on the Cargo registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/cargo/">the documentation</a>.
cargo.details.repository_site = Repository Site cargo.details.repository_site = Repository Site
cargo.details.documentation_site = Documentation Site cargo.details.documentation_site = Documentation Site
chef.registry = Setup this registry in your <code>~/.chef/config.rb</code> file: chef.registry = Setup this registry in your <code>~/.chef/config.rb</code> file:
chef.install = To install the package, run the following command: chef.install = To install the package, run the following command:
chef.documentation = For more information on the Chef registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. chef.documentation = For more information on the Chef registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/chef/">the documentation</a>.
composer.registry = Setup this registry in your <code>~/.composer/config.json</code> file: composer.registry = Setup this registry in your <code>~/.composer/config.json</code> file:
composer.install = To install the package using Composer, run the following command: composer.install = To install the package using Composer, run the following command:
composer.documentation = For more information on the Composer registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. composer.documentation = For more information on the Composer registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/composer/">the documentation</a>.
composer.dependencies = Dependencies composer.dependencies = Dependencies
composer.dependencies.development = Development Dependencies composer.dependencies.development = Development Dependencies
conan.details.repository = Repository conan.details.repository = Repository
conan.registry = Setup this registry from the command line: conan.registry = Setup this registry from the command line:
conan.install = To install the package using Conan, run the following command: conan.install = To install the package using Conan, run the following command:
conan.documentation = For more information on the Conan registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. conan.documentation = For more information on the Conan registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/conan/">the documentation</a>.
conda.registry = Setup this registry as a Conda repository in your <code>.condarc</code> file: conda.registry = Setup this registry as a Conda repository in your <code>.condarc</code> file:
conda.install = To install the package using Conda, run the following command: conda.install = To install the package using Conda, run the following command:
conda.documentation = For more information on the Conda registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. conda.documentation = For more information on the Conda registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/conda/">the documentation</a>.
conda.details.repository_site = Repository Site conda.details.repository_site = Repository Site
conda.details.documentation_site = Documentation Site conda.details.documentation_site = Documentation Site
container.details.type = Image Type container.details.type = Image Type
container.details.platform = Platform container.details.platform = Platform
container.pull = Pull the image from the command line: container.pull = Pull the image from the command line:
container.digest = Digest: container.digest = Digest:
container.documentation = For more information on the Container registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. container.documentation = For more information on the Container registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/container/">the documentation</a>.
container.multi_arch = OS / Arch container.multi_arch = OS / Arch
container.layers = Image Layers container.layers = Image Layers
container.labels = Labels container.labels = Labels
container.labels.key = Key container.labels.key = Key
container.labels.value = Value container.labels.value = Value
generic.download = Download package from the command line: generic.download = Download package from the command line:
generic.documentation = For more information on the generic registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. generic.documentation = For more information on the generic registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/generic">the documentation</a>.
helm.registry = Setup this registry from the command line: helm.registry = Setup this registry from the command line:
helm.install = To install the package, run the following command: helm.install = To install the package, run the following command:
helm.documentation = For more information on the Helm registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. helm.documentation = For more information on the Helm registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/helm/">the documentation</a>.
maven.registry = Setup this registry in your project <code>pom.xml</code> file: maven.registry = Setup this registry in your project <code>pom.xml</code> file:
maven.install = To use the package include the following in the <code>dependencies</code> block in the <code>pom.xml</code> file: maven.install = To use the package include the following in the <code>dependencies</code> block in the <code>pom.xml</code> file:
maven.install2 = Run via command line: maven.install2 = Run via command line:
maven.download = To download the dependency, run via command line: maven.download = To download the dependency, run via command line:
maven.documentation = For more information on the Maven registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. maven.documentation = For more information on the Maven registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/maven/">the documentation</a>.
nuget.registry = Setup this registry from the command line: nuget.registry = Setup this registry from the command line:
nuget.install = To install the package using NuGet, run the following command: nuget.install = To install the package using NuGet, run the following command:
nuget.documentation = For more information on the NuGet registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. nuget.documentation = For more information on the NuGet registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/nuget/">the documentation</a>.
nuget.dependency.framework = Target Framework nuget.dependency.framework = Target Framework
npm.registry = Setup this registry in your project <code>.npmrc</code> file: npm.registry = Setup this registry in your project <code>.npmrc</code> file:
npm.install = To install the package using npm, run the following command: npm.install = To install the package using npm, run the following command:
npm.install2 = or add it to the package.json file: npm.install2 = or add it to the package.json file:
npm.documentation = For more information on the npm registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. npm.documentation = For more information on the npm registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/npm/">the documentation</a>.
npm.dependencies = Dependencies npm.dependencies = Dependencies
npm.dependencies.development = Development Dependencies npm.dependencies.development = Development Dependencies
npm.dependencies.peer = Peer Dependencies npm.dependencies.peer = Peer Dependencies
npm.dependencies.optional = Optional Dependencies npm.dependencies.optional = Optional Dependencies
npm.details.tag = Tag npm.details.tag = Tag
pub.install = To install the package using Dart, run the following command: pub.install = To install the package using Dart, run the following command:
pub.documentation = For more information on the Pub registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. pub.documentation = For more information on the Pub registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/pub/">the documentation</a>.
pypi.requires = Requires Python pypi.requires = Requires Python
pypi.install = To install the package using pip, run the following command: pypi.install = To install the package using pip, run the following command:
pypi.documentation = For more information on the PyPI registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. pypi.documentation = For more information on the PyPI registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/pypi/">the documentation</a>.
rubygems.install = To install the package using gem, run the following command: rubygems.install = To install the package using gem, run the following command:
rubygems.install2 = or add it to the Gemfile: rubygems.install2 = or add it to the Gemfile:
rubygems.dependencies.runtime = Runtime Dependencies rubygems.dependencies.runtime = Runtime Dependencies
rubygems.dependencies.development = Development Dependencies rubygems.dependencies.development = Development Dependencies
rubygems.required.ruby = Requires Ruby version rubygems.required.ruby = Requires Ruby version
rubygems.required.rubygems = Requires RubyGem version rubygems.required.rubygems = Requires RubyGem version
rubygems.documentation = For more information on the RubyGems registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. rubygems.documentation = For more information on the RubyGems registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">the documentation</a>.
swift.registry = Setup this registry from the command line: swift.registry = Setup this registry from the command line:
swift.install = Add the package in your <code>Package.swift</code> file: swift.install = Add the package in your <code>Package.swift</code> file:
swift.install2 = and run the following command: swift.install2 = and run the following command:
swift.documentation = For more information on the Swift registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. swift.documentation = For more information on the Swift registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/swift/">the documentation</a>.
vagrant.install = To add a Vagrant box, run the following command: vagrant.install = To add a Vagrant box, run the following command:
vagrant.documentation = For more information on the Vagrant registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>. vagrant.documentation = For more information on the Vagrant registry, see <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">the documentation</a>.
settings.link = Link this package to a repository settings.link = Link this package to a repository
settings.link.description = If you link a package with a repository, the package is listed in the repository's package list. settings.link.description = If you link a package with a repository, the package is listed in the repository's package list.
settings.link.select = Select Repository settings.link.select = Select Repository

View File

@ -125,20 +125,6 @@ less=少
more= more=
[editor] [editor]
buttons.heading.tooltip=見出し追加
buttons.bold.tooltip=太字追加
buttons.italic.tooltip=イタリック体追加
buttons.quote.tooltip=引用
buttons.code.tooltip=コード追加
buttons.link.tooltip=リンク追加
buttons.list.unordered.tooltip=箇条書き追加
buttons.list.ordered.tooltip=番号付きリスト追加
buttons.list.task.tooltip=タスクリスト追加
buttons.mention.tooltip=ユーザーまたはチームにメンション
buttons.ref.tooltip=イシューまたはプルリクエストを参照
buttons.switch_to_legacy.tooltip=レガシーエディタを使用する
buttons.enable_monospace_font=等幅フォントを有効にする
buttons.disable_monospace_font=等幅フォントを無効にする
[filter] [filter]
string.asc=A - Z string.asc=A - Z
@ -462,7 +448,6 @@ team_invite.text_3=注: この招待は %[1]s 宛です。 招待に心当たり
[modal] [modal]
yes=はい yes=はい
no=いいえ no=いいえ
confirm=了解
cancel=キャンセル cancel=キャンセル
modify=更新 modify=更新

9
package-lock.json generated
View File

@ -29,6 +29,7 @@
"esbuild-loader": "3.0.1", "esbuild-loader": "3.0.1",
"escape-goat": "4.0.0", "escape-goat": "4.0.0",
"fast-glob": "3.2.12", "fast-glob": "3.2.12",
"font-awesome": "4.7.0",
"jquery": "3.6.4", "jquery": "3.6.4",
"jquery.are-you-sure": "1.9.0", "jquery.are-you-sure": "1.9.0",
"katex": "0.16.6", "katex": "0.16.6",
@ -4944,6 +4945,14 @@
"integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==",
"dev": true "dev": true
}, },
"node_modules/font-awesome": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz",
"integrity": "sha512-U6kGnykA/6bFmg1M/oT9EkFeIYv7JlX3bozwQJWiiLz6L0w3F5vBVPxHlwyX/vtNq1ckcpRKOB9f2Qal/VtFpg==",
"engines": {
"node": ">=0.10.3"
}
},
"node_modules/for-each": { "node_modules/for-each": {
"version": "0.3.3", "version": "0.3.3",
"resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",

View File

@ -29,6 +29,7 @@
"esbuild-loader": "3.0.1", "esbuild-loader": "3.0.1",
"escape-goat": "4.0.0", "escape-goat": "4.0.0",
"fast-glob": "3.2.12", "fast-glob": "3.2.12",
"font-awesome": "4.7.0",
"jquery": "3.6.4", "jquery": "3.6.4",
"jquery.are-you-sure": "1.9.0", "jquery.are-you-sure": "1.9.0",
"katex": "0.16.6", "katex": "0.16.6",

View File

@ -55,7 +55,6 @@ type ViewResponse struct {
Status string `json:"status"` Status string `json:"status"`
CanCancel bool `json:"canCancel"` CanCancel bool `json:"canCancel"`
CanApprove bool `json:"canApprove"` // the run needs an approval and the doer has permission to approve CanApprove bool `json:"canApprove"` // the run needs an approval and the doer has permission to approve
CanRerun bool `json:"canRerun"`
Done bool `json:"done"` Done bool `json:"done"`
Jobs []*ViewJob `json:"jobs"` Jobs []*ViewJob `json:"jobs"`
Commit ViewCommit `json:"commit"` Commit ViewCommit `json:"commit"`
@ -137,7 +136,6 @@ func ViewPost(ctx *context_module.Context) {
resp.State.Run.Link = run.Link() resp.State.Run.Link = run.Link()
resp.State.Run.CanCancel = !run.Status.IsDone() && ctx.Repo.CanWrite(unit.TypeActions) resp.State.Run.CanCancel = !run.Status.IsDone() && ctx.Repo.CanWrite(unit.TypeActions)
resp.State.Run.CanApprove = run.NeedApproval && ctx.Repo.CanWrite(unit.TypeActions) resp.State.Run.CanApprove = run.NeedApproval && ctx.Repo.CanWrite(unit.TypeActions)
resp.State.Run.CanRerun = run.Status.IsDone() && ctx.Repo.CanWrite(unit.TypeActions)
resp.State.Run.Done = run.Status.IsDone() resp.State.Run.Done = run.Status.IsDone()
resp.State.Run.Jobs = make([]*ViewJob, 0, len(jobs)) // marshal to '[]' instead fo 'null' in json resp.State.Run.Jobs = make([]*ViewJob, 0, len(jobs)) // marshal to '[]' instead fo 'null' in json
resp.State.Run.Status = run.Status.String() resp.State.Run.Status = run.Status.String()
@ -240,7 +238,7 @@ func ViewPost(ctx *context_module.Context) {
ctx.JSON(http.StatusOK, resp) ctx.JSON(http.StatusOK, resp)
} }
func RerunOne(ctx *context_module.Context) { func Rerun(ctx *context_module.Context) {
runIndex := ctx.ParamsInt64("run") runIndex := ctx.ParamsInt64("run")
jobIndex := ctx.ParamsInt64("job") jobIndex := ctx.ParamsInt64("job")
@ -248,37 +246,10 @@ func RerunOne(ctx *context_module.Context) {
if ctx.Written() { if ctx.Written() {
return return
} }
if err := rerunJob(ctx, job); err != nil {
ctx.Error(http.StatusInternalServerError, err.Error())
return
}
ctx.JSON(http.StatusOK, struct{}{})
}
func RerunAll(ctx *context_module.Context) {
runIndex := ctx.ParamsInt64("run")
_, jobs := getRunJobs(ctx, runIndex, 0)
if ctx.Written() {
return
}
for _, j := range jobs {
if err := rerunJob(ctx, j); err != nil {
ctx.Error(http.StatusInternalServerError, err.Error())
return
}
}
ctx.JSON(http.StatusOK, struct{}{})
}
func rerunJob(ctx *context_module.Context, job *actions_model.ActionRunJob) error {
status := job.Status status := job.Status
if !status.IsDone() { if !status.IsDone() {
return nil ctx.JSON(http.StatusOK, struct{}{})
return
} }
job.TaskID = 0 job.TaskID = 0
@ -290,11 +261,13 @@ func rerunJob(ctx *context_module.Context, job *actions_model.ActionRunJob) erro
_, err := actions_model.UpdateRunJob(ctx, job, builder.Eq{"status": status}, "task_id", "status", "started", "stopped") _, err := actions_model.UpdateRunJob(ctx, job, builder.Eq{"status": status}, "task_id", "status", "started", "stopped")
return err return err
}); err != nil { }); err != nil {
return err ctx.Error(http.StatusInternalServerError, err.Error())
return
} }
actions_service.CreateCommitStatus(ctx, job) actions_service.CreateCommitStatus(ctx, job)
return nil
ctx.JSON(http.StatusOK, struct{}{})
} }
func Cancel(ctx *context_module.Context) { func Cancel(ctx *context_module.Context) {

View File

@ -1186,11 +1186,10 @@ func registerRoutes(m *web.Route) {
m.Combo(""). m.Combo("").
Get(actions.View). Get(actions.View).
Post(web.Bind(actions.ViewRequest{}), actions.ViewPost) Post(web.Bind(actions.ViewRequest{}), actions.ViewPost)
m.Post("/rerun", reqRepoActionsWriter, actions.RerunOne) m.Post("/rerun", reqRepoActionsWriter, actions.Rerun)
}) })
m.Post("/cancel", reqRepoActionsWriter, actions.Cancel) m.Post("/cancel", reqRepoActionsWriter, actions.Cancel)
m.Post("/approve", reqRepoActionsWriter, actions.Approve) m.Post("/approve", reqRepoActionsWriter, actions.Approve)
m.Post("/rerun", reqRepoActionsWriter, actions.RerunAll)
}) })
}, reqRepoActionsReader, actions.MustEnableActions) }, reqRepoActionsReader, actions.MustEnableActions)

View File

@ -1,4 +1,4 @@
<div class="ui secondary pointing tabular top attached borderless menu new-menu navbar"> <div class="ui secondary pointing tabular top attached borderless stackable menu new-menu navbar">
<a class="{{if .PageIsExploreRepositories}}active {{end}}item" href="{{AppSubUrl}}/explore/repos"> <a class="{{if .PageIsExploreRepositories}}active {{end}}item" href="{{AppSubUrl}}/explore/repos">
{{svg "octicon-repo"}} {{.locale.Tr "explore.repos"}} {{svg "octicon-repo"}} {{.locale.Tr "explore.repos"}}
</a> </a>

View File

@ -18,7 +18,7 @@ git-fetch-with-cli = true</code></pre></div>
<div class="markup"><pre class="code-block"><code>cargo add {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}</code></pre></div> <div class="markup"><pre class="code-block"><code>cargo add {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.cargo.documentation" "https://docs.gitea.io/en-us/usage/packages/cargo/" | Safe}}</label> <label>{{.locale.Tr "packages.cargo.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -11,7 +11,7 @@
<div class="markup"><pre class="code-block"><code>knife supermarket install {{.PackageDescriptor.Package.Name}} {{.PackageDescriptor.Version.Version}}</code></pre></div> <div class="markup"><pre class="code-block"><code>knife supermarket install {{.PackageDescriptor.Package.Name}} {{.PackageDescriptor.Version.Version}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.chef.documentation" "https://docs.gitea.io/en-us/usage/packages/chef/" | Safe}}</label> <label>{{.locale.Tr "packages.chef.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -17,7 +17,7 @@
<div class="markup"><pre class="code-block"><code>composer require {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}}</code></pre></div> <div class="markup"><pre class="code-block"><code>composer require {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.composer.documentation" "https://docs.gitea.io/en-us/usage/packages/composer/" | Safe}}</label> <label>{{.locale.Tr "packages.composer.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -11,7 +11,7 @@
<div class="markup"><pre class="code-block"><code>conan install --remote=gitea {{.PackageDescriptor.Package.Name}}/{{.PackageDescriptor.Version.Version}}</code></pre></div> <div class="markup"><pre class="code-block"><code>conan install --remote=gitea {{.PackageDescriptor.Package.Name}}/{{.PackageDescriptor.Version.Version}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.conan.documentation" "https://docs.gitea.io/en-us/usage/packages/conan/" | Safe}}</label> <label>{{.locale.Tr "packages.conan.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -16,7 +16,7 @@ default_channels:
<div class="markup"><pre class="code-block"><code>conda install{{if $channel}} -c {{$channel}}{{end}} {{.PackageDescriptor.PackageProperties.GetByName "conda.name"}}={{.PackageDescriptor.Version.Version}}</code></pre></div> <div class="markup"><pre class="code-block"><code>conda install{{if $channel}} -c {{$channel}}{{end}} {{.PackageDescriptor.PackageProperties.GetByName "conda.name"}}={{.PackageDescriptor.Version.Version}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.conda.documentation" "https://docs.gitea.io/en-us/usage/packages/conda/" | Safe}}</label> <label>{{.locale.Tr "packages.conda.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -19,7 +19,7 @@
<div class="markup"><pre class="code-block"><code>{{range .PackageDescriptor.Files}}{{if eq .File.LowerName "manifest.json"}}{{.Properties.GetByName "container.digest"}}{{end}}{{end}}</code></pre></div> <div class="markup"><pre class="code-block"><code>{{range .PackageDescriptor.Files}}{{if eq .File.LowerName "manifest.json"}}{{.Properties.GetByName "container.digest"}}{{end}}{{end}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.container.documentation" "https://docs.gitea.io/en-us/usage/packages/container/" | Safe}}</label> <label>{{.locale.Tr "packages.container.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -11,7 +11,7 @@ curl <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescripto
</code></pre></div> </code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.generic.documentation" "https://docs.gitea.io/en-us/usage/packages/generic" | Safe}}</label> <label>{{.locale.Tr "packages.generic.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -12,7 +12,7 @@ helm repo update</code></pre></div>
<div class="markup"><pre class="code-block"><code>helm install {{.PackageDescriptor.Package.Name}} {{AppDomain}}/{{.PackageDescriptor.Package.Name}}</code></pre></div> <div class="markup"><pre class="code-block"><code>helm install {{.PackageDescriptor.Package.Name}} {{AppDomain}}/{{.PackageDescriptor.Package.Name}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.helm.documentation" "https://docs.gitea.io/en-us/usage/packages/helm/" | Safe}}</label> <label>{{.locale.Tr "packages.helm.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -40,7 +40,7 @@
<div class="markup"><pre class="code-block"><code>mvn dependency:get -DremoteRepositories=<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></gitea-origin-url> -Dartifact={{.PackageDescriptor.Metadata.GroupID}}:{{.PackageDescriptor.Metadata.ArtifactID}}:{{.PackageDescriptor.Version.Version}}</code></pre></div> <div class="markup"><pre class="code-block"><code>mvn dependency:get -DremoteRepositories=<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></gitea-origin-url> -Dartifact={{.PackageDescriptor.Metadata.GroupID}}:{{.PackageDescriptor.Metadata.ArtifactID}}:{{.PackageDescriptor.Version.Version}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.maven.documentation" "https://docs.gitea.io/en-us/usage/packages/maven/" | Safe}}</label> <label>{{.locale.Tr "packages.maven.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -15,7 +15,7 @@
<div class="markup"><pre class="code-block"><code>&quot;{{.PackageDescriptor.Package.Name}}&quot;: &quot;{{.PackageDescriptor.Version.Version}}&quot;</code></pre></div> <div class="markup"><pre class="code-block"><code>&quot;{{.PackageDescriptor.Package.Name}}&quot;: &quot;{{.PackageDescriptor.Version.Version}}&quot;</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.npm.documentation" "https://docs.gitea.io/en-us/usage/packages/npm/" | Safe}}</label> <label>{{.locale.Tr "packages.npm.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -11,7 +11,7 @@
<div class="markup"><pre class="code-block"><code>dotnet add package --source {{.PackageDescriptor.Owner.Name}} --version {{.PackageDescriptor.Version.Version}} {{.PackageDescriptor.Package.Name}}</code></pre></div> <div class="markup"><pre class="code-block"><code>dotnet add package --source {{.PackageDescriptor.Owner.Name}} --version {{.PackageDescriptor.Version.Version}} {{.PackageDescriptor.Package.Name}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.nuget.documentation" "https://docs.gitea.io/en-us/usage/packages/nuget/" | Safe}}</label> <label>{{.locale.Tr "packages.nuget.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -7,7 +7,7 @@
<div class="markup"><pre class="code-block"><code>dart pub add {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}} --hosted-url=<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/pub/"></gitea-origin-url></code></pre></div> <div class="markup"><pre class="code-block"><code>dart pub add {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}} --hosted-url=<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/pub/"></gitea-origin-url></code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.pub.documentation" "https://docs.gitea.io/en-us/usage/packages/pub/" | Safe}}</label> <label>{{.locale.Tr "packages.pub.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -7,7 +7,7 @@
<div class="markup"><pre class="code-block"><code>pip install --index-url <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/pypi/simple/"></gitea-origin-url> {{.PackageDescriptor.Package.Name}}</code></pre></div> <div class="markup"><pre class="code-block"><code>pip install --index-url <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/pypi/simple/"></gitea-origin-url> {{.PackageDescriptor.Package.Name}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.pypi.documentation" "https://docs.gitea.io/en-us/usage/packages/pypi/" | Safe}}</label> <label>{{.locale.Tr "packages.pypi.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -13,7 +13,7 @@
end</code></pre></div> end</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.rubygems.documentation" "https://docs.gitea.io/en-us/usage/packages/rubygems/" | Safe}}</label> <label>{{.locale.Tr "packages.rubygems.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -17,7 +17,7 @@
<div class="markup"><pre class="code-block"><code>swift package resolve</code></pre></div> <div class="markup"><pre class="code-block"><code>swift package resolve</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.swift.documentation" "https://docs.gitea.io/en-us/usage/packages/swift/" | Safe}}</label> <label>{{.locale.Tr "packages.swift.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -7,7 +7,7 @@
<div class="markup"><pre class="code-block"><code>vagrant box add --box-version {{.PackageDescriptor.Version.Version}} "<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/vagrant/{{.PackageDescriptor.Package.Name}}"></gitea-origin-url>"</code></pre></div> <div class="markup"><pre class="code-block"><code>vagrant box add --box-version {{.PackageDescriptor.Version.Version}} "<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/vagrant/{{.PackageDescriptor.Package.Name}}"></gitea-origin-url>"</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.vagrant.documentation" "https://docs.gitea.io/en-us/usage/packages/vagrant/" | Safe}}</label> <label>{{.locale.Tr "packages.vagrant.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -20,7 +20,7 @@
{{$repoID = .PackageDescriptor.Repository.ID}} {{$repoID = .PackageDescriptor.Repository.ID}}
{{end}} {{end}}
<input type="hidden" name="repo_id" value="{{$repoID}}"> <input type="hidden" name="repo_id" value="{{$repoID}}">
{{svg "octicon-triangle-down" 14 "dropdown icon"}} <i class="dropdown icon"></i>
<div class="default text">{{.locale.Tr "packages.settings.link.select"}}</div> <div class="default text">{{.locale.Tr "packages.settings.link.select"}}</div>
<div class="menu"> <div class="menu">
{{range .Repos}} {{range .Repos}}

View File

@ -18,7 +18,7 @@
<button class="ui green button">{{$.locale.Tr "packages.owner.settings.cargo.rebuild"}}</button> <button class="ui green button">{{$.locale.Tr "packages.owner.settings.cargo.rebuild"}}</button>
</form> </form>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.cargo.documentation" "https://docs.gitea.io/en-us/usage/packages/cargo/" | Safe}}</label> <label>{{.locale.Tr "packages.cargo.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -44,7 +44,7 @@
{{$packagesUrl := URLJoin .Owner.HomeLink "-" "packages"}} {{$packagesUrl := URLJoin .Owner.HomeLink "-" "packages"}}
<p>{{.locale.Tr "packages.empty.repo" $packagesUrl | Safe}}</p> <p>{{.locale.Tr "packages.empty.repo" $packagesUrl | Safe}}</p>
{{end}} {{end}}
<p>{{.locale.Tr "packages.empty.documentation" "https://docs.gitea.io/en-us/usage/packages/overview/" | Safe}}</p> <p>{{.locale.Tr "packages.empty.documentation" | Safe}}</p>
</div> </div>
{{else}} {{else}}
<p>{{.locale.Tr "packages.filter.no_result"}}</p> <p>{{.locale.Tr "packages.filter.no_result"}}</p>

View File

@ -1,6 +1,7 @@
{{template "base/head" .}} {{template "base/head" .}}
<div class="page-content repository"> <div class="page-content repository">
{{template "repo/header" .}} {{template "repo/header" .}}
<div class="ui container"> <div class="ui container">
<div class="ui stackable grid"> <div class="ui stackable grid">
<div class="four wide column"> <div class="four wide column">
@ -11,7 +12,7 @@
<a class="item{{if eq .Entry.Name $.CurWorkflow}} active{{end}}" href="{{$.Link}}?workflow={{.Entry.Name}}">{{.Entry.Name}} <a class="item{{if eq .Entry.Name $.CurWorkflow}} active{{end}}" href="{{$.Link}}?workflow={{.Entry.Name}}">{{.Entry.Name}}
{{if .ErrMsg}} {{if .ErrMsg}}
<span data-tooltip-content="{{.ErrMsg}}"> <span data-tooltip-content="{{.ErrMsg}}">
{{svg "octicon-alert" 16 "text red"}} <i class="warning icon red"></i>
</span> </span>
{{end}} {{end}}
</a> </a>

View File

@ -2,7 +2,7 @@
<tr> <tr>
<td colspan="2"> <td colspan="2">
<div class="image-diff" data-path-before="{{.root.BeforeRawPath}}/{{PathEscapeSegments .file.OldName}}" data-path-after="{{.root.RawPath}}/{{PathEscapeSegments .file.Name}}"> <div class="image-diff" data-path-before="{{.root.BeforeRawPath}}/{{PathEscapeSegments .file.OldName}}" data-path-after="{{.root.RawPath}}/{{PathEscapeSegments .file.Name}}">
<div class="ui secondary pointing tabular top attached borderless menu new-menu"> <div class="ui secondary pointing tabular top attached borderless menu stackable new-menu">
<div class="new-menu-inner"> <div class="new-menu-inner">
<a class="item active" data-tab="diff-side-by-side-{{.file.Index}}">{{.root.locale.Tr "repo.diff.image.side_by_side"}}</a> <a class="item active" data-tab="diff-side-by-side-{{.file.Index}}">{{.root.locale.Tr "repo.diff.image.side_by_side"}}</a>
{{if and .blobBase .blobHead}} {{if and .blobBase .blobHead}}

View File

@ -8,19 +8,21 @@
<input type="hidden" name="last_commit" value="{{.last_commit}}"> <input type="hidden" name="last_commit" value="{{.last_commit}}">
<input type="hidden" name="page_has_posted" value="true"> <input type="hidden" name="page_has_posted" value="true">
<input type="hidden" name="revert" value="{{if eq .CherryPickType "revert"}}true{{else}}false{{end}}"> <input type="hidden" name="revert" value="{{if eq .CherryPickType "revert"}}true{{else}}false{{end}}">
<div class="repo-editor-header"> <div class="ui secondary menu">
<div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}"> <div class="fitted item treepath">
{{$shaurl := printf "%s/commit/%s" $.RepoLink (PathEscape .SHA)}} <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
{{$shalink := printf "<a class=\"ui primary sha label\" href=\"%s\">%s</a>" (Escape $shaurl) (ShortSha .SHA)}} {{$shaurl := printf "%s/commit/%s" $.RepoLink (PathEscape .SHA)}}
{{if eq .CherryPickType "revert"}} {{$shalink := printf "<a class=\"ui primary sha label\" href=\"%s\">%s</a>" (Escape $shaurl) (ShortSha .SHA)}}
{{.locale.Tr "repo.editor.revert" $shalink | Str2html}} {{if eq .CherryPickType "revert"}}
{{else}} {{.locale.Tr "repo.editor.revert" $shalink | Str2html}}
{{.locale.Tr "repo.editor.cherry_pick" $shalink | Str2html}} {{else}}
{{end}} {{.locale.Tr "repo.editor.cherry_pick" $shalink | Str2html}}
<a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a> {{end}}
<div class="divider">:</div> <a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a>
<a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a> <div class="divider">:</div>
<span>{{.locale.Tr "repo.editor.or"}} <a href="{{$shaurl}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span> <a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
<span>{{.locale.Tr "repo.editor.or"}} <a href="{{$shaurl}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
</div>
</div> </div>
</div> </div>
{{template "repo/editor/commit_form" .}} {{template "repo/editor/commit_form" .}}

View File

@ -7,22 +7,24 @@
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<input type="hidden" name="last_commit" value="{{.last_commit}}"> <input type="hidden" name="last_commit" value="{{.last_commit}}">
<input type="hidden" name="page_has_posted" value="{{.PageHasPosted}}"> <input type="hidden" name="page_has_posted" value="{{.PageHasPosted}}">
<div class="repo-editor-header"> <div class="ui secondary menu">
<div class="ui breadcrumb field{{if .Err_TreePath}} error{{end}}"> <div class="fitted item treepath">
<a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a> <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
{{$n := len .TreeNames}} <a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a>
{{$l := Eval $n "-" 1}} {{$n := len .TreeNames}}
{{range $i, $v := .TreeNames}} {{$l := Eval $n "-" 1}}
<div class="divider"> / </div> {{range $i, $v := .TreeNames}}
{{if eq $i $l}} <div class="divider"> / </div>
<input id="file-name" value="{{$v}}" placeholder="{{$.locale.Tr "repo.editor.name_your_file"}}" data-editorconfig="{{$.Editorconfig}}" required autofocus> {{if eq $i $l}}
<span data-tooltip-content="{{$.locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span> <input id="file-name" value="{{$v}}" placeholder="{{$.locale.Tr "repo.editor.name_your_file"}}" data-editorconfig="{{$.Editorconfig}}" required autofocus>
{{else}} <span data-tooltip-content="{{$.locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
<span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span> {{else}}
<span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span>
{{end}}
{{end}} {{end}}
{{end}} <span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}{{if not .IsNewFile}}/{{PathEscapeSegments .TreePath}}{{end}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
<span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}{{if not .IsNewFile}}/{{PathEscapeSegments .TreePath}}{{end}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span> <input type="hidden" id="tree_path" name="tree_path" value="{{.TreePath}}" required>
<input type="hidden" id="tree_path" name="tree_path" value="{{.TreePath}}" required> </div>
</div> </div>
</div> </div>
<div class="field"> <div class="field">

View File

@ -7,15 +7,17 @@
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<input type="hidden" name="last_commit" value="{{.last_commit}}"> <input type="hidden" name="last_commit" value="{{.last_commit}}">
<input type="hidden" name="page_has_posted" value="{{.PageHasPosted}}"> <input type="hidden" name="page_has_posted" value="{{.PageHasPosted}}">
<div class="repo-editor-header"> <div class="ui secondary menu">
<div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}"> <div class="fitted item treepath">
{{.locale.Tr "repo.editor.patching"}} <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
<a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a> {{.locale.Tr "repo.editor.patching"}}
<div class="divider">:</div> <a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a>
<a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a> <div class="divider">:</div>
<span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span> <a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
<input type="hidden" id="tree_path" name="tree_path" value="" required> <span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
<input id="file-name" type="hidden" value="diff.patch"> <input type="hidden" id="tree_path" name="tree_path" value="" required>
<input id="file-name" type="hidden" value="diff.patch">
</div>
</div> </div>
</div> </div>
<div class="field"> <div class="field">

View File

@ -5,22 +5,24 @@
{{template "base/alert" .}} {{template "base/alert" .}}
<form class="ui comment form" method="post"> <form class="ui comment form" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<div class="repo-editor-header"> <div class="ui secondary menu">
<div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}"> <div class="item fitted treepath">
<a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a> <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
{{$n := len .TreeNames}} <a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a>
{{$l := Eval $n "-" 1}} {{$n := len .TreeNames}}
{{range $i, $v := .TreeNames}} {{$l := Eval $n "-" 1}}
<div class="divider"> / </div> {{range $i, $v := .TreeNames}}
{{if eq $i $l}} <div class="divider"> / </div>
<input type="text" id="file-name" value="{{$v}}" placeholder="{{$.locale.Tr "repo.editor.add_subdir"}}" autofocus> {{if eq $i $l}}
<span data-tooltip-content="{{$.locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span> <input type="text" id="file-name" value="{{$v}}" placeholder="{{$.locale.Tr "repo.editor.add_subdir"}}" autofocus>
{{else}} <span data-tooltip-content="{{$.locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
<span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span> {{else}}
<span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span>
{{end}}
{{end}} {{end}}
{{end}} <span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}{{if not .IsNewFile}}/{{.TreePath | PathEscapeSegments}}{{end}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
<span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}{{if not .IsNewFile}}/{{.TreePath | PathEscapeSegments}}{{end}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span> <input type="hidden" id="tree_path" name="tree_path" value="{{.TreePath}}" required>
<input type="hidden" id="tree_path" name="tree_path" value="{{.TreePath}}" required> </div>
</div> </div>
</div> </div>
<div class="field"> <div class="field">

View File

@ -8,6 +8,7 @@
<div class="ui icon buttons tiny color-buttons"> <div class="ui icon buttons tiny color-buttons">
<div class="ui multiple selection search dropdown" id="flow-select-refs-dropdown"> <div class="ui multiple selection search dropdown" id="flow-select-refs-dropdown">
<input type="hidden" name="flow"> <input type="hidden" name="flow">
<i class="dropdown icon"></i>
<div class="default text">{{.locale.Tr "repo.commit_graph.select"}}</div> <div class="default text">{{.locale.Tr "repo.commit_graph.select"}}</div>
<div class="menu"> <div class="menu">
<div class="item" data-value="...flow-hide-pr-refs"> <div class="item" data-value="...flow-hide-pr-refs">

View File

@ -109,7 +109,7 @@
</a> </a>
{{end}} {{end}}
{{if ne $n 0}} {{if ne $n 0}}
<span class="breadcrumb repo-path gt-ml-2"> <span class="ui breadcrumb repo-path gt-ml-2">
<a class="section" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}" title="{{.Repository.Name}}">{{StringUtils.EllipsisString .Repository.Name 30}}</a> <a class="section" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}" title="{{.Repository.Name}}">{{StringUtils.EllipsisString .Repository.Name 30}}</a>
{{- range $i, $v := .TreeNames -}} {{- range $i, $v := .TreeNames -}}
<span class="divider">/</span> <span class="divider">/</span>

View File

@ -3,8 +3,7 @@
{{/* FIXME: required validation */}} {{/* FIXME: required validation */}}
<div class="ui fluid selection dropdown {{if .item.Attributes.multiple}}multiple clearable{{end}}"> <div class="ui fluid selection dropdown {{if .item.Attributes.multiple}}multiple clearable{{end}}">
<input type="hidden" name="form-field-{{.item.ID}}" value="0"> <input type="hidden" name="form-field-{{.item.ID}}" value="0">
{{svg "octicon-triangle-down" 14 "dropdown icon"}} <i class="dropdown icon"></i>
{{svg "octicon-x" 14 "remove icon"}}
<div class="default text"></div> <div class="default text"></div>
<div class="menu"> <div class="menu">
{{range $i, $opt := .item.Attributes.options}} {{range $i, $opt := .item.Attributes.options}}

View File

@ -57,7 +57,7 @@
{{.locale.Tr "cancel"}} {{.locale.Tr "cancel"}}
</button> </button>
<button class="ui primary small approve button"> <button class="ui primary small approve button">
{{svg "fontawesome-save"}} <i class="save icon"></i>
{{.locale.Tr "save"}} {{.locale.Tr "save"}}
</button> </button>
</div> </div>

View File

@ -249,7 +249,7 @@
{{$.locale.Tr "repo.pulls.require_signed_wont_sign"}} {{$.locale.Tr "repo.pulls.require_signed_wont_sign"}}
</div> </div>
<div class="item"> <div class="item">
<i class="icon icon-octicon">{{svg "octicon-unlock"}}</i> <i class="icon unlock"></i>
{{$.locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason)}} {{$.locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason)}}
</div> </div>
{{end}} {{end}}
@ -274,12 +274,12 @@
{{end}} {{end}}
{{if .WillSign}} {{if .WillSign}}
<div class="item"> <div class="item">
<i class="icon icon-octicon">{{svg "octicon-lock" 16 "text green"}}</i> <i class="icon lock green"></i>
{{$.locale.Tr "repo.signing.will_sign" .SigningKey}} {{$.locale.Tr "repo.signing.will_sign" .SigningKey}}
</div> </div>
{{else if .IsSigned}} {{else if .IsSigned}}
<div class="item"> <div class="item">
<i class="icon icon-octicon">{{svg "octicon-unlock"}}</i> <i class="icon unlock"></i>
{{$.locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason)}} {{$.locale.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason)}}
</div> </div>
{{end}} {{end}}

View File

@ -1,4 +1,4 @@
<div class="ui secondary pointing tabular top attached borderless menu new-menu navbar"> <div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
<div class="new-menu-inner"> <div class="new-menu-inner">
<a class="{{if .PageIsOpenIDConnect}}active {{end}}item" href="{{AppSubUrl}}/user/openid/connect"> <a class="{{if .PageIsOpenIDConnect}}active {{end}}item" href="{{AppSubUrl}}/user/openid/connect">
{{.locale.Tr "auth.openid_connect_title"}} {{.locale.Tr "auth.openid_connect_title"}}

View File

@ -1,5 +1,5 @@
<div class="dashboard-navbar"> <div class="dashboard-navbar">
<div class="ui secondary stackable menu"> <div class="ui secondary stackable menu g-menu-stackable-scrollable">
<div class="item"> <div class="item">
<div class="ui floating dropdown jump"> <div class="ui floating dropdown jump">
<span class="text truncated-item-container"> <span class="text truncated-item-container">

View File

@ -16,7 +16,7 @@
<button class="ui green button">{{$.locale.Tr "packages.owner.settings.chef.keypair"}}</button> <button class="ui green button">{{$.locale.Tr "packages.owner.settings.chef.keypair"}}</button>
</form> </form>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.chef.documentation" "https://docs.gitea.io/en-us/usage/packages/chef/" | Safe}}</label> <label>{{.locale.Tr "packages.chef.documentation" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -332,7 +332,8 @@ progress::-moz-progress-bar {
user-select: none; user-select: none;
} }
a { a,
.ui.breadcrumb a {
color: var(--color-primary); color: var(--color-primary);
cursor: pointer; cursor: pointer;
text-decoration-skip-ink: all; text-decoration-skip-ink: all;
@ -346,7 +347,8 @@ a.muted,
a:hover, a:hover,
a.muted:hover, a.muted:hover,
a.muted:hover [class*="color-text"], a.muted:hover [class*="color-text"],
.muted-links a:hover { .muted-links a:hover,
.ui.breadcrumb a:hover {
color: var(--color-primary); color: var(--color-primary);
} }
@ -735,6 +737,14 @@ a.label,
padding-bottom: 7.42px !important; padding-bottom: 7.42px !important;
} }
.ui.breadcrumb a:hover {
text-decoration: underline !important;
}
.ui.breadcrumb .divider {
color: var(--color-text-light-2);
}
.ui.divider:not(.vertical,.horizontal) { .ui.divider:not(.vertical,.horizontal) {
border-top-color: var(--color-secondary) !important; border-top-color: var(--color-secondary) !important;
border-bottom: none !important; border-bottom: none !important;
@ -1915,7 +1925,7 @@ img.ui.avatar,
} }
.ui.menu.new-menu .item { .ui.menu.new-menu .item {
margin-bottom: 0 !important; /* reset fomantic's margin, because the active menu has special bottom border */ margin: 0 !important;
} }
@media (max-width: 767px) { @media (max-width: 767px) {
@ -1924,13 +1934,8 @@ img.ui.avatar,
} }
} }
.ui.menu.new-menu .item:first-child {
margin-left: auto; /* "justify-content: center" doesn't work with "overflow: auto", so use margin: auto */
}
.ui.menu.new-menu .item:last-child { .ui.menu.new-menu .item:last-child {
padding-right: 30px !important; padding-right: 30px !important;
margin-right: auto;
} }
.ui.menu.new-menu::-webkit-scrollbar { .ui.menu.new-menu::-webkit-scrollbar {
@ -2046,13 +2051,6 @@ a.ui.label:hover {
color: var(--color-text); color: var(--color-text);
} }
.ui.labels a.active.label:hover,
a.ui.active.label:hover {
background: var(--color-active);
border-color: var(--color-active);
color: var(--color-text);
}
.ui.label > .detail .icons { .ui.label > .detail .icons {
margin-right: 0.25em; margin-right: 0.25em;
} }
@ -2605,7 +2603,6 @@ table th[data-sortt-desc] .svg {
} }
.ui.dropdown .svg.dropdown.icon, .ui.dropdown .svg.dropdown.icon,
.ui.dropdown .svg.remove.icon,
.svg.dropdown.icon { .svg.dropdown.icon {
margin-top: 0 !important; /* reset the "ui.selection.dropdown > .dropdown.icon {margin-top}", for the Issue Dependencies dropdown */ margin-top: 0 !important; /* reset the "ui.selection.dropdown > .dropdown.icon {margin-top}", for the Issue Dependencies dropdown */
margin-right: -0.5rem !important; /* fix up SVG dropdown triangles because Fomantic thinks they are icon fonts */ margin-right: -0.5rem !important; /* fix up SVG dropdown triangles because Fomantic thinks they are icon fonts */
@ -2618,16 +2615,6 @@ table th[data-sortt-desc] .svg {
top: 0 !important; /* reset the ".ui.selection.dropdown > .xxx.icon {top}" if the icon is svg instead of the fomantic icon */ top: 0 !important; /* reset the ".ui.selection.dropdown > .xxx.icon {top}" if the icon is svg instead of the fomantic icon */
} }
.ui.selection.dropdown > .svg.remove.icon {
top: .5px;
right: 32px;
width: auto;
}
.ui.selection.dropdown > .svg.remove.icon:hover {
opacity: 1;
}
.ui.dropdown.no-text > .dropdown.icon { .ui.dropdown.no-text > .dropdown.icon {
margin-left: 0 !important; margin-left: 0 !important;
margin-right: 0 !important; margin-right: 0 !important;
@ -2798,6 +2785,19 @@ table th[data-sortt-desc] .svg {
height: 15px; height: 15px;
} }
.g-menu-stackable-scrollable {
overflow-y: hidden;
overflow-x: auto;
}
@media (max-width: 767.98px) {
/* also respect Fomantic's "stackable" definition, use the same breakpoint to reset our styles */
.g-menu-stackable-scrollable {
overflow-x: unset;
overflow-y: unset;
}
}
.color-text-light-2 { .color-text-light-2 {
color: var(--color-text-light-2); color: var(--color-text-light-2);
} }

View File

@ -12,12 +12,6 @@
border-bottom: 0; border-bottom: 0;
} }
.repo-editor-header {
display: flex;
margin: 1rem 0;
padding: 3px 0;
}
.editor-toolbar { .editor-toolbar {
border-color: var(--color-secondary); border-color: var(--color-secondary);
} }

View File

@ -1,4 +1,5 @@
.explore .navbar { .explore .navbar {
justify-content: center;
margin-bottom: 15px !important; margin-bottom: 15px !important;
background-color: var(--color-navbar) !important; background-color: var(--color-navbar) !important;
border-width: 1px !important; border-width: 1px !important;

View File

@ -46,6 +46,10 @@
white-space: nowrap; white-space: nowrap;
} }
#git-graph-container #flow-select-refs-dropdown .dropdown.icon {
display: none;
}
#git-graph-container #flow-select-refs-dropdown .default.text { #git-graph-container #flow-select-refs-dropdown .default.text {
padding-top: 4px; padding-top: 4px;
padding-bottom: 4px; padding-bottom: 4px;

View File

@ -1,3 +1,5 @@
@import "font-awesome/css/font-awesome.css";
@import "./animations.css"; @import "./animations.css";
@import "./shared/issuelist.css"; @import "./shared/issuelist.css";
@import "./shared/repoorg.css"; @import "./shared/repoorg.css";
@ -9,7 +11,6 @@
@import "./features/projects.css"; @import "./features/projects.css";
@import "./modules/tippy.css"; @import "./modules/tippy.css";
@import "./modules/modal.css"; @import "./modules/modal.css";
@import "./modules/breadcrumb.css";
@import "./code/linebutton.css"; @import "./code/linebutton.css";
@import "./markup/content.css"; @import "./markup/content.css";
@import "./markup/codecopy.css"; @import "./markup/codecopy.css";

View File

@ -1,9 +0,0 @@
.breadcrumb .divider {
color: var(--color-text-light-2);
margin-left: 3px;
margin-right: 3px;
}
.breadcrumb > * {
display: inline;
}

View File

@ -223,6 +223,11 @@
word-break: break-word; word-break: break-word;
} }
.repository.file.list .repo-path .section,
.repository.file.list .repo-path .divider {
display: inline;
}
.repository.file.list #repo-files-table { .repository.file.list #repo-files-table {
table-layout: fixed; table-layout: fixed;
} }
@ -443,15 +448,16 @@
width: 16px; width: 16px;
} }
.repo-editor-header { .repository.file.editor .treepath {
width: 100%; width: 100%;
} }
.repo-editor-header input { .repository.file.editor .treepath input {
vertical-align: middle !important; vertical-align: middle;
width: auto !important; box-shadow: rgba(0, 0, 0, 0.0745098) 0 1px 2px inset;
padding: 7px 8px !important; width: inherit;
margin-right: 5px !important; padding: 7px 8px;
margin-right: 5px;
} }
.repository.file.editor .tabular.menu .svg { .repository.file.editor .tabular.menu .svg {

View File

@ -32,6 +32,10 @@
color: var(--color-white) !important; color: var(--color-white) !important;
} }
.runner-container .runner-new-menu {
width: 300px;
}
.runner-container .task-status-success { .runner-container .task-status-success {
background-color: var(--color-green); background-color: var(--color-green);
color: var(--color-white); color: var(--color-white);

File diff suppressed because it is too large Load Diff

View File

@ -22,6 +22,7 @@
"admin": false, "admin": false,
"components": [ "components": [
"api", "api",
"breadcrumb",
"button", "button",
"card", "card",
"checkbox", "checkbox",
@ -33,6 +34,7 @@
"form", "form",
"grid", "grid",
"header", "header",
"icon",
"input", "input",
"item", "item",
"label", "label",

View File

@ -6,14 +6,11 @@
<div class="action-title"> <div class="action-title">
{{ run.title }} {{ run.title }}
</div> </div>
<button class="action-control-button text green" @click="approveRun()" v-if="run.canApprove"> <button class="run_approve" @click="approveRun()" v-if="run.canApprove">
<SvgIcon name="octicon-play" :size="20"/> <i class="play circle outline icon"/>
</button> </button>
<button class="action-control-button text red" @click="cancelRun()" v-else-if="run.canCancel"> <button class="run_cancel" @click="cancelRun()" v-else-if="run.canCancel">
<SvgIcon name="octicon-x-circle-fill" :size="20"/> <i class="stop circle outline icon"/>
</button>
<button class="action-control-button text green" @click="rerun()" v-else-if="run.canRerun">
<SvgIcon name="octicon-sync" :size="20"/>
</button> </button>
</div> </div>
<div class="action-commit-summary"> <div class="action-commit-summary">
@ -109,7 +106,6 @@ const sfc = {
status: '', status: '',
canCancel: false, canCancel: false,
canApprove: false, canApprove: false,
canRerun: false,
done: false, done: false,
jobs: [ jobs: [
// { // {
@ -197,11 +193,6 @@ const sfc = {
await this.fetchPost(`${jobLink}/rerun`); await this.fetchPost(`${jobLink}/rerun`);
window.location.href = jobLink; window.location.href = jobLink;
}, },
// rerun workflow
async rerun() {
await this.fetchPost(`${this.run.link}/rerun`);
window.location.href = this.run.link;
},
// cancel a run // cancel a run
cancelRun() { cancelRun() {
this.fetchPost(`${this.run.link}/cancel`); this.fetchPost(`${this.run.link}/cancel`);
@ -375,16 +366,26 @@ export function ansiLogToHTML(line) {
margin: 0 20px 20px 20px; margin: 0 20px 20px 20px;
} }
.action-view-header .action-control-button { .action-view-header .run_cancel {
border: none; border: none;
color: var(--color-red);
background-color: transparent; background-color: transparent;
outline: none; outline: none;
cursor: pointer; cursor: pointer;
transition: transform 0.2s; transition: transform 0.2s;
display: flex;
} }
.action-view-header .action-control-button:hover { .action-view-header .run_approve {
border: none;
color: var(--color-green);
background-color: transparent;
outline: none;
cursor: pointer;
transition: transform 0.2s;
}
.action-view-header .run_cancel:hover,
.action-view-header .run_approve:hover {
transform: scale(130%); transform: scale(130%);
} }

View File

@ -18,7 +18,6 @@ import octiconLink from '../../public/img/svg/octicon-link.svg';
import octiconLock from '../../public/img/svg/octicon-lock.svg'; import octiconLock from '../../public/img/svg/octicon-lock.svg';
import octiconMilestone from '../../public/img/svg/octicon-milestone.svg'; import octiconMilestone from '../../public/img/svg/octicon-milestone.svg';
import octiconMirror from '../../public/img/svg/octicon-mirror.svg'; import octiconMirror from '../../public/img/svg/octicon-mirror.svg';
import octiconPlay from '../../public/img/svg/octicon-play.svg';
import octiconProject from '../../public/img/svg/octicon-project.svg'; import octiconProject from '../../public/img/svg/octicon-project.svg';
import octiconRepo from '../../public/img/svg/octicon-repo.svg'; import octiconRepo from '../../public/img/svg/octicon-repo.svg';
import octiconRepoForked from '../../public/img/svg/octicon-repo-forked.svg'; import octiconRepoForked from '../../public/img/svg/octicon-repo-forked.svg';
@ -80,7 +79,6 @@ const svgs = {
'octicon-milestone': octiconMilestone, 'octicon-milestone': octiconMilestone,
'octicon-mirror': octiconMirror, 'octicon-mirror': octiconMirror,
'octicon-organization': octiconOrganization, 'octicon-organization': octiconOrganization,
'octicon-play': octiconPlay,
'octicon-plus': octiconPlus, 'octicon-plus': octiconPlus,
'octicon-project': octiconProject, 'octicon-project': octiconProject,
'octicon-repo': octiconRepo, 'octicon-repo': octiconRepo,

View File

@ -40,6 +40,10 @@ const filterCssImport = (url, ...args) => {
return false; return false;
} }
if (cssFile.includes('font-awesome') && /(eot|ttf|otf|woff|svg)$/.test(importedFile)) {
return false;
}
return true; return true;
}; };
@ -201,6 +205,9 @@ export default {
}, },
emitError: true, emitError: true,
allow: '(Apache-2.0 OR BSD-2-Clause OR BSD-3-Clause OR MIT OR ISC OR CPAL-1.0 OR Unlicense OR EPL-1.0 OR EPL-2.0)', allow: '(Apache-2.0 OR BSD-2-Clause OR BSD-3-Clause OR MIT OR ISC OR CPAL-1.0 OR Unlicense OR EPL-1.0 OR EPL-2.0)',
ignore: [
'font-awesome',
],
}) : new AddAssetPlugin('js/licenses.txt', `Licenses are disabled during development`), }) : new AddAssetPlugin('js/licenses.txt', `Licenses are disabled during development`),
], ],
performance: { performance: {