mirror of
https://gitee.com/gitea/gitea
synced 2026-01-06 15:45:47 +08:00
Frontend refactor: move Vue related code from index.js to components dir, and remove unused codes. (#17301)
* frontend refactor * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> * Update templates/base/head.tmpl Co-authored-by: delvh <dev.lh@web.de> * Update docs/content/doc/developers/guidelines-frontend.md Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> * fix typo * fix typo * refactor PageData to pageData * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> * Simply for the visual difference. Co-authored-by: delvh <dev.lh@web.de> * Revert "Apply suggestions from code review" This reverts commit 4d78ad9b0e96ca180e0823de17659a2e0814c099. Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
<div id="app" class="six wide column">
|
||||
<div id="dashboard-repo-list" class="six wide column">
|
||||
<repo-search
|
||||
:search-limit="searchLimit"
|
||||
:suburl="suburl"
|
||||
:uid="uid"
|
||||
:sub-url="subUrl"
|
||||
{{if .Team}}
|
||||
:team-id="{{.Team.ID}}"
|
||||
{{end}}
|
||||
@@ -31,7 +30,7 @@
|
||||
{{.i18n.Tr "home.my_repos"}}
|
||||
<span class="ui grey label ml-3">${reposTotalCount}</span>
|
||||
</div>
|
||||
<a class="poping up" :href="suburl + '/repo/create'" data-content="{{.i18n.Tr "new_repo"}}" data-variation="tiny inverted" data-position="left center">
|
||||
<a class="poping up" :href="subUrl + '/repo/create'" data-content="{{.i18n.Tr "new_repo"}}" data-variation="tiny inverted" data-position="left center">
|
||||
{{svg "octicon-plus"}}
|
||||
<span class="sr-only">{{.i18n.Tr "new_repo"}}</span>
|
||||
</a>
|
||||
@@ -122,7 +121,7 @@
|
||||
<div v-if="repos.length" class="ui attached table segment rounded-bottom">
|
||||
<ul class="repo-owner-name-list">
|
||||
<li v-for="repo in repos" :class="{'private': repo.private || repo.internal}">
|
||||
<a class="repo-list-link df ac sb" :href="suburl + '/' + repo.full_name">
|
||||
<a class="repo-list-link df ac sb" :href="subUrl + '/' + repo.full_name">
|
||||
<div class="text truncate item-name f1">
|
||||
<component v-bind:is="repoIcon(repo)" size="16"></component>
|
||||
<strong>${repo.full_name}</strong>
|
||||
@@ -168,7 +167,7 @@
|
||||
{{.i18n.Tr "home.my_orgs"}}
|
||||
<span class="ui grey label ml-3">${organizationsTotalCount}</span>
|
||||
</div>
|
||||
<a v-if="canCreateOrganization" class="poping up" :href="suburl + '/org/create'" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center">
|
||||
<a v-if="canCreateOrganization" class="poping up" :href="subUrl + '/org/create'" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center">
|
||||
{{svg "octicon-plus"}}
|
||||
<span class="sr-only">{{.i18n.Tr "new_org"}}</span>
|
||||
</a>
|
||||
@@ -176,7 +175,7 @@
|
||||
<div v-if="organizations.length" class="ui attached table segment rounded-bottom">
|
||||
<ul class="repo-owner-name-list">
|
||||
<li v-for="org in organizations">
|
||||
<a class="repo-list-link df ac sb" :href="suburl + '/' + org.name">
|
||||
<a class="repo-list-link df ac sb" :href="subUrl + '/' + org.name">
|
||||
<div class="text truncate item-name f1">
|
||||
{{svg "octicon-organization" 16 "mr-2"}}
|
||||
<strong>${org.name}</strong>
|
||||
|
||||
Reference in New Issue
Block a user