adding UI calling for uploader

This commit is contained in:
Peli de Halleux 2015-11-07 10:00:26 -08:00
Родитель dbf9f49b9e
Коммит e021db04ce
2 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -35,6 +35,7 @@ module TDev {
export var isWebkit = false;
export var isAndroid = false;
export var isMacOSX = false;
export var isWindows = false;
export var isWindows8plus = false;
export var isRaspberryPiDebian = false;
export var isCompiledApp = false;
@ -272,6 +273,8 @@ module TDev {
if (m) webkitVersion = parseInt(m[1]);
}
isMacOSX = /Macintosh/.test(userAgent);
if (/Windows NT/.test(userAgent))
isWindows = true;
if (/Windows NT (6.[2-9]|[789])/.test(userAgent))
isWindows8plus = true;
mobileWebkit = isWebkit && isMobile;

Просмотреть файл

@ -2016,6 +2016,14 @@ module TDev
: lf("Please wait while we prepare your .hex file. When the .hex file is downloaded, drag and drop it onto your BBC micro:bit device drive.")
this.currentCompilationModalDialog.add(div("wall-dialog-body", msg));
}
if (TDev.dbg && Browser.isDesktop && Browser.isWindows) {
this.currentCompilationModalDialog.add(div("wall-dialog-body",
lf("Tired of copying the .hex file? "),
HTML.mkA("", "https://www.touchdevelop.com/microbituploader", "blank", lf("Try the uploader app!")))
);
}
this.currentCompilationModalDialog.add(Browser.TheHost.poweredByElements());
//if (inBrowser)
// this.currentCompilationModalDialog.add(div("wall-dialog-body", HTML.mkCheckBoxLocalStorage(hideKey, lf("don't show this dialog again"))));