From ac6ac13ec76f59b43c7787bdecdfdcaeee58c714 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Wed, 19 Jan 2022 19:22:16 -0700 Subject: [PATCH] Fix blank page/error when using hardware back button, add 404 page just in case --- www/pages/404.html | 26 ++++++++++++++++++++++++++ www/routes.js | 6 ++++++ 2 files changed, 32 insertions(+) create mode 100644 www/pages/404.html diff --git a/www/pages/404.html b/www/pages/404.html new file mode 100644 index 0000000..9cd8bac --- /dev/null +++ b/www/pages/404.html @@ -0,0 +1,26 @@ + +
+ + + +
+ +
+

This page doesn't exist. How did you get here? Please tell us, it might be a bug. +

+ +
+ +
\ No newline at end of file diff --git a/www/routes.js b/www/routes.js index f44fded..1f625fe 100644 --- a/www/routes.js +++ b/www/routes.js @@ -43,6 +43,7 @@ var routes = [ { path: '/home', name: 'home', + alias: ["/"], on: { pageBeforeIn: function () { // make sure it's not shown right after account setup @@ -420,5 +421,10 @@ var routes = [ } } ] + }, + { + path: '(.*)', + url: './pages/404.html', + name: '404' } ];