Commit Graph

496 Commits (e65f69f52ef14f8ee7b98d15384975aed1bfd295)

Author SHA1 Message Date
Jason Song e65f69f52e
Merge branch 'main' into feature/bots 2023-01-10 15:18:48 +07:00
Lunny Xiao 50f67d7e38
Don't display stop watch top bar icon when disabled and hidden when click other place (#22374)
Fix #22286 

When timetracking is disabled, the stop watch top bar icon should be
hidden.
When the stop watch recording popup, it should be allowed to hide with
some operation. Now click any place on this page will hide the popup
window.
2023-01-09 21:53:11 +07:00
Jason Song fc1d24368e
chore: remove fetchMockData 2023-01-06 16:32:57 +07:00
Jason Song 60173297aa
chore: lint codes 2023-01-05 12:14:56 +07:00
Jason Song b884772652
Apply suggestions from code review
Co-authored-by: delvh <dev.lh@web.de>
2023-01-05 11:59:32 +07:00
Jason Song d33e9fc11c
chore: sort svgs 2023-01-04 18:52:21 +07:00
Jason Song 1f48a9ad6f
fix: check if can_cancel and can_rerun 2022-12-28 18:18:11 +07:00
Jason Song 567996d06a
Merge branch 'main' into feature/bots 2022-12-26 10:30:37 +07:00
silverwind f5cd0d9319
Add Mermaid copy button, avoid unnecessary tooltip hide (#22225)
- Add Copy button to mermaid diagrams which copies their source.
- Set tippy to not hide on click and avoid tooltip re-creation for
temporary tooltips. This avoids hide and show when copying repo url.
Popovers still hide the tooltip as usual.


<img width="815" alt="Screenshot 2022-12-23 at 14 02 32"
src="https://user-images.githubusercontent.com/115237/209341696-98e30953-f246-46d9-9157-2ececfd791c9.png">

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2022-12-25 18:17:48 +07:00
silverwind 2cf0cf0de1
JS refactors (#22227)
- Replace all default exports with named exports, except for Vue SFCs
- Remove names from Vue SFCs, they are automatically inferred from the
filename
- Misc whitespace-related tweaks
2022-12-24 00:03:11 +07:00
Jason Song d183b32aa8
Merge branch 'main' into feature/bots 2022-12-22 12:00:41 +07:00
MisterCavespider c403e2f1cf
Fixed colour transparency regex matching in project board sorting (#22091) (#22092)
As described in the linked issue (#22091), semi-transparent UI elements
would result in JS errors due to the fact that the CSS `backgroundColor`
element was being matched by the pattern
`^rgb\((\d+),\s*(\d+),\s*(\d+)\)$`, which does not take the alpha
channel into account.

I changed the pattern to `^rgba?\((\d+),\s*(\d+),\s*(\d+).*\)$`.
This new pattern accepts both `rgb` and `rgba` tuples, and ignores the
alpha channel (that little `.*` at the end) from the sorting criteria.
The reason why I chose to ignore alpha is because when it comes to
kanban colour sorting, only the hue is important; the order of the
panels should stay the same, even if some of them are transparent.

Alternative solutions were discussed in the bug report and are included
here for completeness:
1. Change the regex from ^rgb\((\d+),\s*(\d+),\s*(\d+)\)$ to
^rgba?\((\d+),\s*(\d+),\s*(\d+)(,\s*(\d+(\.\d+)?))?\)$ (alpha channel is
a float or NaN on 5th group) and include the alpha channel in the
sorting criteria.
2. Rethink on why you're reading colours out of the CSS in the first
place, then reformat this sorting procedure.

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-12-21 20:19:04 +07:00
Nathaniel Sabanski 8e267afd35
Mobile fix for Project view: Add delay to Sortable.js on mobile, to ensure scrolling is possible. (#22152)
Mobile / touch devices currently get "hung up" on the sortable action,
preventing any ability to visually scroll through the Project board to
see issues.

Solution: Sortable.js has a built-in fix using `delayOnTouchOnly`

BEFORE

https://user-images.githubusercontent.com/24665/208266817-6f2968b7-4788-4656-a941-f85b25fc59d5.mp4

AFTER

https://user-images.githubusercontent.com/24665/208266822-3d327002-7a9d-41cf-9890-6d6b8dcb17be.mp4

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-12-20 23:56:58 +07:00
silverwind 2774671584
Fix heatmap first color being unused (#22157)
vue3-calendar-heatmap has the behaviour that the first and second colors
are mapped to values null and 0, meaning the second color was not used
as intended for values > 0. I think this is a behaviour change from
previous vue2 version that was missed during the upgrade.

This change makes first and second values the same, so the heatmap can
now use one additional color for meaningful values.

Before:
<img width="710" alt="Screenshot 2022-12-18 at 09 17 58"
src="https://user-images.githubusercontent.com/115237/208288347-df4973af-8ebd-4582-b828-bec948ffdf60.png">

After:
<img width="709" alt="Screenshot 2022-12-18 at 09 18 15"
src="https://user-images.githubusercontent.com/115237/208288350-e0b85aa2-6925-4a37-83d2-89e2518c91ce.png">

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-12-19 16:14:49 +07:00
Jason Song 825b838b81
fix: margin 2022-12-19 18:38:13 +07:00
Jason Song dfa1b6168d
Merge branch 'main' into feature/bots 2022-12-12 10:46:13 +07:00
Felipe Leopoldo Sologuren Gutiérrez 097d4e30b1
Change ID pattern of raw content container for issue (#21966)
Implement differentiation to html id for issue raw content container.

Fixes #21965
2022-12-10 00:25:32 +07:00
Jason Song 901914e34b
feat: move summary to header 2022-12-09 16:14:45 +07:00
Jason Song 9b6b848311
fix: layout 2022-12-09 15:47:58 +07:00
Jason Song 10ebbeca2f
chore: rename to action 2022-12-09 15:29:26 +07:00
Jason Song 49143952fa
fix: remove timestamp 2022-12-08 18:08:17 +07:00
Jason Song d4842ac45b
chore: resolve conflict 2022-12-02 22:23:18 +07:00
Jason Song 3dc5547775
Merge branch 'main' into feature/bots 2022-12-02 21:05:31 +07:00
silverwind d64063277d
Multiple improvements for comment edit diff (#21990)
- Use explicit avatar size so when JS copies the HTML, the size gets
copied with it
- Replace icon font use with SVG
- Improve styling and diff rendering
- Sort lists in `svg.js`

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

<img width="933" alt="Screenshot 2022-11-30 at 17 52 17"
src="https://user-images.githubusercontent.com/115237/204859608-f322a8f8-7b91-45e4-87c0-82694e574115.png">

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-12-02 11:42:34 +07:00
Jason Song 66b558017f
Merge branch 'main' into feature/bots 2022-11-28 17:23:53 +07:00
silverwind 5f38acd9a0
Fix markdown anchor re-clicking (#21931)
The hashchange event did not fire on re-click of a active anchor.
Instead, use the click event which always fires.

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

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2022-11-26 19:15:44 +07:00
zeripath d7f12af805
Prevent NPE if trying to restore an already restored deleted branch (#21940)
If a deleted-branch has already been restored, a request to restore it
again will cause a NPE. This PR adds detection for this case, but also
disables buttons when they're clicked in order to help prevent
accidental repeat requests.

Fix #21930

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-11-25 20:58:20 +07:00
Jason Song 6af809d0bd
chore: lint front 2022-11-25 22:27:34 +07:00
Jason Song 736275f0b1 feat: support cancel button 2022-11-25 17:48:48 +07:00
Jason Song f3a9a25682 fix: remove build view header 2022-11-25 17:48:47 +07:00
Jason Song 706aed2ba6 fix: update color of rerun button 2022-11-25 17:48:47 +07:00
Jason Song 0b62e1da74 feat: rerun jobs 2022-11-25 17:48:47 +07:00
wxiaoguang 37224e2441 fix ui 2022-11-25 17:48:47 +07:00
Jason Song 64eb15b73c fix: show block icon 2022-11-25 17:48:47 +07:00
Jason Song 465c348922 fix: show blocked jobs 2022-11-25 17:48:47 +07:00
wxiaoguang ea5e769428 fix build view ui 2022-11-25 17:48:46 +07:00
Jason Song 3d4d44dadf fix: use index of run 2022-11-25 17:48:46 +07:00
wxiaoguang e6ad1b3233 make RepoBuildView loadJobData work correctly, avoid concurrency requests. 2022-11-25 17:48:45 +07:00
Jason Song 15db111df1 fix: avoid multiplue fetching 2022-11-25 17:48:45 +07:00
wxiaoguang bc6a2b2374 fix RepoBuildView loadJobData 2022-11-25 17:48:45 +07:00
Jason Song 1cba52376a feat: use run id and job id in page view 2022-11-25 17:48:45 +07:00
Jason Song d320eb66f4 feat: fetch job data 2022-11-25 17:48:45 +07:00
wxiaoguang c73dbab6e5 fix 2022-11-25 17:48:44 +07:00
wxiaoguang c623e9a279 view logs 2022-11-25 17:48:44 +07:00
wxiaoguang 9193b72d17 view logs 2022-11-25 17:48:44 +07:00
wxiaoguang b54fc6aacb view logs 2022-11-25 17:48:44 +07:00
wxiaoguang 0abbc2b50f log color 2022-11-25 17:48:44 +07:00
wxiaoguang 3e9022c9f0 view logs 2022-11-25 17:48:44 +07:00
wxiaoguang 7ba22b740f view logs 2022-11-25 17:48:44 +07:00
wxiaoguang 4f2330623e view logs 2022-11-25 17:48:44 +07:00