Compare commits

...

21 Commits

Author SHA1 Message Date
dependabot[bot]
e7e6250ea8
Bump webpack from 5.75.0 to 5.76.0 (#23484)
Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to
5.76.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/webpack/webpack/releases">webpack's
releases</a>.</em></p>
<blockquote>
<h2>v5.76.0</h2>
<h2>Bugfixes</h2>
<ul>
<li>Avoid cross-realm object access by <a
href="https://github.com/Jack-Works"><code>@​Jack-Works</code></a> in <a
href="https://redirect.github.com/webpack/webpack/pull/16500">webpack/webpack#16500</a></li>
<li>Improve hash performance via conditional initialization by <a
href="https://github.com/lvivski"><code>@​lvivski</code></a> in <a
href="https://redirect.github.com/webpack/webpack/pull/16491">webpack/webpack#16491</a></li>
<li>Serialize <code>generatedCode</code> info to fix bug in asset module
cache restoration by <a
href="https://github.com/ryanwilsonperkin"><code>@​ryanwilsonperkin</code></a>
in <a
href="https://redirect.github.com/webpack/webpack/pull/16703">webpack/webpack#16703</a></li>
<li>Improve performance of <code>hashRegExp</code> lookup by <a
href="https://github.com/ryanwilsonperkin"><code>@​ryanwilsonperkin</code></a>
in <a
href="https://redirect.github.com/webpack/webpack/pull/16759">webpack/webpack#16759</a></li>
</ul>
<h2>Features</h2>
<ul>
<li>add <code>target</code> to <code>LoaderContext</code> type by <a
href="https://github.com/askoufis"><code>@​askoufis</code></a> in <a
href="https://redirect.github.com/webpack/webpack/pull/16781">webpack/webpack#16781</a></li>
</ul>
<h2>Security</h2>
<ul>
<li><a
href="https://github.com/advisories/GHSA-3rfm-jhwj-7488">CVE-2022-37603</a>
fixed by <a
href="https://github.com/akhilgkrishnan"><code>@​akhilgkrishnan</code></a>
in <a
href="https://redirect.github.com/webpack/webpack/pull/16446">webpack/webpack#16446</a></li>
</ul>
<h2>Repo Changes</h2>
<ul>
<li>Fix HTML5 logo in README by <a
href="https://github.com/jakebailey"><code>@​jakebailey</code></a> in <a
href="https://redirect.github.com/webpack/webpack/pull/16614">webpack/webpack#16614</a></li>
<li>Replace TypeScript logo in README by <a
href="https://github.com/jakebailey"><code>@​jakebailey</code></a> in <a
href="https://redirect.github.com/webpack/webpack/pull/16613">webpack/webpack#16613</a></li>
<li>Update actions/cache dependencies by <a
href="https://github.com/piwysocki"><code>@​piwysocki</code></a> in <a
href="https://redirect.github.com/webpack/webpack/pull/16493">webpack/webpack#16493</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/Jack-Works"><code>@​Jack-Works</code></a> made
their first contribution in <a
href="https://redirect.github.com/webpack/webpack/pull/16500">webpack/webpack#16500</a></li>
<li><a href="https://github.com/lvivski"><code>@​lvivski</code></a> made
their first contribution in <a
href="https://redirect.github.com/webpack/webpack/pull/16491">webpack/webpack#16491</a></li>
<li><a
href="https://github.com/jakebailey"><code>@​jakebailey</code></a> made
their first contribution in <a
href="https://redirect.github.com/webpack/webpack/pull/16614">webpack/webpack#16614</a></li>
<li><a
href="https://github.com/akhilgkrishnan"><code>@​akhilgkrishnan</code></a>
made their first contribution in <a
href="https://redirect.github.com/webpack/webpack/pull/16446">webpack/webpack#16446</a></li>
<li><a
href="https://github.com/ryanwilsonperkin"><code>@​ryanwilsonperkin</code></a>
made their first contribution in <a
href="https://redirect.github.com/webpack/webpack/pull/16703">webpack/webpack#16703</a></li>
<li><a href="https://github.com/piwysocki"><code>@​piwysocki</code></a>
made their first contribution in <a
href="https://redirect.github.com/webpack/webpack/pull/16493">webpack/webpack#16493</a></li>
<li><a href="https://github.com/askoufis"><code>@​askoufis</code></a>
made their first contribution in <a
href="https://redirect.github.com/webpack/webpack/pull/16781">webpack/webpack#16781</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0">https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="97b1718720"><code>97b1718</code></a>
Merge pull request <a
href="https://redirect.github.com/webpack/webpack/issues/16781">#16781</a>
from askoufis/loader-context-target-type</li>
<li><a
href="b84efe6224"><code>b84efe6</code></a>
Merge pull request <a
href="https://redirect.github.com/webpack/webpack/issues/16759">#16759</a>
from ryanwilsonperkin/real-content-hash-regex-perf</li>
<li><a
href="c98e9e0014"><code>c98e9e0</code></a>
Merge pull request <a
href="https://redirect.github.com/webpack/webpack/issues/16493">#16493</a>
from piwysocki/patch-1</li>
<li><a
href="5f34acfbc0"><code>5f34acf</code></a>
feat: Add <code>target</code> to <code>LoaderContext</code> type</li>
<li><a
href="b7fc4d876d"><code>b7fc4d8</code></a>
Merge pull request <a
href="https://redirect.github.com/webpack/webpack/issues/16703">#16703</a>
from ryanwilsonperkin/ryanwilsonperkin/fix-16160</li>
<li><a
href="63ea82da4d"><code>63ea82d</code></a>
Merge branch 'webpack:main' into patch-1</li>
<li><a
href="4ba225225b"><code>4ba2252</code></a>
Merge pull request <a
href="https://redirect.github.com/webpack/webpack/issues/16446">#16446</a>
from akhilgkrishnan/patch-1</li>
<li><a
href="1acd6350be"><code>1acd635</code></a>
Merge pull request <a
href="https://redirect.github.com/webpack/webpack/issues/16613">#16613</a>
from jakebailey/ts-logo</li>
<li><a
href="302eb37fe1"><code>302eb37</code></a>
Merge pull request <a
href="https://redirect.github.com/webpack/webpack/issues/16614">#16614</a>
from jakebailey/html5-logo</li>
<li><a
href="cfdb1dfe59"><code>cfdb1df</code></a>
Improve performance of hashRegExp lookup</li>
<li>Additional commits viewable in <a
href="https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~evilebottnawi">evilebottnawi</a>, a new
releaser for webpack since your current version.</p>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=webpack&package-manager=npm_and_yarn&previous-version=5.75.0&new-version=5.76.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the
default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as
the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as
the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the
default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/go-gitea/gitea/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 23:37:59 -04:00
silverwind
202803fc69
Replace Less with CSS (#23481)
Ran most of the Less files through the Less compiler and Prettier and
then followed up with a round of manual fixes.

The Less compiler had unfortunately stripped all `//` style comments
that I had to restore (It did preserve `/* */` comments). Other fixes
include duplicate selector removal which were revealed after the
transpilation and which weren't caught by stylelint before but now are.

Fixes: https://github.com/go-gitea/gitea/issues/15565
2023-03-14 22:20:19 -04:00
silverwind
bf730528ca
Fix 'View File' button in code search (#23478)
- Right-align 'View File' button
- Add 'role' attribute to button link

Before:
<img width="1148" alt="Screenshot 2023-03-14 at 22 02 16"
src="https://user-images.githubusercontent.com/115237/225135954-f06153ec-c222-441e-98ba-0177afff3a7a.png">

After:
<img width="1150" alt="Screenshot 2023-03-14 at 22 02 33"
src="https://user-images.githubusercontent.com/115237/225135966-323cb695-05ef-4b83-a8ef-05f2b1887090.png">

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-03-14 22:19:27 -04:00
silverwind
ea1b92621b
Use gitea/test_env image instead of golang (#23455)
The `safe.directory` setting was not executed for pull requests, which
made subsequent `deps-backend` target fail at `go mod download`. To fix
it, split thep and perform the git config unconditionally.

Example: https://drone.gitea.io/go-gitea/gitea/69477/4/3

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-03-14 21:53:14 -04:00
techknowlogick
f96eef872f
Skip DB tests duplicate runs on push to branches (#23476)
This skips all testing-* pipelines on push to main or release/*
branches. This decreases the total build time on those, as in theory
they should already be run for PRs before merging.

Fixes https://github.com/go-gitea/gitea/issues/22011

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-03-14 21:46:13 -04:00
Jordan Cech
69c9ab387f
Update app.example.ini (#23480) 2023-03-14 20:39:36 -04:00
GiteaBot
74b80d1b2f [skip ci] Updated translations via Crowdin 2023-03-15 00:17:03 +00:00
Yarden Shoham
b2c1c17f38
Fix due date being wrong on issue list (#23475)
Exactly like #22302 but in the issue list page
2023-03-14 15:55:49 -05:00
techknowlogick
32204fcf8b
test_env: hardcode major go version in use (#23464)
hardcode the version of test_env we use in docker, so that we can use
different major versions of golang between versions of Gitea

---------

Co-authored-by: Lauris BH <lauris@nix.lv>
2023-03-14 16:09:01 -04:00
John Olheiser
6e75739c5b
Push option bonus for PTC docs (#23473)
Follow-up for #23458 

I could have suggested this on the original PR, but I thought there
would be more to add. Hadn't noticed the push options docs already had
nearly the same shell command. 😅

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-03-14 19:12:27 +02:00
techknowlogick
991ab3b5ad
Lint Markdown pass 2023-03-14 12:53:02 -04:00
techknowlogick
db9bb3699a
Push to create docs (#23458)
This PR adds user friendly documentation on how to use push to create
feature
2023-03-14 11:37:11 -05:00
Lunny Xiao
8e40634797
Convert GitHub event on actions and fix some pull_request events. (#23037)
Follow #22680

Partially Fix #22958, on pull_request, `opened`, `reopened`,
`synchronize` supported, `edited` hasn't been supported yet because
Gitea doesn't trigger that events.

---------

Co-authored-by: yp05327 <576951401@qq.com>
2023-03-14 20:50:51 +08:00
Lunny Xiao
c492e86312
Remove wrongly added column on migration test fixtures (#23456)
Fix https://drone.gitea.io/go-gitea/gitea/69418/3/8
Migration fixtures are in `models/migrations/fixtures`, every folder
will be used only by the test with the same name.
For `Test_DeleteOrphanedIssueLabels`, the fixture should keep consistent
as the database structure at that time. So the newly added `exclusive`
is not right. Just revert the change in
https://github.com/go-gitea/gitea/pull/22585/files#diff-f8db9cbbaa10bf7b27eb726884454db821a4b4f8cb9a0d50435555908761bbcb
2023-03-14 19:49:59 +08:00
wxiaoguang
ac8d71ff07
Refactor branch/tag selector to Vue SFC (#23421)
Follow #23394

There were many bad smells in old code. This PR only moves the code into
Vue SFC, doesn't touch the unrelated logic.

update: after
5f23218c85
, there should be no usage of the vue-rumtime-compiler anymore
(hopefully), so I think this PR could close #19851

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-03-14 17:51:20 +08:00
techknowlogick
d56bb74201
add admin API email endpoints (#22792)
add email endpoint to admin API to ensure API parity with admin
dashboard.
2023-03-14 03:54:40 -04:00
techknowlogick
03591f0f95
add user rename endpoint to admin api (#22789)
this is a simple endpoint that adds the ability to rename users to the
admin API.

Note: this is not in a mergeable state. It would be better if this was
handled by a PATCH/POST to the /api/v1/admin/users/{username} endpoint
and the username is modified.

---------

Co-authored-by: Jason Song <i@wolfogre.com>
2023-03-14 03:45:21 -04:00
yp05327
aac07d010f
Add workflow error notification in ui (#23404)
![image](https://user-images.githubusercontent.com/18380374/224237847-07a30029-32d4-4af7-a36e-e55f0ed899aa.png)

![image](https://user-images.githubusercontent.com/18380374/224239309-a96120e1-5eec-41c0-89aa-9cf63d1df30c.png)

---------

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-03-14 15:27:03 +08:00
wxiaoguang
6ff5400af9
Make branches list page operations remember current page (#23420)
Close #23411

Always pass "page" query parameter to backend, and make backend respect
it.

The `ctx.FormInt("limit")` is never used, so removed.

---------

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-03-14 13:11:38 +08:00
techknowlogick
0efa9d5649
fix markdown lint issue (#23457)
CI is failing with the following:
```
docs/content/doc/features/localization.zh-cn.md:16 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "# 本地化"]
docs/content/doc/features/localization.zh-cn.md:23 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## 支持的语言"]
```

This fixes that error
2023-03-14 12:10:01 +08:00
wxiaoguang
e82f1b15c7
Refactor dashboard repo list to Vue SFC (#23405)
Similar to #23394

The dashboard repo list mixes jQuery/Fomantic UI/Vue together, it's very
diffcult to maintain and causes unfixable a11y problems.

This PR uses two steps to refactor the repo list:

1. move `data-` attributes to JS object and use Vue data as much as
possible
d3adc0dcac
2. move the code into a Vue SFC
7ebe55df6e

Total: +516 −585

Screenshots:

<details>

![image](https://user-images.githubusercontent.com/2114189/224271457-a23e05be-d7d3-4247-a803-f0ee30c36f44.png)

![image](https://user-images.githubusercontent.com/2114189/224271504-76fbd3da-4d7a-4725-b0d1-fbff83caac63.png)

![image](https://user-images.githubusercontent.com/2114189/224271845-f007cadf-6c49-46bd-a65c-a3fc75bdba3b.png)

</details>

---------

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2023-03-14 12:09:06 +08:00
136 changed files with 9940 additions and 8964 deletions

View File

@ -9,8 +9,6 @@ platform:
trigger: trigger:
event: event:
- push
- tag
- pull_request - pull_request
paths: paths:
exclude: exclude:
@ -28,7 +26,7 @@ steps:
- make deps-frontend - make deps-frontend
- name: deps-backend - name: deps-backend
image: golang:1.20 image: gitea/test_env:linux-1.20-amd64
pull: always pull: always
commands: commands:
- make deps-backend - make deps-backend
@ -44,7 +42,7 @@ steps:
depends_on: [deps-frontend] depends_on: [deps-frontend]
- name: lint-backend - name: lint-backend
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
pull: always pull: always
commands: commands:
- make lint-backend - make lint-backend
@ -58,7 +56,7 @@ steps:
path: /go path: /go
- name: lint-backend-windows - name: lint-backend-windows
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
commands: commands:
- make golangci-lint-windows vet - make golangci-lint-windows vet
environment: environment:
@ -73,7 +71,7 @@ steps:
path: /go path: /go
- name: lint-backend-gogit - name: lint-backend-gogit
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
commands: commands:
- make lint-backend - make lint-backend
environment: environment:
@ -92,7 +90,7 @@ steps:
depends_on: [deps-frontend] depends_on: [deps-frontend]
- name: checks-backend - name: checks-backend
image: golang:1.20 image: gitea/test_env:linux-1.20-amd64
commands: commands:
- make --always-make checks-backend # ensure the 'go-licenses' make target runs - make --always-make checks-backend # ensure the 'go-licenses' make target runs
depends_on: [deps-backend] depends_on: [deps-backend]
@ -113,7 +111,7 @@ steps:
depends_on: [deps-frontend] depends_on: [deps-frontend]
- name: build-backend-no-gcc - name: build-backend-no-gcc
image: golang:1.19 # this step is kept as the lowest version of golang that we support image: gitea/test_env:linux-1.19-amd64 # this step is kept as the lowest version of golang that we support
pull: always pull: always
environment: environment:
GOPROXY: https://goproxy.io GOPROXY: https://goproxy.io
@ -125,7 +123,7 @@ steps:
path: /go path: /go
- name: build-backend-arm64 - name: build-backend-arm64
image: golang:1.20 image: gitea/test_env:linux-1.20-amd64
environment: environment:
GOPROXY: https://goproxy.io GOPROXY: https://goproxy.io
GOOS: linux GOOS: linux
@ -140,7 +138,7 @@ steps:
path: /go path: /go
- name: build-backend-windows - name: build-backend-windows
image: golang:1.20 image: gitea/test_env:linux-1.20-amd64
environment: environment:
GOPROXY: https://goproxy.io GOPROXY: https://goproxy.io
GOOS: windows GOOS: windows
@ -154,7 +152,7 @@ steps:
path: /go path: /go
- name: build-backend-386 - name: build-backend-386
image: golang:1.20 image: gitea/test_env:linux-1.20-amd64
environment: environment:
GOPROXY: https://goproxy.io GOPROXY: https://goproxy.io
GOOS: linux GOOS: linux
@ -180,8 +178,6 @@ depends_on:
trigger: trigger:
event: event:
- push
- tag
- pull_request - pull_request
paths: paths:
exclude: exclude:
@ -217,7 +213,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
when: when:
event: event:
@ -225,7 +220,7 @@ steps:
- pull_request - pull_request
- name: deps-backend - name: deps-backend
image: golang:1.20 image: gitea/test_env:linux-1.20-amd64
pull: always pull: always
commands: commands:
- make deps-backend - make deps-backend
@ -234,13 +229,13 @@ steps:
path: /go path: /go
- name: prepare-test-env - name: prepare-test-env
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
pull: always pull: always
commands: commands:
- ./build/test-env-prepare.sh - ./build/test-env-prepare.sh
- name: build - name: build
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea user: gitea
commands: commands:
- ./build/test-env-check.sh - ./build/test-env-check.sh
@ -255,7 +250,7 @@ steps:
path: /go path: /go
- name: test-pgsql - name: test-pgsql
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea user: gitea
commands: commands:
- timeout -s ABRT 50m make test-pgsql-migration test-pgsql - timeout -s ABRT 50m make test-pgsql-migration test-pgsql
@ -285,8 +280,6 @@ depends_on:
trigger: trigger:
event: event:
- push
- tag
- pull_request - pull_request
paths: paths:
exclude: exclude:
@ -319,7 +312,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
when: when:
event: event:
@ -327,7 +319,7 @@ steps:
- pull_request - pull_request
- name: deps-backend - name: deps-backend
image: golang:1.20 image: gitea/test_env:linux-1.20-amd64
pull: always pull: always
commands: commands:
- make deps-backend - make deps-backend
@ -336,13 +328,13 @@ steps:
path: /go path: /go
- name: prepare-test-env - name: prepare-test-env
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
pull: always pull: always
commands: commands:
- ./build/test-env-prepare.sh - ./build/test-env-prepare.sh
- name: build - name: build
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea user: gitea
commands: commands:
- ./build/test-env-check.sh - ./build/test-env-check.sh
@ -357,7 +349,7 @@ steps:
path: /go path: /go
- name: unit-test - name: unit-test
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea user: gitea
commands: commands:
- make unit-test-coverage test-check - make unit-test-coverage test-check
@ -373,7 +365,7 @@ steps:
path: /go path: /go
- name: unit-test-gogit - name: unit-test-gogit
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea user: gitea
commands: commands:
- make unit-test-coverage test-check - make unit-test-coverage test-check
@ -389,7 +381,7 @@ steps:
path: /go path: /go
- name: test-mysql - name: test-mysql
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea user: gitea
commands: commands:
- make test-mysql-migration integration-test-coverage - make test-mysql-migration integration-test-coverage
@ -405,7 +397,7 @@ steps:
path: /go path: /go
- name: generate-coverage - name: generate-coverage
image: golang:1.20 image: gitea/test_env:linux-1.20-amd64
commands: commands:
- make coverage - make coverage
environment: environment:
@ -449,8 +441,6 @@ depends_on:
trigger: trigger:
event: event:
- push
- tag
- pull_request - pull_request
paths: paths:
exclude: exclude:
@ -473,7 +463,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
when: when:
event: event:
@ -481,7 +470,7 @@ steps:
- pull_request - pull_request
- name: deps-backend - name: deps-backend
image: golang:1.20 image: gitea/test_env:linux-1.20-amd64
pull: always pull: always
commands: commands:
- make deps-backend - make deps-backend
@ -490,13 +479,13 @@ steps:
path: /go path: /go
- name: prepare-test-env - name: prepare-test-env
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
pull: always pull: always
commands: commands:
- ./build/test-env-prepare.sh - ./build/test-env-prepare.sh
- name: build - name: build
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea user: gitea
commands: commands:
- ./build/test-env-check.sh - ./build/test-env-check.sh
@ -511,7 +500,7 @@ steps:
path: /go path: /go
- name: test-mysql8 - name: test-mysql8
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea user: gitea
commands: commands:
- timeout -s ABRT 50m make test-mysql8-migration test-mysql8 - timeout -s ABRT 50m make test-mysql8-migration test-mysql8
@ -538,8 +527,6 @@ depends_on:
trigger: trigger:
event: event:
- push
- tag
- pull_request - pull_request
paths: paths:
exclude: exclude:
@ -563,7 +550,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
when: when:
event: event:
@ -571,7 +557,7 @@ steps:
- pull_request - pull_request
- name: deps-backend - name: deps-backend
image: golang:1.20 image: gitea/test_env:linux-1.20-amd64
pull: always pull: always
commands: commands:
- make deps-backend - make deps-backend
@ -580,13 +566,13 @@ steps:
path: /go path: /go
- name: prepare-test-env - name: prepare-test-env
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
pull: always pull: always
commands: commands:
- ./build/test-env-prepare.sh - ./build/test-env-prepare.sh
- name: build - name: build
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea user: gitea
commands: commands:
- ./build/test-env-check.sh - ./build/test-env-check.sh
@ -601,7 +587,7 @@ steps:
path: /go path: /go
- name: test-mssql - name: test-mssql
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea user: gitea
commands: commands:
- make test-mssql-migration test-mssql - make test-mssql-migration test-mssql
@ -627,8 +613,6 @@ depends_on:
trigger: trigger:
event: event:
- push
- tag
- pull_request - pull_request
paths: paths:
exclude: exclude:
@ -643,7 +627,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
when: when:
event: event:
@ -651,7 +634,7 @@ steps:
- pull_request - pull_request
- name: deps-backend - name: deps-backend
image: golang:1.20 image: gitea/test_env:linux-1.20-arm64
pull: always pull: always
commands: commands:
- make deps-backend - make deps-backend
@ -660,13 +643,13 @@ steps:
path: /go path: /go
- name: prepare-test-env - name: prepare-test-env
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-arm64 # https://gitea.com/gitea/test-env
pull: always pull: always
commands: commands:
- ./build/test-env-prepare.sh - ./build/test-env-prepare.sh
- name: build - name: build
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-arm64 # https://gitea.com/gitea/test-env
user: gitea user: gitea
commands: commands:
- ./build/test-env-check.sh - ./build/test-env-check.sh
@ -681,7 +664,7 @@ steps:
path: /go path: /go
- name: test-sqlite - name: test-sqlite
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env image: gitea/test_env:linux-1.20-arm64 # https://gitea.com/gitea/test-env
user: gitea user: gitea
commands: commands:
- timeout -s ABRT 50m make test-sqlite-migration test-sqlite - timeout -s ABRT 50m make test-sqlite-migration test-sqlite
@ -733,7 +716,7 @@ steps:
depends_on: [deps-frontend] depends_on: [deps-frontend]
- name: deps-backend - name: deps-backend
image: golang:1.18 image: gitea/test_env:linux-1.20-amd64
pull: always pull: always
commands: commands:
- make deps-backend - make deps-backend
@ -842,7 +825,7 @@ trigger:
steps: steps:
- name: download - name: download
image: golang:1.20 image: gitea/test_env:linux-1.20-amd64
pull: always pull: always
commands: commands:
- timeout -s ABRT 40m make generate-license generate-gitignore - timeout -s ABRT 40m make generate-license generate-gitignore
@ -902,7 +885,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
- name: deps-frontend - name: deps-frontend
@ -912,7 +894,7 @@ steps:
- make deps-frontend - make deps-frontend
- name: deps-backend - name: deps-backend
image: golang:1.20 image: gitea/test_env:linux-1.20-amd64
pull: always pull: always
commands: commands:
- make deps-backend - make deps-backend
@ -1038,7 +1020,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
- name: deps-frontend - name: deps-frontend
@ -1048,7 +1029,7 @@ steps:
- make deps-frontend - make deps-frontend
- name: deps-backend - name: deps-backend
image: golang:1.20 image: gitea/test_env:linux-1.20-amd64
pull: always pull: always
commands: commands:
- make deps-backend - make deps-backend
@ -1148,7 +1129,7 @@ trigger:
steps: steps:
- name: build-docs - name: build-docs
image: golang:1.20 image: gitea/test_env:linux-1.20-amd64
commands: commands:
- cd docs - cd docs
- make trans-copy clean build - make trans-copy clean build
@ -1202,7 +1183,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
- name: publish - name: publish
@ -1280,7 +1260,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
- name: publish - name: publish
@ -1353,7 +1332,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
- name: publish - name: publish
@ -1427,7 +1405,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
- name: publish - name: publish
@ -1477,7 +1454,7 @@ steps:
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: docker-linux-amd64-dry-run name: docker-linux-arm64-dry-run
platform: platform:
os: linux os: linux
@ -1487,8 +1464,8 @@ depends_on:
- compliance - compliance
trigger: trigger:
ref: event:
- "refs/pull/**" - pull_request
paths: paths:
exclude: exclude:
- docs/** - docs/**
@ -1545,7 +1522,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
- name: publish - name: publish
@ -1623,7 +1599,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
- name: publish - name: publish
@ -1699,7 +1674,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
- name: publish - name: publish
@ -1773,7 +1747,6 @@ steps:
image: docker:git image: docker:git
pull: always pull: always
commands: commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force - git fetch --tags --force
- name: publish - name: publish

View File

@ -5,8 +5,6 @@ ignoreFiles:
- "**/*.go" - "**/*.go"
overrides: overrides:
- files: ["**/*.less"]
customSyntax: postcss-less
- files: ["**/chroma/*", "**/codemirror/*", "**/standalone/*", "**/console/*"] - files: ["**/chroma/*", "**/codemirror/*", "**/standalone/*", "**/console/*"]
rules: rules:
scale-unlimited/declaration-strict-value: null scale-unlimited/declaration-strict-value: null

View File

@ -29,7 +29,7 @@ AIR_PACKAGE ?= github.com/cosmtrek/air@v1.40.4
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.6.0 EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.6.0
ERRCHECK_PACKAGE ?= github.com/kisielk/errcheck@v1.6.2 ERRCHECK_PACKAGE ?= github.com/kisielk/errcheck@v1.6.2
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.4.0 GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.4.0
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.0 GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2
GXZ_PAGAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.10 GXZ_PAGAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.10
MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/misspell@v0.3.4 MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/misspell@v0.3.4
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.30.4 SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.30.4
@ -105,7 +105,7 @@ GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO) list code.gitea.io/gitea/models/m
FOMANTIC_WORK_DIR := web_src/fomantic FOMANTIC_WORK_DIR := web_src/fomantic
WEBPACK_SOURCES := $(shell find web_src/js web_src/less -type f) WEBPACK_SOURCES := $(shell find web_src/js web_src/css -type f)
WEBPACK_CONFIGS := webpack.config.js WEBPACK_CONFIGS := webpack.config.js
WEBPACK_DEST := public/js/index.js public/css/index.css WEBPACK_DEST := public/js/index.js public/css/index.css
WEBPACK_DEST_ENTRIES := public/js public/css public/fonts public/img/webpack public/serviceworker.js WEBPACK_DEST_ENTRIES := public/js public/css public/fonts public/img/webpack public/serviceworker.js
@ -131,7 +131,7 @@ TEST_TAGS ?= sqlite sqlite_unlock_notify
TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) $(GO_LICENSE_TMP_DIR) TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) $(GO_LICENSE_TMP_DIR)
GO_DIRS := cmd tests models modules routers build services tools GO_DIRS := cmd tests models modules routers build services tools
WEB_DIRS := web_src/js web_src/less WEB_DIRS := web_src/js web_src/css
GO_SOURCES := $(wildcard *.go) GO_SOURCES := $(wildcard *.go)
GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" -not -path modules/options/bindata.go -not -path modules/public/bindata.go -not -path modules/templates/bindata.go) GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" -not -path modules/options/bindata.go -not -path modules/public/bindata.go -not -path modules/templates/bindata.go)
@ -342,7 +342,7 @@ lint: lint-frontend lint-backend
.PHONY: lint-frontend .PHONY: lint-frontend
lint-frontend: node_modules lint-frontend: node_modules
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js tests/e2e npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js tests/e2e
npx stylelint --color --max-warnings=0 web_src/less npx stylelint --color --max-warnings=0 web_src/css
npx spectral lint -q -F hint $(SWAGGER_SPEC) npx spectral lint -q -F hint $(SWAGGER_SPEC)
npx markdownlint docs *.md npx markdownlint docs *.md

View File

@ -20,7 +20,7 @@
;; - The environment variable `$GITEA_WORK_DIR` ;; - The environment variable `$GITEA_WORK_DIR`
;; - A built-in value set at build time (see building from source) ;; - A built-in value set at build time (see building from source)
;; - Otherwise it defaults to the directory of the _`AppPath`_ ;; - Otherwise it defaults to the directory of the _`AppPath`_
;; - If any of the above are relative paths then they are made absolute against the ;; - If any of the above are relative paths then they are made absolute against
;; the directory of the _`AppPath`_ ;; the directory of the _`AppPath`_
;; - _`CustomPath`_: This is the base directory for custom templates and other options. ;; - _`CustomPath`_: This is the base directory for custom templates and other options.
;; It is determined by using the first set thing in the following hierarchy: ;; It is determined by using the first set thing in the following hierarchy:

View File

@ -46,7 +46,7 @@ reported as part of the default configuration when running `gitea --help` or on
- The environment variable `$GITEA_WORK_DIR` - The environment variable `$GITEA_WORK_DIR`
- A built-in value set at build time (see building from source) - A built-in value set at build time (see building from source)
- Otherwise it defaults to the directory of the _`AppPath`_ - Otherwise it defaults to the directory of the _`AppPath`_
- If any of the above are relative paths then they are made absolute against the - If any of the above are relative paths then they are made absolute against
the directory of the _`AppPath`_ the directory of the _`AppPath`_
- _`CustomPath`_: This is the base directory for custom templates and other options. - _`CustomPath`_: This is the base directory for custom templates and other options.
It is determined by using the first set thing in the following hierarchy: It is determined by using the first set thing in the following hierarchy:

View File

@ -354,7 +354,7 @@ To make a custom theme available to all users:
Community themes are listed in [gitea/awesome-gitea#themes](https://gitea.com/gitea/awesome-gitea#themes). Community themes are listed in [gitea/awesome-gitea#themes](https://gitea.com/gitea/awesome-gitea#themes).
The `arc-green` theme source can be found [here](https://github.com/go-gitea/gitea/blob/main/web_src/less/themes/theme-arc-green.less). The `arc-green` theme source can be found [here](https://github.com/go-gitea/gitea/blob/main/web_src/css/themes/theme-arc-green.css).
If your custom theme is considered a dark theme, set the global css variable `--is-dark-theme` to `true`. If your custom theme is considered a dark theme, set the global css variable `--is-dark-theme` to `true`.
This allows Gitea to adjust the Monaco code editor's theme accordingly. This allows Gitea to adjust the Monaco code editor's theme accordingly.

View File

@ -21,13 +21,13 @@ menu:
## Background ## Background
Gitea uses [Less CSS](https://lesscss.org), [Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html) (based on [jQuery](https://api.jquery.com)) and [Vue3](https://vuejs.org/) for its frontend. Gitea uses [Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html) (based on [jQuery](https://api.jquery.com)) and [Vue3](https://vuejs.org/) for its frontend.
The HTML pages are rendered by [Go HTML Template](https://pkg.go.dev/html/template). The HTML pages are rendered by [Go HTML Template](https://pkg.go.dev/html/template).
The source files can be found in the following directories: The source files can be found in the following directories:
* **Less styles:** `web_src/less/` * **CSS styles:** `web_src/css/`
* **JavaScript files:** `web_src/js/` * **JavaScript files:** `web_src/js/`
* **Vue components:** `web_src/js/components/` * **Vue components:** `web_src/js/components/`
* **Go HTML templates:** `templates/` * **Go HTML templates:** `templates/`

View File

@ -14,6 +14,7 @@ menu:
--- ---
# 本地化 # 本地化
Gitea的本地化是通过我们的[Crowdin项目](https://crowdin.com/project/gitea)进行的。 Gitea的本地化是通过我们的[Crowdin项目](https://crowdin.com/project/gitea)进行的。
对于对**英语翻译**的更改可以发出pull-request来更改[英语语言环境](https://github.com/go-gitea/gitea/blob/master/options/locale/locale_en-US.ini)中合适的关键字。 对于对**英语翻译**的更改可以发出pull-request来更改[英语语言环境](https://github.com/go-gitea/gitea/blob/master/options/locale/locale_en-US.ini)中合适的关键字。
@ -21,6 +22,7 @@ Gitea的本地化是通过我们的[Crowdin项目](https://crowdin.com/project/g
有关对**非英语**翻译的更改,请参阅上面的 Crowdin 项目。 有关对**非英语**翻译的更改,请参阅上面的 Crowdin 项目。
## 支持的语言 ## 支持的语言
上述 Crowdin 项目中列出的任何语言一旦翻译了 25% 或更多都将得到支持。 上述 Crowdin 项目中列出的任何语言一旦翻译了 25% 或更多都将得到支持。
翻译被接受后,它将在下一次 Crowdin 同步后反映在主存储库中,这通常是在任何 PR 合并之后。 翻译被接受后,它将在下一次 Crowdin 同步后反映在主存储库中,这通常是在任何 PR 合并之后。

View File

@ -29,5 +29,5 @@ were added.
Example of changing a repository's visibility to public: Example of changing a repository's visibility to public:
```shell ```shell
git push -o repo.private=false -u origin master git push -o repo.private=false -u origin main
``` ```

View File

@ -29,5 +29,5 @@ Gitea 從 `1.13` 版開始支援某些 [push options](https://git-scm.com/docs/g
以下範例修改儲存庫的可見性為公開: 以下範例修改儲存庫的可見性為公開:
```shell ```shell
git push -o repo.private=false -u origin master git push -o repo.private=false -u origin main
``` ```

View File

@ -0,0 +1,40 @@
---
date: "2020-07-06T16:00:00+02:00"
title: "Usage: Push To Create"
slug: "push-to-create"
weight: 15
toc: false
draft: false
menu:
sidebar:
parent: "usage"
name: "Push To Create"
weight: 15
identifier: "push-to-create"
---
# Push To Create
Push to create is a feature that allows you to push to a repository that does not exist yet in Gitea. This is useful for automation and for allowing users to create repositories without having to go through the web interface. This feature is disabled by default.
## Enabling Push To Create
In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Gitea for the changes to take effect. You can read more about these two options in the [Configuration Cheat Sheet]({{< relref "doc/advanced/config-cheat-sheet.en-us.md#repository-repository" >}}).
## Using Push To Create
Assuming you have a git repository in the current directory, you can push to a repository that does not exist yet in Gitea by running the following command:
```shell
# Add the remote you want to push to
git remote add origin git@{domain}:{username}/{repo name that does not exist yet}.git
# push to the remote
git push -u origin main
```
This assumes you are using an SSH remote, but you can also use HTTPS remotes as well.
## Push options (bonus)
Push-to-create will default to the visibility defined by `DEFAULT_PUSH_CREATE_PRIVATE` in `app.ini`. To explicitly set the visibility, you can use a [push option]({{< relref "doc/usage/push-options.en-us.md" >}}).

View File

@ -660,10 +660,10 @@ func GetPullRequestByIssueID(ctx context.Context, issueID int64) (*PullRequest,
// GetAllUnmergedAgitPullRequestByPoster get all unmerged agit flow pull request // GetAllUnmergedAgitPullRequestByPoster get all unmerged agit flow pull request
// By poster id. // By poster id.
func GetAllUnmergedAgitPullRequestByPoster(uid int64) ([]*PullRequest, error) { func GetAllUnmergedAgitPullRequestByPoster(ctx context.Context, uid int64) ([]*PullRequest, error) {
pulls := make([]*PullRequest, 0, 10) pulls := make([]*PullRequest, 0, 10)
err := db.GetEngine(db.DefaultContext). err := db.GetEngine(ctx).
Where("has_merged=? AND flow = ? AND issue.is_closed=? AND issue.poster_id=?", Where("has_merged=? AND flow = ? AND issue.is_closed=? AND issue.poster_id=?",
false, PullRequestFlowAGit, false, uid). false, PullRequestFlowAGit, false, uid).
Join("INNER", "issue", "issue.id=pull_request.issue_id"). Join("INNER", "issue", "issue.id=pull_request.issue_id").

View File

@ -4,7 +4,6 @@
org_id: 0 org_id: 0
name: label1 name: label1
color: '#abcdef' color: '#abcdef'
exclusive: false
num_issues: 2 num_issues: 2
num_closed_issues: 0 num_closed_issues: 0
@ -14,7 +13,6 @@
org_id: 0 org_id: 0
name: label2 name: label2
color: '#000000' color: '#000000'
exclusive: false
num_issues: 1 num_issues: 1
num_closed_issues: 1 num_closed_issues: 1
- -
@ -23,7 +21,6 @@
org_id: 3 org_id: 3
name: orglabel3 name: orglabel3
color: '#abcdef' color: '#abcdef'
exclusive: false
num_issues: 0 num_issues: 0
num_closed_issues: 0 num_closed_issues: 0
@ -33,7 +30,6 @@
org_id: 3 org_id: 3
name: orglabel4 name: orglabel4
color: '#000000' color: '#000000'
exclusive: false
num_issues: 1 num_issues: 1
num_closed_issues: 0 num_closed_issues: 0
@ -43,6 +39,5 @@
org_id: 0 org_id: 0
name: pull-test-label name: pull-test-label
color: '#000000' color: '#000000'
exclusive: false
num_issues: 0 num_issues: 0
num_closed_issues: 0 num_closed_issues: 0

View File

@ -742,13 +742,13 @@ func VerifyUserActiveCode(code string) (user *User) {
} }
// ChangeUserName changes all corresponding setting from old user name to new one. // ChangeUserName changes all corresponding setting from old user name to new one.
func ChangeUserName(u *User, newUserName string) (err error) { func ChangeUserName(ctx context.Context, u *User, newUserName string) (err error) {
oldUserName := u.Name oldUserName := u.Name
if err = IsUsableUsername(newUserName); err != nil { if err = IsUsableUsername(newUserName); err != nil {
return err return err
} }
ctx, committer, err := db.TxContext(db.DefaultContext) ctx, committer, err := db.TxContext(ctx)
if err != nil { if err != nil {
return err return err
} }

41
modules/actions/github.go Normal file
View File

@ -0,0 +1,41 @@
// Copyright 2023 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package actions
import (
webhook_module "code.gitea.io/gitea/modules/webhook"
"github.com/nektos/act/pkg/jobparser"
)
const (
githubEventPullRequest = "pull_request"
githubEventPullRequestTarget = "pull_request_target"
githubEventPullRequestReviewComment = "pull_request_review_comment"
githubEventPullRequestReview = "pull_request_review"
githubEventRegistryPackage = "registry_package"
githubEventCreate = "create"
githubEventDelete = "delete"
githubEventFork = "fork"
githubEventPush = "push"
githubEventIssues = "issues"
githubEventIssueComment = "issue_comment"
githubEventRelease = "release"
githubEventPullRequestComment = "pull_request_comment"
)
func convertFromGithubEvent(evt *jobparser.Event) string {
switch evt.Name {
case githubEventPullRequest, githubEventPullRequestTarget, githubEventPullRequestReview,
githubEventPullRequestReviewComment:
return string(webhook_module.HookEventPullRequest)
case githubEventRegistryPackage:
return string(webhook_module.HookEventPackage)
case githubEventCreate, githubEventDelete, githubEventFork, githubEventPush,
githubEventIssues, githubEventIssueComment, githubEventRelease, githubEventPullRequestComment:
fallthrough
default:
return evt.Name
}
}

View File

@ -44,14 +44,7 @@ func ListWorkflows(commit *git.Commit) (git.Entries, error) {
return ret, nil return ret, nil
} }
func DetectWorkflows(commit *git.Commit, triggedEvent webhook_module.HookEventType, payload api.Payloader) (map[string][]byte, error) { func GetContentFromEntry(entry *git.TreeEntry) ([]byte, error) {
entries, err := ListWorkflows(commit)
if err != nil {
return nil, err
}
workflows := make(map[string][]byte, len(entries))
for _, entry := range entries {
f, err := entry.Blob().DataAsync() f, err := entry.Blob().DataAsync()
if err != nil { if err != nil {
return nil, err return nil, err
@ -61,20 +54,41 @@ func DetectWorkflows(commit *git.Commit, triggedEvent webhook_module.HookEventTy
if err != nil { if err != nil {
return nil, err return nil, err
} }
return content, nil
}
func GetEventsFromContent(content []byte) ([]*jobparser.Event, error) {
workflow, err := model.ReadWorkflow(bytes.NewReader(content)) workflow, err := model.ReadWorkflow(bytes.NewReader(content))
if err != nil { if err != nil {
log.Warn("ignore invalid workflow %q: %v", entry.Name(), err) return nil, err
continue
} }
events, err := jobparser.ParseRawOn(&workflow.RawOn) events, err := jobparser.ParseRawOn(&workflow.RawOn)
if err != nil {
return nil, err
}
return events, nil
}
func DetectWorkflows(commit *git.Commit, triggedEvent webhook_module.HookEventType, payload api.Payloader) (map[string][]byte, error) {
entries, err := ListWorkflows(commit)
if err != nil {
return nil, err
}
workflows := make(map[string][]byte, len(entries))
for _, entry := range entries {
content, err := GetContentFromEntry(entry)
if err != nil {
return nil, err
}
events, err := GetEventsFromContent(content)
if err != nil { if err != nil {
log.Warn("ignore invalid workflow %q: %v", entry.Name(), err) log.Warn("ignore invalid workflow %q: %v", entry.Name(), err)
continue continue
} }
for _, evt := range events { for _, evt := range events {
if evt.Name != triggedEvent.Event() { log.Trace("detect workflow %q for event %#v matching %q", entry.Name(), evt, triggedEvent)
continue
}
if detectMatched(commit, triggedEvent, payload, evt) { if detectMatched(commit, triggedEvent, payload, evt) {
workflows[entry.Name()] = content workflows[entry.Name()] = content
} }
@ -85,20 +99,58 @@ func DetectWorkflows(commit *git.Commit, triggedEvent webhook_module.HookEventTy
} }
func detectMatched(commit *git.Commit, triggedEvent webhook_module.HookEventType, payload api.Payloader, evt *jobparser.Event) bool { func detectMatched(commit *git.Commit, triggedEvent webhook_module.HookEventType, payload api.Payloader, evt *jobparser.Event) bool {
if convertFromGithubEvent(evt) != string(triggedEvent) {
return false
}
switch triggedEvent {
case webhook_module.HookEventCreate,
webhook_module.HookEventDelete,
webhook_module.HookEventFork,
webhook_module.HookEventIssueAssign,
webhook_module.HookEventIssueLabel,
webhook_module.HookEventIssueMilestone,
webhook_module.HookEventPullRequestAssign,
webhook_module.HookEventPullRequestLabel,
webhook_module.HookEventPullRequestMilestone,
webhook_module.HookEventPullRequestComment,
webhook_module.HookEventPullRequestReviewApproved,
webhook_module.HookEventPullRequestReviewRejected,
webhook_module.HookEventPullRequestReviewComment,
webhook_module.HookEventWiki,
webhook_module.HookEventRepository,
webhook_module.HookEventRelease,
webhook_module.HookEventPackage:
if len(evt.Acts) != 0 {
log.Warn("Ignore unsupported %s event arguments %q", triggedEvent, evt.Acts)
}
// no special filter parameters for these events, just return true if name matched
return true
case webhook_module.HookEventPush:
return matchPushEvent(commit, payload.(*api.PushPayload), evt)
case webhook_module.HookEventIssues:
return matchIssuesEvent(commit, payload.(*api.IssuePayload), evt)
case webhook_module.HookEventPullRequest, webhook_module.HookEventPullRequestSync:
return matchPullRequestEvent(commit, payload.(*api.PullRequestPayload), evt)
case webhook_module.HookEventIssueComment:
return matchIssueCommentEvent(commit, payload.(*api.IssueCommentPayload), evt)
default:
log.Warn("unsupported event %q", triggedEvent)
return false
}
}
func matchPushEvent(commit *git.Commit, pushPayload *api.PushPayload, evt *jobparser.Event) bool {
// with no special filter parameters
if len(evt.Acts) == 0 { if len(evt.Acts) == 0 {
return true return true
} }
switch triggedEvent {
case webhook_module.HookEventCreate:
fallthrough
case webhook_module.HookEventDelete:
fallthrough
case webhook_module.HookEventFork:
log.Warn("unsupported event %q", triggedEvent.Event())
return false
case webhook_module.HookEventPush:
pushPayload := payload.(*api.PushPayload)
matchTimes := 0 matchTimes := 0
// all acts conditions should be satisfied // all acts conditions should be satisfied
for cond, vals := range evt.Acts { for cond, vals := range evt.Acts {
@ -131,30 +183,55 @@ func detectMatched(commit *git.Commit, triggedEvent webhook_module.HookEventType
} }
} }
default: default:
log.Warn("unsupported condition %q", cond) log.Warn("push event unsupported condition %q", cond)
} }
} }
return matchTimes == len(evt.Acts) return matchTimes == len(evt.Acts)
}
func matchIssuesEvent(commit *git.Commit, issuePayload *api.IssuePayload, evt *jobparser.Event) bool {
// with no special filter parameters
if len(evt.Acts) == 0 {
return true
}
case webhook_module.HookEventIssues:
fallthrough
case webhook_module.HookEventIssueAssign:
fallthrough
case webhook_module.HookEventIssueLabel:
fallthrough
case webhook_module.HookEventIssueMilestone:
fallthrough
case webhook_module.HookEventIssueComment:
fallthrough
case webhook_module.HookEventPullRequest:
prPayload := payload.(*api.PullRequestPayload)
matchTimes := 0 matchTimes := 0
// all acts conditions should be satisfied // all acts conditions should be satisfied
for cond, vals := range evt.Acts { for cond, vals := range evt.Acts {
switch cond { switch cond {
case "types": case "types":
for _, val := range vals { for _, val := range vals {
if glob.MustCompile(val, '/').Match(string(prPayload.Action)) { if glob.MustCompile(val, '/').Match(string(issuePayload.Action)) {
matchTimes++
break
}
}
default:
log.Warn("issue event unsupported condition %q", cond)
}
}
return matchTimes == len(evt.Acts)
}
func matchPullRequestEvent(commit *git.Commit, prPayload *api.PullRequestPayload, evt *jobparser.Event) bool {
// with no special filter parameters
if len(evt.Acts) == 0 {
// defaultly, only pull request opened and synchronized will trigger workflow
return prPayload.Action == api.HookIssueSynchronized || prPayload.Action == api.HookIssueOpened
}
matchTimes := 0
// all acts conditions should be satisfied
for cond, vals := range evt.Acts {
switch cond {
case "types":
action := prPayload.Action
if prPayload.Action == api.HookIssueSynchronized {
action = "synchronize"
}
log.Trace("matching pull_request %s with %v", action, vals)
for _, val := range vals {
if glob.MustCompile(val, '/').Match(string(action)) {
matchTimes++ matchTimes++
break break
} }
@ -187,36 +264,32 @@ func detectMatched(commit *git.Commit, triggedEvent webhook_module.HookEventType
} }
} }
default: default:
log.Warn("unsupported condition %q", cond) log.Warn("pull request event unsupported condition %q", cond)
}
}
return matchTimes == len(evt.Acts)
}
func matchIssueCommentEvent(commit *git.Commit, issueCommentPayload *api.IssueCommentPayload, evt *jobparser.Event) bool {
// with no special filter parameters
if len(evt.Acts) == 0 {
return true
}
matchTimes := 0
// all acts conditions should be satisfied
for cond, vals := range evt.Acts {
switch cond {
case "types":
for _, val := range vals {
if glob.MustCompile(val, '/').Match(string(issueCommentPayload.Action)) {
matchTimes++
break
}
}
default:
log.Warn("issue comment unsupported condition %q", cond)
} }
} }
return matchTimes == len(evt.Acts) return matchTimes == len(evt.Acts)
case webhook_module.HookEventPullRequestAssign:
fallthrough
case webhook_module.HookEventPullRequestLabel:
fallthrough
case webhook_module.HookEventPullRequestMilestone:
fallthrough
case webhook_module.HookEventPullRequestComment:
fallthrough
case webhook_module.HookEventPullRequestReviewApproved:
fallthrough
case webhook_module.HookEventPullRequestReviewRejected:
fallthrough
case webhook_module.HookEventPullRequestReviewComment:
fallthrough
case webhook_module.HookEventPullRequestSync:
fallthrough
case webhook_module.HookEventWiki:
fallthrough
case webhook_module.HookEventRepository:
fallthrough
case webhook_module.HookEventRelease:
fallthrough
case webhook_module.HookEventPackage:
fallthrough
default:
log.Warn("unsupported event %q", triggedEvent.Event())
}
return false
} }

View File

@ -18,10 +18,11 @@ type Pagination struct {
urlParams []string urlParams []string
} }
// NewPagination creates a new instance of the Pagination struct // NewPagination creates a new instance of the Pagination struct.
func NewPagination(total, page, issueNum, numPages int) *Pagination { // "pagingNum" is "page size" or "limit", "current" is "page"
func NewPagination(total, pagingNum, current, numPages int) *Pagination {
p := &Pagination{} p := &Pagination{}
p.Paginater = paginator.New(total, page, issueNum, numPages) p.Paginater = paginator.New(total, pagingNum, current, numPages)
return p return p
} }

View File

@ -36,6 +36,8 @@ var (
once sync.Once once sync.Once
cache *lru.TwoQueueCache cache *lru.TwoQueueCache
githubStyles = styles.Get("github")
) )
// NewContext loads custom highlight map from local config // NewContext loads custom highlight map from local config
@ -121,7 +123,7 @@ func CodeFromLexer(lexer chroma.Lexer, code string) string {
return code return code
} }
// style not used for live site but need to pass something // style not used for live site but need to pass something
err = formatter.Format(htmlw, styles.GitHub, iterator) err = formatter.Format(htmlw, githubStyles, iterator)
if err != nil { if err != nil {
log.Error("Can't format code: %v", err) log.Error("Can't format code: %v", err)
return code return code
@ -184,7 +186,7 @@ func File(fileName, language string, code []byte) ([]string, string, error) {
lines := make([]string, 0, len(tokensLines)) lines := make([]string, 0, len(tokensLines))
for _, tokens := range tokensLines { for _, tokens := range tokensLines {
iterator = chroma.Literator(tokens...) iterator = chroma.Literator(tokens...)
err = formatter.Format(htmlBuf, styles.GitHub, iterator) err = formatter.Format(htmlBuf, githubStyles, iterator)
if err != nil { if err != nil {
return nil, "", fmt.Errorf("can't format code: %w", err) return nil, "", fmt.Errorf("can't format code: %w", err)
} }

View File

@ -93,3 +93,12 @@ type UserSettingsOptions struct {
HideEmail *bool `json:"hide_email"` HideEmail *bool `json:"hide_email"`
HideActivity *bool `json:"hide_activity"` HideActivity *bool `json:"hide_activity"`
} }
// RenameUserOption options when renaming a user
type RenameUserOption struct {
// New username for this user. This name cannot be in use yet by any other user.
//
// required: true
// unique: true
NewName string `json:"new_username" binding:"Required"`
}

View File

@ -1,4 +1,5 @@
// Copyright 2015 The Gogs Authors. All rights reserved. // Copyright 2015 The Gogs Authors. All rights reserved.
// Copyright 2023 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
package structs package structs
@ -9,6 +10,8 @@ type Email struct {
Email string `json:"email"` Email string `json:"email"`
Verified bool `json:"verified"` Verified bool `json:"verified"`
Primary bool `json:"primary"` Primary bool `json:"primary"`
UserID int64 `json:"user_id"`
UserName string `json:"username"`
} }
// CreateEmailOption options when creating email addresses // CreateEmailOption options when creating email addresses

View File

@ -3269,6 +3269,7 @@ rubygems.dependencies.development=Vývojové závislosti
rubygems.required.ruby=Vyžaduje verzi Ruby rubygems.required.ruby=Vyžaduje verzi Ruby
rubygems.required.rubygems=Vyžaduje verzi RubyGem rubygems.required.rubygems=Vyžaduje verzi RubyGem
rubygems.documentation=Další informace o registru RubyGems naleznete v <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">dokumentaci</a>. rubygems.documentation=Další informace o registru RubyGems naleznete v <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">dokumentaci</a>.
swift.registry=Nastavte tento registr z příkazového řádku:
vagrant.install=Pro přidání Vagrant box spusťte následující příkaz: vagrant.install=Pro přidání Vagrant box spusťte následující příkaz:
vagrant.documentation=Další informace o registru Vagrant naleznete v <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">dokumentaci</a>. vagrant.documentation=Další informace o registru Vagrant naleznete v <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">dokumentaci</a>.
settings.link=Propojit tento balíček s repozitářem settings.link=Propojit tento balíček s repozitářem

View File

@ -3122,6 +3122,7 @@ rubygems.dependencies.development=Entwicklungsabhängigkeiten
rubygems.required.ruby=Benötigt Ruby Version rubygems.required.ruby=Benötigt Ruby Version
rubygems.required.rubygems=Benötigt RubyGem Version rubygems.required.rubygems=Benötigt RubyGem Version
rubygems.documentation=Weitere Informationen zur RubyGems-Paketverwaltung findest du in der <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">Dokumentation</a>. rubygems.documentation=Weitere Informationen zur RubyGems-Paketverwaltung findest du in der <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">Dokumentation</a>.
swift.registry=Diese Registry über die Kommandozeile einrichten:
vagrant.install=Um eine Vagrant-Box hinzuzufügen, führen Sie folgenden Befehl aus: vagrant.install=Um eine Vagrant-Box hinzuzufügen, führen Sie folgenden Befehl aus:
vagrant.documentation=Für weitere Informationen zur Vagrant-Registry, siehe <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">Dokumentation</a>. vagrant.documentation=Für weitere Informationen zur Vagrant-Registry, siehe <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">Dokumentation</a>.
settings.link=Dieses Paket einem Repository zuweisen settings.link=Dieses Paket einem Repository zuweisen

View File

@ -3155,6 +3155,7 @@ rubygems.dependencies.development=Εξαρτήσεις Ανάπτυξης
rubygems.required.ruby=Απαιτεί την έκδοση Ruby rubygems.required.ruby=Απαιτεί την έκδοση Ruby
rubygems.required.rubygems=Απαιτεί έκδοση RubyGem rubygems.required.rubygems=Απαιτεί έκδοση RubyGem
rubygems.documentation=Για περισσότερες πληροφορίες σχετικά με το μητρώο RubyGems, ανατρέξτε <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">στην τεκμηρίωση</a>. rubygems.documentation=Για περισσότερες πληροφορίες σχετικά με το μητρώο RubyGems, ανατρέξτε <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">στην τεκμηρίωση</a>.
swift.registry=Ρυθμίστε αυτό το μητρώο από τη γραμμή εντολών:
vagrant.install=Για προσθήκη ενός κυτίου Vagrant, εκτελέστε την ακόλουθη εντολή: vagrant.install=Για προσθήκη ενός κυτίου Vagrant, εκτελέστε την ακόλουθη εντολή:
vagrant.documentation=Για περισσότερες πληροφορίες σχετικά με το μητρώο του Vagrant, ανατρέξτε <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">στην τεκμηρίωση</a>. vagrant.documentation=Για περισσότερες πληροφορίες σχετικά με το μητρώο του Vagrant, ανατρέξτε <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">στην τεκμηρίωση</a>.
settings.link=Σύνδεση αυτού του πακέτου με ένα αποθετήριο settings.link=Σύνδεση αυτού του πακέτου με ένα αποθετήριο

View File

@ -3360,5 +3360,7 @@ runs.open_tab = %d Open
runs.closed_tab = %d Closed runs.closed_tab = %d Closed
runs.commit = Commit runs.commit = Commit
runs.pushed_by = Pushed by runs.pushed_by = Pushed by
runs.valid_workflow_helper = Workflow config file is valid.
runs.invalid_workflow_helper = Workflow config file is invalid. Please check your config file: %s
need_approval_desc = Need approval to run workflows for fork pull request. need_approval_desc = Need approval to run workflows for fork pull request.

View File

@ -3154,6 +3154,7 @@ rubygems.dependencies.development=Dependencias de desarrollo
rubygems.required.ruby=Requiere versión Ruby rubygems.required.ruby=Requiere versión Ruby
rubygems.required.rubygems=Requiere la versión de RubyGem rubygems.required.rubygems=Requiere la versión de RubyGem
rubygems.documentation=Para obtener más información sobre el registro de RubyGems, consulte <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">la documentación</a>. rubygems.documentation=Para obtener más información sobre el registro de RubyGems, consulte <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">la documentación</a>.
swift.registry=Configurar este registro desde la línea de comandos:
vagrant.install=Para añadir un paquete Vagrant, ejecuta el siguiente comando: vagrant.install=Para añadir un paquete Vagrant, ejecuta el siguiente comando:
vagrant.documentation=Para más información sobre el registro de paquetes Vagrant, revisa la <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">documentación</a>. vagrant.documentation=Para más información sobre el registro de paquetes Vagrant, revisa la <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">documentación</a>.
settings.link=Vincular este paquete a un repositorio settings.link=Vincular este paquete a un repositorio

View File

@ -3121,6 +3121,7 @@ rubygems.dependencies.development=Dipendenze Di Sviluppo
rubygems.required.ruby=Richiede la versione di Ruby rubygems.required.ruby=Richiede la versione di Ruby
rubygems.required.rubygems=Richiede la versione RubyGem rubygems.required.rubygems=Richiede la versione RubyGem
rubygems.documentation=Per ulteriori informazioni sul registro di RubyGems, vedere <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">la documentazione</a>. rubygems.documentation=Per ulteriori informazioni sul registro di RubyGems, vedere <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">la documentazione</a>.
swift.registry=Configura questo registro dalla riga di comando:
settings.link=Collega questo pacchetto a un repository settings.link=Collega questo pacchetto a un repository
settings.link.description=Se si collega un pacchetto a un repository, il pacchetto è elencato nell'elenco dei pacchetti del repository. settings.link.description=Se si collega un pacchetto a un repository, il pacchetto è elencato nell'elenco dei pacchetti del repository.
settings.link.select=Seleziona Repository settings.link.select=Seleziona Repository

View File

@ -3232,6 +3232,7 @@ rubygems.dependencies.development=開発用依存関係
rubygems.required.ruby=必要なRubyバージョン rubygems.required.ruby=必要なRubyバージョン
rubygems.required.rubygems=必要なRubyGemバージョン rubygems.required.rubygems=必要なRubyGemバージョン
rubygems.documentation=RubyGemsレジストリの詳細については、<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">ドキュメント</a> を参照してください。 rubygems.documentation=RubyGemsレジストリの詳細については、<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">ドキュメント</a> を参照してください。
swift.registry=このレジストリをコマンドラインからセットアップします:
vagrant.install=Vagrant ボックスを追加するには、次のコマンドを実行します。 vagrant.install=Vagrant ボックスを追加するには、次のコマンドを実行します。
vagrant.documentation=Vagrantレジストリの詳細については <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">ドキュメント</a>を参照してください。 vagrant.documentation=Vagrantレジストリの詳細については <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">ドキュメント</a>を参照してください。
settings.link=このパッケージをリポジトリにリンク settings.link=このパッケージをリポジトリにリンク

View File

@ -3329,6 +3329,7 @@ rubygems.dependencies.development=Izstrādes atkarības
rubygems.required.ruby=Nepieciešamā Ruby versija rubygems.required.ruby=Nepieciešamā Ruby versija
rubygems.required.rubygems=Nepieciešamā RubyGem versija rubygems.required.rubygems=Nepieciešamā RubyGem versija
rubygems.documentation=Papildus informācija par RubyGems reģistru pieejama <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">dokumentācijā</a>. rubygems.documentation=Papildus informācija par RubyGems reģistru pieejama <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">dokumentācijā</a>.
swift.registry=Konfigurējiet šo reģistru no komandrindas:
vagrant.install=Lai pievienotu Vagrant kasti, izpildiet sekojošu komandu: vagrant.install=Lai pievienotu Vagrant kasti, izpildiet sekojošu komandu:
vagrant.documentation=Papildus informācija par Vagrant reģistru pieejama <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">dokumentācijā</a>. vagrant.documentation=Papildus informācija par Vagrant reģistru pieejama <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">dokumentācijā</a>.
settings.link=Piesaistīt pakotni šim repozitorijam settings.link=Piesaistīt pakotni šim repozitorijam

View File

@ -3237,6 +3237,7 @@ rubygems.dependencies.development=Dependências de Desenvolvimento
rubygems.required.ruby=Requer o Ruby versão rubygems.required.ruby=Requer o Ruby versão
rubygems.required.rubygems=Requer o RubyGem versão rubygems.required.rubygems=Requer o RubyGem versão
rubygems.documentation=Para obter mais informações sobre o registro do RubyGems, consulte <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">a documentação</a>. rubygems.documentation=Para obter mais informações sobre o registro do RubyGems, consulte <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">a documentação</a>.
swift.registry=Configure este registro pela linha de comando:
vagrant.install=Para adicionar uma Vagrant box, execute o seguinte comando: vagrant.install=Para adicionar uma Vagrant box, execute o seguinte comando:
vagrant.documentation=Para obter mais informações sobre o registro do Vagrant, consulte <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">a documentação</a>. vagrant.documentation=Para obter mais informações sobre o registro do Vagrant, consulte <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">a documentação</a>.
settings.link=Vincular este pacote a um repositório settings.link=Vincular este pacote a um repositório

View File

@ -1357,8 +1357,8 @@ issues.opened_by_fake=%[1]s aberta(s) por %[2]s
issues.closed_by_fake=por %[2]s foi fechada %[1]s issues.closed_by_fake=por %[2]s foi fechada %[1]s
issues.previous=Anterior issues.previous=Anterior
issues.next=Seguinte issues.next=Seguinte
issues.open_title=Aberta issues.open_title=aberta(s)
issues.closed_title=Fechada issues.closed_title=fechada(s)
issues.draft_title=Rascunho issues.draft_title=Rascunho
issues.num_comments=%d comentários issues.num_comments=%d comentários
issues.commented_at=`comentou <a href="#%s">%s</a>` issues.commented_at=`comentou <a href="#%s">%s</a>`
@ -1780,7 +1780,7 @@ activity.title.issues_1=%d questão
activity.title.issues_n=%d questões activity.title.issues_n=%d questões
activity.title.issues_closed_from=%s resolvida(s) de %s activity.title.issues_closed_from=%s resolvida(s) de %s
activity.title.issues_created_by=%s criada por %s activity.title.issues_created_by=%s criada por %s
activity.closed_issue_label=Encerrada activity.closed_issue_label=Fechada
activity.new_issues_count_1=questão nova activity.new_issues_count_1=questão nova
activity.new_issues_count_n=questões novas activity.new_issues_count_n=questões novas
activity.new_issue_label=Em aberto activity.new_issue_label=Em aberto
@ -2934,6 +2934,8 @@ config.git_disable_diff_highlight=Desabilitar o realce de sintaxe no diff
config.git_max_diff_lines=Número máximo de linhas diff (por ficheiro) config.git_max_diff_lines=Número máximo de linhas diff (por ficheiro)
config.git_max_diff_line_characters=Número máximos de caracteres diff (por linha) config.git_max_diff_line_characters=Número máximos de caracteres diff (por linha)
config.git_max_diff_files=Número máximo de ficheiros diff a serem apresentados config.git_max_diff_files=Número máximo de ficheiros diff a serem apresentados
config.git_enable_reflogs=Habilitar reflogs
config.git_reflog_expiry_time=Tempo de expiração
config.git_gc_args=Argumentos da recolha de lixo config.git_gc_args=Argumentos da recolha de lixo
config.git_migrate_timeout=Prazo da migração config.git_migrate_timeout=Prazo da migração
config.git_mirror_timeout=Prazo para sincronização da réplica config.git_mirror_timeout=Prazo para sincronização da réplica
@ -3237,6 +3239,10 @@ rubygems.dependencies.development=Dependências de desenvolvimento
rubygems.required.ruby=Requer a versão do Ruby rubygems.required.ruby=Requer a versão do Ruby
rubygems.required.rubygems=Requer a versão do RubyGem rubygems.required.rubygems=Requer a versão do RubyGem
rubygems.documentation=Para obter mais informações sobre o registo do RubyGems, consulte <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">a documentação</a>. rubygems.documentation=Para obter mais informações sobre o registo do RubyGems, consulte <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">a documentação</a>.
swift.registry=Configurar este registo usando a linha de comandos:
swift.install=Adicione o pacote no seu ficheiro <code>Package.swift</code>:
swift.install2=e execute o seguinte comando:
swift.documentation=Para obter mais informações sobre o registo do Swift, consulte <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/swift/">a documentação</a>.
vagrant.install=Para adicionar uma máquina virtual Vagrant, execute o seguinte comando: vagrant.install=Para adicionar uma máquina virtual Vagrant, execute o seguinte comando:
vagrant.documentation=Para obter mais informações sobre o registo do Vagrant, consulte <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">a documentação</a>. vagrant.documentation=Para obter mais informações sobre o registo do Vagrant, consulte <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">a documentação</a>.
settings.link=Vincular este pacote a um repositório settings.link=Vincular este pacote a um repositório

View File

@ -57,6 +57,7 @@ new_mirror=Yeni Yansı
new_fork=Yeni Depo Çatalı new_fork=Yeni Depo Çatalı
new_org=Yeni Organizasyon new_org=Yeni Organizasyon
new_project=Yeni Proje new_project=Yeni Proje
new_project_column=Yeni Sütun
manage_org=Organizasyonları Yönet manage_org=Organizasyonları Yönet
admin_panel=Site Yönetimi admin_panel=Site Yönetimi
account_settings=Hesap Ayarları account_settings=Hesap Ayarları
@ -90,9 +91,11 @@ disabled=Devre Dışı
copy=Kopyala copy=Kopyala
copy_url=URL'yi kopyala copy_url=URL'yi kopyala
copy_content=İçeriği kopyala
copy_branch=Dal adını kopyala copy_branch=Dal adını kopyala
copy_success=Kopyalandı! copy_success=Kopyalandı!
copy_error=Kopyalama başarısız oldu copy_error=Kopyalama başarısız oldu
copy_type_unsupported=Bu dosya türü kopyalanamaz
write=Yaz write=Yaz
preview=Önizleme preview=Önizleme
@ -109,6 +112,10 @@ never=Asla
rss_feed=RSS Beslemesi rss_feed=RSS Beslemesi
[aria] [aria]
navbar=Gezinti Çubuğu
footer=Alt Bilgi
footer.software=Yazılım Hakkında
footer.links=Bağlantılar
[filter] [filter]
string.asc=A - Z string.asc=A - Z
@ -240,7 +247,10 @@ default_enable_timetracking_popup=Yeni depolar için zaman takibini varsayılan
no_reply_address=Gizlenecek E-Posta Alan Adı no_reply_address=Gizlenecek E-Posta Alan Adı
no_reply_address_helper=Gizlenmiş e-posta adresine sahip kullanıcılar için alan adı. Örneğin 'ali' kullanıcı adı, gizlenmiş e-postalar için alan adı 'yanityok.ornek.org' olarak ayarlandığında Git günlüğüne 'ali@yanityok.ornek.org' olarak kaydedilecektir. no_reply_address_helper=Gizlenmiş e-posta adresine sahip kullanıcılar için alan adı. Örneğin 'ali' kullanıcı adı, gizlenmiş e-postalar için alan adı 'yanityok.ornek.org' olarak ayarlandığında Git günlüğüne 'ali@yanityok.ornek.org' olarak kaydedilecektir.
password_algorithm=Parola Hash Algoritması password_algorithm=Parola Hash Algoritması
invalid_password_algorithm=Hatalı parola hash algoritması
password_algorithm_helper=Parola için hash algoritmasını ayarlayın. Algoritmalar değişen gereksinimlere ve güce sahiptirler. `argon2` iyi özelliklere sahip olmasına rağmen fazla miktarda bellek kullanır ve küçük sistemler için uygun olmayabilir. password_algorithm_helper=Parola için hash algoritmasını ayarlayın. Algoritmalar değişen gereksinimlere ve güce sahiptirler. `argon2` iyi özelliklere sahip olmasına rağmen fazla miktarda bellek kullanır ve küçük sistemler için uygun olmayabilir.
enable_update_checker=Güncelleme Denetleyicisini Etkinleştir
enable_update_checker_helper=Düzenli olarak gitea.io'ya bağlanarak yeni yayınlanan sürümleri denetler.
[home] [home]
uname_holder=Kullanıcı Adı veya E-Posta Adresi uname_holder=Kullanıcı Adı veya E-Posta Adresi
@ -290,14 +300,36 @@ code_last_indexed_at=Son endekslenen %s
relevant_repositories_tooltip=Çatal olan veya konusu, simgesi veya açıklaması olmayan depolar gizlenmiştir. relevant_repositories_tooltip=Çatal olan veya konusu, simgesi veya açıklaması olmayan depolar gizlenmiştir.
relevant_repositories=`Sadece ilişkili depolar gösteriliyor, <a href="` relevant_repositories=`Sadece ilişkili depolar gösteriliyor, <a href="`
show_archived=Arşivlenmiş
show_both_archived_unarchived=Arşivlenenlerin ve arşivlenmeyenlerin tümü gösteriliyor
show_only_archived=Yalnızca arşivlenenler gösteriliyor
show_only_unarchived=Yalnızca arşivlenmeyenler gösteriliyor
show_private=Özel show_private=Özel
show_both_private_public=Hem açık hem de özel olanlar gösteriliyor
show_only_private=Yalnızca özel olanlar gösteriliyor
show_only_public=Yalnızca açık olanlar gösteriliyor
issues.in_your_repos=Depolarınızda
[explore] [explore]
repos=Depolar repos=Depolar
users=Kullanıcılar
organizations=Organizasyonlar organizations=Organizasyonlar
search=Ara
code=Kod code=Kod
search.type.tooltip=Arama türü
search.fuzzy=Bulanık
search.fuzzy.tooltip=Arama terimine benzeyen sonuçları da içer
search.match=Eşleştir
search.match.tooltip=Sadece arama terimiyle tamamen eşleşen sonuçları içer
code_search_unavailable=Kod arama şu an mevcut değil. Lütfen site yöneticinizle bağlantıya geçin.
repo_no_results=Eşleşen depo bulunamadı.
user_no_results=Eşleşen kullanıcı bulunamadı.
org_no_results=Eşleşen organizasyon bulunamadı.
code_search_results='%s' için arama sonuçları
code_last_indexed_at=Son dizinlenen %s
relevant_repositories_tooltip=Çatal olan veya konusu, simgesi veya açıklaması olmayan depolar gizlenmiştir.
[auth] [auth]
@ -1209,6 +1241,7 @@ projects.template.desc_helper=Başlamak için bir proje şablonu seçin
projects.type.uncategorized=Kategorize edilmemiş projects.type.uncategorized=Kategorize edilmemiş
projects.column.edit_title=İsim projects.column.edit_title=İsim
projects.column.new_title=İsim projects.column.new_title=İsim
projects.column.new=Yeni Sütun
projects.column.color=Renk projects.column.color=Renk
projects.open= projects.open=
projects.close=Kapat projects.close=Kapat
@ -1803,6 +1836,7 @@ settings.githooks=Git İstemcileri
settings.basic_settings=Temel Ayarlar settings.basic_settings=Temel Ayarlar
settings.mirror_settings=Yansıma Ayarları settings.mirror_settings=Yansıma Ayarları
settings.mirror_settings.docs=`Projenizi, değişiklikleri başka bir depoya/depodan otomatik olarak gönderecek ve/veya çekecek şekilde ayarlayın. Dallar, etiketler ve işlemeler otomatik olarak senkronize edilecektir. <a target="` settings.mirror_settings.docs=`Projenizi, değişiklikleri başka bir depoya/depodan otomatik olarak gönderecek ve/veya çekecek şekilde ayarlayın. Dallar, etiketler ve işlemeler otomatik olarak senkronize edilecektir. <a target="`
search.code_search_unavailable=Kod arama şu an mevcut değil. Lütfen site yöneticinizle bağlantıya geçin.
settings=Ayarlar settings=Ayarlar
settings.options=Depo settings.options=Depo
@ -3170,6 +3204,7 @@ rubygems.dependencies.development=Geliştirme Bağımlılıkları
rubygems.required.ruby=Gereken Ruby sürümü rubygems.required.ruby=Gereken Ruby sürümü
rubygems.required.rubygems=Gereken RubyGem sürümü rubygems.required.rubygems=Gereken RubyGem sürümü
rubygems.documentation=RubyGems kütüğü hakkında daha fazla bilgi için, <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">belgeye</a> bakabilirsiniz. rubygems.documentation=RubyGems kütüğü hakkında daha fazla bilgi için, <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">belgeye</a> bakabilirsiniz.
swift.registry=Bu kütüğü komut satırını kullanarak kurun:
vagrant.install=Vagrant paketi eklemek için aşağıdaki komutu çalıştırın: vagrant.install=Vagrant paketi eklemek için aşağıdaki komutu çalıştırın:
vagrant.documentation=Vagrant kütüğü hakkında daha fazla bilgi için, <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">belgeye</a> bakabilirsiniz. vagrant.documentation=Vagrant kütüğü hakkında daha fazla bilgi için, <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">belgeye</a> bakabilirsiniz.
settings.link=Bu paketi bir depoya bağlayın settings.link=Bu paketi bir depoya bağlayın

View File

@ -3232,6 +3232,7 @@ rubygems.dependencies.development=开发依赖
rubygems.required.ruby=需要 Ruby 版本 rubygems.required.ruby=需要 Ruby 版本
rubygems.required.rubygems=需要 RubyGem 版本 rubygems.required.rubygems=需要 RubyGem 版本
rubygems.documentation=关于 RubyGems 注册中心的更多信息,请参阅 <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">文档</a>。 rubygems.documentation=关于 RubyGems 注册中心的更多信息,请参阅 <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">文档</a>。
swift.registry=从命令行设置此注册中心:
vagrant.install=若要添加一个 Vagrant box请运行以下命令 vagrant.install=若要添加一个 Vagrant box请运行以下命令
vagrant.documentation=关于 Vagrant 注册中心的更多信息,请参阅 <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">文档</a>。 vagrant.documentation=关于 Vagrant 注册中心的更多信息,请参阅 <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">文档</a>。
settings.link=将此软件包链接到仓库 settings.link=将此软件包链接到仓库

View File

@ -3232,6 +3232,7 @@ rubygems.dependencies.development=開發相依性
rubygems.required.ruby=需要的 Ruby 版本 rubygems.required.ruby=需要的 Ruby 版本
rubygems.required.rubygems=需要的 RubyGem 版本 rubygems.required.rubygems=需要的 RubyGem 版本
rubygems.documentation=關於 RubyGems registry 的詳情請參閱<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">說明文件</a>。 rubygems.documentation=關於 RubyGems registry 的詳情請參閱<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/rubygems/">說明文件</a>。
swift.registry=透過下列命令設定此註冊中心:
vagrant.install=執行下列命令以新增 Vagrant box: vagrant.install=執行下列命令以新增 Vagrant box:
vagrant.documentation=關於 Vagrant registry 的詳情請參閱<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">說明文件</a>。 vagrant.documentation=關於 Vagrant registry 的詳情請參閱<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/packages/vagrant/">說明文件</a>。
settings.link=連結此套件到儲存庫 settings.link=連結此套件到儲存庫

172
package-lock.json generated
View File

@ -28,8 +28,6 @@
"jquery": "3.6.3", "jquery": "3.6.3",
"jquery.are-you-sure": "1.9.0", "jquery.are-you-sure": "1.9.0",
"katex": "0.16.4", "katex": "0.16.4",
"less": "4.1.3",
"less-loader": "11.1.0",
"license-checker-webpack-plugin": "0.2.1", "license-checker-webpack-plugin": "0.2.1",
"mermaid": "10.0.2", "mermaid": "10.0.2",
"mini-css-extract-plugin": "2.7.2", "mini-css-extract-plugin": "2.7.2",
@ -45,7 +43,7 @@
"vue-bar-graph": "2.0.0", "vue-bar-graph": "2.0.0",
"vue-loader": "17.0.1", "vue-loader": "17.0.1",
"vue3-calendar-heatmap": "2.0.0", "vue3-calendar-heatmap": "2.0.0",
"webpack": "5.75.0", "webpack": "5.76.0",
"webpack-cli": "5.0.1", "webpack-cli": "5.0.1",
"workbox-routing": "6.5.4", "workbox-routing": "6.5.4",
"workbox-strategies": "6.5.4", "workbox-strategies": "6.5.4",
@ -64,7 +62,6 @@
"eslint-plugin-vue": "9.9.0", "eslint-plugin-vue": "9.9.0",
"jsdom": "21.0.0", "jsdom": "21.0.0",
"markdownlint-cli": "0.33.0", "markdownlint-cli": "0.33.0",
"postcss-less": "6.0.0",
"stylelint": "15.2.0", "stylelint": "15.2.0",
"stylelint-declaration-strict-value": "1.9.2", "stylelint-declaration-strict-value": "1.9.2",
"svgo": "3.0.2", "svgo": "3.0.2",
@ -2667,6 +2664,9 @@
"version": "2.0.6", "version": "2.0.6",
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz",
"integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": { "dependencies": {
"is-what": "^3.14.1" "is-what": "^3.14.1"
}, },
@ -3813,7 +3813,9 @@
"version": "0.1.8", "version": "0.1.8",
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
"integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"dev": true,
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"prr": "~1.0.1" "prr": "~1.0.1"
}, },
@ -5240,7 +5242,9 @@
"version": "0.5.5", "version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==",
"dev": true,
"optional": true, "optional": true,
"peer": true,
"bin": { "bin": {
"image-size": "bin/image-size.js" "image-size": "bin/image-size.js"
}, },
@ -5675,7 +5679,10 @@
"node_modules/is-what": { "node_modules/is-what": {
"version": "3.14.1", "version": "3.14.1",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==" "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"dev": true,
"optional": true,
"peer": true
}, },
"node_modules/isarray": { "node_modules/isarray": {
"version": "0.0.1", "version": "0.0.1",
@ -5933,14 +5940,6 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/klona": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz",
"integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==",
"engines": {
"node": ">= 8"
}
},
"node_modules/known-css-properties": { "node_modules/known-css-properties": {
"version": "0.26.0", "version": "0.26.0",
"resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.26.0.tgz", "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.26.0.tgz",
@ -5956,6 +5955,9 @@
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/less/-/less-4.1.3.tgz", "resolved": "https://registry.npmjs.org/less/-/less-4.1.3.tgz",
"integrity": "sha512-w16Xk/Ta9Hhyei0Gpz9m7VS8F28nieJaL/VyShID7cYvP6IL5oHeL6p4TXSDJqZE/lNv0oJ2pGVjJsRkfwm5FA==", "integrity": "sha512-w16Xk/Ta9Hhyei0Gpz9m7VS8F28nieJaL/VyShID7cYvP6IL5oHeL6p4TXSDJqZE/lNv0oJ2pGVjJsRkfwm5FA==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": { "dependencies": {
"copy-anything": "^2.0.1", "copy-anything": "^2.0.1",
"parse-node-version": "^1.0.1", "parse-node-version": "^1.0.1",
@ -5977,25 +5979,6 @@
"source-map": "~0.6.0" "source-map": "~0.6.0"
} }
}, },
"node_modules/less-loader": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/less-loader/-/less-loader-11.1.0.tgz",
"integrity": "sha512-C+uDBV7kS7W5fJlUjq5mPBeBVhYpTIm5gB09APT9o3n/ILeaXVsiSFTbZpTJCJwQ/Crczfn3DmfQFwxYusWFug==",
"dependencies": {
"klona": "^2.0.4"
},
"engines": {
"node": ">= 14.15.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
"peerDependencies": {
"less": "^3.5.0 || ^4.0.0",
"webpack": "^5.0.0"
}
},
"node_modules/leven": { "node_modules/leven": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
@ -6201,7 +6184,9 @@
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"dev": true,
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"pify": "^4.0.1", "pify": "^4.0.1",
"semver": "^5.6.0" "semver": "^5.6.0"
@ -6214,7 +6199,9 @@
"version": "5.7.1", "version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"dev": true,
"optional": true, "optional": true,
"peer": true,
"bin": { "bin": {
"semver": "bin/semver" "semver": "bin/semver"
} }
@ -6505,7 +6492,9 @@
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"dev": true,
"optional": true, "optional": true,
"peer": true,
"bin": { "bin": {
"mime": "cli.js" "mime": "cli.js"
}, },
@ -6637,7 +6626,7 @@
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"devOptional": true "dev": true
}, },
"node_modules/nanoid": { "node_modules/nanoid": {
"version": "3.3.4", "version": "3.3.4",
@ -6660,7 +6649,9 @@
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/needle/-/needle-3.2.0.tgz", "resolved": "https://registry.npmjs.org/needle/-/needle-3.2.0.tgz",
"integrity": "sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==", "integrity": "sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==",
"dev": true,
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"debug": "^3.2.6", "debug": "^3.2.6",
"iconv-lite": "^0.6.3", "iconv-lite": "^0.6.3",
@ -6677,7 +6668,9 @@
"version": "3.2.7", "version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"ms": "^2.1.1" "ms": "^2.1.1"
} }
@ -7047,6 +7040,9 @@
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz",
"integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==",
"dev": true,
"optional": true,
"peer": true,
"engines": { "engines": {
"node": ">= 0.10" "node": ">= 0.10"
} }
@ -7148,7 +7144,9 @@
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true,
"optional": true, "optional": true,
"peer": true,
"engines": { "engines": {
"node": ">=6" "node": ">=6"
} }
@ -7288,18 +7286,6 @@
"node": "^10 || ^12 || >=14" "node": "^10 || ^12 || >=14"
} }
}, },
"node_modules/postcss-less": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-6.0.0.tgz",
"integrity": "sha512-FPX16mQLyEjLzEuuJtxA8X3ejDLNGGEG503d2YGZR5Ask1SpDN8KmZUMpzCvyalWRywAn1n1VOA5dcqfCLo5rg==",
"dev": true,
"engines": {
"node": ">=12"
},
"peerDependencies": {
"postcss": "^8.3.5"
}
},
"node_modules/postcss-media-query-parser": { "node_modules/postcss-media-query-parser": {
"version": "0.2.3", "version": "0.2.3",
"resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz",
@ -7481,7 +7467,9 @@
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
"integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==",
"optional": true "dev": true,
"optional": true,
"peer": true
}, },
"node_modules/psl": { "node_modules/psl": {
"version": "1.9.0", "version": "1.9.0",
@ -7987,7 +7975,9 @@
"version": "1.2.4", "version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"optional": true "dev": true,
"optional": true,
"peer": true
}, },
"node_modules/saxes": { "node_modules/saxes": {
"version": "6.0.0", "version": "6.0.0",
@ -8917,7 +8907,8 @@
"node_modules/tslib": { "node_modules/tslib": {
"version": "2.4.1", "version": "2.4.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"dev": true
}, },
"node_modules/type-check": { "node_modules/type-check": {
"version": "0.4.0", "version": "0.4.0",
@ -9413,9 +9404,9 @@
} }
}, },
"node_modules/webpack": { "node_modules/webpack": {
"version": "5.75.0", "version": "5.76.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz",
"integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==",
"dependencies": { "dependencies": {
"@types/eslint-scope": "^3.7.3", "@types/eslint-scope": "^3.7.3",
"@types/estree": "^0.0.51", "@types/estree": "^0.0.51",
@ -11852,6 +11843,9 @@
"version": "2.0.6", "version": "2.0.6",
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz",
"integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==",
"dev": true,
"optional": true,
"peer": true,
"requires": { "requires": {
"is-what": "^3.14.1" "is-what": "^3.14.1"
} }
@ -12710,7 +12704,9 @@
"version": "0.1.8", "version": "0.1.8",
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
"integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"dev": true,
"optional": true, "optional": true,
"peer": true,
"requires": { "requires": {
"prr": "~1.0.1" "prr": "~1.0.1"
} }
@ -13783,7 +13779,9 @@
"version": "0.5.5", "version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==",
"optional": true "dev": true,
"optional": true,
"peer": true
}, },
"immer": { "immer": {
"version": "9.0.18", "version": "9.0.18",
@ -14076,7 +14074,10 @@
"is-what": { "is-what": {
"version": "3.14.1", "version": "3.14.1",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==" "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"dev": true,
"optional": true,
"peer": true
}, },
"isarray": { "isarray": {
"version": "0.0.1", "version": "0.0.1",
@ -14269,11 +14270,6 @@
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
}, },
"klona": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz",
"integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA=="
},
"known-css-properties": { "known-css-properties": {
"version": "0.26.0", "version": "0.26.0",
"resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.26.0.tgz", "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.26.0.tgz",
@ -14289,6 +14285,9 @@
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/less/-/less-4.1.3.tgz", "resolved": "https://registry.npmjs.org/less/-/less-4.1.3.tgz",
"integrity": "sha512-w16Xk/Ta9Hhyei0Gpz9m7VS8F28nieJaL/VyShID7cYvP6IL5oHeL6p4TXSDJqZE/lNv0oJ2pGVjJsRkfwm5FA==", "integrity": "sha512-w16Xk/Ta9Hhyei0Gpz9m7VS8F28nieJaL/VyShID7cYvP6IL5oHeL6p4TXSDJqZE/lNv0oJ2pGVjJsRkfwm5FA==",
"dev": true,
"optional": true,
"peer": true,
"requires": { "requires": {
"copy-anything": "^2.0.1", "copy-anything": "^2.0.1",
"errno": "^0.1.1", "errno": "^0.1.1",
@ -14302,14 +14301,6 @@
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
}, },
"less-loader": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/less-loader/-/less-loader-11.1.0.tgz",
"integrity": "sha512-C+uDBV7kS7W5fJlUjq5mPBeBVhYpTIm5gB09APT9o3n/ILeaXVsiSFTbZpTJCJwQ/Crczfn3DmfQFwxYusWFug==",
"requires": {
"klona": "^2.0.4"
}
},
"leven": { "leven": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
@ -14484,7 +14475,9 @@
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"dev": true,
"optional": true, "optional": true,
"peer": true,
"requires": { "requires": {
"pify": "^4.0.1", "pify": "^4.0.1",
"semver": "^5.6.0" "semver": "^5.6.0"
@ -14494,7 +14487,9 @@
"version": "5.7.1", "version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"optional": true "dev": true,
"optional": true,
"peer": true
} }
} }
}, },
@ -14721,7 +14716,9 @@
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"optional": true "dev": true,
"optional": true,
"peer": true
}, },
"mime-db": { "mime-db": {
"version": "1.52.0", "version": "1.52.0",
@ -14817,7 +14814,7 @@
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"devOptional": true "dev": true
}, },
"nanoid": { "nanoid": {
"version": "3.3.4", "version": "3.3.4",
@ -14834,7 +14831,9 @@
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/needle/-/needle-3.2.0.tgz", "resolved": "https://registry.npmjs.org/needle/-/needle-3.2.0.tgz",
"integrity": "sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==", "integrity": "sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==",
"dev": true,
"optional": true, "optional": true,
"peer": true,
"requires": { "requires": {
"debug": "^3.2.6", "debug": "^3.2.6",
"iconv-lite": "^0.6.3", "iconv-lite": "^0.6.3",
@ -14845,7 +14844,9 @@
"version": "3.2.7", "version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"optional": true, "optional": true,
"peer": true,
"requires": { "requires": {
"ms": "^2.1.1" "ms": "^2.1.1"
} }
@ -15127,7 +15128,10 @@
"parse-node-version": { "parse-node-version": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz",
"integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==" "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==",
"dev": true,
"optional": true,
"peer": true
}, },
"parse5": { "parse5": {
"version": "7.1.2", "version": "7.1.2",
@ -15198,7 +15202,9 @@
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"optional": true "dev": true,
"optional": true,
"peer": true
}, },
"pkg-dir": { "pkg-dir": {
"version": "4.2.0", "version": "4.2.0",
@ -15296,13 +15302,6 @@
"source-map-js": "^1.0.2" "source-map-js": "^1.0.2"
} }
}, },
"postcss-less": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-6.0.0.tgz",
"integrity": "sha512-FPX16mQLyEjLzEuuJtxA8X3ejDLNGGEG503d2YGZR5Ask1SpDN8KmZUMpzCvyalWRywAn1n1VOA5dcqfCLo5rg==",
"dev": true,
"requires": {}
},
"postcss-media-query-parser": { "postcss-media-query-parser": {
"version": "0.2.3", "version": "0.2.3",
"resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz",
@ -15433,7 +15432,9 @@
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
"integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==",
"optional": true "dev": true,
"optional": true,
"peer": true
}, },
"psl": { "psl": {
"version": "1.9.0", "version": "1.9.0",
@ -15792,7 +15793,9 @@
"version": "1.2.4", "version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"optional": true "dev": true,
"optional": true,
"peer": true
}, },
"saxes": { "saxes": {
"version": "6.0.0", "version": "6.0.0",
@ -16527,7 +16530,8 @@
"tslib": { "tslib": {
"version": "2.4.1", "version": "2.4.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"dev": true
}, },
"type-check": { "type-check": {
"version": "0.4.0", "version": "0.4.0",
@ -16847,9 +16851,9 @@
"dev": true "dev": true
}, },
"webpack": { "webpack": {
"version": "5.75.0", "version": "5.76.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz",
"integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==",
"requires": { "requires": {
"@types/eslint-scope": "^3.7.3", "@types/eslint-scope": "^3.7.3",
"@types/estree": "^0.0.51", "@types/estree": "^0.0.51",

View File

@ -28,8 +28,6 @@
"jquery": "3.6.3", "jquery": "3.6.3",
"jquery.are-you-sure": "1.9.0", "jquery.are-you-sure": "1.9.0",
"katex": "0.16.4", "katex": "0.16.4",
"less": "4.1.3",
"less-loader": "11.1.0",
"license-checker-webpack-plugin": "0.2.1", "license-checker-webpack-plugin": "0.2.1",
"mermaid": "10.0.2", "mermaid": "10.0.2",
"mini-css-extract-plugin": "2.7.2", "mini-css-extract-plugin": "2.7.2",
@ -45,7 +43,7 @@
"vue-bar-graph": "2.0.0", "vue-bar-graph": "2.0.0",
"vue-loader": "17.0.1", "vue-loader": "17.0.1",
"vue3-calendar-heatmap": "2.0.0", "vue3-calendar-heatmap": "2.0.0",
"webpack": "5.75.0", "webpack": "5.76.0",
"webpack-cli": "5.0.1", "webpack-cli": "5.0.1",
"workbox-routing": "6.5.4", "workbox-routing": "6.5.4",
"workbox-strategies": "6.5.4", "workbox-strategies": "6.5.4",
@ -64,7 +62,6 @@
"eslint-plugin-vue": "9.9.0", "eslint-plugin-vue": "9.9.0",
"jsdom": "21.0.0", "jsdom": "21.0.0",
"markdownlint-cli": "0.33.0", "markdownlint-cli": "0.33.0",
"postcss-less": "6.0.0",
"stylelint": "15.2.0", "stylelint": "15.2.0",
"stylelint-declaration-strict-value": "1.9.2", "stylelint-declaration-strict-value": "1.9.2",
"svgo": "3.0.2", "svgo": "3.0.2",

View File

@ -0,0 +1,87 @@
// Copyright 2023 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package admin
import (
"net/http"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/context"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/utils"
"code.gitea.io/gitea/services/convert"
)
// GetAllEmails
func GetAllEmails(ctx *context.APIContext) {
// swagger:operation GET /admin/emails admin adminGetAllEmails
// ---
// summary: List all emails
// produces:
// - application/json
// parameters:
// - name: page
// in: query
// description: page number of results to return (1-based)
// type: integer
// - name: limit
// in: query
// description: page size of results
// type: integer
// responses:
// "200":
// "$ref": "#/responses/EmailList"
// "403":
// "$ref": "#/responses/forbidden"
listOptions := utils.GetListOptions(ctx)
emails, maxResults, err := user_model.SearchEmails(&user_model.SearchEmailOptions{
Keyword: ctx.Params(":email"),
ListOptions: listOptions,
})
if err != nil {
ctx.Error(http.StatusInternalServerError, "GetAllEmails", err)
return
}
results := make([]*api.Email, len(emails))
for i := range emails {
results[i] = convert.ToEmailSearch(emails[i])
}
ctx.SetLinkHeader(int(maxResults), listOptions.PageSize)
ctx.SetTotalCountHeader(maxResults)
ctx.JSON(http.StatusOK, &results)
}
// SearchEmail
func SearchEmail(ctx *context.APIContext) {
// swagger:operation GET /admin/emails/search admin adminSearchEmails
// ---
// summary: Search all emails
// produces:
// - application/json
// parameters:
// - name: q
// in: query
// description: keyword
// type: string
// - name: page
// in: query
// description: page number of results to return (1-based)
// type: integer
// - name: limit
// in: query
// description: page size of results
// type: integer
// responses:
// "200":
// "$ref": "#/responses/EmailList"
// "403":
// "$ref": "#/responses/forbidden"
ctx.SetParams(":email", ctx.FormTrim("q"))
GetAllEmails(ctx)
}

View File

@ -461,3 +461,61 @@ func GetAllUsers(ctx *context.APIContext) {
ctx.SetTotalCountHeader(maxResults) ctx.SetTotalCountHeader(maxResults)
ctx.JSON(http.StatusOK, &results) ctx.JSON(http.StatusOK, &results)
} }
// RenameUser api for renaming a user
func RenameUser(ctx *context.APIContext) {
// swagger:operation POST /admin/users/{username}/rename admin adminRenameUser
// ---
// summary: Rename a user
// produces:
// - application/json
// parameters:
// - name: username
// in: path
// description: existing username of user
// type: string
// required: true
// - name: body
// in: body
// required: true
// schema:
// "$ref": "#/definitions/RenameUserOption"
// responses:
// "204":
// "$ref": "#/responses/empty"
// "403":
// "$ref": "#/responses/forbidden"
// "422":
// "$ref": "#/responses/validationError"
if ctx.ContextUser.IsOrganization() {
ctx.Error(http.StatusUnprocessableEntity, "", fmt.Errorf("%s is an organization not a user", ctx.ContextUser.Name))
return
}
newName := web.GetForm(ctx).(*api.RenameUserOption).NewName
if strings.EqualFold(newName, ctx.ContextUser.Name) {
// Noop as username is not changed
ctx.Status(http.StatusNoContent)
return
}
// Check if user name has been changed
if err := user_service.RenameUser(ctx, ctx.ContextUser, newName); err != nil {
switch {
case user_model.IsErrUserAlreadyExist(err):
ctx.Error(http.StatusUnprocessableEntity, "", ctx.Tr("form.username_been_taken"))
case db.IsErrNameReserved(err):
ctx.Error(http.StatusUnprocessableEntity, "", ctx.Tr("user.form.name_reserved", newName))
case db.IsErrNamePatternNotAllowed(err):
ctx.Error(http.StatusUnprocessableEntity, "", ctx.Tr("user.form.name_pattern_not_allowed", newName))
case db.IsErrNameCharsNotAllowed(err):
ctx.Error(http.StatusUnprocessableEntity, "", ctx.Tr("user.form.name_chars_not_allowed", newName))
default:
ctx.ServerError("ChangeUserName", err)
}
return
}
ctx.Status(http.StatusNoContent)
}

View File

@ -1257,8 +1257,13 @@ func Routes(ctx gocontext.Context) *web.Route {
m.Get("/orgs", org.ListUserOrgs) m.Get("/orgs", org.ListUserOrgs)
m.Post("/orgs", bind(api.CreateOrgOption{}), admin.CreateOrg) m.Post("/orgs", bind(api.CreateOrgOption{}), admin.CreateOrg)
m.Post("/repos", bind(api.CreateRepoOption{}), admin.CreateRepo) m.Post("/repos", bind(api.CreateRepoOption{}), admin.CreateRepo)
m.Post("/rename", bind(api.RenameUserOption{}), admin.RenameUser)
}, context_service.UserAssignmentAPI()) }, context_service.UserAssignmentAPI())
}) })
m.Group("/emails", func() {
m.Get("", admin.GetAllEmails)
m.Get("/search", admin.SearchEmail)
})
m.Group("/unadopted", func() { m.Group("/unadopted", func() {
m.Get("", admin.ListUnadoptedRepositories) m.Get("", admin.ListUnadoptedRepositories)
m.Post("/{username}/{reponame}", admin.AdoptRepository) m.Post("/{username}/{reponame}", admin.AdoptRepository)

View File

@ -48,6 +48,9 @@ type swaggerParameterBodies struct {
// in:body // in:body
CreateKeyOption api.CreateKeyOption CreateKeyOption api.CreateKeyOption
// in:body
RenameUserOption api.RenameUserOption
// in:body // in:body
CreateLabelOption api.CreateLabelOption CreateLabelOption api.CreateLabelOption
// in:body // in:body

View File

@ -79,7 +79,7 @@ func SettingsPost(ctx *context.Context) {
ctx.Data["OrgName"] = true ctx.Data["OrgName"] = true
ctx.RenderWithErr(ctx.Tr("form.username_been_taken"), tplSettingsOptions, &form) ctx.RenderWithErr(ctx.Tr("form.username_been_taken"), tplSettingsOptions, &form)
return return
} else if err = user_model.ChangeUserName(org.AsUser(), form.Name); err != nil { } else if err = user_model.ChangeUserName(ctx, org.AsUser(), form.Name); err != nil {
switch { switch {
case db.IsErrNameReserved(err): case db.IsErrNameReserved(err):
ctx.Data["OrgName"] = true ctx.Data["OrgName"] = true

View File

@ -23,6 +23,12 @@ const (
tplViewActions base.TplName = "repo/actions/view" tplViewActions base.TplName = "repo/actions/view"
) )
type Workflow struct {
Entry git.TreeEntry
IsInvalid bool
ErrMsg string
}
// MustEnableActions check if actions are enabled in settings // MustEnableActions check if actions are enabled in settings
func MustEnableActions(ctx *context.Context) { func MustEnableActions(ctx *context.Context) {
if !setting.Actions.Enabled { if !setting.Actions.Enabled {
@ -47,7 +53,7 @@ func List(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("actions.actions") ctx.Data["Title"] = ctx.Tr("actions.actions")
ctx.Data["PageIsActions"] = true ctx.Data["PageIsActions"] = true
var workflows git.Entries var workflows []Workflow
if empty, err := ctx.Repo.GitRepo.IsEmpty(); err != nil { if empty, err := ctx.Repo.GitRepo.IsEmpty(); err != nil {
ctx.Error(http.StatusInternalServerError, err.Error()) ctx.Error(http.StatusInternalServerError, err.Error())
return return
@ -62,13 +68,27 @@ func List(ctx *context.Context) {
ctx.Error(http.StatusInternalServerError, err.Error()) ctx.Error(http.StatusInternalServerError, err.Error())
return return
} }
workflows, err = actions.ListWorkflows(commit) entries, err := actions.ListWorkflows(commit)
if err != nil { if err != nil {
ctx.Error(http.StatusInternalServerError, err.Error()) ctx.Error(http.StatusInternalServerError, err.Error())
return return
} }
workflows = make([]Workflow, 0, len(entries))
for _, entry := range entries {
workflow := Workflow{Entry: *entry}
content, err := actions.GetContentFromEntry(entry)
if err != nil {
ctx.Error(http.StatusInternalServerError, err.Error())
return
}
_, err = actions.GetEventsFromContent(content)
if err != nil {
workflow.IsInvalid = true
workflow.ErrMsg = err.Error()
}
workflows = append(workflows, workflow)
}
} }
ctx.Data["workflows"] = workflows ctx.Data["workflows"] = workflows
ctx.Data["RepoLink"] = ctx.Repo.Repository.Link() ctx.Data["RepoLink"] = ctx.Repo.Repository.Link()

View File

@ -8,6 +8,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"net/http" "net/http"
"net/url"
"strings" "strings"
"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
@ -65,21 +66,17 @@ func Branches(ctx *context.Context) {
if page <= 1 { if page <= 1 {
page = 1 page = 1
} }
pageSize := setting.Git.BranchesRangeSize
limit := ctx.FormInt("limit") skip := (page - 1) * pageSize
if limit <= 0 || limit > setting.Git.BranchesRangeSize { log.Debug("Branches: skip: %d limit: %d", skip, pageSize)
limit = setting.Git.BranchesRangeSize defaultBranchBranch, branches, branchesCount := loadBranches(ctx, skip, pageSize)
}
skip := (page - 1) * limit
log.Debug("Branches: skip: %d limit: %d", skip, limit)
defaultBranchBranch, branches, branchesCount := loadBranches(ctx, skip, limit)
if ctx.Written() { if ctx.Written() {
return return
} }
ctx.Data["Branches"] = branches ctx.Data["Branches"] = branches
ctx.Data["DefaultBranchBranch"] = defaultBranchBranch ctx.Data["DefaultBranchBranch"] = defaultBranchBranch
pager := context.NewPagination(branchesCount, setting.Git.BranchesRangeSize, page, 5) pager := context.NewPagination(branchesCount, pageSize, page, 5)
pager.SetDefaultParams(ctx) pager.SetDefaultParams(ctx)
ctx.Data["Page"] = pager ctx.Data["Page"] = pager
@ -165,7 +162,7 @@ func RestoreBranchPost(ctx *context.Context) {
func redirect(ctx *context.Context) { func redirect(ctx *context.Context) {
ctx.JSON(http.StatusOK, map[string]interface{}{ ctx.JSON(http.StatusOK, map[string]interface{}{
"redirect": ctx.Repo.RepoLink + "/branches", "redirect": ctx.Repo.RepoLink + "/branches?page=" + url.QueryEscape(ctx.FormString("page")),
}) })
} }

View File

@ -27,9 +27,7 @@ import (
"code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/modules/web"
"code.gitea.io/gitea/modules/web/middleware" "code.gitea.io/gitea/modules/web/middleware"
"code.gitea.io/gitea/services/agit"
"code.gitea.io/gitea/services/forms" "code.gitea.io/gitea/services/forms"
container_service "code.gitea.io/gitea/services/packages/container"
user_service "code.gitea.io/gitea/services/user" user_service "code.gitea.io/gitea/services/user"
) )
@ -57,9 +55,8 @@ func HandleUsernameChange(ctx *context.Context, user *user_model.User, newName s
return fmt.Errorf(ctx.Tr("form.username_change_not_local_user")) return fmt.Errorf(ctx.Tr("form.username_change_not_local_user"))
} }
// Check if user name has been changed // rename user
if user.LowerName != strings.ToLower(newName) { if err := user_service.RenameUser(ctx, user, newName); err != nil {
if err := user_model.ChangeUserName(user, newName); err != nil {
switch { switch {
case user_model.IsErrUserAlreadyExist(err): case user_model.IsErrUserAlreadyExist(err):
ctx.Flash.Error(ctx.Tr("form.username_been_taken")) ctx.Flash.Error(ctx.Tr("form.username_been_taken"))
@ -76,26 +73,7 @@ func HandleUsernameChange(ctx *context.Context, user *user_model.User, newName s
} }
return err return err
} }
} else {
if err := repo_model.UpdateRepositoryOwnerNames(user.ID, newName); err != nil {
ctx.ServerError("UpdateRepository", err)
return err
}
}
// update all agit flow pull request header
err := agit.UserNameChanged(user, newName)
if err != nil {
ctx.ServerError("agit.UserNameChanged", err)
return err
}
if err := container_service.UpdateRepositoryNames(ctx, user, newName); err != nil {
ctx.ServerError("UpdateRepositoryNames", err)
return err
}
log.Trace("User name changed: %s -> %s", user.Name, newName)
return nil return nil
} }

View File

@ -226,8 +226,8 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git.
} }
// UserNameChanged handle user name change for agit flow pull // UserNameChanged handle user name change for agit flow pull
func UserNameChanged(user *user_model.User, newName string) error { func UserNameChanged(ctx context.Context, user *user_model.User, newName string) error {
pulls, err := issues_model.GetAllUnmergedAgitPullRequestByPoster(user.ID) pulls, err := issues_model.GetAllUnmergedAgitPullRequestByPoster(ctx, user.ID)
if err != nil { if err != nil {
return err return err
} }

View File

@ -38,6 +38,17 @@ func ToEmail(email *user_model.EmailAddress) *api.Email {
} }
} }
// ToEmail convert models.EmailAddress to api.Email
func ToEmailSearch(email *user_model.SearchEmailResult) *api.Email {
return &api.Email{
Email: email.Email,
Verified: email.IsActivated,
Primary: email.IsPrimary,
UserID: email.UID,
UserName: email.Name,
}
}
// ToBranch convert a git.Commit and git.Branch to an api.Branch // ToBranch convert a git.Commit and git.Branch to an api.Branch
func ToBranch(ctx context.Context, repo *repo_model.Repository, b *git.Branch, c *git.Commit, bp *git_model.ProtectedBranch, user *user_model.User, isRepoAdmin bool) (*api.Branch, error) { func ToBranch(ctx context.Context, repo *repo_model.Repository, b *git.Branch, c *git.Commit, bp *git_model.ProtectedBranch, user *user_model.User, isRepoAdmin bool) (*api.Branch, error) {
if bp == nil { if bp == nil {

41
services/user/rename.go Normal file
View File

@ -0,0 +1,41 @@
// Copyright 2023 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package user
import (
"context"
"fmt"
"strings"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/services/agit"
container_service "code.gitea.io/gitea/services/packages/container"
)
func renameUser(ctx context.Context, u *user_model.User, newUserName string) error {
if u.IsOrganization() {
return fmt.Errorf("cannot rename organization")
}
if err := user_model.ChangeUserName(ctx, u, newUserName); err != nil {
return err
}
if err := agit.UserNameChanged(ctx, u, newUserName); err != nil {
return err
}
if err := container_service.UpdateRepositoryNames(ctx, u, newUserName); err != nil {
return err
}
u.Name = newUserName
u.LowerName = strings.ToLower(newUserName)
if err := user_model.UpdateUser(ctx, u, false); err != nil {
return err
}
log.Trace("User name changed: %s -> %s", u.Name, newUserName)
return nil
}

View File

@ -27,6 +27,22 @@ import (
"code.gitea.io/gitea/services/packages" "code.gitea.io/gitea/services/packages"
) )
// RenameUser renames a user
func RenameUser(ctx context.Context, u *user_model.User, newUserName string) error {
ctx, committer, err := db.TxContext(ctx)
if err != nil {
return err
}
defer committer.Close()
if err := renameUser(ctx, u, newUserName); err != nil {
return err
}
if err := committer.Commit(); err != nil {
return err
}
return err
}
// DeleteUser completely and permanently deletes everything of a user, // DeleteUser completely and permanently deletes everything of a user,
// but issues/comments/pulls will be kept and shown as someone has been deleted, // but issues/comments/pulls will be kept and shown as someone has been deleted,
// unless the user is younger than USER_DELETE_WITH_COMMENTS_MAX_DAYS. // unless the user is younger than USER_DELETE_WITH_COMMENTS_MAX_DAYS.

View File

@ -11,15 +11,15 @@
{{range $result := .SearchResults}} {{range $result := .SearchResults}}
{{$repo := (index $.RepoMaps .RepoID)}} {{$repo := (index $.RepoMaps .RepoID)}}
<div class="diff-file-box diff-box file-content non-diff-file-content repo-search-result"> <div class="diff-file-box diff-box file-content non-diff-file-content repo-search-result">
<h4 class="ui top attached normal header"> <h4 class="ui top attached normal header gt-df gt-fw">
<span class="file"> <span class="file gt-f1">
<a rel="nofollow" href="{{$repo.Link}}">{{$repo.FullName}}</a> <a rel="nofollow" href="{{$repo.Link}}">{{$repo.FullName}}</a>
{{if $repo.IsArchived}} {{if $repo.IsArchived}}
<span class="ui basic label">{{$.locale.Tr "repo.desc.archived"}}</span> <span class="ui basic label">{{$.locale.Tr "repo.desc.archived"}}</span>
{{end}} {{end}}
- {{.Filename}} - {{.Filename}}
</span> </span>
<a class="ui basic tiny button" rel="nofollow" href="{{$repo.Link}}/src/commit/{{$result.CommitID | PathEscape}}/{{.Filename | PathEscapeSegments}}">{{$.locale.Tr "repo.diff.view_file"}}</a> <a role="button" class="ui basic tiny button" rel="nofollow" href="{{$repo.Link}}/src/commit/{{$result.CommitID | PathEscape}}/{{.Filename | PathEscapeSegments}}">{{$.locale.Tr "repo.diff.view_file"}}</a>
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<div class="file-body file-code code-view"> <div class="file-body file-code code-view">

View File

@ -9,7 +9,17 @@
<a class="item{{if not $.CurWorkflow}} active{{end}}" href="{{$.Link}}">{{.locale.Tr "actions.runs.all_workflows"}}</a> <a class="item{{if not $.CurWorkflow}} active{{end}}" href="{{$.Link}}">{{.locale.Tr "actions.runs.all_workflows"}}</a>
<div class="divider"></div> <div class="divider"></div>
{{range .workflows}} {{range .workflows}}
<a class="item{{if eq .Name $.CurWorkflow}} active{{end}}" href="{{$.Link}}?workflow={{.Name}}">{{.Name}}</a> <a class="item{{if eq .Entry.Name $.CurWorkflow}} active{{end}}" href="{{$.Link}}?workflow={{.Entry.Name}}">{{.Entry.Name}}
{{if .IsInvalid}}
<span class="tooltip" data-content="{{$.locale.Tr "actions.runs.invalid_workflow_helper" (.ErrMsg)}}">
<i class="warning icon red"></i>
</span>
{{else}}
<span class="tooltip" data-content="{{$.locale.Tr "actions.runs.valid_workflow_helper"}}">
<i class="check icon green"></i>
</span>
{{end}}
</a>
{{end}} {{end}}
</div> </div>
</div> </div>

View File

@ -81,9 +81,9 @@
<td class="three wide right aligned"> <td class="three wide right aligned">
{{if not .LatestPullRequest}} {{if not .LatestPullRequest}}
{{if .IsIncluded}} {{if .IsIncluded}}
<a class="ui tooltip orange large label" data-content="{{$.locale.Tr "repo.branch.included_desc"}}" data-position="top right"> <span class="ui tooltip orange large label" data-content="{{$.locale.Tr "repo.branch.included_desc"}}" data-position="top right">
{{svg "octicon-git-pull-request"}} {{$.locale.Tr "repo.branch.included"}} {{svg "octicon-git-pull-request"}} {{$.locale.Tr "repo.branch.included"}}
</a> </span>
{{else if and (not .IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}} {{else if and (not .IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}}
<a href="{{$.RepoLink}}/compare/{{PathEscapeSegments $.DefaultBranch}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{PathEscape $.Owner.Name}}:{{end}}{{PathEscapeSegments .Name}}"> <a href="{{$.RepoLink}}/compare/{{PathEscapeSegments $.DefaultBranch}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{PathEscape $.Owner.Name}}:{{end}}{{PathEscapeSegments .Name}}">
<button id="new-pull-request" class="ui compact basic button gt-mr-0">{{if $.CanPull}}{{$.locale.Tr "repo.pulls.compare_changes"}}{{else}}{{$.locale.Tr "action.compare_branch"}}{{end}}</button> <button id="new-pull-request" class="ui compact basic button gt-mr-0">{{if $.CanPull}}{{$.locale.Tr "repo.pulls.compare_changes"}}{{else}}{{$.locale.Tr "action.compare_branch"}}{{end}}</button>
@ -123,13 +123,13 @@
{{end}} {{end}}
{{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}} {{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}}
{{if .IsDeleted}} {{if .IsDeleted}}
<button class="ui basic jump button icon tooltip undo-button" data-url="{{$.Link}}/restore?branch_id={{.DeletedBranch.ID}}&name={{.DeletedBranch.Name}}" data-content="{{$.locale.Tr "repo.branch.restore" (.Name)}}" data-position="top right"> <button class="ui basic jump button icon tooltip undo-button" data-url="{{$.Link}}/restore?branch_id={{.DeletedBranch.ID}}&name={{.DeletedBranch.Name}}&page={{$.Page.Paginater.Current}}" data-content="{{$.locale.Tr "repo.branch.restore" (.Name)}}" data-position="top right">
<span class="text blue"> <span class="text blue">
{{svg "octicon-reply"}} {{svg "octicon-reply"}}
</span> </span>
</button> </button>
{{else}} {{else}}
<button class="ui basic jump button icon tooltip delete-button delete-branch-button" data-url="{{$.Link}}/delete?name={{.Name}}" data-content="{{$.locale.Tr "repo.branch.delete" (.Name)}}" data-position="top right" data-name="{{.Name}}"> <button class="ui basic jump button icon tooltip delete-button delete-branch-button" data-url="{{$.Link}}/delete?name={{.Name}}&page={{$.Page.Paginater.Current}}" data-content="{{$.locale.Tr "repo.branch.delete" (.Name)}}" data-position="top right" data-name="{{.Name}}">
{{svg "octicon-trash"}} {{svg "octicon-trash"}}
</button> </button>
{{end}} {{end}}

View File

@ -1,6 +1,20 @@
{{$release := .release}} {{$defaultBranch := $.root.BranchName}}
{{$defaultBranch := $.root.BranchName}}{{if and .root.IsViewTag (not .noTag)}}{{$defaultBranch = .root.TagName}}{{end}}{{if eq $defaultBranch ""}}{{$defaultBranch = $.root.Repository.DefaultBranch}}{{end}} {{if and .root.IsViewTag (not .noTag)}}
{{$type := ""}}{{if and .root.IsViewTag (not .noTag)}}{{$type = "tag"}}{{else if .root.IsViewBranch}}{{$type = "branch"}}{{else}}{{$type = "tree"}}{{end}} {{$defaultBranch = .root.TagName}}
{{end}}
{{if eq $defaultBranch ""}}
{{$defaultBranch = $.root.Repository.DefaultBranch}}
{{end}}
{{$type := ""}}
{{if and .root.IsViewTag (not .noTag)}}
{{$type = "tag"}}
{{else if .root.IsViewBranch}}
{{$type = "branch"}}
{{else}}
{{$type = "tree"}}
{{end}}
{{$showBranchesInDropdown := not .root.HideBranchesInDropdown}} {{$showBranchesInDropdown := not .root.HideBranchesInDropdown}}
<script type="module"> <script type="module">
@ -30,8 +44,8 @@
'defaultBranch': {{$defaultBranch}}, 'defaultBranch': {{$defaultBranch}},
'branchURLPrefix': '{{if .branchURLPrefix}}{{.branchURLPrefix}}{{else}}{{$.root.RepoLink}}/{{if $.root.PageIsCommits}}commits{{else}}src{{end}}/branch/{{end}}', 'branchURLPrefix': '{{if .branchURLPrefix}}{{.branchURLPrefix}}{{else}}{{$.root.RepoLink}}/{{if $.root.PageIsCommits}}commits{{else}}src{{end}}/branch/{{end}}',
'branchURLSuffix': '{{if .branchURLSuffix}}{{.branchURLSuffix}}{{else}}{{if $.root.TreePath}}/{{PathEscapeSegments $.root.TreePath}}{{end}}{{end}}', 'branchURLSuffix': '{{if .branchURLSuffix}}{{.branchURLSuffix}}{{else}}{{if $.root.TreePath}}/{{PathEscapeSegments $.root.TreePath}}{{end}}{{end}}',
'tagURLPrefix': '{{if .tagURLPrefix}}{{.tagURLPrefix}}{{else if $release}}{{$.root.RepoLink}}/compare/{{else}}{{$.root.RepoLink}}/{{if $.root.PageIsCommits}}commits{{else}}src{{end}}/tag/{{end}}', 'tagURLPrefix': '{{if .tagURLPrefix}}{{.tagURLPrefix}}{{else if .release}}{{$.root.RepoLink}}/compare/{{else}}{{$.root.RepoLink}}/{{if $.root.PageIsCommits}}commits{{else}}src{{end}}/tag/{{end}}',
'tagURLSuffix': '{{if .tagURLSuffix}}{{.tagURLSuffix}}{{else if $release}}...{{if $release.IsDraft}}{{PathEscapeSegments $release.Target}}{{else}}{{if $release.TagName}}{{PathEscapeSegments $release.TagName}}{{else}}{{PathEscapeSegments $release.Sha1}}{{end}}{{end}}{{else}}{{if $.root.TreePath}}/{{PathEscapeSegments $.root.TreePath}}{{end}}{{end}}', 'tagURLSuffix': '{{if .tagURLSuffix}}{{.tagURLSuffix}}{{else if .release}}...{{if .release.IsDraft}}{{PathEscapeSegments .release.Target}}{{else}}{{if .release.TagName}}{{PathEscapeSegments .release.TagName}}{{else}}{{PathEscapeSegments .release.Sha1}}{{end}}{{end}}{{else}}{{if $.root.TreePath}}/{{PathEscapeSegments $.root.TreePath}}{{end}}{{end}}',
'repoLink': {{.root.RepoLink}}, 'repoLink': {{.root.RepoLink}},
'treePath': {{.root.TreePath}}, 'treePath': {{.root.TreePath}},
'branchNameSubURL': {{.root.BranchNameSubURL}}, 'branchNameSubURL': {{.root.BranchNameSubURL}},
@ -46,71 +60,23 @@
window.config.pageData.branchDropdownDataList.push(data); window.config.pageData.branchDropdownDataList.push(data);
</script> </script>
<div class="fitted item choose reference"> <div class="fitted item js-branch-tag-selector">
{{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}}
<div class="ui floating filter dropdown custom"> <div class="ui floating filter dropdown custom">
<button class="branch-dropdown-button gt-ellipsis ui basic small compact button gt-df" @click="menuVisible = !menuVisible" @keyup.enter="menuVisible = !menuVisible"> <button class="branch-dropdown-button gt-ellipsis ui basic small compact button gt-df">
<span class="text gt-df gt-ac gt-mr-2"> <span class="text gt-df gt-ac gt-mr-2">
{{/* v-cloak is used to hide unnecessary elements before Vue componment is mounted */}} {{if .release}}
<span v-cloak v-if="release">${ textReleaseCompare }</span> {{.root.locale.Tr "repo.release.compare"}}
<span :class="{visible: isViewTag}" v-if="isViewTag" {{if not (eq $type "tag")}}v-cloak{{end}}>{{svg "octicon-tag"}}</span> {{else}}
<span :class="{visible: isViewBranch}" v-if="isViewBranch" {{if not (eq $type "branch")}}v-cloak{{end}}>{{svg "octicon-git-branch"}}</span> {{if eq $type "tag"}}
<span :class="{visible: isViewTree}" v-if="isViewTree" {{if not (eq $type "tree")}}v-cloak{{end}}>{{svg "octicon-git-branch"}}</span> {{svg "octicon-tag"}}
{{else}}
{{svg "octicon-git-branch"}}
{{end}}
<strong ref="dropdownRefName" class="gt-ml-3">{{if and .root.IsViewTag (not .noTag)}}{{.root.TagName}}{{else if .root.IsViewBranch}}{{.root.BranchName}}{{else}}{{ShortSha .root.CommitID}}{{end}}</strong> <strong ref="dropdownRefName" class="gt-ml-3">{{if and .root.IsViewTag (not .noTag)}}{{.root.TagName}}{{else if .root.IsViewBranch}}{{.root.BranchName}}{{else}}{{ShortSha .root.CommitID}}{{end}}</strong>
{{end}}
</span> </span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
</button> </button>
<div class="menu transition" :class="{visible: menuVisible}" v-if="menuVisible" v-cloak>
<div class="ui icon search input">
<i class="icon gt-df gt-ac gt-jc gt-m-0">{{svg "octicon-filter" 16}}</i>
<input name="search" ref="searchField" autocomplete="off" v-model="searchTerm" @keydown="keydown($event)" :placeholder="searchFieldPlaceholder">
</div>
<template v-if="showBranchesInDropdown">
<div class="header branch-tag-choice">
<div class="ui grid">
<div class="two column row">
<a class="reference column" href="#" @click="createTag = false; mode = 'branches'; focusSearchField()">
<span class="text" :class="{black: mode === 'branches'}">
{{svg "octicon-git-branch" 16 "gt-mr-2"}}${ textBranches }
</span>
</a>
<template v-if="!noTag">
<a class="reference column" href="#" @click="createTag = true; mode = 'tags'; focusSearchField()">
<span class="text" :class="{black: mode === 'tags'}">
{{svg "octicon-tag" 16 "gt-mr-2"}}${ textTags }
</span>
</a>
</template>
</div>
</div>
</div>
</template>
<div class="scrolling menu" ref="scrollContainer">
<div v-for="(item, index) in filteredItems" :key="item.name" class="item" :class="{selected: item.selected, active: active === index}" @click="selectItem(item)" :ref="'listItem' + index">${ item.name }</div>
<div class="item" v-if="showCreateNewBranch" :class="{active: active === filteredItems.length}" :ref="'listItem' + filteredItems.length">
<a href="#" @click="createNewBranch()">
<div v-show="createTag">
<i class="reference tags icon"></i>
<span v-html="textCreateTag.replace('%s', searchTerm)"></span>
</div>
<div v-show="!createTag">
{{svg "octicon-git-branch"}}
<span v-html="textCreateBranch.replace('%s', searchTerm)"></span>
</div>
<div class="text small">
<span v-if="isViewBranch || release">${ textCreateBranchFrom.replace('%s', branchName) }</span>
<span v-else-if="isViewTag">${ textCreateBranchFrom.replace('%s', tagName) }</span>
<span v-else>${ textCreateBranchFrom.replace('%s', commitIdShort) }</span>
</div>
</a>
<form ref="newBranchForm" action="{{.root.RepoLink}}/branches/_new/{{.root.BranchNameSubURL}}" method="post">
<input type="hidden" name="_csrf" :value="csrfToken">
<input type="hidden" name="new_branch_name" v-model="searchTerm">
<input type="hidden" name="create_tag" v-model="createTag">
<input type="hidden" name="current_path" v-model="treePath" v-if="treePath">
</form>
</div>
</div>
<div class="message" v-if="showNoResults">${ noResults }</div>
</div>
</div> </div>
</div> </div>

View File

@ -39,9 +39,9 @@
<div class="repository search"> <div class="repository search">
{{range $result := .SearchResults}} {{range $result := .SearchResults}}
<div class="diff-file-box diff-box file-content non-diff-file-content repo-search-result"> <div class="diff-file-box diff-box file-content non-diff-file-content repo-search-result">
<h4 class="ui top attached normal header"> <h4 class="ui top attached normal header gt-df gt-fw">
<span class="file">{{.Filename}}</span> <span class="file gt-f1">{{.Filename}}</span>
<a class="ui basic tiny button" rel="nofollow" href="{{$.SourcePath}}/src/commit/{{PathEscape $result.CommitID}}/{{PathEscapeSegments .Filename}}">{{$.locale.Tr "repo.diff.view_file"}}</a> <a role="button" class="ui basic tiny button" rel="nofollow" href="{{$.SourcePath}}/src/commit/{{PathEscape $result.CommitID}}/{{PathEscapeSegments .Filename}}">{{$.locale.Tr "repo.diff.view_file"}}</a>
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<div class="file-body file-code code-view"> <div class="file-body file-code code-view">

View File

@ -108,7 +108,7 @@
<span class="due-date tooltip" data-content="{{$.locale.Tr "repo.issues.due_date"}}" data-position="right center"> <span class="due-date tooltip" data-content="{{$.locale.Tr "repo.issues.due_date"}}" data-position="right center">
<span{{if .IsOverdue}} class="overdue"{{end}}> <span{{if .IsOverdue}} class="overdue"{{end}}>
{{svg "octicon-calendar" 14 "gt-mr-2"}} {{svg "octicon-calendar" 14 "gt-mr-2"}}
<time data-format="short-date" datetime="{{.DeadlineUnix.FormatLong}}">{{.DeadlineUnix.FormatShort}}</time> <time data-format="short-date" datetime="{{.DeadlineUnix.FormatDate}}">{{.DeadlineUnix.FormatShort}}</time>
</span> </span>
</span> </span>
{{end}} {{end}}

View File

@ -138,6 +138,80 @@
} }
} }
}, },
"/admin/emails": {
"get": {
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "List all emails",
"operationId": "adminGetAllEmails",
"parameters": [
{
"type": "integer",
"description": "page number of results to return (1-based)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "page size of results",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/EmailList"
},
"403": {
"$ref": "#/responses/forbidden"
}
}
}
},
"/admin/emails/search": {
"get": {
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Search all emails",
"operationId": "adminSearchEmails",
"parameters": [
{
"type": "string",
"description": "keyword",
"name": "q",
"in": "query"
},
{
"type": "integer",
"description": "page number of results to return (1-based)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "page size of results",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/EmailList"
},
"403": {
"$ref": "#/responses/forbidden"
}
}
}
},
"/admin/hooks": { "/admin/hooks": {
"get": { "get": {
"produces": [ "produces": [
@ -679,6 +753,46 @@
} }
} }
}, },
"/admin/users/{username}/rename": {
"post": {
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Rename a user",
"operationId": "adminRenameUser",
"parameters": [
{
"type": "string",
"description": "existing username of user",
"name": "username",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RenameUserOption"
}
}
],
"responses": {
"204": {
"$ref": "#/responses/empty"
},
"403": {
"$ref": "#/responses/forbidden"
},
"422": {
"$ref": "#/responses/validationError"
}
}
}
},
"/admin/users/{username}/repos": { "/admin/users/{username}/repos": {
"post": { "post": {
"consumes": [ "consumes": [
@ -16959,6 +17073,15 @@
"type": "boolean", "type": "boolean",
"x-go-name": "Primary" "x-go-name": "Primary"
}, },
"user_id": {
"type": "integer",
"format": "int64",
"x-go-name": "UserID"
},
"username": {
"type": "string",
"x-go-name": "UserName"
},
"verified": { "verified": {
"type": "boolean", "type": "boolean",
"x-go-name": "Verified" "x-go-name": "Verified"
@ -19105,6 +19228,22 @@
}, },
"x-go-package": "code.gitea.io/gitea/modules/structs" "x-go-package": "code.gitea.io/gitea/modules/structs"
}, },
"RenameUserOption": {
"description": "RenameUserOption options when renaming a user",
"type": "object",
"required": [
"new_username"
],
"properties": {
"new_username": {
"description": "New username for this user. This name cannot be in use yet by any other user.",
"type": "string",
"uniqueItems": true,
"x-go-name": "NewName"
}
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
"RepoCollaboratorPermission": { "RepoCollaboratorPermission": {
"description": "RepoCollaboratorPermission to get repository permission for a collaborator", "description": "RepoCollaboratorPermission to get repository permission for a collaborator",
"type": "object", "type": "object",

View File

@ -1,181 +1,54 @@
<div id="dashboard-repo-list" class="six wide column"> <script type="module">
<repo-search const data = {
:search-limit="searchLimit" ...window.config.pageData.dashboardRepoList, // it only contains searchLimit and uid
:sub-url="subUrl"
:uid="uid"
{{if .Team}}
:team-id="{{.Team.ID}}"
{{end}}
:more-repos-link="'{{.ContextUser.HomeLink}}'"
{{if not .ContextUser.IsOrganization}}
:organizations="[
{{range .Orgs}}
{name: '{{.Name}}', num_repos: '{{.NumRepos}}'},
{{end}}
]"
:is-organization="false"
:organizations-total-count="{{.UserOrgsCount}}"
:can-create-organization="{{.SignedUser.CanCreateOrganization}}"
{{end}}
inline-template
v-cloak
></repo-search>
</div>
<template id="dashboard-repo-list-template"> isMirrorsEnabled: {{.IsMirrorsEnabled}},
<div> isStarsEnabled: {{not .IsDisableStars}},
<div v-if="!isOrganization" class="ui two item tabable menu">
<a :class="{item: true, active: tab === 'repos'}" @click="changeTab('repos')">{{.locale.Tr "repository"}}</a> textRepository: {{.locale.Tr "repository"}},
<a :class="{item: true, active: tab === 'organizations'}" @click="changeTab('organizations')">{{.locale.Tr "organization"}}</a> textOrganization: {{.locale.Tr "organization"}},
</div> textMyRepos: {{.locale.Tr "home.my_repos"}},
<div v-show="tab === 'repos'" class="ui tab active list dashboard-repos"> textNewRepo: {{.locale.Tr "new_repo"}},
<h4 class="ui top attached header gt-df gt-ac"> textSearchRepos: {{.locale.Tr "home.search_repos"}},
<div class="gt-f1 gt-df gt-ac"> textFilter: {{.locale.Tr "home.filter"}},
{{.locale.Tr "home.my_repos"}} textShowArchived: {{.locale.Tr "home.show_archived"}},
<span class="ui grey label gt-ml-3">${reposTotalCount}</span> textShowPrivate: {{.locale.Tr "home.show_private"}},
</div>
<a class="tooltip" :href="subUrl + '/repo/create'" data-content="{{.locale.Tr "new_repo"}}" data-position="left center"> textShowBothArchivedUnarchived: {{.locale.Tr "home.show_both_archived_unarchived"}},
{{svg "octicon-plus"}} textShowOnlyUnarchived: {{.locale.Tr "home.show_only_unarchived"}},
<span class="sr-only">{{.locale.Tr "new_repo"}}</span> textShowOnlyArchived: {{.locale.Tr "home.show_only_archived"}},
</a>
</h4> textShowBothPrivatePublic: {{.locale.Tr "home.show_both_private_public"}},
<div class="ui attached segment repos-search"> textShowOnlyPublic: {{.locale.Tr "home.show_only_public"}},
<div class="ui fluid right action left icon input" :class="{loading: isLoading}"> textShowOnlyPrivate: {{.locale.Tr "home.show_only_private"}},
<input @input="changeReposFilter(reposFilter)" v-model="searchQuery" ref="search" placeholder="{{.locale.Tr "home.search_repos"}}">
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i> textAll: {{.locale.Tr "all"}},
<div class="ui dropdown icon button" title="{{.locale.Tr "home.filter"}}"> textSources: {{.locale.Tr "sources"}},
<i class="icon gt-df gt-ac gt-jc gt-m-0">{{svg "octicon-filter" 16}}</i> textForks: {{.locale.Tr "forks"}},
<div class="menu"> textMirrors: {{.locale.Tr "mirrors"}},
<a class="item" @click="toggleArchivedFilter()"> textCollaborative: {{.locale.Tr "collaborative"}},
<div class="ui checkbox"
ref="checkboxArchivedFilter" textFirstPage: {{.locale.Tr "admin.first_page"}},
data-title-both="{{.locale.Tr "home.show_both_archived_unarchived"}}" textPreviousPage: {{.locale.Tr "repo.issues.previous"}},
data-title-unarchived="{{.locale.Tr "home.show_only_unarchived"}}" textNextPage: {{.locale.Tr "repo.issues.next"}},
data-title-archived="{{.locale.Tr "home.show_only_archived"}}" textLastPage: {{.locale.Tr "admin.last_page"}},
:title="checkboxArchivedFilterTitle"
> textMyOrgs: {{.locale.Tr "home.my_orgs"}},
<!--the "hidden" is necessary to make the checkbox work without Fomantic UI js, textNewOrg: {{.locale.Tr "new_org"}},
otherwise if the "input" handles click event for intermediate status, it breaks the internal state--> };
<input type="checkbox" class="hidden" v-bind.prop="checkboxArchivedFilterProps">
<label> {{if .Team}}
{{svg "octicon-archive" 16 "gt-mr-2"}} data.teamId = {{.Team.ID}};
{{.locale.Tr "home.show_archived"}} {{end}}
</label>
</div> {{if not .ContextUser.IsOrganization}}
</a> data.organizations = [{{range .Orgs}}{'name': {{.Name}}, 'num_repos': {{.NumRepos}}},{{end}}];
<a class="item" @click="togglePrivateFilter()"> data.isOrganization = false;
<div class="ui checkbox" data.organizationsTotalCount = {{.UserOrgsCount}}
ref="checkboxPrivateFilter" data.canCreateOrganization = {{.SignedUser.CanCreateOrganization}}
data-title-both="{{.locale.Tr "home.show_both_private_public"}}" {{end}}
data-title-public="{{.locale.Tr "home.show_only_public"}}"
data-title-private="{{.locale.Tr "home.show_only_private"}}" window.config.pageData.dashboardRepoList = data;
:title="checkboxPrivateFilterTitle" </script>
>
<input type="checkbox" class="hidden" v-bind.prop="checkboxPrivateFilterProps"> <div id="dashboard-repo-list" class="six wide column"></div>
<label>
{{svg "octicon-lock" 16 "gt-mr-2"}}
{{.locale.Tr "home.show_private"}}
</label>
</div>
</a>
</div>
</div>
</div>
<div class="ui secondary tiny pointing borderless menu center grid repos-filter">
<a class="item" :class="{active: reposFilter === 'all'}" @click="changeReposFilter('all')">
{{.locale.Tr "all"}}
<div v-show="reposFilter === 'all'" class="ui circular mini grey label">${repoTypeCount}</div>
</a>
<a class="item" :class="{active: reposFilter === 'sources'}" @click="changeReposFilter('sources')">
{{.locale.Tr "sources"}}
<div v-show="reposFilter === 'sources'" class="ui circular mini grey label">${repoTypeCount}</div>
</a>
<a class="item" :class="{active: reposFilter === 'forks'}" @click="changeReposFilter('forks')">
{{.locale.Tr "forks"}}
<div v-show="reposFilter === 'forks'" class="ui circular mini grey label">${repoTypeCount}</div>
</a>
{{if .MirrorsEnabled}}
<a class="item" :class="{active: reposFilter === 'mirrors'}" @click="changeReposFilter('mirrors')">
{{.locale.Tr "mirrors"}}
<div v-show="reposFilter === 'mirrors'" class="ui circular mini grey label">${repoTypeCount}</div>
</a>
{{end}}
<a class="item" :class="{active: reposFilter === 'collaborative'}" @click="changeReposFilter('collaborative')">
{{.locale.Tr "collaborative"}}
<div v-show="reposFilter === 'collaborative'" class="ui circular mini grey label">${repoTypeCount}</div>
</a>
</div>
</div>
<div v-if="repos.length" class="ui attached table segment gt-rounded-bottom">
<ul class="repo-owner-name-list">
<li v-for="repo in repos" :class="{'private': repo.private || repo.internal}">
<a class="repo-list-link gt-df gt-ac gt-sb" :href="repo.link">
<div class="item-name gt-df gt-ac gt-f1 gt-mr-2">
<component v-bind:is="repoIcon(repo)" size="16" class="gt-mr-2"></component>
<div class="text gt-bold truncate gt-ml-1">${repo.full_name}</div>
<span v-if="repo.archived">
{{svg "octicon-archive" 16 "gt-ml-2"}}
</span>
</div>
{{if not .DisableStars}}
<div class="text light grey gt-df gt-ac">
${repo.stars_count}
{{svg "octicon-star" 16 "gt-ml-2"}}
</div>
{{end}}
</a>
</li>
</ul>
<div v-if="showMoreReposLink" class="center gt-py-3 gt-border-secondary-top">
<div class="ui borderless pagination menu narrow">
<a class="item navigation gt-py-2" :class="{'disabled': page === 1}"
@click="changePage(1)" title="{{$.locale.Tr "admin.first_page"}}">
{{svg "gitea-double-chevron-left" 16 "gt-mr-2"}}
</a>
<a class="item navigation gt-py-2" :class="{'disabled': page === 1}"
@click="changePage(page - 1)" title="{{$.locale.Tr "repo.issues.previous"}}">
{{svg "octicon-chevron-left" 16 "gt-mr-2"}}
</a>
<a class="active item gt-py-2">${page}</a>
<a class="item navigation" :class="{'disabled': page === finalPage}"
@click="changePage(page + 1)" title="{{$.locale.Tr "repo.issues.next"}}">
{{svg "octicon-chevron-right" 16 "gt-ml-2"}}
</a>
<a class="item navigation gt-py-2" :class="{'disabled': page === finalPage}"
@click="changePage(finalPage)" title="{{$.locale.Tr "admin.last_page"}}">
{{svg "gitea-double-chevron-right" 16 "gt-ml-2"}}
</a>
</div>
</div>
</div>
</div>
<div v-if="!isOrganization" v-show="tab === 'organizations'" class="ui tab active list dashboard-orgs">
<h4 class="ui top attached header gt-df gt-ac">
<div class="gt-f1 gt-df gt-ac">
{{.locale.Tr "home.my_orgs"}}
<span class="ui grey label gt-ml-3">${organizationsTotalCount}</span>
</div>
<a v-if="canCreateOrganization" class="tooltip" :href="subUrl + '/org/create'" data-content="{{.locale.Tr "new_org"}}" data-position="left center">
{{svg "octicon-plus"}}
<span class="sr-only">{{.locale.Tr "new_org"}}</span>
</a>
</h4>
<div v-if="organizations.length" class="ui attached table segment gt-rounded-bottom">
<ul class="repo-owner-name-list">
<li v-for="org in organizations">
<a class="repo-list-link gt-df gt-ac gt-sb" :href="subUrl + '/' + encodeURIComponent(org.name)">
<div class="text truncate item-name gt-f1">
{{svg "octicon-organization" 16 "gt-mr-2"}}
<strong>${org.name}</strong>
</div>
<div class="text light grey gt-df gt-ac">
${org.num_repos}
{{svg "octicon-repo" 16 "gt-ml-2 gt-mt-1"}}
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</template>

110
web_src/css/admin.css Normal file
View File

@ -0,0 +1,110 @@
.admin.hooks .list > .item:not(:first-child) {
border-top: 1px solid var(--color-secondary);
padding: 0.25rem 1rem;
margin: 12px -1rem -1rem;
}
.admin .table.segment {
padding: 0;
font-size: 13px;
overflow-x: auto;
}
.admin .table.segment:not(.striped) thead th:last-child {
padding-right: 5px !important;
}
.admin .table.segment th {
padding-top: 5px;
padding-bottom: 5px;
}
.admin .table.segment:not(.select) th:first-of-type,
.admin .table.segment:not(.select) td:first-of-type {
padding-left: 15px !important;
}
.admin .table.segment form tbody button[type="submit"] {
padding: 5px 8px;
}
.admin .settings .button.adopt,
.admin .settings .button.delete {
margin-top: -15px;
margin-bottom: -15px;
}
.admin .settings .button.adopt .label,
.admin .settings .button.delete .label {
vertical-align: middle;
}
.admin.user .email {
max-width: 200px;
}
.admin dl.admin-dl-horizontal {
padding: 20px;
margin: 0;
}
.admin dl.admin-dl-horizontal dd {
margin-left: 275px;
}
@media (max-width: 767px) {
.admin dl.admin-dl-horizontal dd {
margin-left: 5%;
}
}
.admin dl.admin-dl-horizontal dt {
font-weight: 600;
float: left;
width: 285px;
clear: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@media (max-width: 767px) {
.admin dl.admin-dl-horizontal dt {
width: auto;
margin-right: 0.5em;
}
}
.admin.config #test-mail-btn {
margin-left: 5px;
}
.admin code,
.admin pre {
white-space: pre-wrap;
word-wrap: break-word;
}
@media (max-width: 767px) {
.admin #notice-table .notice-description {
max-width: 80vw;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.admin #notice-table .notice-description {
max-width: 360px;
}
}
@media (min-width: 992px) and (max-width: 1200px) {
.admin #notice-table .notice-description {
max-width: 510px;
}
}
@media (min-width: 1201px) {
.admin #notice-table .notice-description {
max-width: 640px;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -29,14 +29,14 @@
/* LineNumbersTable */ /* LineNumbersTable */
.chroma .lnt { .chroma .lnt {
margin-right: .4em; margin-right: 0.4em;
padding: 0 .4em; padding: 0 0.4em;
} }
/* LineNumbers */ /* LineNumbers */
.chroma .ln { .chroma .ln {
margin-right: .4em; margin-right: 0.4em;
padding: 0 .4em; padding: 0 0.4em;
} }
/* GenericStrong */ /* GenericStrong */

View File

@ -1,5 +1,5 @@
.ui .field:not(:last-child) .EasyMDEContainer .editor-statusbar { .ui .field:not(:last-child) .EasyMDEContainer .editor-statusbar {
margin-bottom: -1em; // when there is a statusbar, the "margin-bottom: 1em" of the "field" is not needed, because the statusbar is likely a blank line margin-bottom: -1em; /* when there is a statusbar, the "margin-bottom: 1em" of the "field" is not needed, because the statusbar is likely a blank line */
} }
.EasyMDEContainer .CodeMirror { .EasyMDEContainer .CodeMirror {
@ -7,15 +7,15 @@
background-color: var(--color-input-background); background-color: var(--color-input-background);
border-color: var(--color-secondary); border-color: var(--color-secondary);
font: 14px var(--fonts-monospace); font: 14px var(--fonts-monospace);
}
&.cm-s-default { .EasyMDEContainer .CodeMirror.cm-s-default {
border-radius: var(--border-radius); border-radius: var(--border-radius);
padding: 0 !important; padding: 0 !important;
} }
&.CodeMirror-fullscreen.CodeMirror-focused { .EasyMDEContainer .CodeMirror.CodeMirror-fullscreen.CodeMirror-focused {
border-right: 1px solid var(--color-primary) !important; border-right: 1px solid var(--color-primary) !important;
}
} }
.CodeMirror-cursor { .CodeMirror-cursor {

View File

@ -0,0 +1,106 @@
.CodeMirror.cm-s-default .cm-property,
.CodeMirror.cm-s-paper .cm-property {
color: #a0cc75;
}
.CodeMirror.cm-s-default .cm-header,
.CodeMirror.cm-s-paper .cm-header {
color: #9daccc;
}
.CodeMirror.cm-s-default .cm-quote,
.CodeMirror.cm-s-paper .cm-quote {
color: #009900;
}
.CodeMirror.cm-s-default .cm-keyword,
.CodeMirror.cm-s-paper .cm-keyword {
color: #cc8a61;
}
.CodeMirror.cm-s-default .cm-atom,
.CodeMirror.cm-s-paper .cm-atom {
color: #ef5e77;
}
.CodeMirror.cm-s-default .cm-number,
.CodeMirror.cm-s-paper .cm-number {
color: #ff5656;
}
.CodeMirror.cm-s-default .cm-def,
.CodeMirror.cm-s-paper .cm-def {
color: #e4e4e4;
}
.CodeMirror.cm-s-default .cm-variable-2,
.CodeMirror.cm-s-paper .cm-variable-2 {
color: #00bdbf;
}
.CodeMirror.cm-s-default .cm-variable-3,
.CodeMirror.cm-s-paper .cm-variable-3 {
color: #008855;
}
.CodeMirror.cm-s-default .cm-comment,
.CodeMirror.cm-s-paper .cm-comment {
color: #8e9ab3;
}
.CodeMirror.cm-s-default .cm-string,
.CodeMirror.cm-s-paper .cm-string {
color: #a77272;
}
.CodeMirror.cm-s-default .cm-string-2,
.CodeMirror.cm-s-paper .cm-string-2 {
color: #ff5500;
}
.CodeMirror.cm-s-default .cm-meta,
.CodeMirror.cm-s-paper .cm-meta,
.CodeMirror.cm-s-default .cm-qualifier,
.CodeMirror.cm-s-paper .cm-qualifier {
color: #ffb176;
}
.CodeMirror.cm-s-default .cm-builtin,
.CodeMirror.cm-s-paper .cm-builtin {
color: #b7c951;
}
.CodeMirror.cm-s-default .cm-bracket,
.CodeMirror.cm-s-paper .cm-bracket {
color: #999977;
}
.CodeMirror.cm-s-default .cm-tag,
.CodeMirror.cm-s-paper .cm-tag {
color: #f1d273;
}
.CodeMirror.cm-s-default .cm-attribute,
.CodeMirror.cm-s-paper .cm-attribute {
color: #bfcc70;
}
.CodeMirror.cm-s-default .cm-hr,
.CodeMirror.cm-s-paper .cm-hr {
color: #999999;
}
.CodeMirror.cm-s-default .cm-url,
.CodeMirror.cm-s-paper .cm-url {
color: #c5cfd0;
}
.CodeMirror.cm-s-default .cm-link,
.CodeMirror.cm-s-paper .cm-link {
color: #d8c792;
}
.CodeMirror.cm-s-default .cm-error,
.CodeMirror.cm-s-paper .cm-error {
color: #dbdbeb;
}

View File

@ -1,4 +1,4 @@
// Based on https://github.com/buildkite/terminal-to-html/blob/697ff23bd8dc48b9d23f11f259f5256dae2455f0/assets/terminal.css /* Based on https://github.com/buildkite/terminal-to-html/blob/697ff23bd8dc48b9d23f11f259f5256dae2455f0/assets/terminal.css */
.console { .console {
background: var(--color-console-bg); background: var(--color-console-bg);

203
web_src/css/dashboard.css Normal file
View File

@ -0,0 +1,203 @@
.dashboard.feeds .context.user.menu,
.dashboard.issues .context.user.menu {
z-index: 101;
min-width: 200px;
}
.dashboard.feeds .context.user.menu .ui.header,
.dashboard.issues .context.user.menu .ui.header {
font-size: 1rem;
text-transform: none;
}
.dashboard.feeds .filter.menu,
.dashboard.issues .filter.menu {
width: initial;
}
.dashboard.feeds .filter.menu .item,
.dashboard.issues .filter.menu .item {
text-align: left;
display: flex;
align-items: center;
justify-content: space-between;
}
.dashboard.feeds .filter.menu .item .text,
.dashboard.issues .filter.menu .item .text {
height: 16px;
vertical-align: middle;
}
.dashboard.feeds .filter.menu .item .text.truncate,
.dashboard.issues .filter.menu .item .text.truncate {
width: 75%;
}
.dashboard.feeds .filter.menu .item .floating.label,
.dashboard.issues .filter.menu .item .floating.label {
top: 7px;
left: 90%;
width: 15%;
}
@media (max-width: 767px) {
.dashboard.feeds .filter.menu .item .floating.label,
.dashboard.issues .filter.menu .item .floating.label {
top: 10px;
left: auto;
width: auto;
right: 13px;
}
}
/* Sort */
.dashboard.feeds .filter.menu .jump.item,
.dashboard.issues .filter.menu .jump.item {
margin: 1px;
padding-right: 0;
}
.dashboard.feeds .filter.menu .menu,
.dashboard.issues .filter.menu .menu {
max-height: 300px;
overflow-x: auto;
right: 0 !important;
left: auto !important;
}
@media (max-width: 767px) {
.dashboard.feeds .filter.menu,
.dashboard.issues .filter.menu {
width: 100%;
}
}
.dashboard.feeds .right.stackable.menu > .item.active,
.dashboard.issues .right.stackable.menu > .item.active {
color: var(--color-red);
}
.dashboard .dashboard-repos,
.dashboard .dashboard-orgs {
margin: 0 1px; /* Accommodate for Semantic's 1px hacks on .attached elements */
}
.dashboard .dashboard-navbar {
width: 100vw;
padding-left: 0.5rem;
padding-right: 0.5rem;
}
.dashboard .dashboard-navbar .org-visibility .label {
margin-left: 5px;
}
.dashboard .dashboard-navbar .ui.dropdown {
max-width: 100%;
}
@media (max-width: 767px) {
.dashboard .dashboard-navbar .ui.dropdown > .menu {
position: static;
}
}
.feeds .news li {
display: flex;
align-items: baseline;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
.feeds .news li img {
align-self: flex-start;
}
.feeds .news li > * + * {
margin-left: 0.35rem;
}
.feeds .news > .ui.grid {
margin-left: auto;
margin-right: auto;
}
.feeds .news .left .ui.avatar {
margin-top: 13px;
}
.feeds .news .time-since {
font-size: 13px;
}
.feeds .news .issue.title {
width: 80%;
margin: 0 0 1em;
}
.feeds .news .push.news .content ul {
line-height: 18px;
font-size: 13px;
list-style: none;
padding-left: 10px;
}
.feeds .news .push.news .content ul .text.truncate {
width: 80%;
}
.feeds .news .commit-id {
font-family: var(--fonts-monospace);
}
.feeds .news code {
padding: 2px 4px;
border-radius: 3px;
background-color: var(--color-markup-code-block);
word-break: break-all;
}
.feeds .news:last-of-type .divider {
display: none !important;
}
.feeds .list ul {
list-style: none;
margin: 0;
padding-left: 0;
}
.feeds .list ul li:not(:last-child) {
border-bottom: 1px solid var(--color-secondary);
}
.feeds .list ul li.private {
background-color: var(--color-box-body-highlight);
}
.feeds .list ul li .repo-list-link {
padding: 6px 1em;
display: block;
}
.feeds .list ul li .repo-list-link .svg {
color: var(--color-text-light-2);
}
.feeds .list ul li .repo-list-link .star-num {
font-size: 12px;
}
.feeds .list #privateFilterCheckbox .svg {
color: var(--color-grey);
margin-right: 0.25rem;
}
.feeds .list .repo-owner-name-list .item-name {
min-width: 0;
}
.feeds .list .repo-owner-name-list .item-name svg {
min-width: 16px;
}

88
web_src/css/explore.css Normal file
View File

@ -0,0 +1,88 @@
.explore .navbar {
justify-content: center;
margin-bottom: 15px !important;
background-color: var(--color-navbar) !important;
border-width: 1px !important;
}
.explore .navbar .svg {
width: 16px;
text-align: center;
margin-right: 5px;
}
.ui.repository.list .item {
padding-bottom: 1.5rem;
}
.ui.repository.list .item:not(:first-child) {
border-top: 1px solid var(--color-secondary);
padding-top: 1.5rem;
}
.ui.repository.list .item .ui.header {
font-size: 1.5rem;
margin-bottom: 0.5rem;
}
.ui.repository.list .item .ui.header .name {
word-break: break-all;
}
.ui.repository.list .item .ui.header .metas {
font-size: 14px;
}
.ui.repository.list .item .time {
font-size: 12px;
}
.ui.repository.list .item .ui.tags {
margin-bottom: 0.5rem;
}
.ui.repository.branches .info {
font-size: 12px;
color: var(--color-text-light);
display: flex;
white-space: pre;
}
.ui.repository.branches .info .commit-message {
max-width: 72em;
overflow: hidden;
text-overflow: ellipsis;
}
.ui.repository.branches .overflow-visible {
overflow: visible;
}
/* fix alignment of PR popup in branches table */
.ui.repository.branches table .ui.popup {
text-align: left;
}
.ui.user.list .item {
padding-bottom: 25px;
display: flex;
}
.ui.user.list .item:not(:first-child) {
border-top: 1px solid var(--color-secondary);
padding-top: 25px;
}
.ui.user.list .item img.ui.avatar {
width: 40px;
height: 40px;
margin-right: 10px;
}
.ui.user.list .item .description {
margin-top: 5px;
}
.ui.user.list .item .description .svg:not(:first-child) {
margin-left: 5px;
}

View File

@ -1,15 +1,14 @@
.ui .field { .ui .field .dropzone {
.dropzone {
border: 2px dashed var(--color-secondary); border: 2px dashed var(--color-secondary);
background: none; background: none;
box-shadow: none; box-shadow: none;
padding: 0; padding: 0;
border-radius: 4px; border-radius: 4px;
min-height: 0; min-height: 0;
.dz-message { }
.ui .field .dropzone .dz-message {
margin: 10px 0; margin: 10px 0;
}
}
} }
.dropzone .dz-button { .dropzone .dz-button {
@ -50,5 +49,5 @@
} }
.dropzone .dz-preview:hover .dz-image img { .dropzone .dz-preview:hover .dz-image img {
filter: opacity(.5) !important; filter: opacity(0.5) !important;
} }

View File

@ -0,0 +1,317 @@
#git-graph-container {
overflow-x: auto;
width: 100%;
min-height: 350px;
}
#git-graph-container > .ui.segment.loading {
border: 0;
z-index: 1;
min-height: 246px;
}
#git-graph-container h2 {
display: flex;
justify-content: space-between;
align-items: center;
}
#git-graph-container .color-buttons {
margin-right: 0;
}
#git-graph-container .ui.header.dividing {
padding-bottom: 10px;
}
#git-graph-container #flow-select-refs-dropdown {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
min-width: 250px;
border-right: none;
}
#git-graph-container #flow-select-refs-dropdown .ui.label {
max-width: 180px;
display: inline-flex !important;
align-items: center;
}
#git-graph-container #flow-select-refs-dropdown .ui.label .truncate {
display: inline-block;
max-width: 140px;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: top;
white-space: nowrap;
}
#git-graph-container #flow-select-refs-dropdown .dropdown.icon {
display: none;
}
#git-graph-container #flow-select-refs-dropdown .default.text {
padding-top: 4px;
padding-bottom: 4px;
}
#git-graph-container #flow-select-refs-dropdown input.search {
position: relative;
top: 1px;
}
#git-graph-container li {
list-style-type: none;
height: 24px;
line-height: 24px;
white-space: nowrap;
display: flex;
align-items: center;
}
#git-graph-container li .node-relation {
font-family: var(--fonts-monospace);
}
#git-graph-container li .author {
color: var(--color-text-light);
}
#git-graph-container li .time {
color: var(--color-text-light-3);
font-size: 80%;
}
#git-graph-container li a:not(.ui):hover {
text-decoration: underline;
}
#git-graph-container li a em {
color: var(--color-red);
border-bottom: 1px dotted var(--color-secondary);
text-decoration: none;
font-style: normal;
}
#git-graph-container #rel-container {
max-width: 30%;
overflow-x: auto;
float: left;
}
#git-graph-container #rev-container {
width: 100%;
}
#git-graph-container #rev-list {
margin: 0;
padding: 0;
width: 100%;
}
#git-graph-container #rev-list li.highlight.hover {
background-color: var(--color-secondary-alpha-30);
}
#git-graph-container #rev-list .tags a.button {
padding: 2px 4px;
}
#git-graph-container #rev-list .sha.label {
padding-top: 5px;
padding-bottom: 3px;
}
#git-graph-container #rev-list .sha.label .shortsha {
padding-top: 0;
}
#git-graph-container #rev-list .sha.label .shortsha-pad {
padding-right: 10px;
}
#git-graph-container #rev-list .sha.label .ui.detail.icon.button {
padding-top: 3px;
margin-top: -5px;
padding-bottom: 1px;
}
#git-graph-container #rev-list .author img.ui.avatar {
width: auto;
height: 18px;
max-width: none;
}
#git-graph-container #graph-raw-list {
margin: 0;
}
#git-graph-container.monochrome #rel-container .flow-group {
stroke: var(--color-secondary-dark-5);
fill: var(--color-secondary-dark-5);
}
#git-graph-container.monochrome #rel-container .flow-group.highlight {
stroke: var(--color-secondary-dark-12);
fill: var(--color-secondary-dark-12);
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-1 {
stroke: #499a37;
fill: #499a37;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-2 {
stroke: #ce4751;
fill: #ce4751;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-3 {
stroke: #8f9121;
fill: #8f9121;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-4 {
stroke: #ac32a6;
fill: #ac32a6;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-5 {
stroke: #7445e9;
fill: #7445e9;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-6 {
stroke: #c67d28;
fill: #c67d28;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-7 {
stroke: #4db392;
fill: #4db392;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-8 {
stroke: #aa4d30;
fill: #aa4d30;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-9 {
stroke: #2a6f84;
fill: #2a6f84;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-10 {
stroke: #c45327;
fill: #c45327;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-11 {
stroke: #3d965c;
fill: #3d965c;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-12 {
stroke: #792a93;
fill: #792a93;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-13 {
stroke: #439d73;
fill: #439d73;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-14 {
stroke: #103aad;
fill: #103aad;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-15 {
stroke: #982e85;
fill: #982e85;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.flow-color-16-0 {
stroke: #7db233;
fill: #7db233;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-1 {
stroke: #5ac144;
fill: #5ac144;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-2 {
stroke: #ed5a8b;
fill: #ed5a8b;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-3 {
stroke: #ced049;
fill: #ced048;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-4 {
stroke: #db61d7;
fill: #db62d6;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-5 {
stroke: #8455f9;
fill: #8455f9;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-6 {
stroke: #e6a151;
fill: #e6a151;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-7 {
stroke: #44daaa;
fill: #44daaa;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-8 {
stroke: #dd7a5c;
fill: #dd7a5c;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-9 {
stroke: #38859c;
fill: #38859c;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-10 {
stroke: #d95520;
fill: #d95520;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-11 {
stroke: #42ae68;
fill: #42ae68;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-12 {
stroke: #9126b5;
fill: #9126b5;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-13 {
stroke: #4ab080;
fill: #4ab080;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-14 {
stroke: #284fb8;
fill: #284fb8;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-15 {
stroke: #971c80;
fill: #971c80;
}
#git-graph-container:not(.monochrome) #rel-container .flow-group.highlight.flow-color-16-0 {
stroke: #87ca28;
fill: #87ca28;
}

View File

@ -0,0 +1,68 @@
#user-heatmap {
width: 100%;
font-size: 9px;
position: relative;
min-height: 125px;
}
#user-heatmap text {
fill: currentcolor !important;
}
/* for the "Less" and "More" legend */
#user-heatmap .vch__legend .vch__legend {
display: flex;
font-size: 11px;
align-items: center;
justify-content: right;
}
#user-heatmap .vch__legend .vch__legend div:first-child,
#user-heatmap .vch__legend .vch__legend div:last-child {
display: inline-block;
padding: 0 5px;
}
/* move the "? contributions in the last ? months" text from top to bottom */
#user-heatmap .total-contributions {
font-size: 11px;
position: absolute;
bottom: 0;
left: 25px;
}
@media (max-width: 1200px) {
#user-heatmap {
min-height: 105px;
}
#user-heatmap .total-contributions {
left: 21px;
}
}
@media (max-width: 1000px) {
#user-heatmap {
min-height: 80px;
}
#user-heatmap .total-contributions {
font-size: 10px;
left: 17px;
bottom: -4px;
}
}
.user.profile #user-heatmap {
min-height: 135px;
}
@media (max-width: 1200px) {
.user.profile #user-heatmap {
min-height: 115px;
}
}
@media (max-width: 1000px) {
.user.profile #user-heatmap {
min-height: 90px;
}
}

