Commit Graph
1202 Commits
Author SHA1 Message Date
Kerwin Bryant dc63b48493 fix 2025-01-13 05:55:23 +00:00
Kerwin Bryant c0e2fd2e7d fix 2025-01-13 05:41:46 +00:00
Lunny Xiao eff3568d31 Merge branch 'main' into kerwin612-add-file-tree-to-file-view-page 2025-01-12 20:54:57 -08:00
wxiaoguangandGitHub c0751ef116 Fix upload file form (#33230)
Fix #33228
2025-01-13 03:39:15 +08:00
Kerwin Bryant d4a99e53c8 fix 2025-01-10 14:05:34 +00:00
Kerwin BryantandGitHub 62ecf34b99 Merge branch 'main' into add-file-tree-to-file-view-page 2025-01-10 21:13:39 +08:00
Kerwin Bryant c2670dbb81 fix 2025-01-10 09:11:57 +00:00
Kerwin Bryant 0cafe2a39d fix 2025-01-10 09:02:02 +00:00
d7ec23febf Fix editor markdown not incrementing in a numbered list (#33187)
Amended the logic for newPrefix in the MarkdownEditor to resolve
incorrect number ordering.

Fixes #33184

Attached screenshot of fixed input similar to issue 
<img width="175" alt="Screenshot 2025-01-09 at 23 59 24"
src="https://github.com/user-attachments/assets/dfa23cf1-f3db-4b5e-99d2-a71bbcb289a8"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-10 07:28:38 +00:00
Kerwin Bryant 3e679d67b3 fix 2025-01-10 06:52:30 +00:00
Kerwin Bryant 335375fd76 merge main 2025-01-10 01:57:19 +00:00
Lunny XiaoandGitHub 39d51e7c82 Automerge supports deleting branch automatically after merging (#32343)
Resolve #32341 
~Depends on #27151~

- [x] It will display a checkbox of deleting the head branch on the pull
request view page when starting an auto-merge task.
- [x] Add permission check before deleting the branch
- [x] Add delete branch comment for those closing pull requests because
of head branch or base branch was deleted.
- [x] Merge `RetargetChildrenOnMerge` and `AddDeletePRBranchComment`
into `service.DeleteBranch`.
2025-01-10 03:51:03 +08:00
wxiaoguangandGitHub 386c1ed908 Refactor HTMLFormat, update chroma render, fix js error (#33136)
A small refactor to improve HTMLFormat, to help to prevent low-level
mistakes.

And fix #33141, fix #33139
2025-01-08 03:44:32 +00:00
a8e7caedfa add submodule diff links (#33097)
This adds links to submodules in diffs, similar to the existing link
when viewing a repo at a specific commit. It does this by expanding diff
parsing to recognize changes to submodules, and find the specific refs
that are added, deleted or changed.

Related #25888

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-08 01:38:30 +00:00
TheFox0x7andGitHub 4a18c72262 Remove extended glob pattern from branch protection UI (#33125)
Underlying go library has no support for it

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

---

I never touched frontend tests so pointers how to write them are
welcome.

This can be either fix or workaround, depending if this is something
gitea should support in the future or not. The golang side is unlikely
to get updates though.
2025-01-07 01:23:50 +02:00
wxiaoguangandGitHub ef736b7e27 Refactor legacy JS (#33115) 2025-01-06 17:38:42 +08:00
Kerwin Bryant 07e48964b5 fix lint error 2025-01-06 07:06:25 +00:00
Kerwin Bryant 91f972ce82 fix 2025-01-06 06:59:04 +00:00
Kerwin Bryant c949f42d4d fix 2025-01-06 03:20:42 +00:00
wxiaoguangandGitHub 2b064b8637 Refactor legacy line-number and scroll code (#33094)
1. remove jquery
2. rewrite the "line number selection", fix various edge cases
3. fix the scroll
2025-01-04 10:56:07 +08:00
Kerwin Bryant 2a8f9c8531 fix 2025-01-03 08:53:47 +00:00
Kerwin Bryant 087f0d41bd fix 2025-01-03 07:47:44 +00:00
Kerwin BryantandGitHub b1b24282ae Merge branch 'main' into add-file-tree-to-file-view-page 2025-01-03 13:52:57 +08:00
wxiaoguangandGitHub c1167709ed Refactor repo-new.ts (#33070)
1. merge `repo-template.ts` into `repo-new.ts` (they are all for "/repo/create")
2. remove jquery
3. fix an anonying fomantic dropdown bug, see the comment of `onResponseKeepSelectedItem`
2025-01-01 17:21:13 +00:00
wxiaoguangandGitHub 85c756e279 Refactor pull-request compare&create page (#33071)
The old code is unnecessarily complex.
2025-01-02 01:16:09 +08:00
wxiaoguangandGitHub a0853e2278 Fix unittest and repo create bug (#33061)
1. `StatDir` was not right, fix the FIXME
2. Clarify the test cases for `IsUsableRepoName`
3. Fix regression bug in `repo-new.ts`

Fix #33060
2024-12-31 18:45:05 +08:00
0387195abb [Feature] Private README.md for organization (#32872)
Implemented #29503

---------

Co-authored-by: Ben Chang <ben_chang@htc.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-31 04:22:09 +00:00
wxiaoguangandGitHub c09656e0e0 Make issue suggestion work for new PR page (#33035)
Fix #33026
2024-12-31 03:50:55 +00:00
Lunny XiaoandGitHub 344c89ea34 Fix bug automerge cannot be chosed when there is only 1 merge style (#33040)
This is a quick bug fix. Even if there is only 1 merge style, the
dropdown menu will still be displayed to allow users to choose
auto-merge.

Fix #32448
2024-12-30 03:04:22 +00:00
wxiaoguangandGitHub 3d3ece36d2 Refactor comment history and fix content edit (#33018)
And fix a regression bug for comment content editing.

Now 11 "import jquery" files left
2024-12-28 19:26:16 +08:00
Kerwin Bryant 91ffb2d720 fix bug 2024-12-27 06:31:28 +00:00
Lunny Xiao bf15e1878c Fix bug 2024-12-26 12:38:11 -08:00
Kerwin BryantandGitHub 634fbe0c2d Merge branch 'main' into add-file-tree-to-file-view-page 2024-12-26 08:52:35 +08:00
Kerwin Bryant 143249f4f1 change loading 2024-12-26 00:51:46 +00:00
Kerwin Bryant 158b79e40a debug new api /tree 2024-12-25 08:55:43 +00:00
1a7591d7f9 fix textarea newline handle (#32966)
- Fix cursor position if input newline on middle of lines
- ~Increment number if numbered list~


![image](https://github.com/user-attachments/assets/bcfe2625-11a8-4ea4-9a71-b7ecfe81b2e0)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-25 13:03:43 +08:00
Kerwin BryantandGitHub 07fb84f830 Merge branch 'main' into add-file-tree-to-file-view-page 2024-12-23 10:56:23 +08:00
6279646ee4 Add auto-expanding running actions step (#30058)
Auto-expands the currently running action step.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-22 18:57:17 +00:00
5d6d62493b Add action auto-scroll (#30057)
Adds an auto-scroll/follow feature to running actions (fix #25186, fix
#28535).

When new log lines are appended and the bottom of the logs container
(`.action-view-right`) is visible at this time, the page automatically
scrolls down to the bottom of the logs.

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-21 14:49:26 -08:00
silverwindandGitHub c0e80dbe26 Enable Typescript strictFunctionTypes (#32911)
1. Enable
[strictFunctionTypes](https://www.typescriptlang.org/tsconfig/#strictFunctionTypes)
2. Introduce `DOMEvent` helper type which sets `e.target`. Surely not
totally correct with that `Partial` but seems to work.
3. Various type-related refactors, change objects in
`eventsource.sharedworker.ts` to `Map`.
2024-12-22 02:59:25 +08:00
wxiaoguangandGitHub 09a0041965 Fix areYouSure confirm (#32941)
See the comment
2024-12-21 12:11:22 -05:00
7580bd98c1 show warning on navigation if currently editing comment or title (#32920)
This PR fixes the issue https://github.com/go-gitea/gitea/issues/32223

Make the browser to show the confirm popup, as it does with other forms.

---------

Co-authored-by: Tim Wundenberg <tim@wundenbergs.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-20 23:39:19 +08:00
141d782c1a Refactor repo-projects.ts (#32892)
- Remove jQuery
- Add types to all functions
- Tested all modified functionality

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-19 08:37:12 +00:00
silverwindandGitHub 857abed3a9 Move RepoBranchTagSelector init outside the SFC (#32890)
SFCs shouldn't export anything besides their component, and this
eliminates one issue with tsc, while apparently also solving a hack. It
seems to work as before, also when multiples are on the same page.
2024-12-18 21:26:17 +01:00
2d7e6e9482 Fix various trivial problems (#32861)
1. add/improve comments to help future readers could understand the
problem more easily.
2. add an error log to LDAP with username fallback
3. use `or` instead of `Iif` for "repo/branch_dropdown" (`Iif` was a
mistake, but it doesn't really affect the UI)
4. add `tw-font-mono` style to container digest to match dockerhub
5. fix a bug in RepoBranchTagSelector: the form is not updated when
there is no click to an item

---------

Co-authored-by: delvh <dev.lh@web.de>
2024-12-17 01:15:18 +00:00
wxiaoguangandGitHub d28a4843b8 Fix incomplete Actions status aggregations (#32859)
fix #32857
2024-12-16 11:18:00 +08:00
Kerwin BryantandGitHub 68ef9ef6b2 Merge branch 'main' into add-file-tree-to-file-view-page 2024-12-16 08:22:52 +08:00
c8ea41b049 Fix remaining typescript issues, enable tsc (#32840)
Fixes 79 typescript errors. Discovered at least two bugs in
`notifications.ts`, and I'm pretty sure this feature was at least
partially broken and may still be, I don't really know how to test it.

After this, only like ~10 typescript errors remain in the codebase but
those are harder to solve.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-16 05:02:32 +08:00
df9a78cd04 Tweak repo sidebar (#32847)
Before and after:

<img width="218" alt="Screenshot 2024-12-15 at 04 53 53"
src="https://github.com/user-attachments/assets/299b1f0a-ba72-47c6-b662-a9d540d4d741"
/>
<img width="222" alt="Screenshot 2024-12-15 at 04 53 41"
src="https://github.com/user-attachments/assets/5a2b5332-e324-4d20-82e9-21d1c850e826"
/>

Diff without whitespace:
https://github.com/go-gitea/gitea/pull/32847/files?diff=unified&w=1

The `tw-mt-2` is fine even if the element renders empty:

<img width="387" alt="image"
src="https://github.com/user-attachments/assets/76a976e4-ba2e-48a5-9248-c361552a937a"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-15 10:01:46 +00:00
wxiaoguangandGitHub cc5ff98e0d Refactor markdown math render (#32831)
Add more tests
2024-12-14 13:43:05 +08:00