Skip to content

tidy up archive modal #27131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions templates/repo/settings/options.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -976,20 +976,23 @@
{{end}}
</div>
<div class="content">
<p>
<div class="ui warning message">
Copy link
Contributor

@wxiaoguang wxiaoguang Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes the UI looks unnecessarily complex by using such warning message.

I never see a dialog with inner warning color/border for the main content.

I think the old UI looks good enough, the content message is rendered as normal text:

image

{{if .Repository.IsArchived}}
{{.locale.Tr "repo.settings.unarchive.text"}}
{{else}}
{{.locale.Tr "repo.settings.archive.text"}}
{{end}}
</p>
</div>
<form action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="{{if .Repository.IsArchived}}unarchive{{else}}archive{{end}}">
<input type="hidden" name="repo_id" value="{{.Repository.ID}}">
{{template "base/modal_actions_confirm" .}}
</div>
<form action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="{{if .Repository.IsArchived}}unarchive{{else}}archive{{end}}">
<input type="hidden" name="repo_id" value="{{.Repository.ID}}">
Comment on lines +986 to +989
Copy link
Member

@delvh delvh Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened in these lines?
Whitespace seems to have changed, but I don't understand why.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They would like to fix a "misalignment" bug, but the bug doesn't exist in Gitea anymore.

<div class="text right actions">
<button class="ui cancel button">{{.locale.Tr "settings.cancel"}}</button>
<button class="ui red button">{{.locale.Tr "repo.settings.archive.button"}}</button>
</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is modal_actions_confirm.tmpl unsuitable?

</form>
</div>
</div>
{{end}}
{{end}}
Expand Down