Commit Graph

73 Commits

Author SHA1 Message Date
fc1d24368e chore: remove fetchMockData 2023-01-06 16:32:57 +08:00
60173297aa chore: lint codes 2023-01-05 12:14:56 +08:00
b884772652 Apply suggestions from code review
Co-authored-by: delvh <dev.lh@web.de>
2023-01-05 11:59:32 +08:00
1f48a9ad6f fix: check if can_cancel and can_rerun 2022-12-28 18:18:11 +08:00
567996d06a Merge branch 'main' into feature/bots 2022-12-26 10:30:37 +08:00
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 +08:00
d183b32aa8 Merge branch 'main' into feature/bots 2022-12-22 12:00:41 +08:00
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 -05:00
825b838b81 fix: margin 2022-12-19 18:38:13 +08:00
901914e34b feat: move summary to header 2022-12-09 16:14:45 +08:00
9b6b848311 fix: layout 2022-12-09 15:47:58 +08:00
10ebbeca2f chore: rename to action 2022-12-09 15:29:26 +08:00
49143952fa fix: remove timestamp 2022-12-08 18:08:17 +08:00
6af809d0bd chore: lint front 2022-11-25 22:27:34 +08:00
736275f0b1 feat: support cancel button 2022-11-25 17:48:48 +08:00
f3a9a25682 fix: remove build view header 2022-11-25 17:48:47 +08:00
706aed2ba6 fix: update color of rerun button 2022-11-25 17:48:47 +08:00
0b62e1da74 feat: rerun jobs 2022-11-25 17:48:47 +08:00
37224e2441 fix ui 2022-11-25 17:48:47 +08:00
64eb15b73c fix: show block icon 2022-11-25 17:48:47 +08:00
465c348922 fix: show blocked jobs 2022-11-25 17:48:47 +08:00
ea5e769428 fix build view ui 2022-11-25 17:48:46 +08:00
3d4d44dadf fix: use index of run 2022-11-25 17:48:46 +08:00
e6ad1b3233 make RepoBuildView loadJobData work correctly, avoid concurrency requests. 2022-11-25 17:48:45 +08:00
15db111df1 fix: avoid multiplue fetching 2022-11-25 17:48:45 +08:00
bc6a2b2374 fix RepoBuildView loadJobData 2022-11-25 17:48:45 +08:00
1cba52376a feat: use run id and job id in page view 2022-11-25 17:48:45 +08:00
d320eb66f4 feat: fetch job data 2022-11-25 17:48:45 +08:00
c73dbab6e5 fix 2022-11-25 17:48:44 +08:00
c623e9a279 view logs 2022-11-25 17:48:44 +08:00
9193b72d17 view logs 2022-11-25 17:48:44 +08:00
b54fc6aacb view logs 2022-11-25 17:48:44 +08:00
0abbc2b50f log color 2022-11-25 17:48:44 +08:00
3e9022c9f0 view logs 2022-11-25 17:48:44 +08:00
7ba22b740f view logs 2022-11-25 17:48:44 +08:00
4f2330623e view logs 2022-11-25 17:48:44 +08:00
13746f070d feat: add button to quickly clear merge message (#21548)
This PR adds a button to allow quickly clearing the merge message of a
PR. The button will remove everything but the git trailers.

I found myself often pruning the commit message before merging,
especially for PRs generated by renovate - renovate puts a very long and
detailed comment with the full changelog in each PR it opens. This
clutters the commit message. However, I want to explicitly preserve the
git commit trailers. Doing this manually works, but having a button is a
lot easier.

Screenshot:

![image](https://user-images.githubusercontent.com/13721712/197337525-d456d0f8-1f7c-43a9-815d-ca93b1e7a90a.png)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
2022-11-23 18:24:03 +08:00
125e3e3d66 Localize time units on activity heatmap (#21570)
Previously, the months and days were hardcoded into English

* Closes #15541

## Screenshots
### English

![image](https://user-images.githubusercontent.com/20454870/197410352-1b28a637-ce19-41ae-b4e5-27955555b082.png)

### German

![image](https://user-images.githubusercontent.com/20454870/197410455-f243ca84-807f-476e-b8ed-c24e827bfc2d.png)

### Spanish

![image](https://user-images.githubusercontent.com/20454870/197410366-55202ca5-08f9-4152-8f9d-d5eeebd532ef.png)

### Italian

![image](https://user-images.githubusercontent.com/20454870/197410385-75f754dd-e845-4444-8a04-472a8f45b617.png)

### Portuguese
This one has a bit of overflow

![image](https://user-images.githubusercontent.com/20454870/197410414-b91f962e-77e9-4cc7-990b-01c0fc0cbd0b.png)

Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-10-28 09:48:24 -04:00
7044d34ae5 Update JS dependencies and eslint config (#21388)
- Update all JS dependencies and playwright image
- Add new eslint rules, enable a few more, fix issues
- Regenerate SVGs
- Tested Vue and Swagger

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-10-10 20:02:20 +08:00
97f3f1988b Fix typos in PullRequestMergeForm.vue header comment (#21378)
Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
2022-10-09 15:17:01 +08:00
04e97b8311 Refactor from Vue2 to Vue3 (#20044)
Close #19902
2022-10-01 22:26:38 +08:00
31f934c1d8 Add filetree on left of diff view (#21012)
This PR adds a filetree to the left side of the files/diff view.

Initially the filetree will not be shown and may be shown via a new
"Show file tree" button.

Showing and hiding is using the same icon as github. Folders are
collapsible. On small devices (max-width 991 PX) the file tree will be
hidden.

Close #18192

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-09-27 13:22:19 +08:00
1b2cd4c4e1 Replace fomantic popup module with tippy.js (#20428)
- replace fomantic popup module with tippy.js
- fix chaining and add comment
- add 100ms delay to tooltips
- stopwatch improvments, raise default maxWidth
- update web_src/js/features/common-global.js
- use type=submit instead of js
2022-08-09 14:37:34 +02:00
2c2f75cb2c Fix default merge style (#20564) 2022-07-31 17:13:31 +02:00
4c0fce8f7b Fix eslint parsing errors, remove eslint-plugin-html (#20323)
Introduce a separate .eslintrc in the Vue components folder to
selectively enable vue-eslint-parser there, so that the rest of the
files can use eslint's core parser which can deal with hashbangs.

The fact that the eslint-disable comments worked in HTML was a
unintended side-effect of the files being parsed via vue-eslint-parser,
so I had to disable the parsing of these files in .eslintrc.yaml to make
it work, and finally decided to remove eslint-plugin-html as it causes
more issues than it solves.
2022-07-15 17:38:18 +08:00
8420c1bf4c Fix checks in PR for empty commits #19603 (#20290)
* Fixes issue #19603 (Not able to merge commit in PR when branches content is same, but different commit id)
* fill HeadCommitID in PullRequest
* compare real commits ID as check for merging
* based on @zeripath patch in #19738
2022-07-13 16:22:51 +08:00
a9cc9c0f7a Auto merge pull requests when all checks succeeded via WebUI (#19648)
Add WebUI part of Auto merge feature

close #19621

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
2022-06-11 16:44:20 +02:00
368baf9e77 Use Vue to refactor pull merge UI (#19650)
* Use Vue to refactor pull merge UI

* add comments

* fix comments

* small fine tune

* fix tests

* adopt new pull default messages

* clean up

Co-authored-by: 6543 <6543@obermui.de>
2022-05-12 21:39:02 +08:00
076eaad743 Improve dashboard's repo list performance (#18963)
* Improve dashboard's repo list performance

- Avoid a lot of database lookups for all the repo's, by adding a
undocumented "minimal" mode for this specific task, which returns the
data that's only needed by this list which doesn't require any database
lookups.
- Makes fetching these list faster.
- Less CPU overhead when a user visits home page.

* Refactor javascript code + fix Fork icon

- Use async in the function so we can use `await`.
- Remove `archivedFilter` check for count, as it doesn't make sense to
  show the count of repos when you can't even see them(as they are
  filited away).

* Add `count_only`

* Remove uncessary code

* Improve comment

Co-authored-by: delvh <dev.lh@web.de>

* Update web_src/js/components/DashboardRepoList.js

Co-authored-by: delvh <dev.lh@web.de>

* Update web_src/js/components/DashboardRepoList.js

Co-authored-by: delvh <dev.lh@web.de>

* By default apply minimal mode

* Remove `minimal` paramater

* Refactor count header

* Simplify init

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
2022-04-26 16:34:30 -04:00
783a021889 Never use /api/v1 from Gitea UI Pages (#19318)
Reusing `/api/v1` from Gitea UI Pages have pros and cons.
Pros:
1) Less code copy

Cons:
1) API/v1 have to support shared session with page requests.
2) You need to consider for each other when you want to change something about api/v1 or page.

This PR moves all dependencies to API/v1 from UI Pages.

Partially replace #16052
2022-04-07 20:59:56 +02:00