Skip to content
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

The js-clone-url-vsc element is located below the script #21224

Closed
tyroneyeh opened this issue Sep 21, 2022 · 3 comments · Fixed by #21225 or #21226
Closed

The js-clone-url-vsc element is located below the script #21224

tyroneyeh opened this issue Sep 21, 2022 · 3 comments · Fixed by #21225 or #21226
Labels
Milestone

Comments

@tyroneyeh
Copy link
Contributor

Description

So this part is useless

https://github.com/go-gitea/gitea/blob/main/templates/repo/clone_script.tmpl#L25
https://github.com/go-gitea/gitea/blob/main/templates/repo/home.tmpl#L129

Gitea Version

1.17.2

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

gentoo

How are you running Gitea?

systemd

Database

PostgreSQL

wxiaoguang added a commit that referenced this issue Sep 21, 2022
Follow #20557, fix #21224

The `clone_script` will update `.js-clone-url` and related elements,
so it should be put after these elements.
@tyroneyeh
Copy link
Contributor Author

v1.17.2 or later still one more issue

image

@wxiaoguang
Copy link
Contributor

Hmm, that's strange. IIRC someone mentioned that the `..//...` can not be used. Maybe that's the root problem.

For 1.18-dev, it works fine https://try.gitea.io

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Sep 22, 2022

It will fixed by #21226

ps: the bug doesn't exist in 1.17.2, but only in unreleased 1.17-dev

Thank you very much for testing it!

@wxiaoguang wxiaoguang reopened this Sep 22, 2022
@wxiaoguang wxiaoguang linked a pull request Sep 22, 2022 that will close this issue
wxiaoguang added a commit that referenced this issue Sep 23, 2022
Backport #21225, fix for #21128 (also in 1.17.3), close #21224

The indent was incorrect before, so this PR did some formatting work. 

Bypass Golang's template bug for JS string interpolation. And since
there are JS lint rules for templates, so the string interpolation is
also a must.
@wxiaoguang wxiaoguang added this to the 1.17.3 milestone Sep 23, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants