mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-01 14:56:30 +00:00
Merge dbc780b7f6
into 286ede47ad
This commit is contained in:
commit
ad974b397b
@ -105,9 +105,20 @@
|
||||
<span class="only-mobile">{{ctx.Locale.Tr "create_new"}}</span>
|
||||
</span>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{AppSubUrl}}/repo/create">
|
||||
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
|
||||
</a>
|
||||
{{if .SignedUser.CanCreateRepo}}
|
||||
<a class="item" href="{{AppSubUrl}}/repo/create">
|
||||
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
|
||||
</a>
|
||||
{{else}}
|
||||
<a
|
||||
class="disabled-with-tooltip item"
|
||||
data-tooltip-content="{{ctx.Locale.TrN .SignedUser.MaxCreationLimit "repo.form.reach_limit_of_creation_1" "repo.form.reach_limit_of_creation_n" .SignedUser.MaxCreationLimit}}"
|
||||
href="/"
|
||||
onclick="event.stopPropagation(); event.preventDefault()"
|
||||
>
|
||||
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if not .DisableMigrations}}
|
||||
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
||||
{{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
{{if .ShowMemberAndTeamTab}}
|
||||
<div class="ui five wide column">
|
||||
{{if .CanCreateOrgRepo}}
|
||||
{{if and .CanCreateOrgRepo .SignedUser.CanCreateRepo}}
|
||||
<div class="center aligned tw-mb-4">
|
||||
<a class="ui primary button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{ctx.Locale.Tr "new_repo"}}</a>
|
||||
{{if not .DisableNewPullMirrors}}
|
||||
|
@ -13,6 +13,7 @@ const data = {
|
||||
textFilter: {{ctx.Locale.Tr "home.filter"}},
|
||||
textShowArchived: {{ctx.Locale.Tr "home.show_archived"}},
|
||||
textShowPrivate: {{ctx.Locale.Tr "home.show_private"}},
|
||||
textRepoReachLimitOfCreation: {{ctx.Locale.TrN .SignedUser.MaxCreationLimit "repo.form.reach_limit_of_creation_1" "repo.form.reach_limit_of_creation_n" .SignedUser.MaxCreationLimit}},
|
||||
|
||||
textShowBothArchivedUnarchived: {{ctx.Locale.Tr "home.show_both_archived_unarchived"}},
|
||||
textShowOnlyUnarchived: {{ctx.Locale.Tr "home.show_only_unarchived"}},
|
||||
@ -49,6 +50,7 @@ data.organizations = [{{range .Orgs}}{'name': {{.Name}}, 'num_repos': {{.NumRepo
|
||||
data.isOrganization = false;
|
||||
data.organizationsTotalCount = {{.UserOrgsCount}};
|
||||
data.canCreateOrganization = {{.SignedUser.CanCreateOrganization}};
|
||||
data.canCreateRepo = {{.SignedUser.CanCreateRepo}};
|
||||
{{else}}
|
||||
data.organizationId = {{.ContextUser.ID}};
|
||||
{{end}}
|
||||
|
@ -1393,6 +1393,12 @@ table th[data-sortt-desc] .svg {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.ui.dropdown .menu > .disabled-with-tooltip.item {
|
||||
cursor: default;
|
||||
opacity: var(--opacity-disabled);
|
||||
background: inherit;
|
||||
}
|
||||
|
||||
.ui.dropdown.ellipsis-items-nowrap > .text {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
|
@ -51,7 +51,7 @@
|
||||
justify-content: stretch;
|
||||
}
|
||||
|
||||
#navbar a.item:hover,
|
||||
#navbar a.item:hover:not(.disabled-with-tooltip),
|
||||
#navbar button.item:hover {
|
||||
background: var(--color-nav-hover-bg);
|
||||
}
|
||||
|
@ -350,9 +350,12 @@ export default sfc; // activate the IDE's Vue plugin
|
||||
{{ textMyRepos }}
|
||||
<span class="ui grey label tw-ml-2">{{ reposTotalCount }}</span>
|
||||
</div>
|
||||
<a class="tw-flex tw-items-center muted" :href="subUrl + '/repo/create' + (isOrganization ? '?org=' + organizationId : '')" :data-tooltip-content="textNewRepo">
|
||||
<a v-if="canCreateRepo" class="tw-flex tw-items-center muted" :href="subUrl + '/repo/create' + (isOrganization ? '?org=' + organizationId : '')" :data-tooltip-content="textNewRepo">
|
||||
<svg-icon name="octicon-plus"/>
|
||||
</a>
|
||||
<span v-else class="tw-flex tw-items-center disabled" :data-tooltip-content="textRepoReachLimitOfCreation">
|
||||
<svg-icon name="octicon-plus"/>
|
||||
</span>
|
||||
</h4>
|
||||
<div class="ui attached segment repos-search">
|
||||
<div class="ui small fluid action left icon input">
|
||||
@ -546,4 +549,9 @@ ul li:not(:last-child) {
|
||||
.repo-owner-name-list li.active {
|
||||
background: var(--color-hover);
|
||||
}
|
||||
|
||||
span.disabled {
|
||||
opacity: var(--opacity-disabled);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user