Handle Helena Express deep links with the home page barcode scanner
This commit is contained in:
parent
ed1f4dddcf
commit
f2463d021d
@ -33,6 +33,8 @@ function openGenericBarcodeScanner() {
|
||||
} else if (trackingcoderegex.test(result)) {
|
||||
code = result;
|
||||
action = "track";
|
||||
} else if (result.startsWith("https://helena.express/")) {
|
||||
action = "hlnexurl";
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
@ -49,6 +51,9 @@ function openGenericBarcodeScanner() {
|
||||
router.navigate("/crypto?paymenturi=" + code);
|
||||
//app.dialog.alert("Not implemented.");
|
||||
break;
|
||||
case "hlnexurl":
|
||||
handleDeepLink(result);
|
||||
break;
|
||||
default:
|
||||
app.dialog.alert("This app can't understand what's in that barcode.", "Error");
|
||||
return;
|
||||
|
@ -159,6 +159,9 @@ function handleDeepLink(href) {
|
||||
break;
|
||||
case "/app":
|
||||
break;
|
||||
case "/app/get":
|
||||
app.dialog.alert("You already have the Helena Express app. You're using it right now!", "Hi there!");
|
||||
break;
|
||||
case "/track":
|
||||
if (link.fragment) {
|
||||
router.navigate("/track/" + link.fragment);
|
||||
|
Loading…
x
Reference in New Issue
Block a user