Commit Graph

14234 Commits

Author SHA1 Message Date
Loïc Dachary 4e5be58493
Merge branch 'v1.18/forgejo-a11y' into v1.18/forgejo 2023-02-09 09:02:33 +01:00
Yarden Shoham 06222f2da7
add default user visibility to cli command "admin user create" (#22750) (#22760)
Backport #22750

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

Co-authored-by: yp05327 <576951401@qq.com>
2023-02-09 08:44:15 +01:00
Yarden Shoham 26836d26e5
Fix color of tertiary button on dark theme (#22739) (#22744)
Backport #22739

Before:
<img width="266" alt="Screenshot 2023-02-03 at 14 07 34"
src="https://user-images.githubusercontent.com/115237/216611151-92e98305-c4b5-42f3-b2e2-8b1b805fa644.png">

After:
<img width="271" alt="Screenshot 2023-02-03 at 14 07 52"
src="https://user-images.githubusercontent.com/115237/216611156-878a8a75-39a1-415b-9b6d-4f035985444e.png">

This is the only instance of such a button in all templates.

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-02-09 08:44:00 +01:00
Yarden Shoham 29de86b938
Fix restore repo bug, clarify the problem of ForeignIndex (#22776) (#22794)
Backport #22776

Fix #22581

TLDR: #18446 made a mess with ForeignIndex and triggered a design
flaw/bug of #16356, then a quick patch #21271 helped #18446, then the
the bug was re-triggered by #21721 .

Related:
* #16356
* BasicIssueContext
https://github.com/go-gitea/gitea/pull/16356/files#diff-7938eb670d42a5ead6b08121e16aa4537a4d716c1cf37923c70470020fb9d036R16-R27
* #18446 
* If some issues were dumped without ForeignIndex, then they would be
imported as ForeignIndex=0
https://github.com/go-gitea/gitea/pull/18446/files#diff-1624a3e715d8fc70edf2db1630642b7d6517f8c359cc69d58c3958b34ba4ce5eR38-R39
* #21271
* It patched the above bug (somewhat), made the issues without
ForeignIndex could have the same value as LocalIndex
* #21721 
    * It re-triggered the zero-ForeignIndex bug.


ps: I am not sure whether the changes in `GetForeignIndex` are ideal (at
least, now it has almost the same behavior as BasicIssueContext in
#16356), it's just a quick fix. Feel free to edit on this PR directly or
replace it.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-02-09 08:43:55 +01:00
wxiaoguang d9938471e2
Escape path for the file list (#22741) (#22757)
Backport #22741
Fix #22740
2023-02-09 08:43:45 +01:00
Yarden Shoham 516128f099
use drone secrets for s3 config (#22770) (#22773) 2023-02-09 08:43:36 +01:00
wxiaoguang 759b04f3b8
Add ARIA support for Fomantic UI checkboxes (#22599)
Replace #22593

This is a general approach to add ARIA support for all Fomantic UI
checkboxes (including radioboxes)

* Pros:
* General approach, it works for all Fomantic UI checkboxes / radioboxes
    * No need to write IDs manually everywhere
    * No need to tell new contributors to write IDs again and again

* Cons:
* Slightly affects performance, but it's really trivial, because there
was already a heavy `$('.ui.checkbox').checkbox()` for Fomantic UI
before. So everything is still fine.


Screenshot (from the repo setting page, which has various checkboxes):

<details>


![image](https://user-images.githubusercontent.com/2114189/214480937-3a54d36f-55c3-49de-9c45-c4bb21f1f4c6.png)

</details>
2023-02-07 13:18:57 -03:00
Felipe Leopoldo Sologuren Gutiérrez d05135474d
Fixes accessibility behavior of Watching, Staring and Fork buttons (#22634)
Add tabindex to buttons of repository views.
2023-02-07 13:16:10 -03:00
Felipe Leopoldo Sologuren Gutiérrez a055570b60
Add main landmark to templates and adjust titles (#22670)
* Add main aria landmark to templates
 * Adjust some titles to improve understanding of location in navigation

Contributed by @Forgejo
2023-02-07 13:01:43 -03:00
Felipe Leopoldo Sologuren Gutiérrez 3cb38db4eb
Improve checkbox accessibility a bit by adding the title attribute (#22593)
EDIT: The main change of this PR was resolved by #22599. This
complements that PR for some cases without label and complicated layout
to be added.

NOTE: Contributed by @Forgejo.
2023-02-07 12:57:16 -03:00
Felipe Leopoldo Sologuren Gutiérrez 07a0af326f
Improve accessibility of navigation bar and footer (#22635)
Added ARIA navigation landmark to navigation bar and aria label for both
nav bar and footer.

Contributed by @forgejo.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-02-07 12:22:33 -03:00
Felipe Leopoldo Sologuren Gutiérrez 23214d7e8b
Fixes accessibility of empty repository commit status (#22632)
Avoid empty labelled anchor in repo without commits.

Contributed by @forgejo.

<!--

Please check the following:

1. Make sure you are targeting the `main` branch, pull requests on
release branches are only allowed for bug fixes.
2. Read contributing guidelines:
https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md
3. Describe what your pull request does and which issue you're targeting
(if any)

-->
2023-02-07 12:21:30 -03:00
Loïc Dachary a81078fd6b
Merge branch 'v1.18/forgejo-i18n' into v1.18/forgejo 2023-02-05 11:18:30 +01:00
Loïc Dachary bc12e00d0f
Merge branch 'v1.18/forgejo-branding' into v1.18/forgejo 2023-02-05 11:18:23 +01:00
Gusted 994346787b
[BRANDING] Update nodeinfo branding
- Change the values for the nodeinfo API, to use branded values.
- Resolves https://codeberg.org/forgejo/forgejo/issues/257
2023-02-05 10:03:06 +01:00
Earl Warren 486c14a05f
[BRANDING] define the forgejo webhook type
templates/swagger/v1_json.tmpl updated with `make generate-swagger`
2023-02-05 10:02:22 +01:00
Earl Warren c0cbf2826d
[BRANDING] add X-Forgejo-* headers 2023-02-05 09:57:10 +01:00
Earl Warren ad5a6b8f43
[BRANDING] parse FORGEJO__* in the container environment
Add the FORGEJO__ prefix as equivalent to GITEA__ when interpreted by
environment-to-ini. It is used when running the Forgejo container like
so:

  docker run --name forgejo -e FORGEJO__security__INSTALL_LOCK=true \
             -d codeberg.org/forgejo/forgejo:1.18

Signed-off-by: Earl Warren <contact@earl-warren.org>
2023-02-05 09:56:25 +01:00
Gusted 76877b7d1f
[BRANDING] Replace branding in Swagger
- "Gitea" is automatically being determined in Swagger and cannot be
overridden, therefor we override it after `swagger generate spec` is run.
- Resolves https://codeberg.org/forgejo/forgejo/issues/226
2023-02-05 09:56:25 +01:00
TomZ afc1cc6abc
[BRANDING] Rename usage of Gitea in user-visible places
As the docs of codeberg refer to the strings printed by the Forgejo
ssh servers, this is user-facing and is nice to update to the new
product name.
2023-02-05 09:56:25 +01:00
Caesar Schinas cbf0396230
[BRANDING] Rebrand default meta tags 2023-02-05 09:56:25 +01:00
Caesar Schinas 1944c077bc
[BRANDING] Add Forgejo light, dark, and auto themes 2023-02-05 09:56:25 +01:00
Loïc Dachary ac808144c5
[BRANDING] container images: set APP_NAME 2023-02-05 09:56:25 +01:00
Caesar Schinas cdc9a9567b
[BRANDING] Custom loading animation for Forgejo 2023-02-05 09:56:25 +01:00
Caesar Schinas 703916fd54
[BRANDING] Rebrand default config settings for new installs (#140)
Replaces `Gitea` with `Forgejo` in the default config settings for new installs.

This will not affect existing installs.

Co-authored-by: Caesar Schinas <caesar@caesarschinas.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/140
Co-authored-by: Caesar Schinas <caesar@noreply.codeberg.org>
Co-committed-by: Caesar Schinas <caesar@noreply.codeberg.org>
2023-02-05 09:56:24 +01:00
Caesar Schinas d4e0198b16
[BRANDING] Add `forgejo` emoji 2023-02-05 09:56:24 +01:00
Caesar Schinas 4afd7de258
[BRANDING] Rebrand footer "powered by" links 2023-02-05 09:56:22 +01:00
Gusted 72019a8a77
[BRANDING] Rebrand systemd service (#137)
- We can rebrand this quite safely, as only new installations would likely look into this file and configure the correct folders(to use forgejo instead of gitea).

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/137
2023-02-05 09:53:43 +01:00
Caesar Schinas 58b71ff5cb
[BRANDING] add Forgejo logo 2023-02-05 09:53:42 +01:00
Gusted 14e1122af7
[PRIVACY] Add a DNS method to fetch new updates
- Use TXT records in order to determine the latest available version.
- This addresses a valid privacy issue, as with HTTP requests the server
can keep track(estimated) of how many instances are using Forgejo, with
DNS that's basically not possible as the server will never receive any
data, as the only ones receiving data are DNS resolvers.
2023-02-05 02:11:26 +01:00
Gusted e06f36f5ea
[PRIVACY] Disable `update_checker` cron tasks
- This is being disabled as it will weekly connect to a domain.
- This only affects existing installations, as new installations will
have a explicit value being written into app.ini due to https://github.com/go-gitea/gitea/pull/21655
2023-02-05 02:11:23 +01:00
fnetx 72159889dc
[I18N] Move source locales to other folder 2023-02-05 02:10:07 +01:00
fnetx 9aa7bf2a67
[I18N] Makefile + gitignore 2023-02-05 02:10:06 +01:00
fnetx 6e935afb5e
[I18N] Add Locale merger script 2023-02-05 02:10:06 +01:00
fnetx 2e82270c1b
[I18N] Rename upstream files 2023-02-05 02:10:06 +01:00
Percy Ma df9821f574
[DOCS] LICENSE: add Forgejo Authors 2023-02-05 02:07:31 +01:00
Loïc Dachary 7ac9332f13
[DOCS] RELEASE-NOTES.md 2023-02-05 02:07:31 +01:00
Loïc Dachary 52af41db5b
[WORKFLOW] issues & pr templates 2023-02-05 02:07:31 +01:00
Loïc Dachary d86b2d791d
[DOCS] README 2023-02-05 02:07:31 +01:00
Loïc Dachary 746b0c3665
[DOCS] CONTRIBUTING
Refs: https://codeberg.org/forgejo/forgejo/issues/8
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/153
Refs: https://codeberg.org/forgejo/forgejo/issues/123
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/299
2023-02-05 02:07:31 +01:00
Loïc Dachary 6db4e58bbf
delete Gitea specific files that need rewriting for Forgejo
Although it would be possible to modify these files, it would create
conflicts when rebasing. Instead, this commit removes them entirely
and another commit can start from scratch, borrowing content from the
original files.

The drawback of this approach is that some content updates from Gitea
that also need updating in Forgejo will have to be copy/pasted
instead of being merged.
2023-02-05 02:07:29 +01:00
Loïc Dachary bda5c2054e
[CI] use codeberg.org/forgejo/test_env:1.18 2023-02-05 00:26:06 +01:00
Loïc Dachary b491104bd5
[CI] implementation: forgejo container images 2023-02-04 23:03:29 +01:00
Loïc Dachary 5717d5243a
[CI] implementation: Woodpecker based CI
Refs: https://codeberg.org/forgejo/forgejo/issues/73
Refs: https://codeberg.org/forgejo/forgejo/issues/101
Refs: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/issues/51
Refs: https://codeberg.org/forgejo/forgejo/issues/117
Refs: https://codeberg.org/forgejo/forgejo/issues/25
Refs: https://codeberg.org/forgejo/forgejo/issues/154
Refs: https://codeberg.org/forgejo/forgejo/issues/180
Refs: https://codeberg.org/forgejo/forgejo/issues/230
2023-02-04 23:02:43 +01:00
Loïc Dachary ed3fc0b92b
[CI] implementation: publish forgejo- binaries instead of gitea- 2023-02-04 23:02:43 +01:00
Gary Moon 39ff0a7ddd
Skip GitHub migration tests if the API token is undefined (#21824)
GitHub migration tests will be skipped if the secret for the GitHub API
token hasn't been set.

This change should make all tests pass (or skip in the case of this one)
for anyone running the pipeline on their own infrastructure without
further action on their part.

Resolves https://github.com/go-gitea/gitea/issues/21739

Signed-off-by: Gary Moon <gary@garymoon.net>
2023-02-04 23:02:28 +01:00
zeripath 2e12161620
Fix bugs with WebAuthn preventing sign in and registration. (#22651) (#22721)
Partial Backport #22651

This PR fixes a longstanding bug within webauthn due to the backend
using URLEncodedBase64 but the javascript using decoding using plain
base64. This causes intermittent issues with users reporting decoding
errors.

Fix #22507

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-02-02 15:45:57 +08:00
crystal 9cde526f87
Fix line spacing for plaintext previews (#22699) (#22701)
Backport #22699

Adding `<br>` between each line is not necessary since the entire file
is rendered inside a `<pre>`

fixes https://codeberg.org/Codeberg/Community/issues/915
2023-02-01 22:06:58 +00:00
Yarden Shoham 4c20be7c00
Add missing close bracket in imagediff (#22710) (#22712)
Backport #22710

There was a missing `]` in imagediff.js:

```
const $range = $container.find("input[type='range'"); 
```

This PR simply adds this.

Fix #22702

Co-authored-by: zeripath <art27@cantab.net>
2023-02-01 12:30:52 +00:00
Yarden Shoham 263d06f616
Fix wrong hint when deleting a branch successfully from pull request UI (#22673) (#22698)
Backport #22673

Fix #18785

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-02-01 01:35:38 +00:00