Commit Graph

2008 Commits

Author SHA1 Message Date
wxiaoguang
3b839f8dc0
Trivial fixes (#33304)
1. the error check was added for go-git, it was caused by the empty `.keep` file in the test fixtures.
2. use `PostFormValue` instead of `PostForm.Get` (`Get` needs to parse the form ahead)
3. fix incorrect container text (it should show "Images" in the header but not "OS/Arch")
4. align maven xml
5. fix closed PR color&icon
2025-01-17 08:55:02 +00:00
silverwind
4b21a6c792
Enable Typescript noImplicitThis (#33250)
- Enable https://www.typescriptlang.org/tsconfig/#noImplicitThis
- Wrap Vue Template-Syntax SFCs in
[`defineComponent`](https://vuejs.org/api/general#definecomponent) which
makes type inference and linter work better
- Move `createApp` calls outside the SFCs into separate files
- Use [`PropType`](https://vuejs.org/api/utility-types#proptype-t) where
appropriate
- Some top-level component properties changed order as dictated by the
linter
- Fix all tsc and lint issues that popped up during these refactors
2025-01-16 04:26:17 +08:00
wxiaoguang
6659a381ea
Fix closed dependency title (#33285)
Fix #33283
2025-01-15 23:38:03 +08:00
wxiaoguang
c0751ef116
Fix upload file form (#33230)
Fix #33228
2025-01-13 03:39:15 +08:00
wxiaoguang
9024b79933
Remove unused CSS styles and move some styles to proper files (#33217) 2025-01-12 05:16:22 +00:00
Harry Vince
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
Lunny Xiao
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
wxiaoguang
9c00e065a1
Fix form width (#33151)
Fix #33150
2025-01-08 23:57:18 +08:00
wxiaoguang
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
Rowan Bohde
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
TheFox0x7
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
wxiaoguang
ef736b7e27
Refactor legacy JS (#33115) 2025-01-06 17:38:42 +08:00
wxiaoguang
cf60734a4d
Fix dropdown menu header and mobile view (#33108)
![image](https://github.com/user-attachments/assets/3f831c8c-ef87-4282-880a-c2738f3e1d17)

----

![image](https://github.com/user-attachments/assets/c4c0519b-cfa6-42b4-bd28-205ee514eb34)

----

![image](https://github.com/user-attachments/assets/8624a605-9f2b-4905-9cbc-0af073972874)
2025-01-05 21:20:22 +00:00
wxiaoguang
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
wxiaoguang
68972a9947
Clean up legacy form CSS styles (#33081) 2025-01-03 04:01:19 +00:00
wxiaoguang
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
wxiaoguang
85c756e279
Refactor pull-request compare&create page (#33071)
The old code is unnecessarily complex.
2025-01-02 01:16:09 +08:00
wxiaoguang
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
Chai-Shi
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
wxiaoguang
c09656e0e0
Make issue suggestion work for new PR page (#33035)
Fix #33026
2024-12-31 03:50:55 +00:00
Lunny Xiao
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
metiftikci
94048f3035
fix toggle commit body button ui when latest commit message is long (#32997)
#### Before


![before](https://github.com/user-attachments/assets/fe36bdb3-10e8-4fe7-9106-0897f49bedb3)

#### After


![after](https://github.com/user-attachments/assets/745bd164-5f25-41ca-b340-36cb695551db)


## Edit:

I found an issue on mobile view and changed the code as using flex gap


![small](https://github.com/user-attachments/assets/dd7c2093-6860-4800-a2bc-676a03e764c8)


![large](https://github.com/user-attachments/assets/5c933779-8281-4d48-9fd0-4d7b245bf4ac)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-29 08:04:56 +08:00
wxiaoguang
a92f5057ae
Fix and/or comment some legacy CSS problems (#33015) 2024-12-28 11:51:38 +00:00
wxiaoguang
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
metiftikci
254314be5f
fix scoped label ui when contains emoji (#33007)
### Before

![old_label](https://github.com/user-attachments/assets/2211f711-613a-4ed4-90fd-8ff6ab0700f5)

### After

![new_label](https://github.com/user-attachments/assets/ecbc89da-7f77-44d0-8ce9-ba51b67421e5)
2024-12-28 00:58:19 +00:00
Blender Defender
079a1ffe8f
De-emphasize signed commits (#31160)
The new code structure is easier to make more improvements or
refactor, for example: change the colors to de-emphasize more, or design
some new layouts.

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-28 04:18:30 +08:00
metiftikci
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
bytedream
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
bytedream
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
silverwind
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
wxiaoguang
09a0041965
Fix areYouSure confirm (#32941)
See the comment
2024-12-21 12:11:22 -05:00
wxiaoguang
4774151e53
Improve navbar: add "admin" tip, add "active" style (#32927)
By the way, remove all "tw-" patches and unused styles.
2024-12-20 16:38:56 +00:00
Tim
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
silverwind
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
silverwind
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
wxiaoguang
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
wxiaoguang
d28a4843b8
Fix incomplete Actions status aggregations (#32859)
fix #32857
2024-12-16 11:18:00 +08:00
silverwind
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
silverwind
74b06d4f5c
Repo file list enhancements (#32835)
1. restore background color
2. fix border radius on top/bottom and on hover
3. parent link is now full-row again, much easier to click
4. parent link now uses directory icon, matching github
5 changed grid layout to remove auto width on file name column which could get too small.
6. mobile layout now shows more of the filename.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-15 16:56:56 +00:00
silverwind
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
silverwind
1a07ebe549
Fix overflow on org header (#32837) 2024-12-14 06:50:12 +00:00
wxiaoguang
cc5ff98e0d
Refactor markdown math render (#32831)
Add more tests
2024-12-14 13:43:05 +08:00
silverwind
bed563e574
Improve JSX/TSX support in code editor (#32833)
Two tweaks to Monaco to improve JSX/TSX support.

1. Certain language features like JSX/TSX only work when passing `uri`
(containing the filename), do this.
2. Set the `jsx` compiler option to avoid error annotations

Before:
<img width="441" alt="Screenshot 2024-12-13 at 15 11 33"
src="https://github.com/user-attachments/assets/dac245a7-e80f-4249-8e09-13124b03d12a"
/>

After:
<img width="441" alt="Screenshot 2024-12-13 at 15 10 46"
src="https://github.com/user-attachments/assets/726ad712-d116-438d-88da-bc40534b6860"
/>
2024-12-14 03:10:20 +00:00
wxiaoguang
5bc030efa2
Fix various UI bugs (#32821) 2024-12-13 01:45:32 -05:00
hiifong
30008fcfcf
Fix bug of branch/tag selector in the issue sidebar (#32744)
Fix: #32731

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-13 00:45:06 +00:00
Lunny Xiao
6370d2fb93
Detect whether action view branch was deleted (#32764)
Fix #32761 

![图片](https://github.com/user-attachments/assets/a5a7eef8-0fea-4242-b199-1b0b73d9bbdb)
2024-12-12 19:28:23 +00:00
Chai-Shi
c9487a755b
Add "n commits" link to contributors in contributors graph page (#32799)
Fixes Issue #29365 and inherit PR #29429

- I should extend the #29429 fork but the fork is not synced, so I
created another PR.
- Use `silenced` class for the link, as in #29847

---------

Co-authored-by: Ben Chang <ben_chang@htc.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-12 19:02:54 +00:00
wxiaoguang
00e2b339b6
Fix "unicode escape" JS error (#32806)
<details>


![image](https://github.com/user-attachments/assets/98aef2fb-791e-4b4a-b2ac-e880f8a52040)


![image](https://github.com/user-attachments/assets/532673ae-c4cf-4d84-a5c6-93e6eacd341c)


![image](https://github.com/user-attachments/assets/2a241a3d-b7f6-44ca-89d9-9d68386fbf3e)


![image](https://github.com/user-attachments/assets/1251e43d-41f2-42d1-a23b-3182e3812c3d)

</details>

---------

Co-authored-by: silverwind <me@silverwind.io>
2024-12-12 18:37:44 +00:00
wxiaoguang
1e751d81b3
Fix JS error when dropping a file to a editor without dropzone (#32804)
`dropzoneEl` may not exist
2024-12-12 12:37:25 +08:00
wxiaoguang
17f0411441
Fix clone panel js error (#32798)
side effect of jquery removal, fix #32797
2024-12-12 02:01:20 +00:00