Commit Graph

2021 Commits (main)

Author SHA1 Message Date
silverwind 05e9063013
Update `@github/text-expander-element`, adapt type imports (#33449)
Followup to https://github.com/go-gitea/gitea/pull/33435, upstream issue
is fixed so the imports are clean now.
3 hours ago
wxiaoguang b57d9f41d4
Fix issue sidebar dropdown keyboard support (#33447)
Just a quick fix, fix #33444
7 hours ago
silverwind dc7ddaee2a
Update `@github/text-expander-element` to 2.9.0 (#33435)
Update and use their newly exported types. Tested, works.

The import path is a bit suboptimal, to be fixed once
https://github.com/github/text-expander-element/pull/75 is merged and
released.

Co-authored-by: Giteabot <teabot@gitea.io>
1 day ago
wxiaoguang 182e3896bf
Fix flex width (#33414)
Fix #33409
4 days ago
silverwind 9875f9b9b8
Clone button enhancements (#33362)
- Add box-shadow to default tippy theme
- Make colors for tabs match the ones from `.ui.tabular.menu`
- Remove tippy arrow and slightly offset tooltip closer to the button
- Fix setting of `aria-haspopup` when default role is used with tippy

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
4 days ago
wxiaoguang e663c4a7f0
Fix issue suggestion bug (#33389)
Fix #33388
5 days ago
wxiaoguang 6a516a0d14
Do not show unnecessary commit sign lock icon (#33387)
Fix #33385
6 days ago
wxiaoguang 7da8a01d39
Fix js error when edit issue (#33384) 6 days ago
silverwind 642e8c1122
Repo homepage styling tweaks (#33289)
Reduce it to a value that results in `.repo-home-sidebar-top` and
`.repo-home-sidebar-bottom` having 240px content width, the same as
GitHub.

Before:
<img width="1333" alt="Screenshot 2025-01-15 at 18 28 34"
src="https://github.com/user-attachments/assets/cf0fa21b-87be-40e3-a6cd-26d146bce9cc"
/>

After:
<img width="1330" alt="Screenshot 2025-01-15 at 18 28 27"
src="https://github.com/user-attachments/assets/28acd837-10f4-4176-b8a0-510cd28c8b8d"
/>
7 days ago
Typed SIGTERM 9e028d8d57
Fix comment header padding (#33377) 7 days ago
silverwind c7f4ca2653
Enable Typescript `noImplicitAny` (#33322)
Enable `noImplicitAny` and fix all issues.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 week ago
wxiaoguang 2cb3946496
Make issue suggestion work for all editors (#33340)
And do not handle special keys when the text-expander popup exists
1 week ago
Vladimir Sysoev dc2308a959
Make tracked time representation display as hours (#33315)
Estimated time represented in hours it might be convenient to
have tracked time represented in the same way to be compared and
managed.

---------

Co-authored-by: Sysoev, Vladimir <i@vsysoev.ru>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 weeks ago
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
2 weeks ago
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
2 weeks ago
wxiaoguang 6659a381ea
Fix closed dependency title (#33285)
Fix #33283
2 weeks ago
wxiaoguang c0751ef116
Fix upload file form (#33230)
Fix #33228
3 weeks ago
wxiaoguang 9024b79933
Remove unused CSS styles and move some styles to proper files (#33217) 3 weeks ago
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>
3 weeks ago
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`.
3 weeks ago
wxiaoguang 9c00e065a1
Fix form width (#33151)
Fix #33150
3 weeks ago
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
3 weeks ago
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>
3 weeks ago
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.
3 weeks ago
wxiaoguang ef736b7e27
Refactor legacy JS (#33115) 4 weeks ago
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)
4 weeks ago
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
4 weeks ago
wxiaoguang 68972a9947
Clean up legacy form CSS styles (#33081) 4 weeks ago
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`
4 weeks ago
wxiaoguang 85c756e279
Refactor pull-request compare&create page (#33071)
The old code is unnecessarily complex.
4 weeks ago
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
1 month ago
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>
1 month ago
wxiaoguang c09656e0e0
Make issue suggestion work for new PR page (#33035)
Fix #33026
1 month ago
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
1 month ago
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>
1 month ago
wxiaoguang a92f5057ae
Fix and/or comment some legacy CSS problems (#33015) 1 month ago
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
1 month ago
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)
1 month ago
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>
1 month ago
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>
1 month ago
bytedream 6279646ee4
Add auto-expanding running actions step (#30058)
Auto-expands the currently running action step.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 month ago
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>
1 month ago
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`.
1 month ago
wxiaoguang 09a0041965
Fix areYouSure confirm (#32941)
See the comment
1 month ago
wxiaoguang 4774151e53
Improve navbar: add "admin" tip, add "active" style (#32927)
By the way, remove all "tw-" patches and unused styles.
1 month ago
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>
1 month ago
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>
1 month ago
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.
1 month ago
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>
2 months ago
wxiaoguang d28a4843b8
Fix incomplete Actions status aggregations (#32859)
fix #32857
2 months ago