|
|
@@ -1,130 +0,0 @@ |
|
|
|
<h2 class="ui left floated medium header"> |
|
|
|
{{.i18n.Tr "explore.repos"}} |
|
|
|
</h2> |
|
|
|
<div class="ui clearing divider"></div> |
|
|
|
<div id="app" class="six wide column"> |
|
|
|
<repo-search |
|
|
|
:search-limit=100 |
|
|
|
:suburl="suburl" |
|
|
|
:uid="uid" |
|
|
|
:more-repos-link="'{{.ContextUser.HomeLink}}'" |
|
|
|
{{if not .ContextUser.IsOrganization}} |
|
|
|
:organizations="[ |
|
|
|
{{range .ContextUser.Orgs}} |
|
|
|
{name: '{{.Name}}', num_repos: '{{.NumRepos}}'}, |
|
|
|
{{end}} |
|
|
|
]" |
|
|
|
:is-organization="false" |
|
|
|
:organizations-total-count="{{.ContextUser.GetOrganizationCount}}" |
|
|
|
:can-create-organization="{{.SignedUser.CanCreateOrganization}}" |
|
|
|
{{end}} |
|
|
|
inline-template |
|
|
|
v-cloak |
|
|
|
> |
|
|
|
<div> |
|
|
|
<div v-show="tab === 'repos'" class="ui tab active list dashboard-repos"> |
|
|
|
<div class="ui attached secondary segment repos-search"> |
|
|
|
<div class="ui fluid right action left icon input" :class="{loading: isLoading}"> |
|
|
|
<input @input="searchRepos(reposFilter)" v-model="searchQuery" ref="search" placeholder="{{.i18n.Tr "home.search_repos"}}"> |
|
|
|
<i class="search icon"></i> |
|
|
|
<div class="ui dropdown button" title="{{.i18n.Tr "home.filter"}}"> |
|
|
|
<i class="icon filter"></i> |
|
|
|
<div class="menu"> |
|
|
|
<div class="item"> |
|
|
|
<a @click="toggleArchivedFilter()"> |
|
|
|
<div class="ui checkbox" id="archivedFilterCheckbox" title="{{.i18n.Tr "home.show_both_archived_unarchived"}}" v-if="archivedFilter === 'both'"> |
|
|
|
<input type="checkbox"> |
|
|
|
<label><i class="archive icon archived-icon"></i>{{.i18n.Tr "home.show_archived"}}</label> |
|
|
|
</div> |
|
|
|
<div class="ui checkbox" id="archivedFilterCheckbox" title="{{.i18n.Tr "home.show_only_unarchived"}}" v-if="archivedFilter === 'unarchived'"> |
|
|
|
<input type="checkbox"> |
|
|
|
<label><i class="archive icon archived-icon"></i>{{.i18n.Tr "home.show_archived"}}</label> |
|
|
|
</div> |
|
|
|
<div class="ui checkbox" id="archivedFilterCheckbox" title="{{.i18n.Tr "home.show_only_archived"}}" v-if="archivedFilter === 'archived'"> |
|
|
|
<input type="checkbox"> |
|
|
|
<label><i class="archive icon archived-icon"></i>{{.i18n.Tr "home.show_archived"}}</label> |
|
|
|
</div> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
<div class="item"> |
|
|
|
<a @click="togglePrivateFilter()"> |
|
|
|
<div class="ui checkbox" id="privateFilterCheckbox" title="{{.i18n.Tr "home.show_both_private_public"}}" v-if="privateFilter === 'both'"> |
|
|
|
<input type="checkbox"> |
|
|
|
<label><svg class="svg octicon-lock" width="16" height="16" aria-hidden="true"><use xlink:href="#octicon-lock" /></svg>{{.i18n.Tr "home.show_private"}}</label> |
|
|
|
</div> |
|
|
|
<div class="ui checkbox" id="privateFilterCheckbox" title="{{.i18n.Tr "home.show_only_public"}}" v-if="privateFilter === 'public'"> |
|
|
|
<input type="checkbox"> |
|
|
|
<label><svg class="svg octicon-lock" width="16" height="16" aria-hidden="true"><use xlink:href="#octicon-lock" /></svg>{{.i18n.Tr "home.show_private"}}</label> |
|
|
|
</div> |
|
|
|
<div class="ui checkbox" id="privateFilterCheckbox" title="{{.i18n.Tr "home.show_only_private"}}" v-if="privateFilter === 'private'"> |
|
|
|
<input type="checkbox"> |
|
|
|
<label><svg class="svg octicon-lock" width="16" height="16" aria-hidden="true"><use xlink:href="#octicon-lock" /></svg>{{.i18n.Tr "home.show_private"}}</label> |
|
|
|
</div> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="ui secondary pointing borderless menu center aligned grid repos-filter"> |
|
|
|
<a class="item" :class="{active: reposFilter === 'all'}" @click="changeReposFilter('all')"> |
|
|
|
{{.i18n.Tr "all"}} |
|
|
|
<div v-show="reposFilter === 'all'" class="ui circular mini grey label">${repoTypeCount}</div> |
|
|
|
</a> |
|
|
|
<a class="item" :class="{active: reposFilter === 'sources'}" @click="changeReposFilter('sources')"> |
|
|
|
{{.i18n.Tr "sources"}} |
|
|
|
<div v-show="reposFilter === 'sources'" class="ui circular mini grey label">${repoTypeCount}</div> |
|
|
|
</a> |
|
|
|
<a class="item" :class="{active: reposFilter === 'forks'}" @click="changeReposFilter('forks')"> |
|
|
|
{{.i18n.Tr "forks"}} |
|
|
|
<div v-show="reposFilter === 'forks'" class="ui circular mini grey label">${repoTypeCount}</div> |
|
|
|
</a> |
|
|
|
<a class="item" :class="{active: reposFilter === 'mirrors'}" @click="changeReposFilter('mirrors')"> |
|
|
|
{{.i18n.Tr "mirrors"}} |
|
|
|
<div v-show="reposFilter === 'mirrors'" class="ui circular mini grey label">${repoTypeCount}</div> |
|
|
|
</a> |
|
|
|
<a class="item" :class="{active: reposFilter === 'collaborative'}" @click="changeReposFilter('collaborative')"> |
|
|
|
{{.i18n.Tr "collaborative"}} |
|
|
|
<div v-show="reposFilter === 'collaborative'" class="ui circular mini grey label">${repoTypeCount}</div> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="ui attached table segment"> |
|
|
|
<ul class="repo-owner-name-list"> |
|
|
|
<div class="ui repository list" v-for="repo in repos"> |
|
|
|
<div class="item"> |
|
|
|
<div class="ui header"> |
|
|
|
{{if .RelAvatarLink}} |
|
|
|
<img class="ui avatar image" src="{{.RelAvatarLink}}"> |
|
|
|
{{end}} |
|
|
|
<a class="name" :href="repo.html_url"> |
|
|
|
${repo.full_name} |
|
|
|
<i v-if="repo.archived" class="archive icon archived-icon"></i> |
|
|
|
</a> |
|
|
|
<span v-if="repo.private" class="middle text gold">{{svg "octicon-lock" 16}}</span> |
|
|
|
<span v-if="repo.fork" class="middle">{{svg "octicon-repo-forked" 16}}</span> |
|
|
|
<span v-if="repo.mirror" class="middle">{{svg "octicon-repo-clone" 16}}</span> |
|
|
|
<div class="ui right metas"> |
|
|
|
<span v-if="repo.primaryLanguage" class="text grey"> |
|
|
|
<i class="color-icon" v-bind:style="{backgroundColor: repo.primaryLanguageColor}"></i> |
|
|
|
${repo.primaryLanguage} |
|
|
|
</span> |
|
|
|
<span class="text grey">{{svg "octicon-star" 16}} ${repo.stars_count}</span> |
|
|
|
<span class="text grey">{{svg "octicon-git-branch" 16}} ${repo.forks_count}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="description"> |
|
|
|
<p v-if="repo.description" class="has-emoji">${repo.description}</p> |
|
|
|
<p class="time" >{{$.i18n.Tr "org.repo_updated"}}<span v-html="repo.timeSinceUnixUpdatedHtml"></span> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-if="repos.length==0"> |
|
|
|
{{$.i18n.Tr "explore.repo_no_results"}} |
|
|
|
</div> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</repo-search> |
|
|
|
</div> |