2030 Commits (main)

Author SHA1 Message Date
bytedream 5d6d62493b
Add action auto-scroll ()
Adds an auto-scroll/follow feature to running actions (fix , fix
).

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>
silverwind c0e80dbe26
Enable Typescript `strictFunctionTypes` ()
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`.
wxiaoguang 09a0041965
Fix areYouSure confirm ()
See the comment
wxiaoguang 4774151e53
Improve navbar: add "admin" tip, add "active" style ()
By the way, remove all "tw-" patches and unused styles.
Tim 7580bd98c1
show warning on navigation if currently editing comment or title ()
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>
silverwind 141d782c1a
Refactor repo-projects.ts ()
- 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>
silverwind 857abed3a9
Move RepoBranchTagSelector init outside the SFC ()
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.
wxiaoguang 2d7e6e9482
Fix various trivial problems ()
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>
wxiaoguang d28a4843b8
Fix incomplete Actions status aggregations ()
fix 
silverwind c8ea41b049
Fix remaining typescript issues, enable `tsc` ()
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>
silverwind 74b06d4f5c
Repo file list enhancements ()
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>
silverwind df9a78cd04
Tweak repo sidebar ()
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>
silverwind 1a07ebe549
Fix overflow on org header ()
wxiaoguang cc5ff98e0d
Refactor markdown math render ()
Add more tests
silverwind bed563e574
Improve JSX/TSX support in code editor ()
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"
/>
wxiaoguang 5bc030efa2
Fix various UI bugs ()
hiifong 30008fcfcf
Fix bug of branch/tag selector in the issue sidebar ()
Fix: 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Lunny Xiao 6370d2fb93
Detect whether action view branch was deleted ()
Fix  

![图片](https://github.com/user-attachments/assets/a5a7eef8-0fea-4242-b199-1b0b73d9bbdb)
Chai-Shi c9487a755b
Add "n commits" link to contributors in contributors graph page ()
Fixes Issue  and inherit PR 

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

---------

Co-authored-by: Ben Chang <ben_chang@htc.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang 00e2b339b6
Fix "unicode escape" JS error ()
<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>
wxiaoguang 1e751d81b3
Fix JS error when dropping a file to a editor without dropzone ()
`dropzoneEl` may not exist
wxiaoguang 17f0411441
Fix clone panel js error ()
side effect of jquery removal, fix 
wxiaoguang 4814f43af7
Fix repo home file list ()
1. use grid instead of table, completely drop "ui table" from that list
2. move some "commit sign" related styles into a new file by the way (no
change) because I need to figure out where `#repo-files-table` is used.
3. move legacy "branch/tag selector" related code into repo-legacy.ts,
now there are 13 `import $` files left.
Blender Defender 18061af490
Rearrange Clone Panel ()
Rearrange the clone panel to use less horizontal space.
The following changes have been made to achieve this:
- Moved everything into the dropdown menu
- Moved the HTTPS/SSH Switch to a separate line
- Moved the "Clone in VS Code"-Button up and added a divider
- Named the dropdown button "Code", added appropriate icon

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
silverwind 8a53a39c42
Fix a number of typescript errors ()
Fixes 96 typescript errors. Behaviour changes are commented below.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang e619384098
Add label/author/assignee filters to the user/org home issue list ()
Replace , fix 

Not perfect, but usable and much better than before. Since it is quite
complex, I am not quite sure whether there would be any regression, if
any, I will fix in first time.

