mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-15 00:01:25 -04:00
Compare commits
5 Commits
d15f20b2d2
...
16bfe983c2
Author | SHA1 | Date | |
---|---|---|---|
|
16bfe983c2 | ||
|
503af4b807 | ||
|
8b3dd7de5d | ||
|
a04535e212 | ||
|
a1460333dc |
@ -317,7 +317,14 @@ func UpdateSource(source *Source) error {
|
||||
}
|
||||
}
|
||||
|
||||
_, err := db.GetEngine(db.DefaultContext).ID(source.ID).AllCols().Update(source)
|
||||
has, err := db.GetEngine(db.DefaultContext).Where("name=? AND id!=?", source.Name, source.ID).Exist(new(Source))
|
||||
if err != nil {
|
||||
return err
|
||||
} else if has {
|
||||
return ErrSourceAlreadyExist{source.Name}
|
||||
}
|
||||
|
||||
_, err = db.GetEngine(db.DefaultContext).ID(source.ID).AllCols().Update(source)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -426,9 +426,11 @@ func EditAuthSourcePost(ctx *context.Context) {
|
||||
source.IsActive = form.IsActive
|
||||
source.IsSyncEnabled = form.IsSyncEnabled
|
||||
source.Cfg = config
|
||||
// FIXME: if the name conflicts, it will result in 500: Error 1062: Duplicate entry 'aa' for key 'login_source.UQE_login_source_name'
|
||||
if err := auth.UpdateSource(source); err != nil {
|
||||
if oauth2.IsErrOpenIDConnectInitialize(err) {
|
||||
if auth.IsErrSourceAlreadyExist(err) {
|
||||
ctx.Data["Err_Name"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("admin.auths.login_source_exist", err.(auth.ErrSourceAlreadyExist).Name), tplAuthEdit, form)
|
||||
} else if oauth2.IsErrOpenIDConnectInitialize(err) {
|
||||
ctx.Flash.Error(err.Error(), true)
|
||||
ctx.Data["Err_DiscoveryURL"] = true
|
||||
ctx.HTML(http.StatusOK, tplAuthEdit)
|
||||
|
@ -105,6 +105,7 @@ func NewUserPost(ctx *context.Context) {
|
||||
ctx.Data["PageIsAdmin"] = true
|
||||
ctx.Data["PageIsAdminUsers"] = true
|
||||
ctx.Data["DefaultUserVisibilityMode"] = setting.Service.DefaultUserVisibilityMode
|
||||
ctx.Data["AllowedUserVisibilityModes"] = setting.Service.AllowedUserVisibilityModesSlice.ToVisibleTypeSlice()
|
||||
|
||||
sources, err := auth.Sources()
|
||||
if err != nil {
|
||||
@ -273,6 +274,7 @@ func EditUserPost(ctx *context.Context) {
|
||||
ctx.Data["PageIsAdmin"] = true
|
||||
ctx.Data["PageIsAdminUsers"] = true
|
||||
ctx.Data["DisableMigrations"] = setting.Repository.DisableMigrations
|
||||
ctx.Data["AllowedUserVisibilityModes"] = setting.Service.AllowedUserVisibilityModesSlice.ToVisibleTypeSlice()
|
||||
|
||||
u := prepareUserInfo(ctx)
|
||||
if ctx.Written() {
|
||||
|
@ -294,6 +294,10 @@ func AddTestPullRequestTask(doer *user_model.User, repoID int64, branch string,
|
||||
}
|
||||
if err == nil {
|
||||
for _, pr := range prs {
|
||||
if pr.Issue.IsClosed {
|
||||
// The closed PR never trigger action or webhook
|
||||
continue
|
||||
}
|
||||
if newCommitID != "" && newCommitID != git.EmptySHA {
|
||||
changed, err := checkIfPRContentChanged(ctx, pr, oldCommitID, newCommitID)
|
||||
if err != nil {
|
||||
|
@ -128,7 +128,6 @@
|
||||
{{- else}}red{{end}}">{{svg "octicon-git-merge" 32}}</a>
|
||||
<div class="content">
|
||||
{{template "repo/pulls/status" .}}
|
||||
{{$canAutoMerge := false}}
|
||||
{{$showGeneralMergeForm := false}}
|
||||
<div class="ui attached merge-section segment {{if not $.LatestCommitStatus}}no-header{{end}}">
|
||||
{{if .Issue.PullRequest.HasMerged}}
|
||||
@ -193,7 +192,7 @@
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "repo/issue/view_content/update_branch_by_merge" (dict "locale" .locale "Issue" .Issue "UpdateAllowed" .UpdateAllowed "UpdateByRebaseAllowed" .UpdateByRebaseAllowed "Link" .Link)}}
|
||||
{{template "repo/issue/view_content/update_branch_by_merge" $}}
|
||||
{{else if .Issue.PullRequest.IsChecking}}
|
||||
<div class="item">
|
||||
<i class="icon icon-octicon">{{svg "octicon-sync"}}</i>
|
||||
@ -286,7 +285,7 @@
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{template "repo/issue/view_content/update_branch_by_merge" (dict "locale" .locale "Issue" .Issue "UpdateAllowed" .UpdateAllowed "UpdateByRebaseAllowed" .UpdateByRebaseAllowed "Link" .Link)}}
|
||||
{{template "repo/issue/view_content/update_branch_by_merge" $}}
|
||||
{{if .Issue.PullRequest.IsEmpty}}
|
||||
<div class="ui divider"></div>
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
{{$canAutoMerge := false}}
|
||||
{{if and (gt .Issue.PullRequest.CommitsBehind 0) (not .Issue.IsClosed) (not .Issue.PullRequest.IsChecking) (not .IsPullFilesConflicted) (not .IsPullRequestBroken) (not $canAutoMerge)}}
|
||||
{{if and (gt $.Issue.PullRequest.CommitsBehind 0) (not $.Issue.IsClosed) (not $.Issue.PullRequest.IsChecking) (not $.IsPullFilesConflicted) (not $.IsPullRequestBroken)}}
|
||||
<div class="ui divider"></div>
|
||||
<div class="item item-section">
|
||||
<div class="item-section-left">
|
||||
@ -7,10 +6,10 @@
|
||||
{{$.locale.Tr "repo.pulls.outdated_with_base_branch"}}
|
||||
</div>
|
||||
<div class="item-section-right">
|
||||
{{if and .UpdateAllowed .UpdateByRebaseAllowed}}
|
||||
{{if and $.UpdateAllowed $.UpdateByRebaseAllowed}}
|
||||
<div class="gt-dib">
|
||||
<div class="ui buttons update-button">
|
||||
<button class="ui button" data-do="{{.Link}}/update" data-redirect="{{.Link}}">
|
||||
<button class="ui button" data-do="{{$.Link}}/update" data-redirect="{{$.Link}}">
|
||||
<span class="button-text">
|
||||
{{$.locale.Tr "repo.pulls.update_branch"}}
|
||||
</span>
|
||||
@ -19,17 +18,17 @@
|
||||
<div class="ui dropdown icon button no-text">
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<div class="menu">
|
||||
<div class="item active selected" data-do="{{.Link}}/update">{{$.locale.Tr "repo.pulls.update_branch"}}</div>
|
||||
<div class="item" data-do="{{.Link}}/update?style=rebase">{{$.locale.Tr "repo.pulls.update_branch_rebase"}}</div>
|
||||
<a class="item active selected" data-do="{{$.Link}}/update">{{$.locale.Tr "repo.pulls.update_branch"}}</a>
|
||||
<a class="item" data-do="{{$.Link}}/update?style=rebase">{{$.locale.Tr "repo.pulls.update_branch_rebase"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .UpdateAllowed (not .UpdateByRebaseAllowed)}}
|
||||
<form action="{{.Link}}/update" method="post" class="ui update-branch-form">
|
||||
{{.CsrfTokenHtml}}
|
||||
<button class="ui compact button" data-do="update">
|
||||
{{if and $.UpdateAllowed (not $.UpdateByRebaseAllowed)}}
|
||||
<form action="{{$.Link}}/update" method="post" class="ui update-branch-form">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<button class="ui compact button">
|
||||
<span class="ui text">{{$.locale.Tr "repo.pulls.update_branch"}}</span>
|
||||
</button>
|
||||
</form>
|
||||
|
@ -78,7 +78,6 @@
|
||||
--color-purple: #a333c8;
|
||||
--color-pink: #e03997;
|
||||
--color-brown: #a5673f;
|
||||
--color-grey: #888888;
|
||||
--color-black: #1b1c1d;
|
||||
/* light variants - produced via Sass scale-color(color, $lightness: +25%) */
|
||||
--color-red-light: #e45e5e;
|
||||
@ -92,9 +91,10 @@
|
||||
--color-purple-light: #bb64d8;
|
||||
--color-pink-light: #e86bb1;
|
||||
--color-brown-light: #c58b66;
|
||||
--color-grey-light: #a6a6a6;
|
||||
--color-black-light: #525558;
|
||||
/* other colors */
|
||||
--color-grey: #707070;
|
||||
--color-grey-light: #838383;
|
||||
--color-gold: #a1882b;
|
||||
--color-white: #ffffff;
|
||||
--color-diff-removed-word-bg: #fdb8c0;
|
||||
@ -2665,6 +2665,10 @@ table th[data-sortt-desc] .svg {
|
||||
border-radius: 0 0 var(--border-radius) var(--border-radius);
|
||||
}
|
||||
|
||||
.ui.multiple.dropdown > .label {
|
||||
box-shadow: 0 0 0 1px var(--color-secondary) inset;
|
||||
}
|
||||
|
||||
.text-label {
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
|
@ -94,6 +94,15 @@ textarea:focus,
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.ui.form .required.fields:not(.grouped) > .field > label::after,
|
||||
.ui.form .required.fields.grouped > label::after,
|
||||
.ui.form .required.field > label::after,
|
||||
.ui.form .required.fields:not(.grouped) > .field > .checkbox::after,
|
||||
.ui.form .required.field > .checkbox::after,
|
||||
.ui.form label.required::after {
|
||||
color: var(--color-red);
|
||||
}
|
||||
|
||||
.ui.input,
|
||||
.ui.checkbox input:focus ~ label::after,
|
||||
.ui.checkbox input:checked ~ label::after,
|
||||
|
@ -68,8 +68,7 @@
|
||||
--color-purple: #b259d0;
|
||||
--color-pink: #d22e8b;
|
||||
--color-brown: #a47252;
|
||||
--color-grey: #9ea2aa;
|
||||
--color-black: #1e222e;
|
||||
--color-black: #2e323e;
|
||||
/* light variants - produced via Sass scale-color(color, $lightness: -10%) */
|
||||
--color-red-light: #c23636;
|
||||
--color-orange-light: #b84f0b;
|
||||
@ -82,9 +81,10 @@
|
||||
--color-purple-light: #a742c9;
|
||||
--color-pink-light: #be297d;
|
||||
--color-brown-light: #94674a;
|
||||
--color-grey-light: #8d919b;
|
||||
--color-black-light: #1b1f29;
|
||||
--color-black-light: #292d38;
|
||||
/* other colors */
|
||||
--color-grey: #505665;
|
||||
--color-grey-light: #a1a6b7;
|
||||
--color-gold: #b1983b;
|
||||
--color-white: #ffffff;
|
||||
--color-diff-removed-word-bg: #6f3333;
|
||||
@ -124,19 +124,19 @@
|
||||
--color-orange-badge-hover-bg: #f2711c4d;
|
||||
--color-git: #f05133;
|
||||
/* target-based colors */
|
||||
--color-body: #383c4a;
|
||||
--color-body: #373b47;
|
||||
--color-box-header: #404652;
|
||||
--color-box-body: #2a2e3a;
|
||||
--color-box-body-highlight: #353945;
|
||||
--color-text-dark: #dbe0ea;
|
||||
--color-text: #bbc0ca;
|
||||
--color-text-light: #a6aab5;
|
||||
--color-text-light-1: #979ba6;
|
||||
--color-text-light-2: #8a8e99;
|
||||
--color-text-light-3: #707687;
|
||||
--color-text: #cbd0da;
|
||||
--color-text-light: #bbbfca;
|
||||
--color-text-light-1: #aaafb9;
|
||||
--color-text-light-2: #9a9ea9;
|
||||
--color-text-light-3: #8a8e99;
|
||||
--color-footer: #2e323e;
|
||||
--color-timeline: #4c525e;
|
||||
--color-input-text: #d5dbe6;
|
||||
--color-input-text: #dfe3ec;
|
||||
--color-input-background: #232933;
|
||||
--color-input-toggle-background: #454a57;
|
||||
--color-input-border: #454a57;
|
||||
@ -159,7 +159,7 @@
|
||||
--color-secondary-bg: #2a2e3a;
|
||||
--color-text-focus: #fff;
|
||||
--color-expand-button: #3c404d;
|
||||
--color-placeholder-text: #6a737d;
|
||||
--color-placeholder-text: #8a8e99;
|
||||
--color-editor-line-highlight: var(--color-primary-light-5);
|
||||
--color-project-board-bg: var(--color-secondary-light-2);
|
||||
--color-caret: var(--color-text); /* should ideally be --color-text-dark, see #15651 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user