From 20316396231b0294c6742e75219552c2068f6358 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Fri, 17 Nov 2023 22:24:05 -0700 Subject: [PATCH] Add locations map, add kiosks, remove crypto/money orders, text tweaks --- www/assets/css/app.css | 12 ++ www/assets/css/customstyles.css | 20 +++ www/assets/images/DAS_marker.png | Bin 0 -> 1183 bytes www/assets/images/PP_marker.png | Bin 0 -> 1497 bytes www/assets/images/dropbox-icon.png | Bin 896 -> 0 bytes .../postalpoint-logo-horizontal-black.svg | 90 ++++++++++++ .../postalpoint-logo-horizontal-white.svg | 79 +++++++++++ www/assets/js/dropandsend.js | 2 +- www/assets/js/locationmap.js | 128 ++++++++++++++++++ www/assets/js/main.js | 3 + www/assets/js/map.js | 1 + www/assets/js/platform.js | 9 +- www/assets/js/storage.js | 13 +- www/index.html | 2 + www/pages/kiosk.html | 68 ++++++++++ www/pages/locations.html | 42 ++++++ www/pages/notary.html | 5 + www/pages/trailer.html | 11 +- www/routes.js | 111 +++++++++++---- www/settings.js | 5 +- 20 files changed, 552 insertions(+), 49 deletions(-) create mode 100644 www/assets/images/DAS_marker.png create mode 100644 www/assets/images/PP_marker.png delete mode 100644 www/assets/images/dropbox-icon.png create mode 100644 www/assets/images/postalpoint-logo-horizontal-black.svg create mode 100644 www/assets/images/postalpoint-logo-horizontal-white.svg create mode 100644 www/assets/js/locationmap.js create mode 100644 www/pages/kiosk.html create mode 100644 www/pages/locations.html diff --git a/www/assets/css/app.css b/www/assets/css/app.css index f7e7103..533c21b 100644 --- a/www/assets/css/app.css +++ b/www/assets/css/app.css @@ -63,6 +63,18 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. background-color: rgba(0,0,0,0.95); } +.hidden-light { + display: none; +} + +.dark .hidden-dark { + display: none; +} + +.dark .hidden-light { + display: initial; +} + .navbar, .navbar-bg, .subnavbar, .subnavbar *, .subnavbar .searchbar-inner .searchbar-input-wrap * { background-color: var(--solid-translucent-color); } diff --git a/www/assets/css/customstyles.css b/www/assets/css/customstyles.css index fd28a9f..d61c222 100644 --- a/www/assets/css/customstyles.css +++ b/www/assets/css/customstyles.css @@ -57,6 +57,10 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +:root { + --location-map-height: calc(100vh - calc(var(--f7-navbar-height) + var(--f7-toolbar-height))); +} + .md, .aurora { --service-area-map-height: calc(100vh - calc(var(--f7-navbar-height) + var(--f7-toolbar-height))); } @@ -70,6 +74,22 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. height: var(--service-area-map-height); } +#mapbox-locations { + width: 100%; + height: var(--location-map-height); +} + +#locationInfoModal .sheet-modal-inner { + overflow-y: auto; +} + +#locationInfoModalContainer { + margin-top: 1em; +} + +#mapbox-locations.sheet-open { + height: calc(var(--location-map-height) - var(--f7-sheet-height)); +} /* diff --git a/www/assets/images/DAS_marker.png b/www/assets/images/DAS_marker.png new file mode 100644 index 0000000000000000000000000000000000000000..efd14b4cdaebb30f1630acc926e38803d4b63e66 GIT binary patch literal 1183 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 + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/www/assets/images/postalpoint-logo-horizontal-white.svg b/www/assets/images/postalpoint-logo-horizontal-white.svg new file mode 100644 index 0000000..c6f431f --- /dev/null +++ b/www/assets/images/postalpoint-logo-horizontal-white.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/www/assets/js/dropandsend.js b/www/assets/js/dropandsend.js index 3e59cc5..af788f0 100644 --- a/www/assets/js/dropandsend.js +++ b/www/assets/js/dropandsend.js @@ -78,7 +78,7 @@ $("body").on("popup:open", "#dasLocationMapPopup", function () { dropboxMap.reloadMap(); dropboxMap.mapObj.on('load', function () { dropboxMap.mapObj.jumpTo({center: [-112.005, 46.589], zoom: 8}); - dropboxMap.loadIcon("./assets/images/dropbox-icon.png", "dropbox", function () { + dropboxMap.loadIcon("./assets/images/DAS_marker.png", "dropbox", function () { apirequest(SETTINGS.apis.dropandsendlocations, {}, function (data) { dropboxMap.loadMarkersFromGeoJson(data, "dropbox", "dropbox"); dropboxMap.mapObj.on('click', 'marker-layer-dropbox', function (e) { diff --git a/www/assets/js/locationmap.js b/www/assets/js/locationmap.js new file mode 100644 index 0000000..66ed01c --- /dev/null +++ b/www/assets/js/locationmap.js @@ -0,0 +1,128 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/** + * Open a location on the map. + * @param {type} e + * @returns {undefined} + */ +var openMapLocationInfo = function (e) { + var coordinates = e.geometry.coordinates.slice(); + showLocationDetails(e); + locationMap.mapObj.resize(); + locationMap.mapObj.easeTo({ + center: [coordinates[0], coordinates[1]], + zoom: 15, + bearing: 0, + pitch: 0 + }); +}; + +var showLocationDetails = function (e) { + var coordinates = e.geometry.coordinates.slice(); + var name = e.properties.name; + var info = e.properties.info; + var hours = e.properties.hours; + var geolink = "geo:" + (Math.round(coordinates[1] * 1000000) / 1000000) + "," + (Math.round(coordinates[0] * 1000000) / 1000000); + + var typeinfo = ""; + if (e.properties.branding == "DAS") { + typeinfo = "Drop and Send℠ Drop Box
Use this app to send packages from this box, no postage necessary. Just put your package inside and scan the QR code with this app."; + } else if (e.properties.branding == "PP") { + typeinfo = "PostalPoint™ Kiosk
Purchase postage, send USPS packages, and get free boxes here."; + } + $("#locationInfoName").text(name); + $("#locationInfoModalContainer").html( + "
" + + "  Directions" + + "
" + + "
" + + (e.properties.branding == "DAS" ? "  More Info" : "") + + (e.properties.branding == "PP" ? "  More info" : "") + + "
" + + typeinfo + "
" + + (hours == "" ? "" : "Hours: " + hours) + + "
Info: " + info + ); + app.sheet.open("#locationInfoModal"); +}; + +function loadLocationMap() { + if (MapControl.supported()) { + if (locationMap == null) { + app.preloader.show(); + var mapboxel = document.getElementById("mapbox-locations"); + locationMap = new MapControl(mapboxel, true); + locationMap.reloadMap(); + var locationMapLoaded = false; + + locationMap.mapObj.on('load', function () { + locationMapLoaded = true; + }); + + apirequest(SETTINGS.apis.locations, {}, function (resp) { + var loadWhenMapReady = function () { + if (locationMapLoaded) { + setupLocationMap(resp); + } else { + setTimeout(function () { + loadWhenMapReady(); + }, 100); + } + } + loadWhenMapReady(); + }, function (xhr) { + app.preloader.hide(); + try { + var error = $.parseJSON(xhr.responseText); + if (error && typeof error.msg != 'undefined') { + app.dialog.alert(error.msg, "Error"); + sendErrorReport("Location Map", "Couldn't get locations GeoJSON", error.msg); + } else { + app.dialog.alert("There's a server or network problem. Check your Internet connection or try again later.", "Error"); + sendErrorReport("Location Map", "Couldn't get locations GeoJSON", "Server/network problem: " + xhr.status + ": " + xhr.statusText); + } + } catch (ex) { + app.dialog.alert("There's a server or network problem. Check your Internet connection or try again later.", "Error"); + sendErrorReport("Location Map", "Couldn't get locations GeoJSON", "Server/network problem: " + xhr.status + ": " + xhr.statusText); + } + }); + } + } else { + showWebGLErrorMessage(); + app.preloader.hide(); + } +} + +function setupLocationMap(geojson) { + app.preloader.hide(); + geojson.features.forEach((marker) => { + const el = document.createElement('div'); + el.className = 'marker'; + el.style.backgroundImage = "url(./assets/images/" + marker.properties.branding + "_marker.png)"; + el.style.width = "32px"; + el.style.height = "32px"; + el.style.cursor = "pointer"; + el.addEventListener('click', () => { + openMapLocationInfo(marker); + }); + new maplibregl.Marker({element: el}) + .setLngLat(marker.geometry.coordinates) + .addTo(locationMap.mapObj); + }); + locationMap.mapObj.jumpTo({center: [-112.005, 46.589], zoom: 9}); + +} + +$("body").on("sheet:open", "#locationInfoModal", function () { + $("#mapbox-locations").addClass("sheet-open"); + locationMap.mapObj.resize(); +}); +$("body").on("sheet:close", "#locationInfoModal", function () { + $("#mapbox-locations").removeClass("sheet-open"); + locationMap.mapObj.resize(); + locationMap.mapObj.easeTo({center: [-112.005, 46.589], zoom: 9}); +}); \ No newline at end of file diff --git a/www/assets/js/main.js b/www/assets/js/main.js index 8b42bdb..8369e05 100644 --- a/www/assets/js/main.js +++ b/www/assets/js/main.js @@ -23,6 +23,9 @@ var app = new Framework7({ popover: { backdrop: true }, + sheet: { + backdrop: false + }, touch: { tapHold: true }, diff --git a/www/assets/js/map.js b/www/assets/js/map.js index 7ca6d66..92ae33b 100644 --- a/www/assets/js/map.js +++ b/www/assets/js/map.js @@ -7,6 +7,7 @@ var dropboxMap = null; var serviceAreaMap = null; +var locationMap = null; function showWebGLErrorMessage() { app.dialog.alert("Well, this is awkward. Your device doesn't support displaying the map. If your \n\ diff --git a/www/assets/js/platform.js b/www/assets/js/platform.js index 3f65913..4e3b126 100644 --- a/www/assets/js/platform.js +++ b/www/assets/js/platform.js @@ -181,7 +181,7 @@ function handleDeepLink(href) { router.navigate("/quicksend"); break; case "/kiosk": - router.navigate("/postalpoint"); + router.navigate("/kiosk"); break; case "/manifest": openExternalBrowser(link.href); @@ -199,15 +199,14 @@ function handleDeepLink(href) { case "/pickup": router.navigate("/pickup"); break; - case "/postalpoint": - case "/postalpoint/": - router.navigate("/postalpoint"); + case "/locations": + router.navigate("/locations"); break; case "/rates": router.navigate("/rates"); break; case "/review": - openExternalBrowser(link.href); + openExternalBrowser("https://helena.express/review"); break; case "/schedule": router.navigate("/appointment"); diff --git a/www/assets/js/storage.js b/www/assets/js/storage.js index d03e5bf..76b0dcf 100644 --- a/www/assets/js/storage.js +++ b/www/assets/js/storage.js @@ -12,7 +12,11 @@ * @returns {undefined} */ function setStorage(key, value) { - localStorage.setItem(key, value); + if (typeof value == "string") { + localStorage.setItem(key, value); + } else { + localStorage.setItem(key, "JSON|" + JSON.stringify(value)); + } } /** @@ -21,7 +25,12 @@ function setStorage(key, value) { * @returns {DOMString} */ function getStorage(key) { - return localStorage.getItem(key); + var val = localStorage.getItem(key); + if (typeof val == "string" && val.startsWith("JSON|")) { + return JSON.parse(val.substr(5)); + } else { + return val; + } } function removeFromStorage(key) { diff --git a/www/index.html b/www/index.html index 44a5270..df81d4b 100644 --- a/www/index.html +++ b/www/index.html @@ -70,8 +70,10 @@ + + diff --git a/www/pages/kiosk.html b/www/pages/kiosk.html new file mode 100644 index 0000000..68ce103 --- /dev/null +++ b/www/pages/kiosk.html @@ -0,0 +1,68 @@ + + +
+ + + +
+
+
+
+
+
+ + +
+
+ Visit a PostalPoint™ shipping kiosk to send mail and packages. + We've designed the kiosks with a simple and easy to use touchscreen, free boxes and envelopes, and a secure package drop. + You pay USPS retail prices with no markup. Free tracking and insurance included. +
+
+
+
+
+
Locations
+
+ +
+
+
+
+ Helena Express is a founding member of the PostalPoint shipping network. PostalPoint is a trademark of PostalPortal LLC. +
+
+
\ No newline at end of file diff --git a/www/pages/locations.html b/www/pages/locations.html new file mode 100644 index 0000000..fdad3a2 --- /dev/null +++ b/www/pages/locations.html @@ -0,0 +1,42 @@ + + +
+ + + +
+
+
+ Drop Box + Kiosk +
+
+
+
+ +
+ +
+
+
+
+
\ No newline at end of file diff --git a/www/pages/notary.html b/www/pages/notary.html index 11201a2..dc8b3e3 100644 --- a/www/pages/notary.html +++ b/www/pages/notary.html @@ -61,6 +61,11 @@ licensed to practice law. We are not allowed to draft legal records, give advice on legal matters, including immigration, or charge a fee for those activities. +
+
+
+
+
diff --git a/www/pages/trailer.html b/www/pages/trailer.html index 0b5f4ce..aea12de 100644 --- a/www/pages/trailer.html +++ b/www/pages/trailer.html @@ -27,24 +27,19 @@
Our Mobile Shipping Center is a specialized trailer equipped to offer mailing, - shipping, notarizing, copying, and faxing services. With no pickup or travel fees, + shipping, notarizing, copying, and faxing services. With no markup or extra fees, it's a good way to save money and skip the line at the post office.
-
- Check the schedule and come visit us! Need directions? - Just tapclick - a location to open a map. -
Learn More  
- +
Use Quick Send for faster service! Just enter the address info for your package ahead of time then show us your phone screen.
- +
Open Quick Send diff --git a/www/routes.js b/www/routes.js index efc2936..5fb9ac1 100644 --- a/www/routes.js +++ b/www/routes.js @@ -23,7 +23,6 @@ var pagesToCompile = [ "shop", "shoppingcart_fragment", "rateresult", -// "labelrateresult", "crypto", "crypto_wallet", "account", @@ -31,9 +30,10 @@ var pagesToCompile = [ "settings", "receipts", "trailer", + "kiosk", "money", "moneyorder", - //"postalpoint", + "locations", "quicksend" ]; console.log("Compiling page templates..."); @@ -172,10 +172,10 @@ var routes = [ text: "Book a mobile notary visit." }, { - title: "My Account", - href: "/account", - icon: "fa-duotone fa-user-circle", - text: "View receipts, get account number, update payment method, and more." + title: "Locations", + href: "/locations", + icon: "fa-duotone fa-map-location-dot", + text: "Find a shipping kiosk or drop box near you." }, { title: "Shop for Supplies", @@ -190,10 +190,10 @@ var routes = [ text: "Send a hand-delivered telegram anywhere in the Helena area." }, { - title: "Money Services", - href: "/money", - icon: "fa-duotone fa-money-bill-wave", - text: "Manage money orders and cryptocurrency." + title: "My Account", + href: "/account", + icon: "fa-duotone fa-user-circle", + text: "View receipts, get account number, update payment method, and more." } ] }) @@ -207,41 +207,35 @@ var routes = [ resolve({ content: compiledPages.send({ pages: [ -// { -// title: "From My Phone", -// href: "/labelmaker", -// icon: "fa-duotone fa-mobile-alt", -// text: "Send USPS Flat Rate packages from your phone. Printer optional." -// }, -// { -// title: "Shipping Kiosk", -// href: "/postalpoint", -// icon: "fa-duotone fa-shop", -// text: "Stop by a PostalPoint kiosk at a local business, put your package on the scale, and print postage." -// }, { - title: "Pickup", - href: "/pickup", - icon: "fa-duotone fa-home", - text: "Leave your package on your porch and we'll pick it up and ship it for you. No postage or appointment needed." + title: "Self-Serve Kiosk", + href: "/kiosk", + icon: "fa-duotone fa-display", + text: "Visit a friendly neighborhood PostalPoint™ shipping kiosk to send mail and packages with no lines or hassle." }, { title: "Drop Box", href: "/das", icon: "fa-duotone fa-box-alt", - text: "Just drop your package into a Drop and Send drop box. We'll add postage for you and charge your account." + text: "Just drop your package into a Drop and Send℠ drop box and scan the QR code. We'll charge the postage to your Helena Express account." + }, + { + title: "Pickup", + href: "/pickup", + icon: "fa-duotone fa-home", + text: "Leave your package on your porch and we'll pick it up and ship it for you. No postage or appointment needed." }, { title: "Appointment", href: "/appointment/shipping", icon: "fa-duotone fa-calendar-alt", - text: "A courier will come to you on your schedule. No account required." + text: "We'll come to your home or business on your schedule. It's like a post office in your driveway!" }, { title: "Mobile Shipping Center", href: "/mobile", icon: "fa-duotone fa-caravan", - text: "Our Mobile Shipping Center roams the Helena area like a food truck for mail. Find dates and places here." + text: "Our Mobile Shipping Center is a specially-designed trailer for printing postage, shipping mail and packages, and more." } ] }) @@ -308,6 +302,19 @@ var routes = [ } } }, + { + path: '/locations', + content: compiledPages.locations(), + name: 'locations', + on: { + pageAfterIn: function () { + loadLocationMap(); + }, + pageAfterOut: function () { + locationMap = null; + } + } + }, { path: '/servicearea', content: compiledPages.servicearea(), @@ -536,6 +543,52 @@ var routes = [ } } }, + { + path: '/kiosk', + name: 'kiosk', + async: function ( {resolve, reject}) { + app.dialog.preloader("Loading..."); + apirequest(SETTINGS.apis.locations, [], function (resp) { + app.dialog.close(); + + var kioskLocations = []; + for (var i = 0; i < resp.features.length; i++) { + if (resp.features[i].properties.branding != "PP") { + continue; + } + kioskLocations.push({ + name: resp.features[i].properties.name, + hours: resp.features[i].properties.hours, + info: resp.features[i].properties.info, + geo: "geo:" + (Math.round(resp.features[i].geometry.coordinates[1] * 1000000) / 1000000) + "," + (Math.round(resp.features[i].geometry.coordinates[0] * 1000000) / 1000000) + }); + } + + resolve({ + content: compiledPages.kiosk({ + locations: kioskLocations + }) + }, {}); + }, function (error) { + app.dialog.close(); + app.dialog.alert("Couldn't get the kiosk locations. Try again later.", "Whoops!"); + sendErrorReport("Kiosks", "Loading locations"); + resolve({ + content: compiledPages.kiosk({ + locations: [] + }) + }, {}); + }, "GET"); + }, + on: { + pageBeforeIn: function () { + dyncontent = getDynamicPageContent("kiosk"); + if (dyncontent != null) { + $("#kiosk-dyncontent").html(dyncontent); + } + } + } + }, { path: '/telegram', name: 'telegram', diff --git a/www/settings.js b/www/settings.js index d1d44b0..a97d4b2 100644 --- a/www/settings.js +++ b/www/settings.js @@ -53,10 +53,7 @@ var SETTINGS = { trailerschedule: "https://helena.express/mobile/schedule.json", // Money order verification moneyorderverify: "https://apis.helena.express/v1/moneyorder/verify/", - // Label maker - label_rates: "https://apis.helena.express/v1/labelmaker/rates/", - label_purchase: "https://apis.helena.express/v1/labelmaker/purchase/", - postalpoint_locations: "https://apis.helena.express/v1/postalpoint/locations/" + locations: "https://apis.helena.express/v1/locations/" }, stripe_pubkey: "pk_test_51J6qFXCa1Fboir5UzPO3LCiMsVNiFP2lq4wR0dEcjJJVzAaJ3uRggDekZPB3qeYpMD3ayIYHKyD5sSn0IFLlEXMW001LqrvGSH", branding: {