Add some confirm dialogs to scouting page to prevent dangerous actions.
Change-Id: I533bf92b8aedfd8d0029b98ebaf7ba12eecc1eae
Signed-off-by: Alex Perry <alex.perry96@gmail.com>
diff --git a/scouting/www/app.ts b/scouting/www/app.ts
index 285d306..e22fad0 100644
--- a/scouting/www/app.ts
+++ b/scouting/www/app.ts
@@ -15,6 +15,12 @@
}
switchTabTo(tab: Tab) {
- this.tab = tab;
+ let shouldSwitch = true;
+ if (tab === 'ImportMatchList') {
+ shouldSwitch = window.confirm('Leave data scouting page?');
+ }
+ if (shouldSwitch) {
+ this.tab = tab;
+ }
}
}