Skip to content

Remove windows-setup auto download functionality #1660

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 1 commit into from
Jan 2, 2022
Merged
Show file tree
Hide file tree
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
11 changes: 0 additions & 11 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,17 +238,6 @@ var Downloads = {
Downloads.observeGUIOSFilter();
Downloads.observePopState();
Downloads.filterGUIS();
Downloads.triggerAutoDownload();
},

triggerAutoDownload: function() {
var ref = document.referrer;
var src = $('#auto-download-link').attr('href');

if (this.shouldAutoDownload(ref, src)) {
$('.downloading .hide').show();
document.location = src;
}
},

shouldAutoDownload: function(ref, src) {
Expand Down
23 changes: 0 additions & 23 deletions app/assets/stylesheets/downloads.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,6 @@
}
}

.callout.downloading {
background: $callout-color url("/images/icons/download.png") 24px 24px no-repeat;
padding: 20px 30px 20px 100px !important;

h3 {
font-size: 18px;
color: $orange;
}

p {
margin-bottom: 15px !important;
font-size: 15px;
line-height: 1.3em;
}

p.small {
margin-bottom: 0 !important;
font-size: 12px;
line-height: 1.4;
color: $light-font-color;
}
}

#download-next-steps {
@include clearfix;
@extend .unstyled !optional;
Expand Down
61 changes: 28 additions & 33 deletions app/views/downloads/download_windows.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,34 @@
<% end %>

<div id="main">
<h1>Downloading Git</h1>
<div class="callout downloading">
<h3 class="hide">Your download is starting...</h3>
<p>
<%= raw "You are downloading the latest (<strong>#{@download.version.name}</strong>) <strong>#{@bitness}</strong> version of <strong>Git for Windows</strong>. This is the most recent <a href='#{@project_url}'>maintained build</a>. It was released <strong>#{time_ago_in_words @download.release_date} ago</strong>, on #{@download.release_date.strftime("%Y-%m-%d")}." %>
</p>
<p>
<%= raw "<strong><a id=\"auto-download-link\" href=\"#{@download.url}\">Click here to download manually</a><span class=\"hide\">, if your download hasn't started.</span></strong>" %>
</p>
<h3>Other Git for Windows downloads</h3>
<h4>Executable Setup</h4>
<p>
<%= raw "<strong><a href=\"#{@download32.url}\">32-bit Git for Windows Setup</a>.</strong>" %>
</p>
<p>
<%= raw "<strong><a href=\"#{@download64.url}\">64-bit Git for Windows Setup</a>.</strong>" %>
</p>
<h4>Portable ("thumbdrive edition")</h4>
<p>
<%= raw "<strong><a href=\"#{@download32portable.url}\">32-bit Git for Windows Portable</a>.</strong>" %>
</p>
<p>
<%= raw "<strong><a href=\"#{@download64portable.url}\">64-bit Git for Windows Portable</a>.</strong>" %>
</p>
<h4>Using winget tool</h4>
<p>
Install <a href="https://docs.microsoft.com/en-us/windows/package-manager/winget">winget tool</a> if you don't already have it, then type this command in command prompt or Powershell.<br>
<code>winget install --id Git.Git -e --source winget</code>
</p>
<p class="small">
<%= raw "The current source code release is version <strong>#{@latest.name}</strong>. If you want the newer version, you can build it from <a href=\"#{@source_url}\">the source code</a>." %>
</p>
</div>
<h1>Download for Windows</h1>
<p>
<%= raw "<strong><a id=\"auto-download-link\" href=\"#{@download.url}\">Click here to download </a></strong>" %><%= raw " the latest (<strong>#{@download.version.name}</strong>) <strong>#{@bitness}</strong> version of <strong>Git for Windows</strong>. This is the most recent <a href='#{@project_url}'>maintained build</a>. It was released <strong>#{time_ago_in_words @download.release_date} ago</strong>, on #{@download.release_date.strftime("%Y-%m-%d")}." %>
</p>
<h3>Other Git for Windows downloads</h3>
<h4>Standalone Installer</h4>
<p>
<%= raw "<strong><a href=\"#{@download32.url}\">32-bit Git for Windows Setup</a>.</strong>" %>
</p>
<p>
<%= raw "<strong><a href=\"#{@download64.url}\">64-bit Git for Windows Setup</a>.</strong>" %>
</p>
<h4>Portable ("thumbdrive edition")</h4>
<p>
<%= raw "<strong><a href=\"#{@download32portable.url}\">32-bit Git for Windows Portable</a>.</strong>" %>
</p>
<p>
<%= raw "<strong><a href=\"#{@download64portable.url}\">64-bit Git for Windows Portable</a>.</strong>" %>
</p>
<h4>Using winget tool</h4>
<p>
Install <a href="https://docs.microsoft.com/en-us/windows/package-manager/winget">winget tool</a> if you don't already have it, then type this command in command prompt or Powershell.<br>
<code>winget install --id Git.Git -e --source winget</code>
</p>
<p class="small">
<%= raw "The current source code release is version <strong>#{@latest.name}</strong>. If you want the newer version, you can build it from <a href=\"#{@source_url}\">the source code</a>." %>
</p>

<h2>Now What?</h2>
<p>
Now that you have downloaded Git, it's time to start using it.
Expand Down