Skip to content

Commit

Permalink
Add fallback install instructions when browser detection fails
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Feb 1, 2017
1 parent fd702a6 commit ef52525
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
31 changes: 25 additions & 6 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,38 @@
</div>

<div id="platform-instructions-unknown" class="instructions" style="display: none;">
<!-- unrecognized platform: ask for help -->
<p>I don't recognize your platform.</p>
<p>
rustup runs on Windows, Linux, Mac OS X, FreeBSD and NetBSD. If
you are on one of these platforms and are seeing this then please
<a href="https://github.com/rust-lang-nursery/rustup.rs/issues/new">report an issue</a>,
along with the following values:
<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>
</p>

<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>

<!-- duplicate the default cross-platform instructions -->
<div>
<p>If you are running Unix,<br/>run the following in your terminal, then follow the onscreen instructions.</p>
<pre>curl https://sh.rustup.rs -sSf | sh</pre>
</div>

<hr/>

<div>
<p>
If you are running Windows,<br/>download and run
<a href="https://win.rustup.rs">rustup&#x2011;init.exe</a>
then follow the onscreen instructions.
</p>
</div>

</div>

<div id="platform-instructions-default" class="instructions">
Expand Down
3 changes: 2 additions & 1 deletion www/rustup.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ hr {
letter-spacing: 0.1rem;
}

#platform-instructions-unknown div {
/* This is the box that prints navigator.platform, navigator.appVersion values */
#platform-instructions-unknown > div:first-of-type {
font-size: 16px;
line-height: 2rem;
}
Expand Down

0 comments on commit ef52525

Please sign in to comment.