Skip to content

Commit ba5b81a

Browse files
committed
Rename some shorthands
1 parent 69865ca commit ba5b81a

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

public/js/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,19 +1687,19 @@ function initVueComponents(){
16871687
type: Number,
16881688
required: true
16891689
},
1690-
orgs: {
1690+
organizations: {
16911691
type: Array,
16921692
default: []
16931693
},
1694-
isOrg: {
1694+
isOrganization: {
16951695
type: Boolean,
16961696
default: true
16971697
},
1698-
canCreateOrg: {
1698+
canCreateOrganization: {
16991699
type: Boolean,
17001700
default: false
17011701
},
1702-
orgsTotal: {
1702+
organizationsTotalCount: {
17031703
type: Number,
17041704
default: 0
17051705
},
@@ -1713,7 +1713,7 @@ function initVueComponents(){
17131713
return {
17141714
tab: 'repos',
17151715
repos: [],
1716-
reposTotal: 0,
1716+
reposTotalCount: 0,
17171717
reposFilter: 'all',
17181718
searchQuery: '',
17191719
isLoading: false
@@ -1761,7 +1761,7 @@ function initVueComponents(){
17611761
if (searchedQuery == self.searchQuery) {
17621762
self.repos = result.data;
17631763
if (searchedQuery == "") {
1764-
self.reposTotal = request.getResponseHeader('X-Total-Count');
1764+
self.reposTotalCount = request.getResponseHeader('X-Total-Count');
17651765
}
17661766
}
17671767
}).always(function() {

templates/user/dashboard/dashboard.tmpl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,26 @@
1414
:uid="uid"
1515
:more-repos-link="'{{.ContextUser.HomeLink}}'"
1616
{{if not .ContextUser.IsOrganization}}
17-
:orgs="[
17+
:organizations="[
1818
{{range .ContextUser.Orgs}}
1919
{name: '{{.Name}}', num_repos: '{{.NumRepos}}'},
2020
{{end}}
2121
]"
22-
:is-org="false"
23-
:orgs-total="{{.ContextUser.GetOrganizationCount}}"
24-
:can-create-org="{{.SignedUser.CanCreateOrganization}}"
22+
:is-organization="false"
23+
:organizations-total-count="{{.ContextUser.GetOrganizationCount}}"
24+
:can-create-organization="{{.SignedUser.CanCreateOrganization}}"
2525
{{end}}
2626
inline-template
2727
v-cloak
2828
>
2929
<div>
30-
<div v-if="!isOrg" class="ui two item stackable tabable menu">
30+
<div v-if="!isOrganization" class="ui two item stackable tabable menu">
3131
<a :class="{item: true, active: tab === 'repos'}" @click="changeTab('repos')">{{.i18n.Tr "repository"}}</a>
32-
<a :class="{item: true, active: tab === 'orgs'}" @click="changeTab('orgs')">{{.i18n.Tr "organization"}}</a>
32+
<a :class="{item: true, active: tab === 'organizations'}" @click="changeTab('organizations')">{{.i18n.Tr "organization"}}</a>
3333
</div>
3434
<div v-show="tab === 'repos'" class="ui tab active list">
3535
<h4 class="ui top attached header">
36-
{{.i18n.Tr "home.my_repos"}} <span class="ui grey label">${reposTotal}</span>
36+
{{.i18n.Tr "home.my_repos"}} <span class="ui grey label">${reposTotalCount}</span>
3737
<div class="ui right">
3838
<a class="poping up" :href="suburl + '/repo/create>'" data-content="{{.i18n.Tr "new_repo"}}" data-variation="tiny inverted" data-position="left center">
3939
<i class="plus icon"></i>
@@ -65,16 +65,16 @@
6565
</span>
6666
</a>
6767
</li>
68-
<li v-if="repos.length < reposTotal">
68+
<li v-if="repos.length < reposTotalCount">
6969
<a :href="moreReposLink">{{.i18n.Tr "home.show_more_repos"}}</a>
7070
</li>
7171
</ul>
7272
</div>
7373
</div>
74-
<div v-if="!isOrg" v-show="tab === 'orgs'" class="ui tab active list">
74+
<div v-if="!isOrganization" v-show="tab === 'organizations'" class="ui tab active list">
7575
<h4 class="ui top attached header">
76-
{{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">${orgsTotal}</span>
77-
<div v-if="canCreateOrg" class="ui right">
76+
{{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">${organizationsTotalCount}</span>
77+
<div v-if="canCreateOrganization" class="ui right">
7878
<a class="poping up" :href="suburl + '/org/create'" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center">
7979
<i class="plus icon"></i>
8080
<span class="sr-only">{{.i18n.Tr "new_org"}}</span>
@@ -83,7 +83,7 @@
8383
</h4>
8484
<div class="ui attached table segment">
8585
<ul class="repo-owner-name-list">
86-
<li v-for="org in orgs">
86+
<li v-for="org in organizations">
8787
<a :href="suburl + '/' + org.name">
8888
<i class="octicon octicon-organization"></i>
8989
<strong class="text truncate item-name">${org.name}</strong>

0 commit comments

Comments
 (0)