chore: rename class issue-title-buttons to button-row

This commit is contained in:
0ko 2024-06-28 13:11:16 +05:00
parent 51735c415b
commit 7299b2def4
8 changed files with 11 additions and 11 deletions

View file

@ -9,7 +9,7 @@
{{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}} {{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}}
</span> </span>
</div> </div>
<span class="tw-flex tw-items-center top-right-buttons tw-ml-auto tw-text-16 tw-whitespace-nowrap"> <span class="tw-flex tw-items-center button-row tw-ml-auto tw-text-16 tw-whitespace-nowrap">
{{if .EnableFeed}} {{if .EnableFeed}}
<a class="ui basic label button tw-mr-0" href="{{.Org.HomeLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}"> <a class="ui basic label button tw-mr-0" href="{{.Org.HomeLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">
{{svg "octicon-rss" 24}} {{svg "octicon-rss" 24}}

View file

@ -6,7 +6,7 @@
<div class="tw-flex tw-items-center tw-justify-between"> <div class="tw-flex tw-items-center tw-justify-between">
<h1 class="tw-mb-2">{{.Milestone.Name}}</h1> <h1 class="tw-mb-2">{{.Milestone.Name}}</h1>
{{if not .Repository.IsArchived}} {{if not .Repository.IsArchived}}
<div class="tw-flex top-right-buttons"> <div class="tw-flex button-row">
{{if or .CanWriteIssues .CanWritePulls}} {{if or .CanWriteIssues .CanWritePulls}}
{{if .Milestone.IsClosed}} {{if .Milestone.IsClosed}}
<a class="ui primary button link-action" href data-url="{{$.RepoLink}}/milestones/{{.MilestoneID}}/open">{{ctx.Locale.Tr "repo.milestones.open"}} <a class="ui primary button link-action" href data-url="{{$.RepoLink}}/milestones/{{.MilestoneID}}/open">{{ctx.Locale.Tr "repo.milestones.open"}}

View file

@ -8,7 +8,7 @@
{{template "repo/issue/navbar" .}} {{template "repo/issue/navbar" .}}
{{template "repo/issue/search" .}} {{template "repo/issue/search" .}}
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}} {{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
<div class="top-right-buttons"> <div class="button-row">
<a class="ui small primary button" href="{{$.Link}}/new">{{ctx.Locale.Tr "repo.milestones.new"}}</a> <a class="ui small primary button" href="{{$.Link}}/new">{{ctx.Locale.Tr "repo.milestones.new"}}</a>
</div> </div>
{{end}} {{end}}

View file

@ -10,7 +10,7 @@
{{RenderIssueTitle $.Context .Issue.Title ($.Repository.ComposeMetas ctx) | RenderCodeBlock}} {{RenderIssueTitle $.Context .Issue.Title ($.Repository.ComposeMetas ctx) | RenderCodeBlock}}
<span class="index">#{{.Issue.Index}}</span> <span class="index">#{{.Issue.Index}}</span>
</h1> </h1>
<div class="top-right-buttons"> <div class="button-row">
{{if $canEditIssueTitle}} {{if $canEditIssueTitle}}
<button id="issue-title-edit-show" class="ui small basic button">{{ctx.Locale.Tr "repo.issues.edit"}}</button> <button id="issue-title-edit-show" class="ui small basic button">{{ctx.Locale.Tr "repo.issues.edit"}}</button>
{{end}} {{end}}
@ -24,7 +24,7 @@
<div class="ui input tw-flex-1"> <div class="ui input tw-flex-1">
<input value="{{.Issue.Title}}" data-old-title="{{.Issue.Title}}" maxlength="255" autocomplete="off" class="js-quick-submit"> <input value="{{.Issue.Title}}" data-old-title="{{.Issue.Title}}" maxlength="255" autocomplete="off" class="js-quick-submit">
</div> </div>
<div class="top-right-buttons"> <div class="button-row">
<button class="ui small basic cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button> <button class="ui small basic cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
<button class="ui small primary button" <button class="ui small primary button"
data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title"> data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title">

View file

@ -11,7 +11,7 @@
{{ctx.Locale.Tr "notification.read"}} {{ctx.Locale.Tr "notification.read"}}
</a> </a>
</div> </div>
<div class="tw-flex top-right-buttons"> <div class="tw-flex button-row">
<a class="ui tiny button" href="{{AppSubUrl}}/notifications/subscriptions"> <a class="ui tiny button" href="{{AppSubUrl}}/notifications/subscriptions">
{{ctx.Locale.Tr "notification.subscriptions"}} {{ctx.Locale.Tr "notification.subscriptions"}}
</a> </a>

View file

@ -213,7 +213,7 @@ func TestPullCreate_TitleEscape(t *testing.T) {
req := NewRequest(t, "GET", url) req := NewRequest(t, "GET", url)
resp = session.MakeRequest(t, req, http.StatusOK) resp = session.MakeRequest(t, req, http.StatusOK)
htmlDoc := NewHTMLParser(t, resp.Body) htmlDoc := NewHTMLParser(t, resp.Body)
editTestTitleURL, exists := htmlDoc.doc.Find(".top-right-buttons button[data-update-url]").First().Attr("data-update-url") editTestTitleURL, exists := htmlDoc.doc.Find(".button-row button[data-update-url]").First().Attr("data-update-url")
assert.True(t, exists, "The template has changed") assert.True(t, exists, "The template has changed")
req = NewRequestWithValues(t, "POST", editTestTitleURL, map[string]string{ req = NewRequestWithValues(t, "POST", editTestTitleURL, map[string]string{

View file

@ -246,11 +246,11 @@ h1.error-code {
user-select: none; user-select: none;
} }
.top-right-buttons { .button-row {
gap: 0.5rem; gap: 0.5rem;
} }
.top-right-buttons .ui.button { .button-row .ui.button {
margin-right: 0; margin-right: 0;
} }

View file

@ -601,7 +601,7 @@ td .commit-summary {
align-items: center; align-items: center;
} }
.repository.view.issue .top-right-buttons { .repository.view.issue .button-row {
display: flex; display: flex;
} }
@ -609,7 +609,7 @@ td .commit-summary {
.repository.view.issue .issue-title { .repository.view.issue .issue-title {
flex-direction: column; flex-direction: column;
} }
.repository.view.issue .top-right-buttons { .repository.view.issue .button-row {
width: 100%; width: 100%;
margin-top: .5rem; margin-top: .5rem;
justify-content: space-between; justify-content: space-between;