forgejo/web_src/css
Gusted e53f955c88
[MODERATION] user blocking
- Add the ability to block a user via their profile page.
- This will unstar their repositories and visa versa.
- Blocked users cannot create issues or pull requests on your the doer's repositories (mind that this is not the case for organizations).
- Blocked users cannot comment on the doer's opened issues or pull requests.
- Blocked users cannot add reactions to doer's comments.
- Blocked users cannot cause a notification trough mentioning the doer.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/540
(cherry picked from commit 687d852480)
(cherry picked from commit 0c32a4fde5)
(cherry picked from commit 1791130e3c)
(cherry picked from commit 37858b7e8f)
(cherry picked from commit a3e2bfd7e9)
(cherry picked from commit 7009b9fe87)

Conflicts: https://codeberg.org/forgejo/forgejo/pulls/1014
	routers/web/user/profile.go
	templates/user/profile.tmpl
(cherry picked from commit b2aec34791)
(cherry picked from commit e2f1b73752)

[MODERATION] organization blocking a user (#802)

- Resolves #476
- Follow up for: #540
- Ensure that the doer and blocked person cannot follow each other.
- Ensure that the block person cannot watch doer's repositories.
- Add unblock button to the blocked user list.
- Add blocked since information to the blocked user list.
- Add extra testing to moderation code.
- Blocked user will unwatch doer's owned repository upon blocking.
- Add flash messages to let the user know the block/unblock action was successful.
- Add "You haven't blocked any users" message.
- Add organization blocking a user.

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/802
(cherry picked from commit 0505a10421)
(cherry picked from commit 37b4e6ef9b)
(cherry picked from commit c17c121f2c)

[MODERATION] organization blocking a user (#802) (squash)

Changes to adapt to:

  6bbccdd177 Improve AJAX link and modal confirm dialog (#25210)

Refs: https://codeberg.org/forgejo/forgejo/pulls/882/files#issuecomment-945962
Refs: https://codeberg.org/forgejo/forgejo/pulls/882#issue-330561
(cherry picked from commit 523635f83c)
(cherry picked from commit 4743eaa6a0)
(cherry picked from commit eff5b43d2e)

Conflicts: https://codeberg.org/forgejo/forgejo/pulls/1014
	routers/web/user/profile.go
(cherry picked from commit 9d359be5ed)
(cherry picked from commit b1f3069a22)

[MODERATION] add user blocking API

- Follow up for: #540, #802
- Add API routes for user blocking from user and organization
perspective.
- The new routes have integration testing.
- The new model functions have unit tests.
- Actually quite boring to write and to read this pull request.

(cherry picked from commit f3afaf15c7)
(cherry picked from commit 6d754db3e5)
(cherry picked from commit 2a89ddc0ac)
(cherry picked from commit 4a147bff7e)

Conflicts:
	routers/api/v1/api.go
	templates/swagger/v1_json.tmpl
(cherry picked from commit bb8c339185)
(cherry picked from commit 5a11569a01)
(cherry picked from commit 2373c801ee)

[MODERATION] restore redirect on unblock

 ctx.RedirectToFirst(ctx.FormString("redirect_to"), ctx.ContextUser.HomeLink())

was replaced by

 ctx.JSONOK()

in 128d77a3a Following up fixes for "Fix inconsistent user profile layout across tabs" (#25739)

thus changing the behavior (nicely spotted by the tests). This
restores it.

(cherry picked from commit 597c243707)
(cherry picked from commit cfa539e590)

[MODERATION] Add test case (squash)

- Add an test case, to test an property of the function.

(cherry picked from commit 70dadb1916)

[MODERATION] Block adding collaborators

- Ensure that the doer and blocked user cannot add each other as
collaborators to repositories.
- The Web UI gets an detailed message of the specific situation, the API
gets an generic Forbidden code.
- Unit tests has been added.
- Integration testing for Web and API has been added.
- This commit doesn't introduce removing each other as collaborators on
the block action, due to the complexity of database calls that needs to
be figured out. That deserves its own commit and test code.

(cherry picked from commit 747be949a1)

[MODERATION] move locale_en-US.ini strings to avoid conflicts

Conflicts:
	web_src/css/org.css
	web_src/css/user.css
	https://codeberg.org/forgejo/forgejo/pulls/1180
2023-08-01 10:38:14 +02:00
..
chroma Change --font-weight-bold to --font-weight-semibold and 600 value, introduce new font weight variables (#24827) 2023-05-21 23:37:32 +00:00
codemirror Remove EasyMDE focus outline on text (#25328) 2023-06-18 04:10:07 +00:00
editor Several fixes for mobile UI (#25634) 2023-07-04 17:45:45 +00:00
features Improve commit graph alignment and truncating (#26112) 2023-07-25 10:17:41 +00:00
markup Render plaintext task list items for markdown files (#26186) 2023-07-27 14:15:31 +00:00
modules Reduce margins on user settings page, introduce flex-container (#26046) 2023-07-31 07:16:03 +00:00
repo Introduce flex-list & flex-item elements for Gitea UI (#25790) 2023-08-01 00:13:42 +02:00
shared Introduce flex-list & flex-item elements for Gitea UI (#25790) 2023-08-01 00:13:42 +02:00
standalone Add toasts to UI (#25449) 2023-06-27 02:45:24 +00:00
themes Add custom ansi colors and CSS variables for them (#25546) 2023-06-28 15:38:55 +02:00
actions.css Introduce flex-list & flex-item elements for Gitea UI (#25790) 2023-08-01 00:13:42 +02:00
admin.css Reduce margins on user settings page, introduce flex-container (#26046) 2023-07-31 07:16:03 +00:00
base.css Add commits dropdown in PR files view and allow commit by commit review (#25528) 2023-07-28 21:18:12 +02:00
dashboard.css Introduce flex-list & flex-item elements for Gitea UI (#25790) 2023-08-01 00:13:42 +02:00
explore.css Introduce flex-list & flex-item elements for Gitea UI (#25790) 2023-08-01 00:13:42 +02:00
font_i18n.css Fix @font-face overrides (#24855) 2023-05-24 01:48:51 +00:00
form.css Fix mobile navbar and misc cleanups (#25134) 2023-06-09 09:10:51 +00:00
helpers.css Fix the truncate and alignment problem for some admin tables (#26042) 2023-07-22 10:54:48 +00:00
home.css avoid hard-coding height in language dropdown menu (#25986) 2023-07-19 23:30:57 +02:00
index.css Introduce flex-list & flex-item elements for Gitea UI (#25790) 2023-08-01 00:13:42 +02:00
install.css Make "install page" respect environment config (#25648) 2023-07-09 22:43:37 +00:00
org.css [MODERATION] user blocking 2023-08-01 10:38:14 +02:00
repo.css Introduce flex-list & flex-item elements for Gitea UI (#25790) 2023-08-01 00:13:42 +02:00
review.css Make add line comment buttons focusable (#25894) 2023-07-15 11:45:34 +02:00
user.css [MODERATION] user blocking 2023-08-01 10:38:14 +02:00