1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-25 13:19:37 -05:00
forgejo/templates
silverwind 56b99551ae
Clean up and fix clone button script (#20415 & #20600) (#20599)
* Clean up and fix clone button script (#20415)

The button 'primary' class needs to be set in a synchronous script to prevent flicker of the button which was regressed recently, fixed that.

Additionally, reduced the two script tags to just one, the previous scripts were actually initializing the buttons thrice on the empty repo page, now it only initializes once. Finally, removed duplicate code and re-used the inline function in the update code as well.

I had to split out the script into a separate template as on the empty repo page, the script needs access to the clone URL span in the example text, which is rendered below the clone buttons, so buttons and script could not be combined.

* Add default value for clone URLs

Default clone URLs to HTTP(S) in DOM rendering. JS will immediately
replace this if the user preference is SSH.

Fixes: https://github.com/go-gitea/gitea/issues/20558
2022-08-02 12:31:38 +08:00
..
admin Remove tab/TabName usage where it's not needed (#19973) 2022-06-15 23:05:32 +08:00
api/packages/pypi Add Package Registry (#16510) 2022-03-30 16:42:47 +08:00
base Add labels to two buttons that were missing them (#20419) (#20524) 2022-07-28 21:21:36 +01:00
custom Add footer extra links template (#9576) 2020-01-03 20:41:56 +02:00
explore Remove tab/TabName usage where it's not needed (#19973) 2022-06-15 23:05:32 +08:00
mail Try to prevent autolinking of displaynames by email readers (#19169) 2022-03-23 12:34:20 +00:00
org Replace blue button and label classes with primary (#19763) 2022-05-20 00:08:08 +02:00
package Show hint to link package to repo when viewing empty repo package list (#20504) (#20507) 2022-07-27 10:06:54 -04:00
repo Clean up and fix clone button script (#20415 & #20600) (#20599) 2022-08-02 12:31:38 +08:00
shared Show source/target branches on PR's list (#19747) 2022-05-25 15:33:35 +02:00
status Refactor HTTP request context (#17979) 2021-12-15 14:59:57 +08:00
swagger Dismiss prior pull reviews if done via web in review dismiss (#20197) (#20407) 2022-07-19 17:46:33 +02:00
user Add missing Tabs on organisation/package view (#20539) 2022-07-29 19:14:50 +02:00
home.tmpl Rename StaticUrlPrefix to AssetUrlPrefix (#15779) 2021-05-08 16:27:25 +02:00
install.tmpl Refactor install page (db type) (#17919) 2021-12-07 13:44:08 +08:00
post-install.tmpl Rename StaticUrlPrefix to AssetUrlPrefix (#15779) 2021-05-08 16:27:25 +02:00