|
8 | 8 | {{template "user/dashboard/feeds" .}}
|
9 | 9 | </div>
|
10 | 10 | <div id="dashboard-repo-search" class="six wide column">
|
11 |
| - <div class="ui {{if not .ContextUser.IsOrganization}}three{{else}}two{{end}} item stackable tabable menu"> |
12 |
| - <a :class="{item: true, active: tab === 'repos'}" @click="changeTab('repos')">{{.i18n.Tr "repository"}}</a> |
13 |
| - {{if not .ContextUser.IsOrganization}} |
14 |
| - <a :class="{item: true, active: tab === 'orgs'}" @click="changeTab('orgs')">{{.i18n.Tr "organization"}}</a> |
15 |
| - {{end}} |
16 |
| - <a :class="{item: true, active: tab === 'mirrors'}" @click="changeTab('mirrors')">{{.i18n.Tr "mirror"}}</a> |
17 |
| - </div> |
18 |
| - <div v-if="tab === 'repos'" class="ui tab active list"> |
19 |
| - <div class="ui fluid input"> |
20 |
| - <input @keyUp="searchKeyUp" v-model="searchQuery" id="search_repo" placeholder="{{.i18n.Tr "home.search_repos"}}"> |
21 |
| - </div> |
22 |
| - <h4 class="ui top attached header"> |
23 |
| - {{.i18n.Tr "home.my_repos"}} <span class="ui grey label">{{.ContextUser.NumRepos}}</span> |
24 |
| - <div class="ui right"> |
25 |
| - <a class="poping up" href="{{AppSubUrl}}/repo/create" data-content="{{.i18n.Tr "new_repo"}}" data-variation="tiny inverted" data-position="left center"> |
26 |
| - <i class="plus icon"></i> |
27 |
| - <span class="sr-only">{{.i18n.Tr "new_repo"}}</span> |
28 |
| - </a> |
29 |
| - </div> |
30 |
| - </h4> |
31 |
| - <div class="ui attached table segment"> |
32 |
| - <ul class="repo-owner-name-list"> |
33 |
| - <li v-for="repo in repos" :class="{'private': repo.private}"> |
34 |
| - <a :href="'{{AppSubUrl}}/' + repo.full_name"> |
35 |
| - <i :class="repoClass(repo)"></i> |
36 |
| - <strong class="text truncate item-name">${ repo.full_name }</strong> |
37 |
| - <span class="ui right text light grey"> |
38 |
| - ${ repo.stars_count } <i class="octicon octicon-star rear"></i> |
39 |
| - </span> |
40 |
| - </a> |
41 |
| - </li> |
42 |
| - {{if gt .ContextUser.NumRepos .MaxShowRepoNum}} |
43 |
| - <li> |
44 |
| - <a href="{{.ContextUser.HomeLink}}">{{.i18n.Tr "home.show_more_repos"}}</a> |
45 |
| - </li> |
46 |
| - {{end}} |
47 |
| - </ul> |
48 |
| - </div> |
49 |
| - </div> |
50 |
| - |
51 |
| - {{if not .ContextUser.IsOrganization}} |
52 |
| - <div v-if="tab === 'orgs'" class="ui tab active list"> |
53 |
| - <h4 class="ui top attached header"> |
54 |
| - {{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">{{.ContextUser.GetOrganizationCount}}</span> |
55 |
| - <div class="ui right"> |
56 |
| - {{if .SignedUser.CanCreateOrganization}} |
57 |
| - <a class="poping up" href="{{AppSubUrl}}/org/create" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center"> |
58 |
| - <i class="plus icon"></i> |
59 |
| - <span class="sr-only">{{.i18n.Tr "new_org"}}</span> |
60 |
| - </a> |
61 |
| - {{end}} |
62 |
| - </div> |
63 |
| - </h4> |
64 |
| - <div class="ui attached table segment"> |
65 |
| - <ul class="repo-owner-name-list"> |
66 |
| - {{range .ContextUser.Orgs}} |
67 |
| - <li> |
68 |
| - <a href="{{AppSubUrl}}/{{.Name}}"> |
69 |
| - <i class="octicon octicon-organization"></i> |
70 |
| - <strong class="text truncate item-name">{{.Name}}</strong> |
71 |
| - <span class="ui right text light grey"> |
72 |
| - {{.NumRepos}} <i class="octicon octicon-repo rear"></i> |
73 |
| - </span> |
74 |
| - </a> |
75 |
| - </li> |
76 |
| - {{end}} |
77 |
| - </ul> |
78 |
| - </div> |
79 |
| - </div> |
80 |
| - {{end}} |
81 |
| - |
82 |
| - <div v-if="tab === 'mirrors'" class="ui tab active list"> |
83 |
| - <h4 class="ui top attached header"> |
84 |
| - {{.i18n.Tr "home.my_mirrors"}} <span class="ui grey label">{{.MirrorCount}}</span> |
85 |
| - <div class="ui right"> |
86 |
| - <a class="poping up" href="{{AppSubUrl}}/repo/migrate?mirror=1" data-content="{{.i18n.Tr "new_mirror"}}" data-variation="tiny inverted" data-position="left center"> |
87 |
| - <i class="plus icon"></i> |
88 |
| - <span class="sr-only">{{.i18n.Tr "new_mirror"}}</span> |
89 |
| - </a> |
90 |
| - </div> |
91 |
| - </h4> |
92 |
| - <div class="ui attached table segment"> |
93 |
| - <ul class="repo-owner-name-list"> |
94 |
| - {{range .Mirrors}} |
95 |
| - <li {{if .IsPrivate}}class="private"{{end}}> |
96 |
| - <a href="{{AppSubUrl}}/{{$.ContextUser.Name}}/{{.Name}}"> |
97 |
| - <i class="octicon octicon-repo-clone"></i> |
98 |
| - <strong class="text truncate item-name">{{.Name}}</strong> |
99 |
| - <span class="ui right text light grey"> |
100 |
| - {{.Interval}}H <i class="octicon octicon-sync rear"></i> |
101 |
| - </span> |
102 |
| - </a> |
103 |
| - </li> |
104 |
| - {{end}} |
105 |
| - </ul> |
106 |
| - </div> |
107 |
| - </div> |
| 11 | + <repo-search :search-limit="searchLimit" :suburl="suburl" :uid="uid"><i class="fa fa-spinner fa-spin"></i></repo-search> |
108 | 12 | </div>
|
109 | 13 | </div>
|
110 | 14 | </div>
|
111 | 15 | </div>
|
| 16 | +{{template "user/dashboard/repo-search" .}} |
112 | 17 | {{template "base/footer" .}}
|
0 commit comments