View File

@ -0,0 +1,107 @@
.image-diff-container {
text-align: center;
padding: 1em 0;
}
.image-diff-container img {
border: 1px solid var(--color-primary-light-7);
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAG0lEQVQYlWN4+vTpf3SMDTAMBYXYBLFpHgoKAeiOf0SGE9kbAAAAAElFTkSuQmCC") right bottom var(--color-primary-light-7);
}
.image-diff-container .before-container {
border: 1px solid var(--color-red);
display: block;
}
.image-diff-container .after-container {
border: 1px solid var(--color-green);
display: block;
}
.image-diff-container .diff-side-by-side .side {
display: inline-block;
line-height: 0;
vertical-align: top;
margin: 0 1em;
}
.image-diff-container .diff-side-by-side .side .side-header {
font-weight: bold;
}
.image-diff-container .diff-swipe {
margin: auto;
}
.image-diff-container .diff-swipe .swipe-frame {
position: absolute;
}
.image-diff-container .diff-swipe .swipe-frame .before-container {
position: absolute;
}
.image-diff-container .diff-swipe .swipe-frame .swipe-container {
position: absolute;
right: 0;
display: block;
border-left: 2px solid var(--color-secondary-dark-8);
height: 100%;
overflow: hidden;
}
.image-diff-container
.diff-swipe
.swipe-frame
.swipe-container
.after-container {
position: absolute;
right: 0;
}
.image-diff-container .diff-swipe .swipe-frame .swipe-bar {
position: absolute;
height: 100%;
top: 0;
left: 0;
}
.image-diff-container .diff-swipe .swipe-frame .swipe-bar .handle {
background: var(--color-secondary-dark-8);
left: -5px;
height: 12px;
width: 12px;
position: absolute;
transform: rotate(45deg);
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
.image-diff-container .diff-swipe .swipe-frame .swipe-bar .top-handle {
top: -12px;
}
.image-diff-container .diff-swipe .swipe-frame .swipe-bar .bottom-handle {
bottom: -14px;
}
.image-diff-container .diff-overlay {
margin: 0 auto;
}
.image-diff-container .diff-overlay .overlay-frame {
margin: 0 auto;
position: relative;
}
.image-diff-container .diff-overlay .before-container,
.image-diff-container .diff-overlay .after-container {
position: absolute;
}
.image-diff-container .diff-overlay input {
max-width: 300px;
}

View File

@ -3,14 +3,14 @@
flex-direction: row; flex-direction: row;
flex-wrap: nowrap; flex-wrap: nowrap;
overflow-x: auto; overflow-x: auto;
margin: 0 .5em; margin: 0 0.5em;
} }
.board-column { .board-column {
background-color: var(--color-project-board-bg) !important; background-color: var(--color-project-board-bg) !important;
border: 1px solid var(--color-secondary) !important; border: 1px solid var(--color-secondary) !important;
margin: 0 .5rem !important; margin: 0 0.5rem !important;
padding: .5rem !important; padding: 0.5rem !important;
width: 320px; width: 320px;
height: calc(100vh - 450px); height: calc(100vh - 450px);
min-height: 60vh; min-height: 60vh;
@ -24,21 +24,22 @@
.board-column-header { .board-column-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
}
&.dark-label { .board-column-header.dark-label {
color: var(--color-project-board-dark-label) !important; color: var(--color-project-board-dark-label) !important;
}
.board-label { .board-column-header.dark-label .board-label {
color: var(--color-project-board-dark-label) !important; color: var(--color-project-board-dark-label) !important;
} }
}
&.light-label {
color: var(--color-project-board-light-label) !important;
.board-label { .board-column-header.light-label {
color: var(--color-project-board-light-label) !important;
}
.board-column-header.light-label .board-label {
color: var(--color-project-board-light-label) !important; color: var(--color-project-board-light-label) !important;
}
}
} }
.board-label { .board-label {
@ -81,7 +82,7 @@
border-radius: 5px !important; border-radius: 5px !important;
cursor: move; cursor: move;
width: calc(100% - 4px) !important; width: calc(100% - 4px) !important;
padding: .5rem !important; padding: 0.5rem !important;
min-height: auto !important; min-height: auto !important;
} }
@ -124,24 +125,23 @@
.color-field .minicolors.minicolors-theme-default { .color-field .minicolors.minicolors-theme-default {
display: block; display: block;
}
.minicolors-input { .color-field .minicolors.minicolors-theme-default .minicolors-input {
height: 38px; height: 38px;
padding-left: 2rem; padding-left: 2rem;
} }
.minicolors-swatch { .color-field .minicolors.minicolors-theme-default .minicolors-swatch {
top: 10px; top: 10px;
}
} }
.edit-project-board, .edit-project-board .color.picker.column,
.new-board-modal { .new-board-modal .color.picker.column {
.color.picker.column {
display: flex; display: flex;
}
.minicolors {
flex: 1; .edit-project-board .color.picker.column .minicolors,
} .new-board-modal .color.picker.column .minicolors {
} flex: 1;
} }

393
web_src/css/font_i18n.css Normal file
View File

@ -0,0 +1,393 @@
:root :lang(ja) {
--fonts-override: var(--fonts-default-override-ja);
}
:root :lang(zh-CN) {
--fonts-override: var(--fonts-default-override-zh-cn);
}
:root :lang(zh-TW) {
--fonts-override: var(--fonts-default-override-zh-tw);
}
:root :lang(zh-HK) {
--fonts-override: var(--fonts-default-override-zh-hk);
}
:root :lang(ko) {
--fonts-override: var(--fonts-default-override-ko);
}
[lang] {
font-family: var(--fonts-regular);
}
:root {
--fonts-default-override-ja: system-ui-ja, var(--fonts-proportional);
--fonts-default-override-zh-cn: system-ui-zh-cn, var(--fonts-proportional);
--fonts-default-override-zh-tw: system-ui-zh-tw, var(--fonts-proportional);
--fonts-default-override-zh-hk: system-ui-zh-hk, var(--fonts-proportional);
--fonts-default-override-ko: system-ui-ko, var(--fonts-proportional);
}
/* Special handling for Firefox on Windows/Linux */
@supports (-moz-appearance: none) {
:root {
--fonts-default-override-ja: var(--fonts-proportional), system-ui-ja;
--fonts-default-override-zh-cn: var(--fonts-proportional), system-ui-zh-cn;
--fonts-default-override-zh-tw: var(--fonts-proportional), system-ui-zh-tw;
--fonts-default-override-zh-hk: var(--fonts-proportional), system-ui-zh-hk;
--fonts-default-override-ko: var(--fonts-proportional), system-ui-ko;
}
}
@font-face {
font-family: system-ui-ja;
src: local("HiraKakuProN-W3"), local("Hiragino Kaku Gothic ProN W3"),
local("HiraginoSans-W2"), local("Source Han Sans JP Light"),
local("SourceHanSansJP-Light"), local("Source Han Sans J Light"),
local("SourceHanSansJ-Light"), local("Noto Sans CJK JP Light"),
local("NotoSansCJKJP-Light"), local("Source Han Sans Light"),
local("SourceHanSans-Light"), local("Yu Gothic Regular"),
local("YuGothic Regular"), local("Droid Sans Japanese"), local("Meiryo"),
local("MS PGothic");
font-weight: 300;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-ja;
src: local("HiraKakuProN-W3"), local("Hiragino Kaku Gothic ProN W3"),
local("HiraginoSans-W4"), local("Source Han Sans JP Regular"),
local("SourceHanSansJP-Regular"), local("Source Han Sans J Regular"),
local("SourceHanSansJ-Regular"), local("Noto Sans CJK JP Regular"),
local("NotoSansCJKJP-Regular"), local("Source Han Sans Regular"),
local("SourceHanSans-Regular"), local("Yu Gothic Medium"),
local("YuGothic Medium"), local("Droid Sans Japanese"), local("Meiryo"),
local("MS PGothic");
font-weight: 400;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-ja;
src: local("HiraKakuProN-W3"), local("Hiragino Kaku Gothic ProN W3"),
local("HiraginoSans-W5"), local("Source Han Sans JP Medium"),
local("SourceHanSansJP-Medium"), local("Source Han Sans J Medium"),
local("SourceHanSansJ-Medium"), local("Noto Sans CJK JP Medium"),
local("NotoSansCJKJP-Medium"), local("Source Han Sans Medium"),
local("SourceHanSans-Medium"), local("Yu Gothic Medium"),
local("YuGothic Medium"), local("Droid Sans Japanese"), local("Meiryo"),
local("MS PGothic");
font-weight: 500;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-ja;
src: local("HiraKakuProN-W6"), local("Hiragino Kaku Gothic ProN W6"),
local("HiraginoSans-W6"), local("Source Han Sans JP Bold"),
local("SourceHanSansJP-Bold"), local("Source Han Sans J Bold"),
local("SourceHanSansJ-Bold"), local("Noto Sans CJK JP Bold"),
local("NotoSansCJKJP-Bold"), local("Source Han Sans Bold"),
local("SourceHanSans-Bold"), local("Yu Gothic Bold"), local("YuGothic Bold"),
local("Droid Sans Japanese"), local("Meiryo Bold"), local("MS PGothic");
font-weight: 700;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
/* Safari on macOS/iOS */
@font-face {
font-family: system-ui-ja;
src: local("HelveticaNeue");
unicode-range: U+A0;
}
/* Other browsers on macOS/iOS */
@supports not (-webkit-hyphens: none) {
@font-face {
font-family: system-ui-ja;
src: local("HelveticaNeue");
unicode-range: U+20;
}
}
@font-face {
font-family: system-ui-zh-cn;
src: local("PingFangSC-Light"), local("Source Han Sans CN Light"),
local("SourceHanSansCN-Light"), local("Source Han Sans SC Light"),
local("SourceHanSansSC-Light"), local("Noto Sans CJK SC Light"),
local("NotoSansCJKSC-Light"), local("HiraginoSansGB-W3"),
local("Hiragino Sans GB W3"), local("Microsoft YaHei Light"),
local("Heiti SC Light"), local("SimHei");
font-weight: 300;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-zh-cn;
src: local("PingFangSC-Regular"), local("Source Han Sans CN Regular"),
local("SourceHanSansCN-Regular"), local("Source Han Sans SC Regular"),
local("SourceHanSansSC-Regular"), local("Noto Sans CJK SC Regular"),
local("NotoSansCJKSC-Regular"), local("HiraginoSansGB-W3"),
local("Hiragino Sans GB W3"), local("Microsoft YaHei"),
local("Heiti SC Light"), local("SimHei");
font-weight: 400;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-zh-cn;
src: local("PingFangSC-Medium"), local("Source Han Sans CN Medium"),
local("SourceHanSansCN-Medium"), local("Source Han Sans SC Medium"),
local("SourceHanSansSC-Medium"), local("Noto Sans CJK SC Medium"),
local("NotoSansCJKSC-Medium"), local("HiraginoSansGB-W3"),
local("Hiragino Sans GB W3"), local("Microsoft YaHei"),
local("Heiti SC Light"), local("SimHei");
font-weight: 500;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-zh-cn;
src: local("PingFangSC-Semibold"), local("Source Han Sans CN Bold"),
local("SourceHanSansCN-Bold"), local("Source Han Sans SC Bold"),
local("SourceHanSansSC-Bold"), local("Noto Sans CJK SC Bold"),
local("NotoSansCJKSC-Bold"), local("HiraginoSansGB-W6"),
local("Hiragino Sans GB W6"), local("Microsoft YaHei Bold"),
local("Heiti SC Medium"), local("SimHei");
font-weight: 700;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
/* Safari on macOS/iOS */
@font-face {
font-family: system-ui-zh-cn;
src: local("HelveticaNeue");
unicode-range: U+A0;
}
/* Other browsers on macOS/iOS */
@supports not (-webkit-hyphens: none) {
@font-face {
font-family: system-ui-zh-cn;
src: local("HelveticaNeue");
unicode-range: U+20;
}
}
@font-face {
font-family: system-ui-zh-tw;
src: local("PingFangTC-Light"), local("Source Han Sans TW Light"),
local("SourceHanSansTW-Light"), local("Source Han Sans TC Light"),
local("SourceHanSansTC-Light"), local("Noto Sans CJK TC Light"),
local("NotoSansCJKTC-Light"), local("HiraginoSansTC-W3"),
local("Hiragino Sans TC W3"), local("Microsoft JhengHei Light"),
local("Heiti TC Light"), local("PMingLiU");
font-weight: 300;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-zh-tw;
src: local("PingFangTC-Regular"), local("Source Han Sans TW Regular"),
local("SourceHanSansTW-Regular"), local("Source Han Sans TC Regular"),
local("SourceHanSansTC-Regular"), local("Noto Sans CJK TC Regular"),
local("NotoSansCJKTC-Regular"), local("HiraginoSansTC-W3"),
local("Hiragino Sans TC W3"), local("Microsoft JhengHei"),
local("Heiti TC Light"), local("PMingLiU");
font-weight: 400;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-zh-tw;
src: local("PingFangTC-Medium"), local("Source Han Sans TW Medium"),
local("SourceHanSansTW-Medium"), local("Source Han Sans TC Medium"),
local("SourceHanSansTC-Medium"), local("Noto Sans CJK TC Medium"),
local("NotoSansCJKTC-Medium"), local("HiraginoSansTC-W3"),
local("Hiragino Sans TC W3"), local("Microsoft JhengHei"),
local("Heiti TC Light"), local("PMingLiU");
font-weight: 500;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-zh-tw;
src: local("PingFangTC-Semibold"), local("Source Han Sans TW Bold"),
local("SourceHanSansTW-Bold"), local("Source Han Sans TC Bold"),
local("SourceHanSansTC-Bold"), local("Noto Sans CJK TC Bold"),
local("NotoSansCJKTC-Bold"), local("HiraginoSansTC-W6"),
local("Hiragino Sans TC W6"), local("Microsoft JhengHei Bold"),
local("Heiti TC Medium"), local("PMingLiU");
font-weight: 700;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
/* Safari on macOS/iOS */
@font-face {
font-family: system-ui-zh-tw;
src: local("HelveticaNeue");
unicode-range: U+A0;
}
/* Other browsers on macOS/iOS */
@supports not (-webkit-hyphens: none) {
@font-face {
font-family: system-ui-zh-tw;
src: local("HelveticaNeue");
unicode-range: U+20;
}
}
@font-face {
font-family: system-ui-zh-hk;
src: local("PingFangHK-Light"), local("Source Han Sans HK Light"),
local("SourceHanSansHK-Light"), local("Source Han Sans HC Light"),
local("SourceHanSansHC-Light"), local("Noto Sans CJK HK Light"),
local("NotoSansCJKHK-Light"), local("Source Han Sans TC Light"),
local("SourceHanSansTC-Light"), local("Noto Sans CJK TC Light"),
local("NotoSansCJKTC-Light"), local("HiraginoSansTC-W3"),
local("Hiragino Sans TC W3"), local("Microsoft JhengHei Light"),
local("Heiti TC Light"), local("PMingLiU_HKSCS"), local("PMingLiU");
font-weight: 300;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-zh-hk;
src: local("PingFangHK-Regular"), local("Source Han Sans HK Regular"),
local("SourceHanSansHK-Regular"), local("Source Han Sans HC Regular"),
local("SourceHanSansHC-Regular"), local("Noto Sans CJK HK Regular"),
local("NotoSansCJKHK-Regular"), local("Source Han Sans TC Regular"),
local("SourceHanSansTC-Regular"), local("Noto Sans CJK TC Regular"),
local("NotoSansCJKTC-Regular"), local("HiraginoSansTC-W3"),
local("Hiragino Sans TC W3"), local("Microsoft JhengHei"),
local("Heiti TC Light"), local("PMingLiU_HKSCS"), local("PMingLiU");
font-weight: 400;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-zh-hk;
src: local("PingFangHK-Medium"), local("Source Han Sans HK Medium"),
local("SourceHanSansHK-Medium"), local("Source Han Sans HC Medium"),
local("SourceHanSansHC-Medium"), local("Noto Sans CJK HK Medium"),
local("NotoSansCJKHK-Medium"), local("Source Han Sans TC Medium"),
local("SourceHanSansTC-Medium"), local("Noto Sans CJK TC Medium"),
local("NotoSansCJKTC-Medium"), local("HiraginoSansTC-W3"),
local("Hiragino Sans TC W3"), local("Microsoft JhengHei"),
local("Heiti TC Light"), local("PMingLiU_HKSCS"), local("PMingLiU");
font-weight: 500;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-zh-hk;
src: local("PingFangHK-Semibold"), local("Source Han Sans HK Bold"),
local("SourceHanSansHK-Bold"), local("Source Han Sans HC Bold"),
local("SourceHanSansHC-Bold"), local("Noto Sans CJK HK Bold"),
local("NotoSansCJKHK-Bold"), local("Source Han Sans TC Bold"),
local("SourceHanSansTC-Bold"), local("Noto Sans CJK TC Bold"),
local("NotoSansCJKTC-Bold"), local("HiraginoSansTC-W6"),
local("Hiragino Sans TC W6"), local("Microsoft JhengHei Bold"),
local("Heiti TC Medium"), local("PMingLiU_HKSCS"), local("PMingLiU");
font-weight: 700;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
/* Safari on macOS/iOS */
@font-face {
font-family: system-ui-zh-hk;
src: local("HelveticaNeue");
unicode-range: U+A0;
}
/* Other browsers on macOS/iOS */
@supports not (-webkit-hyphens: none) {
@font-face {
font-family: system-ui-zh-hk;
src: local("HelveticaNeue");
unicode-range: U+20;
}
}
@font-face {
font-family: system-ui-ko;
src: local("AppleSDGothicNeo-Light"), local("Source Han Sans KR Light"),
local("SourceHanSansKR-Light"), local("Source Han Sans K Light"),
local("SourceHanSansK-Light"), local("Noto Sans CJK KR Light"),
local("NotoSansCJKKR-Light"), local("NanumBarunGothic Light"),
local("Malgun Gothic Semilight"), local("Nanum Gothic"), local("Dotum");
font-weight: 300;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-ko;
src: local("AppleSDGothicNeo-Regular"), local("Source Han Sans KR Regular"),
local("SourceHanSansKR-Regular"), local("Source Han Sans K Regular"),
local("SourceHanSansK-Regular"), local("Noto Sans CJK KR Regular"),
local("NotoSansCJKKR-Regular"), local("NanumBarunGothic"),
local("Malgun Gothic"), local("Nanum Gothic"), local("Dotum");
font-weight: 400;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-ko;
src: local("AppleSDGothicNeo-Medium"), local("Source Han Sans KR Medium"),
local("SourceHanSansKR-Medium"), local("Source Han Sans K Medium"),
local("SourceHanSansK-Medium"), local("Noto Sans CJK KR Medium"),
local("NotoSansCJKKR-Medium"), local("NanumBarunGothic"),
local("Malgun Gothic"), local("Nanum Gothic"), local("Dotum");
font-weight: 500;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
@font-face {
font-family: system-ui-ko;
src: local("AppleSDGothicNeo-SemiBold"), local("Source Han Sans KR Bold"),
local("SourceHanSansKR-Bold"), local("Source Han Sans K Bold"),
local("SourceHanSansK-Bold"), local("Noto Sans CJK KR Bold"),
local("NotoSansCJKKR-Bold"), local("NanumBarunGothic Bold"),
local("Malgun Gothic Bold"), local("Nanum Gothic Bold"), local("Dotum");
font-weight: 700;
unicode-range: U+11??, U+2E80-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF,
U+F900-FAFF, U+FE00-FE6F, U+FF00-FFEF, U+1F2??, U+2????;
}
/* Safari on macOS/iOS */
@font-face {
font-family: system-ui-ko;
src: local("HelveticaNeue");
unicode-range: U+A0;
}
/* Other browsers on macOS/iOS */
@supports not (-webkit-hyphens: none) {
@font-face {
font-family: system-ui-ko;
src: local("HelveticaNeue");
unicode-range: U+20;
}
}

547
web_src/css/form.css Normal file
View File

@ -0,0 +1,547 @@
input,
textarea,
.ui.input > input,
.ui.form input:not([type]),
.ui.form select,
.ui.form textarea,
.ui.form input[type="date"],
.ui.form input[type="datetime-local"],
.ui.form input[type="email"],
.ui.form input[type="file"],
.ui.form input[type="number"],
.ui.form input[type="password"],
.ui.form input[type="search"],
.ui.form input[type="tel"],
.ui.form input[type="text"],
.ui.form input[type="time"],
.ui.form input[type="url"],
.ui.selection.dropdown,
.ui.checkbox label::before,
.ui.checkbox input:checked ~ label::before,
.ui.checkbox input:not([type="radio"]):indeterminate ~ label::before {
background: var(--color-input-background);
border-color: var(--color-input-border);
color: var(--color-input-text);
}
input:hover,
textarea:hover,
.ui.input input:hover,
.ui.form input:not([type]):hover,
.ui.form select:hover,
.ui.form textarea:hover,
.ui.form input[type="date"]:hover,
.ui.form input[type="datetime-local"]:hover,
.ui.form input[type="email"]:hover,
.ui.form input[type="file"]:hover,
.ui.form input[type="number"]:hover,
.ui.form input[type="password"]:hover,
.ui.form input[type="search"]:hover,
.ui.form input[type="tel"]:hover,
.ui.form input[type="text"]:hover,
.ui.form input[type="time"]:hover,
.ui.form input[type="url"]:hover,
.ui.selection.dropdown:hover,
.ui.checkbox label:hover::before,
.ui.checkbox label:active::before,
.ui.radio.checkbox label::after,
.ui.radio.checkbox input:focus ~ label::before,
.ui.radio.checkbox input:checked ~ label::before {
background: var(--color-input-background);
border-color: var(--color-input-border-hover);
color: var(--color-input-text);
}
input:focus,
textarea:focus,
.ui.input input:focus,
.ui.form input:not([type]):focus,
.ui.form select:focus,
.ui.form textarea:focus,
.ui.form input[type="date"]:focus,
.ui.form input[type="datetime-local"]:focus,
.ui.form input[type="email"]:focus,
.ui.form input[type="file"]:focus,
.ui.form input[type="number"]:focus,
.ui.form input[type="password"]:focus,
.ui.form input[type="search"]:focus,
.ui.form input[type="tel"]:focus,
.ui.form input[type="text"]:focus,
.ui.form input[type="time"]:focus,
.ui.form input[type="url"]:focus,
.ui.selection.dropdown:focus,
.ui.checkbox input:focus ~ label::before,
.ui.checkbox input:not([type="radio"]):indeterminate:focus ~ label::before,
.ui.checkbox input:checked:focus ~ label::before,
.ui.radio.checkbox input:focus:checked ~ label::before {
background: var(--color-input-background);
border-color: var(--color-primary);
color: var(--color-input-text);
}
.ui.form .field > label,
.ui.form .inline.fields > label,
.ui.form .inline.fields .field > label,
.ui.form .inline.fields .field > p,
.ui.form .inline.field > label,
.ui.form .inline.field > p,
.ui.checkbox label,
.ui.checkbox + label,
.ui.checkbox label:hover,
.ui.checkbox + label:hover,
.ui.checkbox input:focus ~ label,
.ui.checkbox input:active ~ label {
color: var(--color-text);
}
.ui.input,
.ui.checkbox input:focus ~ label::after,
.ui.checkbox input:checked ~ label::after,
.ui.checkbox label:active::after,
.ui.checkbox input:not([type="radio"]):indeterminate ~ label::after,
.ui.checkbox input:not([type="radio"]):indeterminate:focus ~ label::after,
.ui.checkbox input:checked:focus ~ label::after,
.ui.disabled.checkbox label,
.ui.checkbox input[disabled] ~ label {
color: var(--color-input-text);
}
.ui.radio.checkbox input:focus ~ label::after,
.ui.radio.checkbox input:checked ~ label::after,
.ui.radio.checkbox input:focus:checked ~ label::after {
background: var(--color-input-text);
}
.ui.toggle.checkbox label::before {
background: var(--color-input-toggle-background);
}
.ui.toggle.checkbox label,
.ui.toggle.checkbox input:checked ~ label,
.ui.toggle.checkbox input:focus:checked ~ label {
color: var(--color-text) !important;
}
.ui.toggle.checkbox input:checked ~ label::before,
.ui.toggle.checkbox input:focus:checked ~ label::before {
background: var(--color-primary) !important;
}
/* match <select> padding to <input> */
.ui.form select {
padding: 0.67857143em 1em;
}
.form .help {
color: var(--color-secondary-dark-5);
padding-bottom: 0.6em;
display: inline-block;
}
#create-page-form form {
margin: auto;
}
#create-page-form form .ui.message {
text-align: center;
}
@media (min-width: 768px) {
#create-page-form form {
width: 800px !important;
}
#create-page-form form .header {
padding-left: 280px !important;
}
#create-page-form form .inline.field > label,
#create-page-form form .inline.field.captcha-field > span {
text-align: right;
width: 250px !important;
word-wrap: break-word;
}
#create-page-form form .help {
margin-left: 265px !important;
}
#create-page-form form .optional .title {
margin-left: 250px !important;
}
#create-page-form form .inline.field > input,
#create-page-form form .inline.field > textarea {
width: 50%;
}
}
@media (max-width: 767px) {
#create-page-form form .optional .title {
margin-left: 15px;
}
#create-page-form form .inline.field > label {
display: block;
}
}
.signin .oauth2 div {
display: inline-block;
}
.signin .oauth2 div p {
margin: 10px 5px 0 0;
float: left;
}
.signin .oauth2 a {
margin-right: 3px;
}
.signin .oauth2 a:last-child {
margin-right: 0;
}
.signin .oauth2 img {
width: 32px;
height: 32px;
}
.signin .oauth2 img.openidConnect {
width: auto;
}
@media (min-width: 768px) {
.g-recaptcha-style,
.h-captcha-style {
margin: 0 auto !important;
width: 304px;
padding-left: 30px;
}
.g-recaptcha-style iframe,
.h-captcha-style iframe {
border-radius: 5px !important;
width: 302px !important;
height: 76px !important;
}
}
@media (max-height: 575px) {
#rc-imageselect,
.g-recaptcha-style,
.h-captcha-style {
transform: scale(0.77);
transform-origin: 0 0;
}
}
.user.activate form,
.user.forgot.password form,
.user.reset.password form,
.user.link-account form,
.user.signin form,
.user.signup form {
margin: auto;
width: 700px !important;
}
.user.activate form .ui.message,
.user.forgot.password form .ui.message,
.user.reset.password form .ui.message,
.user.link-account form .ui.message,
.user.signin form .ui.message,
.user.signup form .ui.message {
text-align: center;
}
@media (min-width: 768px) {
.user.activate form,
.user.forgot.password form,
.user.reset.password form,
.user.link-account form,
.user.signin form,
.user.signup form {
width: 800px !important;
}
.user.activate form .header,
.user.forgot.password form .header,
.user.reset.password form .header,
.user.link-account form .header,
.user.signin form .header,
.user.signup form .header {
padding-left: 280px !important;
}
.user.activate form .inline.field > label,
.user.forgot.password form .inline.field > label,
.user.reset.password form .inline.field > label,
.user.link-account form .inline.field > label,
.user.signin form .inline.field > label,
.user.signup form .inline.field > label,
.user.activate form .inline.field.captcha-field > span,
.user.forgot.password form .inline.field.captcha-field > span,
.user.reset.password form .inline.field.captcha-field > span,
.user.link-account form .inline.field.captcha-field > span,
.user.signin form .inline.field.captcha-field > span,
.user.signup form .inline.field.captcha-field > span {
text-align: right;
width: 250px !important;
word-wrap: break-word;
}
.user.activate form .help,
.user.forgot.password form .help,
.user.reset.password form .help,
.user.link-account form .help,
.user.signin form .help,
.user.signup form .help {
margin-left: 265px !important;
}
.user.activate form .optional .title,
.user.forgot.password form .optional .title,
.user.reset.password form .optional .title,
.user.link-account form .optional .title,
.user.signin form .optional .title,
.user.signup form .optional .title {
margin-left: 250px !important;
}
.user.activate form .inline.field > input,
.user.forgot.password form .inline.field > input,
.user.reset.password form .inline.field > input,
.user.link-account form .inline.field > input,
.user.signin form .inline.field > input,
.user.signup form .inline.field > input,
.user.activate form .inline.field > textarea,
.user.forgot.password form .inline.field > textarea,
.user.reset.password form .inline.field > textarea,
.user.link-account form .inline.field > textarea,
.user.signin form .inline.field > textarea,
.user.signup form .inline.field > textarea {
width: 50%;
}
}
@media (max-width: 767px) {
.user.activate form .optional .title,
.user.forgot.password form .optional .title,
.user.reset.password form .optional .title,
.user.link-account form .optional .title,
.user.signin form .optional .title,
.user.signup form .optional .title {
margin-left: 15px;
}
.user.activate form .inline.field > label,
.user.forgot.password form .inline.field > label,
.user.reset.password form .inline.field > label,
.user.link-account form .inline.field > label,
.user.signin form .inline.field > label,
.user.signup form .inline.field > label {
display: block;
}
}
.user.activate form .header,
.user.forgot.password form .header,
.user.reset.password form .header,
.user.link-account form .header,
.user.signin form .header,
.user.signup form .header {
padding-left: 0 !important;
text-align: center;
}
.user.activate form .inline.field > label,
.user.forgot.password form .inline.field > label,
.user.reset.password form .inline.field > label,
.user.link-account form .inline.field > label,
.user.signin form .inline.field > label,
.user.signup form .inline.field > label {
width: 200px;
}
@media (max-width: 767px) {
.user.activate form .inline.field > label,
.user.forgot.password form .inline.field > label,
.user.reset.password form .inline.field > label,
.user.link-account form .inline.field > label,
.user.signin form .inline.field > label,
.user.signup form .inline.field > label,
.user.activate form input,
.user.forgot.password form input,
.user.reset.password form input,
.user.link-account form input,
.user.signin form input,
.user.signup form input {
width: 100% !important;
}
}
.user.activate form input[type="number"],
.user.forgot.password form input[type="number"],
.user.reset.password form input[type="number"],
.user.link-account form input[type="number"],
.user.signin form input[type="number"],
.user.signup form input[type="number"] {
-moz-appearance: textfield;
}
.user.activate form input::-webkit-outer-spin-button,
.user.forgot.password form input::-webkit-outer-spin-button,
.user.reset.password form input::-webkit-outer-spin-button,
.user.link-account form input::-webkit-outer-spin-button,
.user.signin form input::-webkit-outer-spin-button,
.user.signup form input::-webkit-outer-spin-button,
.user.activate form input::-webkit-inner-spin-button,
.user.forgot.password form input::-webkit-inner-spin-button,
.user.reset.password form input::-webkit-inner-spin-button,
.user.link-account form input::-webkit-inner-spin-button,
.user.signin form input::-webkit-inner-spin-button,
.user.signup form input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
.user.signin.webauthn-prompt {
margin-top: 15px;
}
.repository.new.repo form,
.repository.new.migrate form,
.repository.new.fork form {
margin: auto;
}
.repository.new.repo form .ui.message,
.repository.new.migrate form .ui.message,
.repository.new.fork form .ui.message {
text-align: center;
}
@media (min-width: 768px) {
.repository.new.repo form,
.repository.new.migrate form,
.repository.new.fork form {
width: 800px !important;
}
.repository.new.repo form .header,
.repository.new.migrate form .header,
.repository.new.fork form .header {
padding-left: 280px !important;
}
.repository.new.repo form .inline.field > label,
.repository.new.migrate form .inline.field > label,
.repository.new.fork form .inline.field > label,
.repository.new.repo form .inline.field.captcha-field > span,
.repository.new.migrate form .inline.field.captcha-field > span,
.repository.new.fork form .inline.field.captcha-field > span {
text-align: right;
width: 250px !important;
word-wrap: break-word;
}
.repository.new.repo form .help,
.repository.new.migrate form .help,
.repository.new.fork form .help {
margin-left: 265px !important;
}
.repository.new.repo form .optional .title,
.repository.new.migrate form .optional .title,
.repository.new.fork form .optional .title {
margin-left: 250px !important;
}
.repository.new.repo form .inline.field > input,
.repository.new.migrate form .inline.field > input,
.repository.new.fork form .inline.field > input,
.repository.new.repo form .inline.field > textarea,
.repository.new.migrate form .inline.field > textarea,
.repository.new.fork form .inline.field > textarea {
width: 50%;
}
}
@media (max-width: 767px) {
.repository.new.repo form .optional .title,
.repository.new.migrate form .optional .title,
.repository.new.fork form .optional .title {
margin-left: 15px;
}
.repository.new.repo form .inline.field > label,
.repository.new.migrate form .inline.field > label,
.repository.new.fork form .inline.field > label {
display: block;
}
}
.repository.new.repo form .dropdown .text,
.repository.new.migrate form .dropdown .text,
.repository.new.fork form .dropdown .text {
margin-right: 0 !important;
}
.repository.new.repo form .header,
.repository.new.migrate form .header,
.repository.new.fork form .header {
padding-left: 0 !important;
text-align: center;
}
.repository.new.repo form .selection.dropdown,
.repository.new.migrate form .selection.dropdown,
.repository.new.fork form .selection.dropdown {
vertical-align: middle;
width: 50% !important;
}
@media (max-width: 767px) {
.repository.new.repo form label,
.repository.new.migrate form label,
.repository.new.fork form label,
.repository.new.repo form input,
.repository.new.migrate form input,
.repository.new.fork form input,
.repository.new.repo form .selection.dropdown,
.repository.new.migrate form .selection.dropdown,
.repository.new.fork form .selection.dropdown {
width: 100% !important;
}
.repository.new.repo form .field button,
.repository.new.migrate form .field button,
.repository.new.fork form .field button,
.repository.new.repo form .field a,
.repository.new.migrate form .field a,
.repository.new.fork form .field a {
margin-bottom: 1em;
width: 100%;
}
}
@media (min-width: 768px) {
.repository.new.repo .ui.form #auto-init {
margin-left: 265px !important;
}
}
.repository.new.repo .ui.form .selection.dropdown:not(.owner) {
width: 50% !important;
}
@media (max-width: 767px) {
.repository.new.repo .ui.form .selection.dropdown:not(.owner) {
width: 100% !important;
}
}
.new.webhook form .help {
margin-left: 25px;
}
.new.webhook .events.fields .column {
padding-left: 40px;
}
.githook textarea {
font-family: var(--fonts-monospace);
}
@media (max-width: 767px) {
.new.org .ui.form .field button,
.new.org .ui.form .field a {
margin-bottom: 1em;
width: 100%;
}
.new.org .ui.form .field input {
width: 100% !important;
}
}

