]> source.dussan.org Git - gitea.git/commit
Refactor dashboard repo list to Vue SFC (#23405)
authorwxiaoguang <wxiaoguang@gmail.com>
Tue, 14 Mar 2023 04:09:06 +0000 (12:09 +0800)
committerGitHub <noreply@github.com>
Tue, 14 Mar 2023 04:09:06 +0000 (12:09 +0800)
commite82f1b15c7120ad13fd3b67cf7e2c6cb9915c22d
tree1da00ac20e4f62bf55bbf68e914d27cd1920a5d6
parentb942838bd486f5d3919a14a128efe22fc55c6112
Refactor dashboard repo list to Vue SFC (#23405)

Similar to #23394

The dashboard repo list mixes jQuery/Fomantic UI/Vue together, it's very
diffcult to maintain and causes unfixable a11y problems.

This PR uses two steps to refactor the repo list:

1. move `data-` attributes to JS object and use Vue data as much as
possible
https://github.com/go-gitea/gitea/pull/23405/commits/d3adc0dcacf7de87b9819277e6598ac3993bbfa3
2. move the code into a Vue SFC
https://github.com/go-gitea/gitea/pull/23405/commits/7ebe55df6e67adfd272a4bf0a96ad6688edf661f

Total: +516 −585

Screenshots:

<details>

![image](https://user-images.githubusercontent.com/2114189/224271457-a23e05be-d7d3-4247-a803-f0ee30c36f44.png)

![image](https://user-images.githubusercontent.com/2114189/224271504-76fbd3da-4d7a-4725-b0d1-fbff83caac63.png)

![image](https://user-images.githubusercontent.com/2114189/224271845-f007cadf-6c49-46bd-a65c-a3fc75bdba3b.png)

</details>

---------

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
templates/user/dashboard/repolist.tmpl
web_src/js/components/DashboardRepoList.js [deleted file]
web_src/js/components/DashboardRepoList.vue [new file with mode: 0644]
web_src/js/components/RepoActivityTopAuthors.vue
web_src/js/components/RepoBranchTagDropdown.js
web_src/js/components/VueComponentLoader.js [deleted file]
web_src/js/index.js
web_src/js/svg.js