From be78a82d72b0d65a89b573e0bb7559d49f5ab348 Mon Sep 17 00:00:00 2001 From: Jan Sprinz Date: Tue, 27 Aug 2019 17:02:54 +0200 Subject: [PATCH] Add option to dismiss the driver notice forever --- src/html/index.pug | 2 +- src/html/modals/windows-drivers.pug | 3 ++- src/html/scripts/ui.pug | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/html/index.pug b/src/html/index.pug index b50e9879..0854f965 100644 --- a/src/html/index.pug +++ b/src/html/index.pug @@ -42,8 +42,8 @@ html include modals/select-device include modals/developer-mode include modals/options - include modals/windows-drivers include modals/new-update + include modals/windows-drivers include modals/no-network // --- Scripts --- // Animated loading screen diff --git a/src/html/modals/windows-drivers.pug b/src/html/modals/windows-drivers.pug index 1f102e30..771de5db 100644 --- a/src/html/modals/windows-drivers.pug +++ b/src/html/modals/windows-drivers.pug @@ -16,4 +16,5 @@ br | As a last resort, we also have #[a(onclick="shell.openExternal('https://devices.ubuntu-touch.io')") manual installation instructions for every device], that you can follow if you want to install without using the UBports Installer. .modal-footer - button.btn.btn-default(type='button', data-dismiss='modal') Continue + button.btn.btn-default(type='button', data-dismiss='modal') Dismiss + button#btn-driver-never-ask.btn.btn-primary(type='button', data-dismiss='modal', onclick="localStorage.setItem('neverAskForWindowsDrivers', 'true');") Don't ask me again diff --git a/src/html/scripts/ui.pug b/src/html/scripts/ui.pug index 9ac11ee1..fd754a26 100644 --- a/src/html/scripts/ui.pug +++ b/src/html/scripts/ui.pug @@ -225,7 +225,7 @@ script. $("#options-custom-tools-snap-note").show(); } - if (process.platform === "win32") { + if (process.platform === "win32" && !localStorage.getItem('neverAskForWindowsDrivers')) { modals.show('windows-drivers'); }