View File

@ -196,7 +196,7 @@
.gt-content-center { align-content: center !important; } .gt-content-center { align-content: center !important; }
@media @mediaSm { @media (max-width: 767px) {
.gt-db-small { display: block !important; } .gt-db-small { display: block !important; }
.gt-w-100-small { width: 100% !important; } .gt-w-100-small { width: 100% !important; }
.gt-js-small { justify-content: flex-start !important; } .gt-js-small { justify-content: flex-start !important; }

53
web_src/css/home.css Normal file
View File

@ -0,0 +1,53 @@
.home .logo {
max-width: 220px;
}
@media (max-width: 767px) {
.home .hero h1 {
font-size: 3.5em;
}
.home .hero h2 {
font-size: 2em;
}
}
@media (min-width: 768px) {
.home .hero h1 {
font-size: 5.5em;
}
.home .hero h2 {
font-size: 3em;
}
}
.home .hero .svg {
color: var(--color-green);
height: 40px;
width: 50px;
vertical-align: bottom;
}
.home .hero.header {
font-size: 20px;
}
.home p.large {
font-size: 16px;
}
.home .stackable {
padding-top: 30px;
}
.home a {
color: var(--color-green);
}
@media (max-width: 880px) {
footer .ui.container .left,
footer .ui.container .right {
display: block;
text-align: center;
float: none;
}
}

40
web_src/css/index.css Normal file
View File

@ -0,0 +1,40 @@
@import "font-awesome/css/font-awesome.css";
@import "./animations.css";
@import "./shared/issuelist.css";
@import "./features/dropzone.css";
@import "./features/gitgraph.css";
@import "./features/heatmap.css";
@import "./features/imagediff.css";
@import "./features/codeeditor.css";
@import "./features/projects.css";
@import "./modules/tippy.css";
@import "./code/linebutton.css";
@import "./markup/content.css";
@import "./markup/codecopy.css";
@import "./markup/asciicast.css";
@import "./chroma/base.css";
@import "./chroma/light.css";
@import "./codemirror/base.css";
@import "./codemirror/light.css";
@import "./console/console.css";
@import "./svg.css";
@import "./tribute.css";
@import "./font_i18n.css";
@import "./base.css";
@import "./home.css";
@import "./install.css";
@import "./form.css";
@import "./repository.css";
@import "./editor.css";
@import "./organization.css";
@import "./user.css";
@import "./dashboard.css";
@import "./admin.css";
@import "./explore.css";
@import "./review.css";
@import "./package.css";
@import "./runner.css";
@import "./helpers.css";

65
web_src/css/install.css Normal file
View File

@ -0,0 +1,65 @@
.page-content.install {
padding-top: 45px;
}
.page-content.install form.ui.form .inline.field > label {
text-align: right;
width: 30%;
padding-right: 10px;
margin-right: 0;
}
.page-content.install form.ui.form .inline.field > .ui.checkbox:first-child {
margin-left: 30%;
padding-left: 5px;
}
.page-content.install form.ui.form .inline.field > .ui.checkbox:first-child label {
width: auto;
}
.page-content.install form.ui.form .title {
margin-left: 30%;
padding-left: 5px;
}
.page-content.install form.ui.form input {
width: 60%;
}
.page-content.install form.ui.form details.optional.field[open] {
border-bottom: 1px solid var(--color-secondary);
padding-bottom: 10px;
}
.page-content.install form.ui.form details.optional.field[open] summary {
margin-bottom: 10px;
}
.page-content.install form.ui.form details.optional.field * {
box-sizing: border-box;
}
.page-content.install form.ui.form .field {
text-align: left;
}
.page-content.install form.ui.form .field .help {
margin-left: 30%;
padding-left: 5px;
width: 60%;
}
.page-content.install .ui .reinstall-message {
width: 70%;
margin: 20px auto;
color: var(--color-red);
text-align: left;
font-weight: bold;
}
.page-content.install .ui .reinstall-confirm {
width: 70%;
text-align: left;
margin: 10px auto;
}

View File

@ -9,7 +9,7 @@
right: 6px; right: 6px;
padding: 9px; padding: 9px;
visibility: hidden; visibility: hidden;
animation: fadeout .2s both; animation: fadeout 0.2s both;
} }
/* adjustments for comment content having only 14px font size */ /* adjustments for comment content having only 14px font size */
@ -23,6 +23,7 @@
.markup .code-copy:hover { .markup .code-copy:hover {
background: var(--color-secondary) !important; background: var(--color-secondary) !important;
} }
.markup .code-copy:active { .markup .code-copy:active {
background: var(--color-secondary-dark-1) !important; background: var(--color-secondary-dark-1) !important;
} }
@ -30,5 +31,5 @@
.markup .code-block:hover .code-copy, .markup .code-block:hover .code-copy,
.markup .mermaid-block:hover .code-copy { .markup .mermaid-block:hover .code-copy {
visibility: visible; visibility: visible;
animation: fadein .2s both; animation: fadein 0.2s both;
} }

