Skip to content

Fine tune push mirror UI #33866

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

Merged
merged 2 commits into from
Mar 14, 2025
Merged

Conversation

wxiaoguang
Copy link
Contributor

No description provided.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 13, 2025
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Mar 13, 2025
@wxiaoguang
Copy link
Contributor Author

image


image

@@ -203,8 +203,17 @@
{{range .PushMirrors}}
<tr>
<td class="tw-break-anywhere">{{.RemoteAddress}}</td>
<td>{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.push"}}</td>
<td>{{if .LastUpdateUnix}}{{DateUtils.FullTime .LastUpdateUnix}}{{else}}{{ctx.Locale.Tr "never"}}{{end}} {{if .LastError}}<div class="ui red label" data-tooltip-content="{{.LastError}}">{{ctx.Locale.Tr "error"}}</div>{{end}}</td>
<td>{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.push"}} ({{.Interval}})</td>
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it make more sense to include the interval already in the translated string?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How to? See the screenshot, I do not see your point.

Copy link
Contributor Author

@wxiaoguang wxiaoguang Mar 13, 2025

Choose a reason for hiding this comment

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

And I think the current syntax is good for all languages, no need to make it more complex.

(If not good, it won't be late to add a new translation in a new PR)

Copy link
Member

Choose a reason for hiding this comment

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

I meant something like Push (every %v), but yes, we can postpone it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, actually Push (every %v) is not really translatable ..... here 2h3m is not a human language, it doesn't fit "every" in many cases. 🤣

<div class="field">
<label for="name">{{ctx.Locale.Tr "repo.settings.mirror_settings.mirrored_repository"}}</label>
<div class="ui small input">
<input id="push-mirror-edit-address" readonly>
Copy link
Member

Choose a reason for hiding this comment

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

This breaks changing the mirror URL.
At the moment (1.23.4), it is possible to change it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you sure? readonly, how to change the mirror URL?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@delvh delvh Mar 13, 2025

Choose a reason for hiding this comment

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

Yep, you are right, I got completely bamboozled:
I saw the readonly in the code above, but didn't check in the actual textbox if I could edit it.
The textbox did not look disabled, so I assumed it could be edited…
I thought the readonly may have been removed with JS.
I didn't imagine in the slightest that we would have a read-only input instead of a span that does not differ at all from an editable input.

@wxiaoguang wxiaoguang added this to the 1.24.0 milestone Mar 13, 2025
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 13, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 13, 2025
@wxiaoguang wxiaoguang enabled auto-merge (squash) March 13, 2025 23:39
@wxiaoguang wxiaoguang merged commit d879ec6 into go-gitea:main Mar 14, 2025
26 checks passed
@wxiaoguang wxiaoguang deleted the fix-push-mirror-ui branch March 14, 2025 01:43
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 14, 2025
* giteaofficial/main:
  Pull request updates will also trigger code owners review requests (go-gitea#33744)
  [skip ci] Updated translations via Crowdin
  remove context from retry downloader (go-gitea#33871)
  Fine tune push mirror UI (go-gitea#33866)
  Fix markdown render (go-gitea#33870)
  Improve issue & code search (go-gitea#33860)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/templates This PR modifies the template files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants