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

Clean up and fix clone button script (#20415 & #20600) #20599

Merged
merged 2 commits into from
Aug 2, 2022

Commits on Aug 1, 2022

  1. Clean up and fix clone button script (go-gitea#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.
    silverwind committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    03a32cd View commit details
    Browse the repository at this point in the history
  2. 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: go-gitea#20558
    silverwind committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    7b7dca2 View commit details
    Browse the repository at this point in the history