View File

@ -0,0 +1,559 @@
.markup {
overflow: hidden;
font-size: 16px;
line-height: 1.5 !important;
word-wrap: break-word;
}
.markup.ui.segment {
padding: 3em;
}
.markup.file-view {
padding: 2em !important;
}
.markup > *:first-child {
margin-top: 0 !important;
}
.markup > *:last-child {
margin-bottom: 0 !important;
}
.markup a:not([href]) {
color: inherit;
text-decoration: none;
}
.markup .absent {
color: var(--color-red);
}
.markup .anchor {
padding-right: 4px;
margin-left: -20px;
line-height: 1;
color: inherit;
}
.markup .anchor .svg {
vertical-align: middle;
}
.markup .anchor:focus {
outline: none;
}
.markup h1 .anchor .svg,
.markup h2 .anchor .svg,
.markup h3 .anchor .svg,
.markup h4 .anchor .svg,
.markup h5 .anchor .svg,
.markup h6 .anchor .svg {
visibility: hidden;
}
.markup h1:hover .anchor .svg,
.markup h2:hover .anchor .svg,
.markup h3:hover .anchor .svg,
.markup h4:hover .anchor .svg,
.markup h5:hover .anchor .svg,
.markup h6:hover .anchor .svg {
visibility: visible;
}
.markup h2 .anchor .svg,
.markup h3 .anchor .svg,
.markup h4 .anchor .svg {
position: relative;
top: -2px;
}
.markup h1,
.markup h2,
.markup h3,
.markup h4,
.markup h5,
.markup h6 {
margin-top: 24px;
margin-bottom: 16px;
font-weight: 600;
line-height: 1.25;
}
.markup h1 tt,
.markup h1 code,
.markup h2 tt,
.markup h2 code,
.markup h3 tt,
.markup h3 code,
.markup h4 tt,
.markup h4 code,
.markup h5 tt,
.markup h5 code,
.markup h6 tt,
.markup h6 code {
font-size: inherit;
}
.markup h1 {
padding-bottom: 0.3em;
font-size: 2em;
border-bottom: 1px solid var(--color-secondary);
}
.markup h2 {
padding-bottom: 0.3em;
font-size: 1.5em;
border-bottom: 1px solid var(--color-secondary);
}
.markup h3 {
font-size: 1.25em;
}
.markup h4 {
font-size: 1em;
}
.markup h5 {
font-size: 0.875em;
}
.markup h6 {
font-size: 0.85em;
color: var(--color-text-light-2);
}
.markup p,
.markup blockquote,
.markup details,
.markup ul,
.markup ol,
.markup dl,
.markup table,
.markup pre {
margin-top: 0;
margin-bottom: 16px;
}
.markup hr {
height: 4px;
padding: 0;
margin: 16px 0;
background-color: var(--color-secondary);
border: 0;
}
.markup ul,
.markup ol {
padding-left: 2em;
}
.markup ul.no-list,
.markup ol.no-list {
padding: 0;
list-style-type: none;
}
.markup .task-list-item {
list-style-type: none;
position: relative;
line-height: 1.5rem;
min-height: 1.5rem; /* // to render a checkbox list without content `- [ ]`, we need this min-height to make sure the <li> can be visible */
}
.markup .task-list-item input[type="checkbox"] {
position: absolute;
top: 0.25em;
left: -1.6em;
}
.markup .task-list-item p {
line-height: 1.5rem;
}
.markup .task-list-item + .task-list-item {
margin-top: 3px;
}
.markup input[type="checkbox"] {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
position: relative;
border: 1px solid var(--color-secondary);
border-radius: 2px;
background: var(--color-input-background);
height: 14px;
width: 14px;
opacity: 1 !important; /* override fomantic on edit preview */
pointer-events: auto !important; /* override fomantic on edit preview */
vertical-align: middle !important; /* override fomantic on edit preview */
-webkit-print-color-adjust: exact;
color-adjust: exact;
}
.markup input[type="checkbox"]:not([disabled]):hover,
.markup input[type="checkbox"]:not([disabled]):active {
border-color: var(--color-primary);
}
.markup input[type="checkbox"]::after {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
pointer-events: none;
background: var(--color-text);
mask-size: cover;
-webkit-mask-size: cover;
}
.markup input[type="checkbox"]:checked::after {
content: "";
mask-image: var(--checkbox-mask-checked);
-webkit-mask-image: var(--checkbox-mask-checked);
-webkit-print-color-adjust: exact;
color-adjust: exact;
}
.markup input[type="checkbox"]:indeterminate::after {
content: "";
mask-image: var(--checkbox-mask-indeterminate);
-webkit-mask-image: var(--checkbox-mask-indeterminate);
}
.markup ul ul,
.markup ul ol,
.markup ol ol,
.markup ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markup ol ol,
.markup ul ol {
list-style-type: lower-roman;
}
.markup li > p {
margin-top: 16px;
}
.markup li + li {
margin-top: 0.25em;
}
.markup dl {
padding: 0;
}
.markup dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: 600;
}
.markup dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markup blockquote {
margin-left: 0;
padding: 0 15px;
color: var(--color-text-light-2);
border-left: 4px solid var(--color-secondary);
}
.markup blockquote > :first-child {
margin-top: 0;
}
.markup blockquote > :last-child {
margin-bottom: 0;
}
.markup table {
display: block;
width: 100%;
width: max-content;
max-width: 100%;
overflow: auto;
}
.markup table th {
font-weight: 600;
}
.markup table th,
.markup table td {
padding: 6px 13px !important;
border: 1px solid var(--color-secondary) !important;
}
.markup table tr {
border-top: 1px solid var(--color-secondary);
}
.markup table tr:nth-child(2n) {
background-color: var(--color-markup-table-row);
}
.markup img {
max-width: 100%;
box-sizing: initial;
}
.markup img[align="right"] {
padding-left: 20px;
}
.markup img[align="left"] {
padding-right: 20px;
}
.markup .emoji {
max-width: none;
vertical-align: text-top;
}
.markup span.frame {
display: block;
overflow: hidden;
}
.markup span.frame > span {
display: block;
float: left;
width: auto;
padding: 7px;
margin: 13px 0 0;
overflow: hidden;
border: 1px solid var(--color-secondary);
}
.markup span.frame span img {
display: block;
float: left;
}
.markup span.frame span span {
display: block;
padding: 5px 0 0;
clear: both;
color: var(--color-text);
}
.markup span.align-center {
display: block;
overflow: hidden;
clear: both;
}
.markup span.align-center > span {
display: block;
margin: 13px auto 0;
overflow: hidden;
text-align: center;
}
.markup span.align-center span img {
margin: 0 auto;
text-align: center;
}
.markup span.align-right {
display: block;
overflow: hidden;
clear: both;
}
.markup span.align-right > span {
display: block;
margin: 13px 0 0;
overflow: hidden;
text-align: right;
}
.markup span.align-right span img {
margin: 0;
text-align: right;
}
.markup span.float-left {
display: block;
float: left;
margin-right: 13px;
overflow: hidden;
}
.markup span.float-left span {
margin: 13px 0 0;
}
.markup span.float-right {
display: block;
float: right;
margin-left: 13px;
overflow: hidden;
}
.markup span.float-right > span {
display: block;
margin: 13px auto 0;
overflow: hidden;
text-align: right;
}
.markup code,
.markup tt {
padding: 0.2em 0.4em;
margin: 0;
font-size: 85%;
white-space: break-spaces;
background-color: var(--color-markup-code-block);
border-radius: 4px;
}
.markup code br,
.markup tt br {
display: none;
}
.markup del code {
text-decoration: inherit;
}
.markup pre > code {
padding: 0;
margin: 0;
font-size: 100%;
white-space: pre-wrap;
word-break: break-all;
overflow-wrap: break-word;
background: transparent;
border: 0;
}
.markup .highlight {
margin-bottom: 16px;
}
.markup .highlight pre,
.markup pre {
padding: 16px;
font-size: 85%;
line-height: 1.45;
background-color: var(--color-markup-code-block);
border-radius: 4px;
}
.markup .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markup pre {
word-wrap: normal;
}
.markup pre code,
.markup pre tt {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markup pre code::before,
.markup pre code::after,
.markup pre tt::before,
.markup pre tt::after {
content: normal;
}
.markup kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: var(--color-text-light);
vertical-align: middle;
background-color: var(--color-markup-code-block);
border: 1px solid var(--color-secondary);
border-radius: 3px;
box-shadow: inset 0 -1px 0 var(--color-secondary);
}
.markup .ui.list .list,
.markup ol.ui.list ol,
.markup ul.ui.list ul {
padding-left: 2em;
}
.repository.wiki.revisions .ui.container > .ui.stackable.grid {
-ms-flex-direction: row-reverse;
flex-direction: row-reverse;
}
.repository.wiki.revisions .ui.container > .ui.stackable.grid > .header {
margin-top: 0;
}
.repository.wiki.revisions .ui.container > .ui.stackable.grid > .header .sub.header {
padding-left: 52px;
word-break: break-word;
}
.file-revisions-btn {
display: block;
float: left;
margin-bottom: 2px !important;
padding: 11px !important;
margin-right: 10px !important;
}
.file-revisions-btn i {
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
.markup-render {
display: block;
border: none;
width: 100%;
height: var(--height-loading); /* actual height is set in JS after loading */
overflow: hidden;
color-scheme: normal; /* match the value inside the iframe to allow it to become transparent */
}
.markup-block-error {
border: 1px solid var(--color-error-border) !important;
margin-bottom: 0 !important;
border-bottom-left-radius: 0 !important;
border-bottom-right-radius: 0 !important;
box-shadow: none !important;
font-size: 85% !important;
white-space: pre-wrap !important;
padding: 0.5rem 1rem !important;
text-align: left !important;
}
.markup-block-error + pre {
border-top: none !important;
margin-top: 0 !important;
border-top-left-radius: 0 !important;
border-top-right-radius: 0 !important;
}

View File

@ -1,6 +1,6 @@
/* styles are based on node_modules/tippy.js/dist/tippy.css */ /* styles are based on node_modules/tippy.js/dist/tippy.css */
// class to hide tippy target elements on page load /* class to hide tippy target elements on page load */
.tippy-target { .tippy-target {
display: none !important; display: none !important;
} }
@ -40,7 +40,7 @@
} }
.tippy-box[data-theme="tooltip"] .tippy-content { .tippy-box[data-theme="tooltip"] .tippy-content {
padding: .5rem 1rem; padding: 0.5rem 1rem;
} }
.tippy-box[data-theme="menu"] .tippy-content { .tippy-box[data-theme="menu"] .tippy-content {

View File

@ -0,0 +1,250 @@
#create-page-form form {
margin: auto;
}
#create-page-form form .ui.message {
text-align: center;
}
@media (min-width: 768px) {
#create-page-form form {
width: 800px !important;
}
#create-page-form form .header {
padding-left: 280px !important;
}
#create-page-form form .inline.field > label,
#create-page-form form .inline.field.captcha-field > span {
text-align: right;
width: 250px !important;
word-wrap: break-word;
}
#create-page-form form .help {
margin-left: 265px !important;
}
#create-page-form form .optional .title {
margin-left: 250px !important;
}
#create-page-form form .inline.field > input,
#create-page-form form .inline.field > textarea {
width: 50%;
}
}
@media (max-width: 767px) {
#create-page-form form .optional .title {
margin-left: 15px;
}
#create-page-form form .inline.field > label {
display: block;
}
}
.organization .head .ui.header .text {
vertical-align: middle;
font-size: 1.6rem;
margin-left: 15px;
}
.organization .head .ui.header .org-visibility .label {
margin-left: 5px;
margin-top: 5px;
}
.organization .head .ui.header .ui.right {
margin-top: 5px;
}
.organization .ui.secondary.stackable.pointing.menu {
flex-wrap: wrap;
margin-top: 5px;
margin-bottom: 10px;
}
.organization.new.org form {
margin: auto;
}
.organization.new.org form .ui.message {
text-align: center;
}
@media (min-width: 768px) {
.organization.new.org form {
width: 800px !important;
}
.organization.new.org form .header {
padding-left: 280px !important;
}
.organization.new.org form .inline.field > label,
.organization.new.org form .inline.field.captcha-field > span {
text-align: right;
width: 250px !important;
word-wrap: break-word;
}
.organization.new.org form .help {
margin-left: 265px !important;
}
.organization.new.org form .optional .title {
margin-left: 250px !important;
}
.organization.new.org form .inline.field > input,
.organization.new.org form .inline.field > textarea {
width: 50%;
}
}
@media (max-width: 767px) {
.organization.new.org form .optional .title {
margin-left: 15px;
}
.organization.new.org form .inline.field > label {
display: block;
}
}
.organization.new.org form .header {
padding-left: 0 !important;
text-align: center;
}
.organization.options input {
min-width: 300px;
}
.organization.profile .org-avatar {
width: 100px;
height: 100px;
margin-right: 15px;
}
.organization.profile #org-info {
overflow-wrap: anywhere;
}
.organization.profile #org-info .ui.header {
display: flex;
align-items: center;
font-size: 36px;
margin-bottom: 0;
}
.organization.profile #org-info .ui.header .org-visibility .label {
margin-left: 5px;
margin-top: 2px;
}
.organization.profile #org-info .desc {
font-size: 16px;
margin-bottom: 10px;
}
.organization.profile #org-info .meta .item {
display: inline-block;
margin-right: 10px;
}
.organization.profile #org-info .meta .item .icon {
margin-right: 5px;
}
.organization.profile .ui.top.header .ui.right {
margin-top: 0;
}
.organization.profile .teams .item {
padding: 10px 15px;
}
.organization.teams .members a:hover,
.organization.profile .members a:hover {
text-decoration: none;
}
.organization.teams .members .ui.avatar,
.organization.profile .members .ui.avatar {
width: 48px;
height: 48px;
margin-right: 5px;
margin-bottom: 5px;
}
.organization.invite #invite-box {
margin: 50px auto auto;
width: 500px !important;
}
.organization.invite #invite-box #search-user-box input {
margin-left: 0;
width: 300px;
}
.organization.invite #invite-box .ui.button {
margin-left: 5px;
margin-top: -3px;
}
.organization.invite .ui.avatar {
width: 100%;
height: 100%;
}
.organization.members .list .item {
margin-left: 0;
margin-right: 0;
border-bottom: 1px solid var(--color-secondary);
}
.organization.members .list .item .ui.avatar {
width: 48px;
height: auto;
margin-right: 1rem;
align-self: flex-start;
}
.organization.members .list .item .meta {
line-height: 24px;
word-break: break-word;
min-width: 2em;
}
.organization.teams .detail .item {
padding: 10px 15px;
}
.organization.teams .detail .item:not(:last-child) {
border-bottom: 1px solid var(--color-secondary);
}
.organization.teams .repositories .item,
.organization.teams .members .item {
padding: 10px 20px;
line-height: 32px;
}
.organization.teams .repositories .item:not(:last-child),
.organization.teams .members .item:not(:last-child) {
border-bottom: 1px solid var(--color-secondary);
}
.organization.teams .repositories .item .button,
.organization.teams .members .item .button {
padding: 9px 10px;
}
.organization.teams #add-repo-form input,
.organization.teams #repo-multiple-form input,
.organization.teams #add-member-form input {
margin-left: 0;
}
.organization.teams #add-repo-form .ui.button,
.organization.teams #repo-multiple-form .ui.button,
.organization.teams #add-member-form .ui.button {
margin-left: 5px;
margin-top: -3px;
}
.organization.teams #repo-top-segment {
height: 60px;
}

7
web_src/css/package.css Normal file
View File

@ -0,0 +1,7 @@
.container-labels td:nth-child(1) {
vertical-align: top;
}
.container-labels td:nth-child(2) {
overflow-wrap: anywhere;
}

3629
web_src/css/repository.css Normal file

File diff suppressed because it is too large Load Diff

322
web_src/css/review.css Normal file
View File

@ -0,0 +1,322 @@
.show-outdated,
.hide-outdated {
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
.ui.button.add-code-comment {
padding: 2px;
position: absolute;
margin-left: -22px;
z-index: 5;
opacity: 0;
transition: transform 0.1s ease-in-out;
transform: scale(1);
box-shadow: none !important;
border: none !important;
}
.ui.button.add-code-comment:hover {
transform: scale(1.1);
}
.lines-escape a.toggle-escape-button::before {
visibility: visible;
content: "⚠️";
font-family: var(--fonts-emoji);
color: var(--color-red);
}
.repository .diff-file-box .code-diff td.lines-escape {
padding-left: 0 !important;
}
.diff-file-box .lines-code:hover .ui.button.add-code-comment {
opacity: 1;
}
.repository .diff-file-box .code-diff .add-comment-left,
.repository .diff-file-box .code-diff .add-comment-right,
.repository .diff-file-box .code-diff .add-code-comment .add-comment-left,
.repository .diff-file-box .code-diff .add-code-comment .add-comment-right,
.repository .diff-file-box .code-diff .add-code-comment .lines-type-marker {
padding-left: 0 !important;
padding-right: 0 !important;
}
.add-comment-left.add-comment-right .ui.attached.header {
border: 1px solid var(--color-secondary);
}
.add-comment-left.add-comment-right .ui.attached.header:not(.top) {
margin-bottom: 0.5em;
}
.add-comment .lines-num,
.add-comment .lines-escape,
.add-comment .lines-type-marker {
display: none;
}
.show-outdated:hover,
.hide-outdated:hover {
text-decoration: underline;
}
.comment-code-cloud {
padding: 0.5rem 1rem !important;
position: relative;
margin: 0 auto;
max-width: 1000px;
}
@media (max-width: 767px) {
.comment-code-cloud {
max-width: none;
padding: 0.75rem !important;
}
.comment-code-cloud .code-comment-buttons {
margin: 0.5rem 0 0.25rem !important;
}
.comment-code-cloud .code-comment-buttons .code-comment-buttons-buttons {
width: 100%;
}
.comment-code-cloud .ui.buttons {
width: 100%;
margin: 0 !important;
}
.comment-code-cloud .ui.buttons .button {
flex: 1;
}
}
.comment-code-cloud .comments .comment {
padding: 0;
}
@media (max-width: 767px) {
.comment-code-cloud .comments .comment {
display: flex;
}
.comment-code-cloud
.comments
.comment
.comment-header-right.actions
.ui.basic.label {
display: none;
}
.comment-code-cloud .comments .comment .avatar {
width: auto;
float: none;
margin: 0 0.5rem 0 0;
flex-shrink: 0;
}
.comment-code-cloud .comments .comment .avatar ~ .content {
margin-left: 1em;
}
.comment-code-cloud .comments .comment img.avatar {
margin: 0 !important;
}
.comment-code-cloud .comments .comment .comment-content {
margin-left: 0 !important;
}
.comment-code-cloud .comments .comment .comment-container {
width: 100%;
}
.comment-code-cloud .comments .comment.code-comment {
padding: 0 0 0.5rem !important;
}
}
.comment-code-cloud .attached.tab {
border: 0;
padding: 0;
margin: 0;
}
.comment-code-cloud .attached.header {
padding: 0.1rem 1rem;
}
.comment-code-cloud .attached.header .text {
margin: 0;
}
.comment-code-cloud .right.menu.options .item {
padding: 0.85714286em 0.442857em;
cursor: pointer;
}
.comment-code-cloud .ui.active.tab {
padding: 0.5em;
}
.comment-code-cloud .ui.active.tab.markup {
padding: 1em;
min-height: 168px;
}
.comment-code-cloud .ui.tabular.menu {
margin: 0.5em;
}
.comment-code-cloud .footer {
border-top: 1px solid var(--color-secondary);
padding: 10px 0;
}
.comment-code-cloud .footer .markup-info {
display: inline-block;
margin: 5px 0;
font-size: 12px;
color: var(--color-text-light);
}
.comment-code-cloud .footer .ui.right.floated {
padding-top: 6px;
}
.comment-code-cloud .footer::after {
clear: both;
content: "";
display: block;
}
@media (max-width: 767px) {
.comment-code-cloud .button {
width: 100%;
margin: 0 !important;
margin-bottom: 0.75rem !important;
}
}
.diff-file-body .comment-form {
margin: 0 0 0 3em;
}
.file-comment {
color: var(--color-text);
}
a.blob-excerpt {
color: var(--color-text-light);
height: 28px;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
background: var(--color-expand-button);
}
a.blob-excerpt:hover {
background: var(--color-primary);
color: var(--color-primary-contrast);
}
/* See the comment of createCommentEasyMDE() for the review editor */
/* EasyMDE's options can not handle minHeight & maxHeight together correctly, we have to set minHeight in JS code */
.review-box-panel .CodeMirror-scroll {
min-height: 80px;
max-height: calc(100vh - 360px);
}
@media (max-width: 767px) {
.review-box-panel .CodeMirror-scroll {
max-width: calc(100vw - 70px);
}
}
@media (min-width: 768px) and (max-width: 991px) {
.review-box-panel .CodeMirror-scroll {
max-width: 700px;
}
}
@media (min-width: 992px) and (max-width: 1200px) {
.review-box-panel .CodeMirror-scroll {
max-width: 800px;
}
}
@media (min-width: 1201px) {
.review-box-panel .CodeMirror-scroll {
max-width: 900px;
}
}
#review-box {
position: relative;
}
.review-box-panel {
position: absolute;
min-width: max-content;
top: 45px;
right: -5px;
z-index: 2;
}
#review-box .review-comments-counter {
background-color: var(--color-primary-light-4);
color: var(--color-primary-contrast);
}
#review-box:hover .review-comments-counter {
background-color: var(--color-primary-light-5);
}
#review-box .review-comments-counter[data-pending-comment-number="0"] {
display: none;
}
.pull.files.diff [id] {
scroll-margin-top: 99px;
}
@media (max-width: 991px) {
.pull.files.diff [id] {
scroll-margin-top: 130px;
}
}
.changed-since-last-review {
border: 1px var(--color-accent) solid;
background-color: var(--color-small-accent);
border-radius: 15px;
padding: 4px 8px;
margin: -8px 0; /* just like other buttons in the diff box header */
font-size: 0.857rem; /* just like .ui.tiny.button */
}
.viewed-file-form {
display: flex;
align-items: center;
border: 1px solid transparent;
padding: 4px 8px;
margin: -8px 0; /* just like other buttons in the diff box header */
border-radius: 0.285rem; /* just like .ui.tiny.button */
font-size: 0.857rem; /* just like .ui.tiny.button */
}
.viewed-file-form input {
margin-right: 4px;
}
.viewed-file-checked-form {
background-color: var(--color-small-accent);
border-color: var(--color-accent);
}
#viewed-files-summary {
width: 72px;
height: 10px;
}
.diff-file-box {
border-radius: 0.285rem; /* Just like ui.top.attached.header */
}
.diff-file-box:target {
box-shadow: 0 0 0 3px var(--color-accent);
}