I have tested the related pages many times: issue list, milestone issue
list, project view, user issue list, org issue list.
silverwind d061f6b70a
Change typescript `module` to `nodenext` ()
Typescript 5.7 changed semantics around JSON imports and `nodenext` is
now [treated
differently](https://devblogs.microsoft.com/typescript/announcing-typescript-5-7-beta/#validated-json-imports-in---module-nodenext)
than `node16` for JSON imports and it requires the import attribute, so
change the value to that and add the attribute to eliminate this
typescript error.


[`moduleResolution`](https://www.typescriptlang.org/tsconfig/#moduleResolution)
is treated as an alias when `module` is `nodenext`, so we don't need to
specify it.

Also see https://github.com/microsoft/TypeScript/issues/60589. It
appears the next Typescript release will fix this for `node16`, but I
guess it'll still be good to switch to `nodenext`.
wxiaoguang 90d20be541
Refactor issue filter (labels, poster, assignee) ()
Rewrite a lot of legacy strange code, remove duplicate code, remove
jquery, and make these filters reusable.

Let's forget the old code, new code affects: 

* issue list open/close switch
* issue list filter (label, author, assignee)
* milestone list open/close switch
* milestone issue list filter (label, author, assignee)
* project view (label, assignee)
wxiaoguang 1b069dc94a
Make RepoActionView.vue support `##[group]` ()
silverwind 57a5e9acf8
Make Monaco theme follow browser, fully type codeeditor.ts ()
1. Monaco's theme now follows changes in dark/light mode setting, this
works via
[`MediaQueryList`](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList)'s
[change
event](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/change_event).
2. Fully type the file, it now passes typescript strict mode.
wxiaoguang 5675efb3e0
Fix duplicate dropdown dividers ()
Fix 

The problem is that any item in the menu could be hidden, pure CSS won't
work, and dropdown's builtin "hideDividers" doesn't work with our "scope
dividers". The newly introduced "archived" label makes the dividers
regression more.
yp05327 2d13eafd69
Remove unnecessary border in repo home page sidebar ()
wxiaoguang 23471e1333
Refactor issue list ()
1. add backend support for filtering "poster" and "assignee"
    * due to the limits, there is no frontend support at the moment
2. rewrite TS code without jquery, now there are 14 jQuery files left:
metiftikci ad994780af
fix: render job title as commit message ()
resolves 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
silverwind 1518f4ed12
Fix typescript errors in Vue files, fix regression in "Recent Commits" chart ()
- Fix all typescript errors in `.vue` files
- Fix regression from https://github.com/go-gitea/gitea/pull/32329 where
"Recent Commits" chart would not render.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang 96d3a03a08
Refactor LabelEdit ()
And fix a regression:
https://github.com/go-gitea/gitea/pull/30053#discussion_r1874405470

Major changes:

* rewrite without jquery
* remove the "delete modal", using "link-action" is good enough
* merge "new modal" and "edit modal"
yp05327 faf5705d29
GitHub like repo home page ()
Move some components (description, license, release, language stats) to sidebar

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang f7f68e4cc0
Refactor RepoActionView.vue, add `::group::` support ()
1. make it able to "force reload", then the previous pending request
won't block the new request
2. make it support `::group::`
3. add some TS types (but there are still many variables untyped, this
PR is large enough, the remaining types could be added in the future)
Illya Marchenko 936665bf85
Issue time estimate, meaningful time tracking ()
Redesign the time tracker side bar, and add "time estimate" support (in "1d 2m" format)

Closes 

---------

Co-authored-by: stuzer05 <stuzer05@gmail.com>
Co-authored-by: Yarden Shoham <hrsi88@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
KN4CK3R 0c3c041c88
Add Arch package registry ()
Close 
Close 

This PR adds a Arch package registry usable with pacman.

![grafik](https://github.com/user-attachments/assets/81cdb0c2-02f9-4733-bee2-e48af6b45224)

Rewrite of  and . You can follow [this
tutorial](https://wiki.archlinux.org/title/Creating_packages) to build a
package for testing.

Docs PR: https://gitea.com/gitea/docs/pulls/111

Co-authored-by: [d1nch8g@ion.lc](mailto:d1nch8g@ion.lc)
Co-authored-by: @ExplodingDragon

---------

Co-authored-by: dancheg97 <dancheg97@fmnx.su>
Co-authored-by: dragon <ExplodingFKL@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang 838653d1df
Fix file editor & preview ()
Fix a regression caused by jQuery removal (`renderPreviewPanelContent`)

And simplify the file editor, it doesn't need to be that complex. And
remove jQuery code.
wxiaoguang c9e582c6b6
Refactor markdown editor and use it for milestone description editor ()
Refactor markdown editor to clarify its "preview" behavior and remove
jQuery code.

Close 

---------

Co-authored-by: silverwind <me@silverwind.io>
yp05327 690d07470c
Fix word overflow in file search page ()
Kerwin Bryant 576e31ae3b
Add "View all branches/tags" entry to Branch Selector ()
![image](https://github.com/user-attachments/assets/7b62a38f-36d5-452a-8a97-204842c68b2e)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang 13fbab5cf4
Remove all "floated" CSS styles ()
flex but don't float

diff with ignoring spaces :
https://github.com/go-gitea/gitea/pull/32691/files?diff=split&w=1

related pages:

### admin users

![image](https://github.com/user-attachments/assets/40dd4c46-3f5b-4a68-89b0-d0a9a806f1fc)

### milestone

![image](https://github.com/user-attachments/assets/e3efb630-f07c-4c9d-b877-71e28cddcdce)

### user account setting

![image](https://github.com/user-attachments/assets/d15609ee-016d-4aee-999a-b5455fe6185c)
wxiaoguang e3e32605a1
Refactor RepoBranchTagSelector ()
wxiaoguang 1bb1a51f47
Fix JS error when reply comment on Conversation page ()
Fix , regression of  (side-effect of jQuery removal: jQuery could tolerate non-existing elements)
And fix another regression bug from  (initCompReactionSelector double-init)
silverwind a1f56f83bf
Improve diff file tree ()
- Unfolded directories now show a "open" icon
- Prevent accidential text selection while toggling directories
- Increase vertical item padding from 3px to 6px

<img width="257" alt="image"
src="https://github.com/user-attachments/assets/d5372306-a666-4732-827e-3ddeee3c711e">
Kerwin Bryant 68d9f36543
Allow cropping an avatar before setting it ()
Provide a cropping tool on the avatar editing page, allowing users to
select the cropping area themselves. This way, users can decide the
displayed area of the image, rather than us deciding for them.

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
wxiaoguang 5a50b271e7
Make frontend unit test code could know it is in testing ()
See the comment of isInFrontendUnitTest
6543 846f618716
Add priority to protected branch ()
## Solves

Currently for rules to re-order them you have to alter the creation
date. so you basicly have to delete and recreate them in the right
order. This is more than just inconvinient ...

## Solution

Add a new col for prioritization

## Demo WebUI Video

https://github.com/user-attachments/assets/92182a31-9705-4ac5-b6e3-9bb74108cbd1


---
*Sponsored by Kithara Software GmbH*
silverwind 3fc1bbe971
Regenerate fomantic package-lock.json ()
Fixes: https://github.com/go-gitea/gitea/security/dependabot/83
Fixes: https://github.com/go-gitea/gitea/security/dependabot/84

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang 6e507c45ed
Fix global form submit event ()
hiifong 87bb5ed0bc
Fix: passkey login not working anymore ()
Quick fix , use authenticator auth flags to login

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang 0f4b0cf892
Refactor some frontend problems ()
1. correct the modal usage on "admin email list" page (then
`web_src/js/features/admin/emails.ts` is removed)
2. use `addDelegatedEventListener` instead of `jQuery().on`
3. more jQuery related changes and remove jQuery from
`web_src/js/features/common-button.ts`
4. improve `confirmModal` to make it support header, and remove
incorrect double-escaping
5. fix more typescript related types
6. fine tune devtest pages and add more tests
wxiaoguang 722e703c6b
Bypass vitest bug ()
william-allspice 88f5d33ab2
Fix race condition in mermaid observer ()
This Pull Request addresses a race condition in the updateIframeHeight
function where it is sometimes called when the iframe is not fully
loaded or accessible resulting in an alarming error message for the
user.

To address this we:
1. Add defensive programming within the updateIframeHeight function
2. Delay instantiating the intersection observer until the iframe has
loaded

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Kerwin Bryant 25cacaf0aa
Fixed Issue of Review Menu Shown Behind ()
Fixed  

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang e90753a712
Fix PR diff review form submit ()
Fix , there is a longstanding bug in , 
it doesn't handle submit event, correctly.
silverwind 675c288811
Fix some typescript issues ()
Fixes around 30 or so typescript errors. No runtime changes.
wxiaoguang 07373f1d5d
Improve issue sidebar UI ()
1. remove duplicate dividers
2. align reviewer items
3. merge & remove unused CSS styles


Before:

<details>


![image](https://github.com/user-attachments/assets/1b3121ee-b5fa-4fe9-b0f2-344d96dc5fbc)


![image](https://github.com/user-attachments/assets/ba8b97e6-114d-488c-adee-48f6c7a3b580)

</details>

After:

<details>


![image](https://github.com/user-attachments/assets/978eab3e-a5d7-4b68-90ce-079b61994d25)


![image](https://github.com/user-attachments/assets/a8b58a27-dd05-4c8d-be60-816439ce77c6)


![image](https://github.com/user-attachments/assets/b7e6a16c-bf98-4465-a805-9f4a642d366e)

</details>
a1012112796 23d0f9083e
make search box in issue sidebar dropdown list always show when scrolling ()
as title, replace  after  

---------

Signed-off-by: a1012112796 <1012112796@qq.com>
Lunny Xiao 896314c7a2
Fix some places which doesn't repsect org full name setting ()
Partially fix 
charles e546480d0a
Fix large image overflow in comment page ()
Close  

52px is calculate by avatar size in
templates\repo\issue\view_content\comments.tmpl
```html
<img src="{{.Poster.AvatarLink $.Context}}" width="40" height="40">
```
+
```css
.ui.comments .comment > .avatar ~ .content {
  margin-left: 12px;
}
```


![圖片](https://github.com/user-attachments/assets/bf15f4d4-1574-46f6-9f5e-1fbdbf1a98b0)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang 6f1de0a9e5
Add avif image file support ()
Most modern browsers support it now

` Update ALLOWED_TYPES  ` https://gitea.com/gitea/docs/pulls/96

---------

Co-authored-by: silverwind <me@silverwind.io>
wxiaoguang 249e67672a
Remove jQuery import from some files ()
Many files do not directly depend on jQuery now.

To clarify the usage: use `fomanticQuery` to operate Fomantic
components.

Then developers could focus on removing the remaining jQuery usages by
searching `import $` globally.

21 files now:

```
./components/RepoBranchTagSelector.vue:3:import $ from 'jquery';
./features/admin/common.ts:1:import $ from 'jquery';
./features/admin/emails.ts:1:import $ from 'jquery';
./features/common-button.ts:1:import $ from 'jquery';
./features/comp/ComboMarkdownEditor.ts:3:import $ from 'jquery'; (I am working on it, there will be a new PR)
./features/comp/LabelEdit.ts:1:import $ from 'jquery';
./features/notification.ts:1:import $ from 'jquery';
./features/org-team.ts:1:import $ from 'jquery';
./features/repo-code.ts:1:import $ from 'jquery';
./features/repo-common.ts:1:import $ from 'jquery';
./features/repo-diff.ts:1:import $ from 'jquery';
./features/repo-editor.ts:1:import $ from 'jquery';
./features/repo-issue-content.ts:1:import $ from 'jquery';
./features/repo-issue-list.ts:1:import $ from 'jquery';
./features/repo-issue-sidebar.ts:1:import $ from 'jquery';
./features/repo-issue.ts:1:import $ from 'jquery';
./features/repo-legacy.ts:1:import $ from 'jquery';
./features/repo-new.ts:1:import $ from 'jquery';
./features/repo-projects.ts:1:import $ from 'jquery';
./features/repo-settings.ts:1:import $ from 'jquery';
./features/repo-template.ts:1:import $ from 'jquery';
```
wxiaoguang 3f9c3e7bc3
Refactor render system ()
There were too many patches to the Render system, it's really difficult
to make further improvements.

This PR clears the legacy problems and fix TODOs.

1. Rename `RenderContext.Type` to `RenderContext.MarkupType` to clarify
its usage.
2. Use `ContentMode` to replace `meta["mode"]` and `IsWiki`, to clarify
the rendering behaviors.
3. Use "wiki" mode instead of "mode=gfm + wiki=true"
4. Merge `renderByType` and `renderByFile`
5. Add more comments

----

The problem of "mode=document": in many cases it is not set, so many
non-comment places use comment's hard line break incorrectly
silverwind f35e2b0cd1
Fix a number of typescript issues ()
Fixes 69 typescript errors found in the `admin` and `markup` folders.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
wxiaoguang a928739456
Refactor sidebar assignee&milestone&project selectors ()
Follow 

Now the code could be much clearer than before and easier to maintain. A
lot of legacy code is removed.

Manually tested.

This PR is large enough, that fine tunes could be deferred to the future if
there is no bug found or design problem.

Screenshots:

<details>

![image](https://github.com/user-attachments/assets/35f4ab7b-1bc0-4bad-a73c-a4569328303c)

</details>
wxiaoguang 58c634b854
Refactor sidebar label selector ()
Introduce `issueSidebarLabelsData` to handle all sidebar labels related data.
silverwind b55a31eb6a
Fix mermaid diagram height when initially hidden ()
In a hidden iframe, `document.body.clientHeight` is not reliable. Use
`IntersectionObserver` to detect the visibility change and update the
height there.

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

<img width="885" alt="image"
src="https://github.com/user-attachments/assets/a95ef6aa-27e7-443f-9d06-400ef27919ae">
Calvin K 18aeca5320
Add reviewers selection to new pull request ()
Users could add reviewers when creating new PRs.

---------

Co-authored-by: splitt3r <splitt3r@users.noreply.github.com>
Co-authored-by: Sebastian Sauer <sauer.sebastian@gmail.com>
Co-authored-by: bb-ben <70356237+bboerben@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang d80f99ef04
Fix issue sidebar ()
Fix 

Major changes:

* revert the `<div class="divider"></div>` in
`templates/repo/issue/branch_selector_field.tmpl` (it was removed by
mistake in ##32444)
* remove incorrect `<div class="inline field">` in
`templates/repo/issue/sidebar/allow_maintainer_edit.tmpl`
* use `gt-ellipsis` to replace the "title" class in the dependency list,
then `.repository .issue-content-right .ui.list .title` could be removed
* remove the "relaxed" from dependency list, then there is no padding,
then `.repository .issue-content-right .ui.list .dependency` could be
removed (`white-space` doesn't have effect either because there is
`gt-ellipsis`)
* remove dead code `.repository .issue-content-right #deadlineForm input
`

The fixed UI should be the same as before.
wxiaoguang 0f397ae09b
Refactor language menu and dom utils ()
1. Make `queryElem*` functions could correctly handle TS types
2. Remove some legacy jQuery $ calls (introduce fomanticQuery for Fomantic UI only)
3. Fix some TS typing problems
wxiaoguang 623a2d41cc
Refactor issue page info ()
Fix a longstanding TODO since 2021 () / 2018 ()
wxiaoguang 145e266987
Support quote selected comments to reply ()
Many existing tests were quite hacky, these could be improved later.

<details>

![image](https://github.com/user-attachments/assets/93aebb4f-9de5-4cb8-910b-50c64cbcd25a)

</details>
wxiaoguang b573512312
Correctly query the primary button in a form ()
The "primary button" is used at many places, but sometimes they might
conflict (due to button switch, hidden panel, dropdown menu, etc).

Sometimes we could add a special CSS class for the buttons, but
sometimes not (see the comment of QuickSubmit)

This PR introduces `querySingleVisibleElem` to help to get the correct
primary button (the only visible one), and prevent from querying the
wrong buttons.

Fix 

---------

Co-authored-by: silverwind <me@silverwind.io>
Lunny Xiao 24b83ff63e
Fix milestone deadline and date related problems ()
Use zero instead of 9999-12-31 for deadline
Fix 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
wxiaoguang af28ce59b8
Add some handy markdown editor features ()
There were some missing features from EasyMDE:

1. H1 - H3 style
2. Auto add task list
3. Insert a table

And added some tests
wxiaoguang f2a6df03d9
Refactor repo legacy ()
Only move code, no unnecessary logic change. (There are many problems in
old code, but changing them is not in this PR's scope)

Co-authored-by: Giteabot <teabot@gitea.io>
silverwind 8107823026
Fix a number of typescript issues ()
- Prefer
[window.location.assign](https://developer.mozilla.org/en-US/docs/Web/API/Location/assign)
over assigning to
[window.location](https://developer.mozilla.org/en-US/docs/Web/API/Window/location)
which typescript does not like. This works in all browsers including
PaleMoon.
- Fix all typescript issues in `web_src/js/webcomponents`, no behaviour
changes.
- ~~Workaround bug in `@typescript-eslint/no-unnecessary-type-assertion`
rule.~~
- Omit vendored file from type checks.
- `tsc` error count is reduce by 53 with these changes.
silverwind 9914c9ab08
Update JS and PY dependencies ()
- Update all JS dependencies excluding stylelint (because of
https://github.com/AndyOGo/stylelint-declaration-strict-value/issues/379).
- Update all PY dependencies.
- Replace `eslint-plugin-deprecation` with
`@typescript-eslint/no-deprecated` rule.
- Enabled `unicorn/prefer-math-min-max` and autofixed issues.
- Tested all dependencies.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang a4a121c684
Fix suggestions for issues ()
wxiaoguang aee9801d46
Fix toAbsoluteLocaleDate and add more tests ()
wxiaoguang ce4d909bd6
Fix absolute-date ()
cloudchamb3r f938dbc9b5
Fix undefined errors on Activity page ()
close 

Co-authored-by: Giteabot <teabot@gitea.io>
Anbraten b7fb20e73e
Suggestions for issues ()
closes 
Anbraten 348d1d0f32
Migrate vue components to setup ()
Migrated a handful Vue components to the `setup` syntax using
composition api as it has better Typescript support and is becoming the
new default in the Vue ecosystem.

- [x] ActionRunStatus.vue    
- [x] ActivityHeatmap.vue
- [x] ContextPopup.vue       
- [x] DiffFileList.vue
- [x] DiffFileTree.vue       
- [x] DiffFileTreeItem.vue    
- [x] PullRequestMergeForm.vue
- [x] RepoActivityTopAuthors.vue  
- [x] RepoCodeFrequency.vue
- [x] RepoRecentCommits.vue
- [x] ScopedAccessTokenSelector.vue

Left some larger components untouched for now to not go to crazy in this
single PR:
- [ ] DiffCommitSelector.vue  
- [ ] RepoActionView.vue
- [ ] RepoContributors.vue
- [ ] DashboardRepoList.vue  
- [ ] RepoBranchTagSelector.vue
yp05327 7cf611d197
Fix broken image when editing comment with non-image attachments ()
Fix 
박상철 620f19610e
Prevent from submitting issue/comment on uploading ()
fix 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
Zettat123 9206fbb55f
Add `DISABLE_ORGANIZATIONS_PAGE` and `DISABLE_CODE_PAGE` settings for explore pages and fix an issue related to user search ()
These settings can allow users to only display the repositories explore page.

Thanks to yp05327 and wxiaoguang !

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang 0196b3583a
Warn users when they try to use a non-root-url to sign in/up ()
cloudchamb3r 603fca1e27
Fix null errors on conversation holder () ()
fix 

Errors in the issue was due to unhandled null check. so i fixed it.

### Detailed description for Issue & Fix
To reproduce that issue, the comment must be deleted on Conversation
tab.
#### Before Delete
<img width="1032" alt="image"
src="https://github.com/user-attachments/assets/72df61ba-7db6-44c9-bebc-ca1178dd27f1">

#### After Delete (AS-IS)
<img width="1010" alt="image"
src="https://github.com/user-attachments/assets/36fa537e-4f8e-4535-8d02-e538c50f0dd8">

gitea already have remove logic for `timeline-item-group`, but because
of null ref exception the later logic that removes `timeline-item-group`
could be not be called correctly.
a1012112796 c4b2808b89
make `show stats` work when only one file changed ()
fix https://github.com/go-gitea/gitea/issues/32226

in https://github.com/go-gitea/gitea/pull/27775 , it do some changes to
only show diff file tree when more than one file changed. But looks it
also break the `diff-file-list` logic, which looks not expected change.
so try fix it.

/cc @silverwind 

example view:

![image](https://github.com/user-attachments/assets/281e9c4f-a269-4d36-94eb-a132058aea87)

Signed-off-by: a1012112796 <1012112796@qq.com>
charles 6fced33581
Fix dropdown content overflow ()
close  

![圖片](https://github.com/go-gitea/gitea/assets/30816317/43722917-bc5e-4e06-b0de-db52552a20df)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
cloudchamb3r cb739f5333
Fix checkbox bug on private/archive filter ()
fix 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Lunny Xiao c2217670dd
Move admin routers from /admin to /-/admin ()
Resolve 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
cloudchamb3r 2e12343fc4
Add null check for responseData.invalidTopics ()
<img width="553" alt="Screenshot 2024-10-08 at 10 49 10 AM"
src="https://github.com/user-attachments/assets/faeef64d-684a-4aba-b7fc-c7c6a0301abe">

`responseData.invalidTopics` can be null but it wasn't handled.
Lunny Xiao a989404e23
Fix javascript error when an anonymous user visiting migration page ()
This PR fixes javascript errors when an anonymous user visits the
migration page.
It also makes task view checking more restrictive.

The router moved from `/user/task/{id}/status` to
`/username/reponame/-/migrate/status` because it's a migrate status.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
charles 3269b04d61
Notify the user when the file path contains leading or trailing spaces and fix the error message for invalid file names. ()
close