mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-24 05:33:40 +09:00
chore: fine tune pull request merge box and commit status item (#38060)
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
)
|
||||
|
||||
type pullMergeBoxInfoItem struct {
|
||||
ItemClass string
|
||||
SvgIconHTML template.HTML
|
||||
InfoHTML template.HTML
|
||||
ListItems []template.HTML
|
||||
@@ -42,10 +41,9 @@ func (c *pullMergeBoxInfoItemCollection) AddInfoItem(svg, info template.HTML, op
|
||||
})
|
||||
}
|
||||
|
||||
func (c *pullMergeBoxInfoItemCollection) AddErrorItem(svg, info template.HTML, optItems ...[]template.HTML) {
|
||||
func (c *pullMergeBoxInfoItemCollection) AddErrorItem(info template.HTML, optItems ...[]template.HTML) {
|
||||
c.items = append(c.items, &pullMergeBoxInfoItem{
|
||||
ItemClass: "tw-text-red",
|
||||
SvgIconHTML: svg,
|
||||
SvgIconHTML: svg.RenderHTML("octicon-x", 16, "tw-text-red"),
|
||||
InfoHTML: info,
|
||||
ListItems: util.OptionalArg(optItems),
|
||||
})
|
||||
@@ -151,10 +149,7 @@ func (prInfo *pullRequestViewInfo) prepareMergeBoxInfoItems(ctx *context.Context
|
||||
ctx.Locale.Tr("repo.pulls.is_empty"),
|
||||
)
|
||||
} else {
|
||||
prInfo.MergeBoxData.infoProtectionBlockers.AddErrorItem(
|
||||
svg.RenderHTML("octicon-x"),
|
||||
ctx.Locale.Tr("repo.pulls.cannot_auto_merge_desc"),
|
||||
)
|
||||
prInfo.MergeBoxData.infoProtectionBlockers.AddErrorItem(ctx.Locale.Tr("repo.pulls.cannot_auto_merge_desc"))
|
||||
prInfo.MergeBoxData.infoProtectionBlockers.AddInfoItem(
|
||||
svg.RenderHTML("octicon-info"),
|
||||
ctx.Locale.Tr("repo.pulls.cannot_auto_merge_helper"),
|
||||
|
||||
Reference in New Issue
Block a user