Skip to content

Commit

Permalink
Merge branch 'main' into lunny/repo_dep_org
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Dec 3, 2024
2 parents 8ce062b + 576e31a commit d3dee97
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 50 deletions.
2 changes: 2 additions & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,8 @@ fork_to_different_account = Fork to a different account
fork_visibility_helper = The visibility of a forked repository cannot be changed.
fork_branch = Branch to be cloned to the fork
all_branches = All branches
view_all_branches = View all branches
view_all_tags = View all tags
fork_no_valid_owners = This repository can not be forked because there are no valid owners.
fork.blocked_user = Cannot fork the repository because you are blocked by the repository owner.
use_template = Use this template
Expand Down
10 changes: 5 additions & 5 deletions templates/admin/user/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
</div>
</h4>
<div class="ui attached segment">
<form class="ui form ignore-dirty" id="user-list-search-form">

<form class="ui form ignore-dirty flex-text-block" id="user-list-search-form">
<div class="tw-flex-1">
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.user_kind")}}
</div>
<!-- Right Menu -->
<div class="ui right floated secondary filter menu">
<div class="ui secondary menu tw-m-0">
<!-- Status Filter Menu Item -->
<div class="ui dropdown type jump item">
<span class="text">{{ctx.Locale.Tr "admin.users.list_status_filter.menu_text"}}</span>
Expand Down Expand Up @@ -51,8 +53,6 @@
</div>
</div>
</div>

{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.user_kind")}}
</form>
</div>
<div class="ui attached table segment">
Expand Down
4 changes: 4 additions & 0 deletions templates/repo/branch_dropdown.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* ShowTabBranches
* ShowTabTagsTab
* AllowCreateNewRef
* ShowViewAllRefsEntry

Search "repo/branch_dropdown" in the template directory to find all occurrences.
*/}}
Expand All @@ -24,6 +25,8 @@ Search "repo/branch_dropdown" in the template directory to find all occurrences.
data-text-create-branch="{{ctx.Locale.Tr "repo.branch.create_branch"}}"
data-text-create-ref-from="{{ctx.Locale.Tr "repo.branch.create_from"}}"
data-text-no-results="{{ctx.Locale.Tr "no_results_found"}}"
data-text-view-all-branches="{{ctx.Locale.Tr "repo.view_all_branches"}}"
data-text-view-all-tags="{{ctx.Locale.Tr "repo.view_all_tags"}}"

data-current-repo-default-branch="{{.Repository.DefaultBranch}}"
data-current-repo-link="{{.Repository.Link}}"
Expand All @@ -37,6 +40,7 @@ Search "repo/branch_dropdown" in the template directory to find all occurrences.
data-show-tab-branches="{{.ShowTabBranches}}"
data-show-tab-tags="{{.ShowTabTags}}"
data-allow-create-new-ref="{{.AllowCreateNewRef}}"
data-show-view-all-refs-entry="{{.ShowViewAllRefsEntry}}"

