File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
templates/components/tools Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -157,8 +157,23 @@ function set_up_cycle_button() {
157157function fill_in_bug_report_values ( ) {
158158 var nav_plat = document . getElementById ( "nav-plat" ) ;
159159 var nav_app = document . getElementById ( "nav-app" ) ;
160+ var report_link = document . getElementById ( "report-unknown-platform-link" ) ;
160161 nav_plat . textContent = navigator . platform ;
161162 nav_app . textContent = navigator . appVersion ;
163+ var issue_template = `\
164+ <!--
165+ PLEASE do not open an issue if you are using Android!
166+
167+ The Rust toolchain does not run and can't be installed on Android.
168+
169+ If you are on desktop, go ahead and open this issue.
170+ -->
171+
172+ navigator.platform: \`${ navigator . platform } \`
173+ navigator.appVersion: \`${ navigator . appVersion } \`
174+
175+ The website did not recognize the platform I'm on, so I am unable to install rustup.` ;
176+ report_link . href = "https://github.com/rust-lang/www.rust-lang.org/issues/new?title=Unrecognized%20platform&body=" + encodeURIComponent ( issue_template ) ;
162177}
163178
164179var override_map = new Map ( [
Original file line number Diff line number Diff line change 3333 </div >
3434 </div >
3535 <br />
36- <a href =" https://github.com/rust-lang/www.rust-lang.org/issues/new?title=Unrecognized%20platform&body=navigator.platform%3A%20_please%20fill%20out_%0Anavigator.appVersion%3A%20_please%20fill%20out_%0A%0AThe%20website%20did%20not%20recognize%20the%20platform%20I%27m%20on%2C%20so%20I%20am%20unable%20to%20install%20rustup." class =" button button-secondary" >{{ fluent " tools-rustup-report" }} </a >
36+ <!-- This href is overwritten with a better template in static/scripts/tools-install.js -->
37+ <a
38+ href =" https://github.com/rust-lang/www.rust-lang.org/issues/new"
39+ id =" report-unknown-platform-link"
40+ class =" button button-secondary"
41+ >
42+ {{ fluent " tools-rustup-report" }}
43+ </a >
3744 <hr />
3845 <div >
3946 <p >
You can’t perform that action at this time.
0 commit comments