54
web_src/css/runner.css Normal file
View File

@ -0,0 +1,54 @@
.runner-container {
padding-bottom: 30px;
}
.runner-container .runner-ops > a {
margin-left: 0.5em;
}
.runner-container .runner-ops-delete {
color: var(--color-red-light);
}
.runner-container .runner-basic-info .gt-dib {
margin-right: 1em;
}
.runner-container .runner-status-online {
padding: 0.3em 0.5em;
background-color: var(--color-green);
color: var(--color-white);
}
.runner-container .runner-new-text {
color: var(--color-white);
}
.runner-container #runner-new:hover .runner-new-text {
color: var(--color-white) !important;
}
.runner-container .runner-new-menu {
width: 300px;
}
.runner-container .task-status-success {
background-color: var(--color-green);
color: var(--color-white);
}
.runner-container .task-status-failure {
background-color: var(--color-red-light);
color: var(--color-white);
}
.runner-container .task-status-running {
background-color: var(--color-blue);
color: var(--color-white);
}
.runner-container .task-status-cancelled,
.runner-container .task-status-blocked {
background-color: var(--color-yellow);
color: var(--color-white);
}

View File

@ -0,0 +1,166 @@
.issue.list {
list-style: none;
margin-top: 1rem;
}
.issue.list a:not(.label):hover {
color: var(--color-primary) !important;
}
.issue.list > .item .issue-checkbox {
margin-top: 1px;
}
.issue.list > .item .issue-item-icon svg {
margin-right: 0.75rem;
margin-top: 1px;
}
.issue.list > .item .issue-item-icons-right > * + * {
margin-left: 0.5rem;
}
.issue.list > .item .issue-item-main {
width: 100%;
}
.issue.list > .item .action-item-main {
width: 80%;
}
.issue.list > .item .issue-item-right {
width: 15%;
}
.issue.list > .item .issue-item-top-row {
max-width: 100%;
color: var(--color-text);
font-size: 16px;
min-width: 0;
font-weight: 600;
}
.issue.list > .item .issue-item-top-row a.index {
max-width: fit-content;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
word-break: break-all;
}
.issue.list > .item .labels-list {
position: relative;
top: -1.5px;
}
.issue.list > .item .issue-item-bottom-row {
font-size: 13px;
}
.issue.list > .item .title {
color: var(--color-text);
word-break: break-word;
}
.issue.list > .item .issue-item-icon-right {
min-width: 2rem;
}
.issue.list > .item .assignee {
position: relative;
top: -2px;
}
.issue.list > .item .assignee img {
width: 20px;
height: 20px;
margin-right: 2px;
}
.issue.list > .item .desc {
color: var(--color-text-light-2);
}
.issue.list > .item .desc a {
color: inherit;
}
.issue.list > .item .desc .time-since,
.issue.list > .item .desc a {
margin-left: 0.25rem;
margin-right: 0.25rem;
}
.issue.list > .item .desc .waiting,
.issue.list > .item .desc .approvals,
.issue.list > .item .desc .rejects {
padding-left: 5px;
}
.issue.list > .item .desc .checklist {
padding-left: 5px;
}
.issue.list > .item .desc .checklist progress {
margin-left: 2px;
width: 80px;
height: 6px;
display: inline-block;
border-radius: 3px;
vertical-align: 2px !important;
}
.issue.list > .item .desc .checklist progress::-webkit-progress-value {
background-color: var(--color-secondary-dark-4);
}
.issue.list > .item .desc .checklist progress::-moz-progress-bar {
background-color: var(--color-secondary-dark-4);
}
.issue.list > .item .desc .conflicting {
padding-left: 5px;
}
.issue.list > .item .desc .due-date {
padding-left: 5px;
}
.issue.list > .item .desc a.milestone,
.issue.list > .item .desc a.project {
margin-left: 5px;
}
.issue.list > .item .desc a.ref {
margin-left: 8px;
}
.issue.list > .item .desc a.ref span {
margin-right: -4px;
}
.issue.list > .item .desc .overdue {
color: var(--color-red);
}
.issue.list .branches {
display: inline-flex;
padding: 0 4px;
}
.issue.list .branches .branch {
background-color: var(--color-secondary);
border-radius: 3px;
}
.issue.list .branches .truncated-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 10em;
}
.issue.list > .item + .item {
border-top: 1px solid var(--color-secondary);
}

