Merge pull request 'Update look of repo/org tabs on homepage' (#2593) from 0ko/forgejo:hometab into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2593 Reviewed-by: Otto <otto@codeberg.org> Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
commit
6d340bcfea
|
@ -332,10 +332,9 @@ uname_holder = Username or Email address
|
|||
password_holder = Password
|
||||
switch_dashboard_context = Switch Dashboard Context
|
||||
my_repos = Repositories
|
||||
my_orgs = Organizations
|
||||
show_more_repos = Show more repositories…
|
||||
collaborative_repos = Collaborative Repositories
|
||||
my_orgs = My Organizations
|
||||
my_mirrors = My Mirrors
|
||||
view_home = View %s
|
||||
search_repos = Find a repository…
|
||||
filter = Other Filters
|
||||
|
|
|
@ -5,10 +5,7 @@ const data = {
|
|||
isMirrorsEnabled: {{.MirrorsEnabled}},
|
||||
isStarsEnabled: {{not .IsDisableStars}},
|
||||
|
||||
textRepository: {{ctx.Locale.Tr "repository"}},
|
||||
textOrganization: {{ctx.Locale.Tr "organization"}},
|
||||
textMyRepos: {{ctx.Locale.Tr "home.my_repos"}},
|
||||
textNewRepo: {{ctx.Locale.Tr "new_repo"}},
|
||||
textSearchRepos: {{ctx.Locale.Tr "home.search_repos"}},
|
||||
textFilter: {{ctx.Locale.Tr "home.filter"}},
|
||||
textShowArchived: {{ctx.Locale.Tr "home.show_archived"}},
|
||||
|
@ -34,7 +31,6 @@ const data = {
|
|||
textLastPage: {{ctx.Locale.Tr "admin.last_page"}},
|
||||
|
||||
textMyOrgs: {{ctx.Locale.Tr "home.my_orgs"}},
|
||||
textNewOrg: {{ctx.Locale.Tr "new_org"}},
|
||||
|
||||
textOrgVisibilityLimited: {{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}},
|
||||
textOrgVisibilityPrivate: {{ctx.Locale.Tr "org.settings.visibility.private_shortname"}},
|
||||
|
|
|
@ -82,6 +82,14 @@
|
|||
padding-right: 0.5rem;
|
||||
}
|
||||
|
||||
.dashboard .dashboard-navbar .right.menu {
|
||||
gap: .35714286em;
|
||||
}
|
||||
|
||||
.dashboard .dashboard-navbar .right.menu div.item {
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
|
||||
.dashboard .dashboard-navbar .org-visibility .label {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
|
|
@ -340,21 +340,18 @@ export default sfc; // activate the IDE's Vue plugin
|
|||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="!isOrganization" class="ui two item menu">
|
||||
<a :class="{item: true, active: tab === 'repos'}" @click="changeTab('repos')">{{ textRepository }}</a>
|
||||
<a :class="{item: true, active: tab === 'organizations'}" @click="changeTab('organizations')">{{ textOrganization }}</a>
|
||||
<div v-if="!isOrganization" class="ui secondary stackable menu">
|
||||
<a :class="{item: true, active: tab === 'repos'}" @click="changeTab('repos')">{{ textMyRepos }} <span class="ui grey label gt-ml-3">{{ reposTotalCount }}</span></a>
|
||||
<a :class="{item: true, active: tab === 'organizations'}" @click="changeTab('organizations')">{{ textMyOrgs }} <span class="ui grey label gt-ml-3">{{ organizationsTotalCount }}</span></a>
|
||||
</div>
|
||||
<div v-show="tab === 'repos'" class="ui tab active list dashboard-repos">
|
||||
<h4 class="ui top attached header gt-df gt-ac">
|
||||
<h4 v-if="isOrganization" class="ui top attached gt-mt-4 gt-df gt-ac">
|
||||
<div class="gt-f1 gt-df gt-ac">
|
||||
{{ textMyRepos }}
|
||||
<span class="ui grey label gt-ml-3">{{ reposTotalCount }}</span>
|
||||
</div>
|
||||
<a class="gt-df gt-ac muted" :href="subUrl + '/repo/create' + (isOrganization ? '?org=' + organizationId : '')" :data-tooltip-content="textNewRepo">
|
||||
<svg-icon name="octicon-plus"/>
|
||||
</a>
|
||||
</h4>
|
||||
<div class="ui attached segment repos-search">
|
||||
<div class="ui top attached segment repos-search gt-rounded-top">
|
||||
<div class="ui fluid action left icon input" :class="{loading: isLoading}">
|
||||
<input type="search" spellcheck="false" maxlength="255" @input="changeReposFilter(reposFilter)" v-model="searchQuery" ref="search" @keydown="reposFilterKeyControl" :placeholder="textSearchRepos">
|
||||
<i class="icon"><svg-icon name="octicon-search" :size="16"/></i>
|
||||
|
@ -457,16 +454,7 @@ export default sfc; // activate the IDE's Vue plugin
|
|||
</div>
|
||||
</div>
|
||||
<div v-if="!isOrganization" v-show="tab === 'organizations'" class="ui tab active list dashboard-orgs">
|
||||
<h4 class="ui top attached header gt-df gt-ac">
|
||||
<div class="gt-f1 gt-df gt-ac">
|
||||
{{ textMyOrgs }}
|
||||
<span class="ui grey label gt-ml-3">{{ organizationsTotalCount }}</span>
|
||||
</div>
|
||||
<a class="gt-df gt-ac muted" v-if="canCreateOrganization" :href="subUrl + '/org/create'" :data-tooltip-content="textNewOrg">
|
||||
<svg-icon name="octicon-plus"/>
|
||||
</a>
|
||||
</h4>
|
||||
<div v-if="organizations.length" class="ui attached table segment gt-rounded-bottom">
|
||||
<div v-if="organizations.length" class="ui attached table segment gt-rounded">
|
||||
<ul class="repo-owner-name-list">
|
||||
<li class="gt-df gt-ac gt-py-3" v-for="org in organizations" :key="org.name">
|
||||
<a class="repo-list-link muted" :href="subUrl + '/' + encodeURIComponent(org.name)">
|
||||
|
|
Loading…
Reference in New Issue