From e0ce3767c4d8e7aa0bbd4aa4509ea071c0787a8b Mon Sep 17 00:00:00 2001 From: Jan Sprinz Date: Tue, 27 Aug 2019 23:25:25 +0200 Subject: [PATCH] Very aggressive legacy note, resolves #221 (#862) --- src/html/index.pug | 1 + src/html/modals/legacy-android.pug | 13 +++++++++++++ src/html/scripts/main.pug | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 src/html/modals/legacy-android.pug diff --git a/src/html/index.pug b/src/html/index.pug index f739b5f8..6c1a32f1 100644 --- a/src/html/index.pug +++ b/src/html/index.pug @@ -39,6 +39,7 @@ html include modals/error include modals/password include modals/oem-lock + include modals/legacy-android include modals/low-power include modals/select-device include modals/developer-mode diff --git a/src/html/modals/legacy-android.pug b/src/html/modals/legacy-android.pug new file mode 100644 index 00000000..e19eafab --- /dev/null +++ b/src/html/modals/legacy-android.pug @@ -0,0 +1,13 @@ +#legacy-android-modal.modal.fade(tabindex='-1', role='dialog') + .modal-dialog(role='document') + .modal-content + .modal-header + button.close(type='button', data-dismiss='modal', aria-label='Close') + span(aria-hidden='true') × + h4.modal-title This is a legacy Android device! + .modal-body + p If your device is running Android, you might have to #[a(onclick="shell.openExternal('https://docs.ubports.com/en/latest/userguide/install.html#install-on-legacy-android-devices')") install the old Ubuntu Touch version from Canonical] first to unlock the bootloader. + p #[b The UBports Installer will not work while this device is running Android!] + p You can follow #[a(onclick="shell.openExternal('https://docs.ubports.com/en/latest/userguide/install.html#install-on-legacy-android-devices')") this step-by-step guide] to unlock your device. + .modal-footer + button.btn.btn-default(type='button', data-dismiss='modal') Got it, my device is unlocked! diff --git a/src/html/scripts/main.pug b/src/html/scripts/main.pug index c346de08..0f6fd9cd 100644 --- a/src/html/scripts/main.pug +++ b/src/html/scripts/main.pug @@ -157,6 +157,8 @@ script. $("#device-name").text(output.name); if (isLegacyAndroid && !ubuntuCom) $("#legacy-android-note").show(); + if (isLegacyAndroid) + modals.show("legacy-android"); if (autoDetected) footer.underText.set("Are you ready for Ubuntu Touch on your " + output.name + "?"); else