gitea/web_src/js
Brecht Van Lommel a46b16f10f
Edit file workflow for creating a fork and proposing changes (#34240)
When viewing a file that the user can't edit because they can't write to
the branch, the new, upload, patch, edit and delete functionality is no
longer disabled.

If no user fork of the repository exists, there is now a page to create one.
It will automatically create a fork with a single branch matching the one
being viewed, and a unique repository name will be automatically picked.

When a fork exists, but it's archived, a mirror or the user can't write
code to it, there will instead be a message explaining the situation.

If the usable fork exists, a message will appear at the top of the edit page
explaining that the changes will be applied to a branch in the fork. The
base repository branch will be pushed to a new branch to the fork, and
then the edits will be applied on top.

The suggestion to fork happens when accessing /_edit/, so that for
example online documentation can have an "edit this page" link to
the base repository that does the right thing.

Also includes changes to properly report errors when trying to commit
to a new branch that is protected, and when trying to commit to an
existing branch when choosing the new branch option.

Resolves #9017, #20882

---------

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-22 12:43:43 +00:00
..
components Improve img lazy loading (#34804) 2025-06-21 14:53:22 +08:00
features Edit file workflow for creating a fork and proposing changes (#34240) 2025-06-22 12:43:43 +00:00
markup Fix footnote jump behavior on the issue page. (#34621) 2025-06-09 17:18:11 +00:00
modules Rework delete org and rename org UI (#34762) 2025-06-21 18:21:48 +00:00
render Refactor markup and pdf-viewer to use new init framework (#33772) 2025-03-03 11:49:15 -08:00
standalone Update TypeScript types (#33799) 2025-03-05 08:03:44 -08:00
utils Add repo file tree item link behavior (#34730) 2025-06-20 02:28:19 +08:00
vendor Fix areYouSure confirm (#32941) 2024-12-21 12:11:22 -05:00
webcomponents Optimize overflow-menu (#34183) 2025-04-13 01:59:36 +00:00
bootstrap.test.ts Convert frontend code to typescript (#31559) 2024-07-07 15:32:30 +00:00
bootstrap.ts Add types to fetch,toast,bootstrap,svg (#31627) 2024-07-25 23:31:24 +00:00
globals.d.ts Fix various Fomantic UI and htmx problems (#33851) 2025-03-11 11:35:05 -07:00
globals.ts Convert frontend code to typescript (#31559) 2024-07-07 15:32:30 +00:00
htmx.ts Update JS and PY deps, misc tweaks (#33903) 2025-03-16 10:04:18 +01:00
index.ts Optimize the calling code of queryElems (#34235) 2025-04-19 08:17:07 +08:00
svg.test.ts Remove "class-name" from svg icon (#33540) 2025-02-09 22:39:54 +02:00
svg.ts Add file tree to file view page (#32721) 2025-03-15 16:26:49 +08:00
types.ts Enable Typescript noImplicitAny (#33322) 2025-01-22 15:11:51 +08:00
utils.test.ts Use git diff-tree for DiffFileTree on diff pages (#33514) 2025-02-28 00:58:25 +00:00
utils.ts Add fullscreen mode as a more efficient operation way to view projects (#34081) 2025-04-23 13:42:22 +08:00
vitest.setup.ts Fix a number of Typescript issues (#31877) 2024-08-28 18:32:38 +02:00