View File

@ -27,5 +27,5 @@ body {
.swagger-back-link svg { .swagger-back-link svg {
color: inherit; color: inherit;
fill: currentcolor; fill: currentcolor;
margin-right: .5rem; margin-right: 0.5rem;
} }

View File

@ -2,8 +2,8 @@
display: inline-block; display: inline-block;
vertical-align: text-top; vertical-align: text-top;
fill: currentcolor; fill: currentcolor;
}
.middle & {
vertical-align: middle; .middle .svg {
} vertical-align: middle;
} }

View File

@ -1,6 +1,6 @@
@import "../chroma/base.less"; @import "../chroma/base.css";
@import "../chroma/dark.less"; @import "../chroma/dark.css";
@import "../codemirror/dark.less"; @import "../codemirror/dark.css";
:root { :root {
--is-dark-theme: true; --is-dark-theme: true;

View File

@ -0,0 +1 @@
@import "./theme-arc-green.css" (prefers-color-scheme: dark);

View File

@ -1,8 +1,8 @@
@import "tributejs/dist/tribute.css"; @import "tributejs/dist/tribute.css";
.tribute-container { .tribute-container {
box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .25); box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.25);
border-radius: .25rem; border-radius: 0.25rem;
} }
.tribute-container ul { .tribute-container ul {
@ -11,12 +11,12 @@
} }
.tribute-container li { .tribute-container li {
padding: 3px .5rem !important; padding: 3px 0.5rem !important;
} }
.tribute-container li span.fullname { .tribute-container li span.fullname {
font-weight: normal; font-weight: normal;
font-size: .8rem; font-size: 0.8rem;
margin-left: 3px; margin-left: 3px;
} }
@ -33,7 +33,7 @@
.tribute-item .emoji, .tribute-item .emoji,
.tribute-item img[src*="/avatar/"] { .tribute-item img[src*="/avatar/"] {
margin-right: .5rem; margin-right: 0.5rem;
} }
.tribute-container img { .tribute-container img {

173
web_src/css/user.css Normal file
View File

@ -0,0 +1,173 @@
.user.profile .ui.card .header {
display: block;
font-weight: 600;
font-size: 1.3rem;
margin-top: -0.2rem;
line-height: 1.3rem;
}
.user.profile .ui.card .profile-avatar-name {
border-top: none;
text-align: center;
}
.user.profile .ui.card .extra.content {
padding: 0;
}
.user.profile .ui.card .extra.content ul {
margin: 0;
padding: 0;
}
.user.profile .ui.card .extra.content ul li {
padding: 10px;
list-style: none;
}
.user.profile .ui.card .extra.content ul li:not(:last-child) {
border-bottom: 1px solid var(--color-secondary);
}
.user.profile .ui.card .extra.content ul li .svg {
margin-left: 1px;
margin-right: 5px;
}
.user.profile .ui.card .extra.content ul li.follow .ui.button {
width: 100%;
}
.user.profile .ui.card #profile-avatar {
background: none;
padding: 1rem 1rem 0.25rem;
justify-content: center;
}
.user.profile .ui.card #profile-avatar img {
width: 100%;
height: auto;
object-fit: contain;
margin: 0;
}
@media (max-width: 767px) {
.user.profile .ui.card #profile-avatar img {
width: 30vw;
}
}
@media (max-width: 767px) {
.user.profile .ui.card {
width: 100%;
}
}
.user.profile .ui.repository.list {
margin-top: 25px;
}
.user.profile #loading-heatmap {
margin-bottom: 1em;
}
.user.profile .ui.secondary.stackable.pointing.menu {
flex-wrap: wrap;
}
.user.followers .header.name {
font-size: 20px;
line-height: 24px;
vertical-align: middle;
}
.user.followers .follow .ui.button {
padding: 8px 15px;
}
.user.notification .svg {
float: left;
font-size: 2em;
}
.user.notification .svg.green {
color: var(--color-green);
}
.user.notification .svg.red {
color: var(--color-red);
}
.user.notification .svg.purple {
color: var(--color-purple);
}
.user.notification .svg.blue {
color: var(--color-blue);
}
.user.notification .content {
float: left;
margin-left: 7px;
}
.user.notification table form {
display: inline-block;
}
.user.notification table button {
padding: 3px 3px 3px 5px;
}
.user.notification table tr {
cursor: pointer;
}
.user .button.adopt,
.user .button.delete {
margin-top: -15px;
margin-bottom: -15px;
}
.user .button.adopt .label,
.user .button.delete .label {
vertical-align: middle;
}
.user.link-account:not(.icon) {
padding-top: 15px;
padding-bottom: 5px;
}
.user.settings .iconFloat {
float: left;
}
.user-orgs {
display: flex;
flex-flow: row wrap;
padding: 0;
margin: -3px !important;
}
.user-orgs li {
display: flex;
border-bottom: 0 !important;
padding: 3px !important;
width: 20%;
max-width: 60px;
}
.user-badges {
display: grid;
grid-template-columns: repeat(auto-fill, 64px);
gap: 2px;
}
.user-badges img {
object-fit: contain;
}
#notification_div .tab.segment {
overflow-x: auto;
}

View File

@ -1,345 +0,0 @@
import {createApp, nextTick} from 'vue';
import $ from 'jquery';
import {initVueSvg, vueDelimiters} from './VueComponentLoader.js';
import {initTooltip} from '../modules/tippy.js';
const {appSubUrl, assetUrlPrefix, pageData} = window.config;
function initVueComponents(app) {
app.component('repo-search', {
delimiters: vueDelimiters,
props: {
searchLimit: {
type: Number,
default: 10
},
subUrl: {
type: String,
required: true
},
uid: {
type: Number,
default: 0
},
teamId: {
type: Number,
required: false,
default: 0
},
organizations: {
type: Array,
default: () => [],
},
isOrganization: {
type: Boolean,
default: true
},
canCreateOrganization: {
type: Boolean,
default: false
},
organizationsTotalCount: {
type: Number,
default: 0
},
moreReposLink: {
type: String,
default: ''
}
},
data() {
const params = new URLSearchParams(window.location.search);
let tab = params.get('repo-search-tab');
if (!tab) {
tab = 'repos';
}
let reposFilter = params.get('repo-search-filter');
if (!reposFilter) {
reposFilter = 'all';
}
let privateFilter = params.get('repo-search-private');
if (!privateFilter) {
privateFilter = 'both';
}
let archivedFilter = params.get('repo-search-archived');
if (!archivedFilter) {
archivedFilter = 'unarchived';
}
let searchQuery = params.get('repo-search-query');
if (!searchQuery) {
searchQuery = '';
}
let page = 1;
try {
page = parseInt(params.get('repo-search-page'));
} catch {
// noop
}
if (!page) {
page = 1;
}
return {
hasMounted: false, // accessing $refs in computed() need to wait for mounted
tab,
repos: [],
reposTotalCount: 0,
reposFilter,
archivedFilter,
privateFilter,
page,
finalPage: 1,
searchQuery,
isLoading: false,
staticPrefix: assetUrlPrefix,
counts: {},
repoTypes: {
all: {
searchMode: '',
},
forks: {
searchMode: 'fork',
},
mirrors: {
searchMode: 'mirror',
},
sources: {
searchMode: 'source',
},
collaborative: {
searchMode: 'collaborative',
},
}
};
},
computed: {
// used in `repolist.tmpl`
showMoreReposLink() {
return this.repos.length > 0 && this.repos.length < this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`];
},
searchURL() {
return `${this.subUrl}/repo/search?sort=updated&order=desc&uid=${this.uid}&team_id=${this.teamId}&q=${this.searchQuery
}&page=${this.page}&limit=${this.searchLimit}&mode=${this.repoTypes[this.reposFilter].searchMode
}${this.reposFilter !== 'all' ? '&exclusive=1' : ''
}${this.archivedFilter === 'archived' ? '&archived=true' : ''}${this.archivedFilter === 'unarchived' ? '&archived=false' : ''
}${this.privateFilter === 'private' ? '&is_private=true' : ''}${this.privateFilter === 'public' ? '&is_private=false' : ''
}`;
},
repoTypeCount() {
return this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`];
},
checkboxArchivedFilterTitle() {
return this.hasMounted && this.$refs.checkboxArchivedFilter?.getAttribute(`data-title-${this.archivedFilter}`);
},
checkboxArchivedFilterProps() {
return {checked: this.archivedFilter === 'archived', indeterminate: this.archivedFilter === 'both'};
},
checkboxPrivateFilterTitle() {
return this.hasMounted && this.$refs.checkboxPrivateFilter?.getAttribute(`data-title-${this.privateFilter}`);
},
checkboxPrivateFilterProps() {
return {checked: this.privateFilter === 'private', indeterminate: this.privateFilter === 'both'};
},
},
mounted() {
const el = document.getElementById('dashboard-repo-list');
this.changeReposFilter(this.reposFilter);
for (const elTooltip of el.querySelectorAll('.tooltip')) {
initTooltip(elTooltip);
}
$(el).find('.dropdown').dropdown();
nextTick(() => {
this.$refs.search.focus();
});
this.hasMounted = true;
},
methods: {
changeTab(t) {
this.tab = t;
this.updateHistory();
},
changeReposFilter(filter) {
this.reposFilter = filter;
this.repos = [];
this.page = 1;
this.counts[`${filter}:${this.archivedFilter}:${this.privateFilter}`] = 0;
this.searchRepos();
},
updateHistory() {
const params = new URLSearchParams(window.location.search);
if (this.tab === 'repos') {
params.delete('repo-search-tab');
} else {
params.set('repo-search-tab', this.tab);
}
if (this.reposFilter === 'all') {
params.delete('repo-search-filter');
} else {
params.set('repo-search-filter', this.reposFilter);
}
if (this.privateFilter === 'both') {
params.delete('repo-search-private');
} else {
params.set('repo-search-private', this.privateFilter);
}
if (this.archivedFilter === 'unarchived') {
params.delete('repo-search-archived');
} else {
params.set('repo-search-archived', this.archivedFilter);
}
if (this.searchQuery === '') {
params.delete('repo-search-query');
} else {
params.set('repo-search-query', this.searchQuery);
}
if (this.page === 1) {
params.delete('repo-search-page');
} else {
params.set('repo-search-page', `${this.page}`);
}
const queryString = params.toString();
if (queryString) {
window.history.replaceState({}, '', `?${queryString}`);
} else {
window.history.replaceState({}, '', window.location.pathname);
}
},
toggleArchivedFilter() {
if (this.archivedFilter === 'unarchived') {
this.archivedFilter = 'archived';
} else if (this.archivedFilter === 'archived') {
this.archivedFilter = 'both';
} else { // including both
this.archivedFilter = 'unarchived';
}
this.page = 1;
this.repos = [];
this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`] = 0;
this.searchRepos();
},
togglePrivateFilter() {
if (this.privateFilter === 'both') {
this.privateFilter = 'public';
} else if (this.privateFilter === 'public') {
this.privateFilter = 'private';
} else { // including private
this.privateFilter = 'both';
}
this.page = 1;
this.repos = [];
this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`] = 0;
this.searchRepos();
},
changePage(page) {
this.page = page;
if (this.page > this.finalPage) {
this.page = this.finalPage;
}
if (this.page < 1) {
this.page = 1;
}
this.repos = [];
this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`] = 0;
this.searchRepos();
},
async searchRepos() {
this.isLoading = true;
const searchedMode = this.repoTypes[this.reposFilter].searchMode;
const searchedURL = this.searchURL;
const searchedQuery = this.searchQuery;
let response, json;
try {
if (!this.reposTotalCount) {
const totalCountSearchURL = `${this.subUrl}/repo/search?count_only=1&uid=${this.uid}&team_id=${this.teamId}&q=&page=1&mode=`;
response = await fetch(totalCountSearchURL);
this.reposTotalCount = response.headers.get('X-Total-Count');
}
response = await fetch(searchedURL);
json = await response.json();
} catch {
if (searchedURL === this.searchURL) {
this.isLoading = false;
}
return;
}
if (searchedURL === this.searchURL) {
this.repos = json.data;
const count = response.headers.get('X-Total-Count');
if (searchedQuery === '' && searchedMode === '' && this.archivedFilter === 'both') {
this.reposTotalCount = count;
}
this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`] = count;
this.finalPage = Math.ceil(count / this.searchLimit);
this.updateHistory();
this.isLoading = false;
}
},
repoIcon(repo) {
if (repo.fork) {
return 'octicon-repo-forked';
} else if (repo.mirror) {
return 'octicon-mirror';
} else if (repo.template) {
return `octicon-repo-template`;
} else if (repo.private) {
return 'octicon-lock';
} else if (repo.internal) {
return 'octicon-repo';
}
return 'octicon-repo';
}
},
template: document.getElementById('dashboard-repo-list-template'),
});
}
export function initDashboardRepoList() {
const el = document.getElementById('dashboard-repo-list');
const dashboardRepoListData = pageData.dashboardRepoList || null;
if (!el || !dashboardRepoListData) return;
const app = createApp({
delimiters: vueDelimiters,
data() {
return {
searchLimit: dashboardRepoListData.searchLimit || 0,
subUrl: appSubUrl,
uid: dashboardRepoListData.uid || 0,
};
},
});
initVueSvg(app);
initVueComponents(app);
app.mount(el);
}

View File

@ -0,0 +1,432 @@
<template>
<div>
<div v-if="!isOrganization" class="ui two item tabable menu">
<a :class="{item: true, active: tab === 'repos'}" @click="changeTab('repos')">{{ textRepository }}</a>
<a :class="{item: true, active: tab === 'organizations'}" @click="changeTab('organizations')">{{ textOrganization }}</a>
</div>
<div v-show="tab === 'repos'" class="ui tab active list dashboard-repos">
<h4 class="ui top attached header gt-df gt-ac">
<div class="gt-f1 gt-df gt-ac">
{{ textMyRepos }}
<span class="ui grey label gt-ml-3">{{ reposTotalCount }}</span>
</div>
<a class="tooltip" :href="subUrl + '/repo/create'" :data-content="textNewRepo" data-position="left center">
<svg-icon name="octicon-plus"/>
<span class="sr-only">{{ textNewRepo }}</span>
</a>
</h4>
<div class="ui attached segment repos-search">
<div class="ui fluid right action left icon input" :class="{loading: isLoading}">
<input @input="changeReposFilter(reposFilter)" v-model="searchQuery" ref="search" :placeholder="textSearchRepos">
<i class="icon gt-df gt-ac gt-jc"><svg-icon name="octicon-search" :size="16"/></i>
<div class="ui dropdown icon button" :title="textFilter">
<i class="icon gt-df gt-ac gt-jc gt-m-0"><svg-icon name="octicon-filter" :size="16"/></i>
<div class="menu">
<a class="item" @click="toggleArchivedFilter()">
<div class="ui checkbox" ref="checkboxArchivedFilter" :title="checkboxArchivedFilterTitle">
<!--the "hidden" is necessary to make the checkbox work without Fomantic UI js,
otherwise if the "input" handles click event for intermediate status, it breaks the internal state-->
<input type="checkbox" class="hidden" v-bind.prop="checkboxArchivedFilterProps">
<label>
<svg-icon name="octicon-archive" :size="16" class-name="gt-mr-2"/>
{{ textShowArchived }}
</label>
</div>
</a>
<a class="item" @click="togglePrivateFilter()">
<div class="ui checkbox" ref="checkboxPrivateFilter" :title="checkboxPrivateFilterTitle">
<input type="checkbox" class="hidden" v-bind.prop="checkboxPrivateFilterProps">
<label>
<svg-icon name="octicon-lock" :size="16" class-name="gt-mr-2"/>
{{ textShowPrivate }}
</label>
</div>
</a>
</div>
</div>
</div>
<div class="ui secondary tiny pointing borderless menu center grid repos-filter">
<a class="item" :class="{active: reposFilter === 'all'}" @click="changeReposFilter('all')">
{{ textAll }}
<div v-show="reposFilter === 'all'" class="ui circular mini grey label">{{ repoTypeCount }}</div>
</a>
<a class="item" :class="{active: reposFilter === 'sources'}" @click="changeReposFilter('sources')">
{{ textSources }}
<div v-show="reposFilter === 'sources'" class="ui circular mini grey label">{{ repoTypeCount }}</div>
</a>
<a class="item" :class="{active: reposFilter === 'forks'}" @click="changeReposFilter('forks')">
{{ textForks }}
<div v-show="reposFilter === 'forks'" class="ui circular mini grey label">{{ repoTypeCount }}</div>
</a>
<a class="item" :class="{active: reposFilter === 'mirrors'}" @click="changeReposFilter('mirrors')" v-if="isMirrorsEnabled">
{{ textMirrors }}
<div v-show="reposFilter === 'mirrors'" class="ui circular mini grey label">{{ repoTypeCount }}</div>
</a>
<a class="item" :class="{active: reposFilter === 'collaborative'}" @click="changeReposFilter('collaborative')">
{{ textCollaborative }}
<div v-show="reposFilter === 'collaborative'" class="ui circular mini grey label">{{ repoTypeCount }}</div>
</a>
</div>
</div>
<div v-if="repos.length" class="ui attached table segment gt-rounded-bottom">
<ul class="repo-owner-name-list">
<li v-for="repo in repos" :class="{'private': repo.private || repo.internal}" :key="repo.id">
<a class="repo-list-link gt-df gt-ac gt-sb" :href="repo.link">
<div class="item-name gt-df gt-ac gt-f1 gt-mr-2">
<svg-icon :name="repoIcon(repo)" :size="16" class-name="gt-mr-2"/>
<div class="text gt-bold truncate gt-ml-1">{{ repo.full_name }}</div>
<span v-if="repo.archived">
<svg-icon name="octicon-archive" :size="16" class-name="gt-ml-2"/>
</span>
</div>
<div class="text light grey gt-df gt-ac" v-if="isStarsEnabled">
{{ repo.stars_count }}
<svg-icon name="octicon-star" :size="16" class-name="gt-ml-2"/>
</div>
</a>
</li>
</ul>
<div v-if="showMoreReposLink" class="center gt-py-3 gt-border-secondary-top">
<div class="ui borderless pagination menu narrow">
<a
class="item navigation gt-py-2" :class="{'disabled': page === 1}"
@click="changePage(1)" :title="textFirstPage"
>
<svg-icon name="gitea-double-chevron-left" :size="16" class-name="gt-mr-2"/>
</a>
<a
class="item navigation gt-py-2" :class="{'disabled': page === 1}"
@click="changePage(page - 1)" :title="textPreviousPage"
>
<svg-icon name="octicon-chevron-left" :size="16" clsas-name="gt-mr-2"/>
</a>
<a class="active item gt-py-2">{{ page }}</a>
<a
class="item navigation" :class="{'disabled': page === finalPage}"
@click="changePage(page + 1)" :title="textNextPage"
>
<svg-icon name="octicon-chevron-right" :size="16" class-name="gt-ml-2"/>
</a>
<a
class="item navigation gt-py-2" :class="{'disabled': page === finalPage}"
@click="changePage(finalPage)" :title="textLastPage"
>
<svg-icon name="gitea-double-chevron-right" :size="16" class-name="gt-ml-2"/>
</a>
</div>
</div>
</div>
</div>
<div v-if="!isOrganization" v-show="tab === 'organizations'" class="ui tab active list dashboard-orgs">
<h4 class="ui top attached header gt-df gt-ac">
<div class="gt-f1 gt-df gt-ac">
{{ textMyOrgs }}
<span class="ui grey label gt-ml-3">{{ organizationsTotalCount }}</span>
</div>
<a v-if="canCreateOrganization" class="tooltip" :href="subUrl + '/org/create'" :data-content="textNewOrg" data-position="left center">
<svg-icon name="octicon-plus"/>
<span class="sr-only">{{ textNewOrg }}</span>
</a>
</h4>
<div v-if="organizations.length" class="ui attached table segment gt-rounded-bottom">
<ul class="repo-owner-name-list">
<li v-for="org in organizations" :key="org.name">
<a class="repo-list-link gt-df gt-ac gt-sb" :href="subUrl + '/' + encodeURIComponent(org.name)">
<div class="text truncate item-name gt-f1">
<svg-icon name="octicon-organization" :size="16" class-name="gt-mr-2"/>
<strong>{{ org.name }}</strong>
</div>
<div class="text light grey gt-df gt-ac">
{{ org.num_repos }}
<svg-icon name="octicon-repo" :size="16" class-name="gt-ml-2 gt-mt-1"/>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</template>
<script>
import {createApp, nextTick} from 'vue';
import $ from 'jquery';
import {initTooltip} from '../modules/tippy.js';
import {SvgIcon} from '../svg.js';
const {appSubUrl, assetUrlPrefix, pageData} = window.config;
const sfc = {
components: {SvgIcon},
data() {
const params = new URLSearchParams(window.location.search);
const tab = params.get('repo-search-tab') || 'repos';
const reposFilter = params.get('repo-search-filter') || 'all';
const privateFilter = params.get('repo-search-private') || 'both';
const archivedFilter = params.get('repo-search-archived') || 'unarchived';
const searchQuery = params.get('repo-search-query') || '';
const page = Number(params.get('repo-search-page')) || 1;
return {
tab,
repos: [],
reposTotalCount: 0,
reposFilter,
archivedFilter,
privateFilter,
page,
finalPage: 1,
searchQuery,
isLoading: false,
staticPrefix: assetUrlPrefix,
counts: {},
repoTypes: {
all: {
searchMode: '',
},
forks: {
searchMode: 'fork',
},
mirrors: {
searchMode: 'mirror',
},
sources: {
searchMode: 'source',
},
collaborative: {
searchMode: 'collaborative',
},
},
textArchivedFilterTitles: {},
textPrivateFilterTitles: {},
organizations: [],
isOrganization: true,
canCreateOrganization: false,
organizationsTotalCount: 0,
subUrl: appSubUrl,
...pageData.dashboardRepoList,
};
},
computed: {
showMoreReposLink() {
return this.repos.length > 0 && this.repos.length < this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`];
},
searchURL() {
return `${this.subUrl}/repo/search?sort=updated&order=desc&uid=${this.uid}&team_id=${this.teamId}&q=${this.searchQuery
}&page=${this.page}&limit=${this.searchLimit}&mode=${this.repoTypes[this.reposFilter].searchMode
}${this.reposFilter !== 'all' ? '&exclusive=1' : ''
}${this.archivedFilter === 'archived' ? '&archived=true' : ''}${this.archivedFilter === 'unarchived' ? '&archived=false' : ''
}${this.privateFilter === 'private' ? '&is_private=true' : ''}${this.privateFilter === 'public' ? '&is_private=false' : ''
}`;
},
repoTypeCount() {
return this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`];
},
checkboxArchivedFilterTitle() {
return this.textArchivedFilterTitles[this.archivedFilter];
},
checkboxArchivedFilterProps() {
return {checked: this.archivedFilter === 'archived', indeterminate: this.archivedFilter === 'both'};
},
checkboxPrivateFilterTitle() {
return this.textPrivateFilterTitles[this.privateFilter];
},
checkboxPrivateFilterProps() {
return {checked: this.privateFilter === 'private', indeterminate: this.privateFilter === 'both'};
},
},
mounted() {
const el = document.getElementById('dashboard-repo-list');
this.changeReposFilter(this.reposFilter);
for (const elTooltip of el.querySelectorAll('.tooltip')) {
initTooltip(elTooltip);
}
$(el).find('.dropdown').dropdown();
nextTick(() => {
this.$refs.search.focus();
});
this.textArchivedFilterTitles = {
'archived': this.textShowOnlyArchived,
'unarchived': this.textShowOnlyUnarchived,
'both': this.textShowBothArchivedUnarchived,
};
this.textPrivateFilterTitles = {
'private': this.textShowOnlyPrivate,
'public': this.textShowOnlyPublic,
'both': this.textShowBothPrivatePublic,
};
},
methods: {
changeTab(t) {
this.tab = t;
this.updateHistory();
},
changeReposFilter(filter) {
this.reposFilter = filter;
this.repos = [];
this.page = 1;
this.counts[`${filter}:${this.archivedFilter}:${this.privateFilter}`] = 0;
this.searchRepos();
},
updateHistory() {
const params = new URLSearchParams(window.location.search);
if (this.tab === 'repos') {
params.delete('repo-search-tab');
} else {
params.set('repo-search-tab', this.tab);
}
if (this.reposFilter === 'all') {
params.delete('repo-search-filter');
} else {
params.set('repo-search-filter', this.reposFilter);
}
if (this.privateFilter === 'both') {
params.delete('repo-search-private');
} else {
params.set('repo-search-private', this.privateFilter);
}
if (this.archivedFilter === 'unarchived') {
params.delete('repo-search-archived');
} else {
params.set('repo-search-archived', this.archivedFilter);
}
if (this.searchQuery === '') {
params.delete('repo-search-query');
} else {
params.set('repo-search-query', this.searchQuery);
}
if (this.page === 1) {
params.delete('repo-search-page');
} else {
params.set('repo-search-page', `${this.page}`);
}
const queryString = params.toString();
if (queryString) {
window.history.replaceState({}, '', `?${queryString}`);
} else {
window.history.replaceState({}, '', window.location.pathname);
}
},
toggleArchivedFilter() {
if (this.archivedFilter === 'unarchived') {
this.archivedFilter = 'archived';
} else if (this.archivedFilter === 'archived') {
this.archivedFilter = 'both';
} else { // including both
this.archivedFilter = 'unarchived';
}
this.page = 1;
this.repos = [];
this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`] = 0;
this.searchRepos();
},
togglePrivateFilter() {
if (this.privateFilter === 'both') {
this.privateFilter = 'public';
} else if (this.privateFilter === 'public') {
this.privateFilter = 'private';
} else { // including private
this.privateFilter = 'both';
}
this.page = 1;
this.repos = [];
this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`] = 0;
this.searchRepos();
},
changePage(page) {
this.page = page;
if (this.page > this.finalPage) {
this.page = this.finalPage;
}
if (this.page < 1) {
this.page = 1;
}
this.repos = [];
this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`] = 0;
this.searchRepos();
},
async searchRepos() {
this.isLoading = true;
const searchedMode = this.repoTypes[this.reposFilter].searchMode;
const searchedURL = this.searchURL;
const searchedQuery = this.searchQuery;
let response, json;
try {
if (!this.reposTotalCount) {
const totalCountSearchURL = `${this.subUrl}/repo/search?count_only=1&uid=${this.uid}&team_id=${this.teamId}&q=&page=1&mode=`;
response = await fetch(totalCountSearchURL);
this.reposTotalCount = response.headers.get('X-Total-Count');
}
response = await fetch(searchedURL);
json = await response.json();
} catch {
if (searchedURL === this.searchURL) {
this.isLoading = false;
}
return;
}
if (searchedURL === this.searchURL) {
this.repos = json.data;
const count = response.headers.get('X-Total-Count');
if (searchedQuery === '' && searchedMode === '' && this.archivedFilter === 'both') {
this.reposTotalCount = count;
}
this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`] = count;
this.finalPage = Math.ceil(count / this.searchLimit);
this.updateHistory();
this.isLoading = false;
}
},
repoIcon(repo) {
if (repo.fork) {
return 'octicon-repo-forked';
} else if (repo.mirror) {
return 'octicon-mirror';
} else if (repo.template) {
return `octicon-repo-template`;
} else if (repo.private) {
return 'octicon-lock';
} else if (repo.internal) {
return 'octicon-repo';
}
return 'octicon-repo';
}
},
};
export function initDashboardRepoList() {
const el = document.getElementById('dashboard-repo-list');
if (el) {
createApp(sfc).mount(el);
}
}
export default sfc; // activate the IDE's Vue plugin
</script>

View File

@ -10,8 +10,8 @@
-d '{"context": "test/context", "description": "description", "state": "${state}", "target_url": "http://localhost"}' -d '{"context": "test/context", "description": "description", "state": "${state}", "target_url": "http://localhost"}'
--> -->
<div> <div>
<!-- eslint-disable --> <!-- eslint-disable-next-line vue/no-v-html -->
<div v-if="mergeForm.hasPendingPullRequestMerge" v-html="mergeForm.hasPendingPullRequestMergeTip" class="ui info message"></div> <div v-if="mergeForm.hasPendingPullRequestMerge" v-html="mergeForm.hasPendingPullRequestMergeTip" class="ui info message"/>
<div class="ui form" v-if="showActionForm"> <div class="ui form" v-if="showActionForm">
<form :action="mergeForm.baseLink+'/merge'" method="post"> <form :action="mergeForm.baseLink+'/merge'" method="post">
@ -30,7 +30,8 @@
<button @click.prevent="clearMergeMessage" class="ui tertiary button"> <button @click.prevent="clearMergeMessage" class="ui tertiary button">
{{ mergeForm.textClearMergeMessage }} {{ mergeForm.textClearMergeMessage }}
</button> </button>
<div class="ui label"><!-- TODO: Convert to tooltip once we can use tooltips in Vue templates --> <div class="ui label">
<!-- TODO: Convert to tooltip once we can use tooltips in Vue templates -->
{{ mergeForm.textClearMergeMessageHint }} {{ mergeForm.textClearMergeMessageHint }}
</div> </div>
</template> </template>

Some files were not shown because too many files have changed in this diff Show More