data-enable-feed="{{ctx.RootData.EnableFeed}}"
>
Expand Down
1 change: 1 addition & 0 deletions templates/repo/home.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"CurrentTreePath" .TreePath
"RefLinkTemplate" "{RepoLink}/src/{RefType}/{RefShortName}/{TreePath}"
"AllowCreateNewRef" .CanCreateBranch
"ShowViewAllRefsEntry" true
}}
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
{{$cmpBranch := ""}}
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/issue/milestone_new.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="issue-navbar">
{{template "repo/issue/navbar" .}}
{{if and (or .CanWriteIssues .CanWritePulls) .PageIsEditMilestone}}
<div class="ui right floated secondary menu">
<div class="ui right">
<a class="ui primary button" href="{{$.RepoLink}}/milestones/new">{{ctx.Locale.Tr "repo.milestones.new"}}</a>
</div>
{{end}}
Expand Down
48 changes: 22 additions & 26 deletions templates/user/settings/account.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{{ctx.Locale.Tr "settings.manage_emails"}}
</h4>
<div class="ui attached segment">
<div class="ui list">
<div class="ui list flex-items-block">
{{if $.EnableNotifyMail}}
<div class="item">
<div class="tw-mb-2">{{ctx.Locale.Tr "settings.email_desc"}}</div>
Expand All @@ -65,27 +65,34 @@
</div>
{{end}}
{{if not ($.UserDisabledFeatures.Contains "manage_credentials")}}
{{range .Emails}}
<div class="item">
{{if not .IsPrimary}}
<div class="right floated content">
{{range .Emails}}
<div class="item tw-flex-wrap">
<div class="content tw-flex-1">
<strong>{{.Email}}</strong>
{{if .IsPrimary}}
<div class="ui primary label">{{ctx.Locale.Tr "settings.primary"}}</div>
{{end}}
{{if .IsActivated}}
<div class="ui green label">{{ctx.Locale.Tr "settings.activated"}}</div>
{{else}}
<div class="ui label">{{ctx.Locale.Tr "settings.requires_activation"}}</div>
{{end}}
</div>
<div class="flex-text-block">
{{if not .IsPrimary}}
<button class="ui red tiny button delete-button" data-modal-id="delete-email" data-url="{{AppSubUrl}}/user/settings/account/email/delete" data-id="{{.ID}}">
{{ctx.Locale.Tr "settings.delete_email"}}
</button>
</div>
{{if .CanBePrimary}}
<div class="right floated content">
{{if .CanBePrimary}}
<form action="{{AppSubUrl}}/user/settings/account/email" method="post">
{{$.CsrfTokenHtml}}
<input name="_method" type="hidden" value="PRIMARY">
<input name="id" type="hidden" value="{{.ID}}">
<button class="ui primary tiny button">{{ctx.Locale.Tr "settings.primary_email"}}</button>
</form>
</div>
{{end}}
{{end}}
{{end}}
{{if not .IsActivated}}
<div class="right floated content">
{{if not .IsActivated}}
<form action="{{AppSubUrl}}/user/settings/account/email" method="post">
{{$.CsrfTokenHtml}}
<input name="_method" type="hidden" value="SENDACTIVATION">
Expand All @@ -96,22 +103,11 @@
<button class="ui primary tiny button">{{ctx.Locale.Tr "settings.activate_email"}}</button>
{{end}}
</form>
</div>
{{end}}
<div class="content tw-py-2">
<strong>{{.Email}}</strong>
{{if .IsPrimary}}
<div class="ui primary label">{{ctx.Locale.Tr "settings.primary"}}</div>
{{end}}
{{if .IsActivated}}
<div class="ui green label">{{ctx.Locale.Tr "settings.activated"}}</div>
{{else}}
<div class="ui label">{{ctx.Locale.Tr "settings.requires_activation"}}</div>
{{end}}
</div>
</div>
</div>
{{end}}
{{end}}
{{end}}{{/* range Emails */}}
{{end}}{{/* if manage_credentials */}}
</div>
</div>
{{end}}
Expand Down
6 changes: 0 additions & 6 deletions web_src/css/modules/list.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,6 @@
cursor: pointer;
}

.ui.list .list > .item [class*="right floated"],
.ui.list > .item [class*="right floated"] {
float: right;
margin: 0 0 0 1em;
}

.ui.menu .ui.list > .item,
.ui.menu .ui.list .list > .item {
display: list-item;
Expand Down
12 changes: 0 additions & 12 deletions web_src/css/modules/menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -633,18 +633,6 @@
}
}

.ui.floated.menu {
float: left;
margin: 0 0.5rem 0 0;
}
.ui.floated.menu .item:last-child::before {
display: none;
}
.ui.right.floated.menu {
float: right;
margin: 0 0 0 0.5rem;
}

.ui.borderless.menu .item::before,
.ui.borderless.menu .item .menu .item::before,
.ui.menu .borderless.item::before {
Expand Down
8 changes: 8 additions & 0 deletions web_src/js/components/RepoBranchTagSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ const sfc = {
textCreateBranch: elRoot.getAttribute('data-text-create-branch'),
textCreateRefFrom: elRoot.getAttribute('data-text-create-ref-from'),
textNoResults: elRoot.getAttribute('data-text-no-results'),
textViewAllBranches: elRoot.getAttribute('data-text-view-all-branches'),
textViewAllTags: elRoot.getAttribute('data-text-view-all-tags'),
currentRepoDefaultBranch: elRoot.getAttribute('data-current-repo-default-branch'),
currentRepoLink: elRoot.getAttribute('data-current-repo-link'),
Expand All @@ -99,6 +101,7 @@ const sfc = {
showTabBranches: shouldShowTabBranches,
showTabTags: elRoot.getAttribute('data-show-tab-tags') === 'true',
allowCreateNewRef: elRoot.getAttribute('data-allow-create-new-ref') === 'true',
showViewAllRefsEntry: elRoot.getAttribute('data-show-view-all-refs-entry') === 'true',
enableFeed: elRoot.getAttribute('data-enable-feed') === 'true',
};
Expand Down Expand Up @@ -281,6 +284,11 @@ export default sfc; // activate IDE's Vue plugin
<div class="message" v-if="showNoResults">
{{ textNoResults }}
</div>
<template v-if="showViewAllRefsEntry">
<div class="divider tw-m-0"/>
<a v-if="selectedTab === 'branches'" class="item" :href="currentRepoLink + '/branches'">{{ textViewAllBranches }}</a>
<a v-if="selectedTab === 'tags'" class="item" :href="currentRepoLink + '/tags'">{{ textViewAllTags }}</a>
</template>
</div>
</div>
</template>

0 comments on commit d3dee97

Please sign in to comment.