Compare commits
63 Commits
Author | SHA1 | Date | |
---|---|---|---|
424c6b3987 | |||
4d9b4abd19 | |||
771fd271c2 | |||
e1ded04c9b | |||
261b797a85 | |||
bbdf21f8a2 | |||
7c25b8c3b3 | |||
acd0c86447 | |||
5f28ee8a7e | |||
d5e6d7eaee | |||
7d39c12fce | |||
a0cbb0dbe5 | |||
91e31c449e | |||
b50524903d | |||
1f942ecafe | |||
5306f25a97 | |||
78f9c5f31f | |||
c69b8933ab | |||
00600ffee9 | |||
1796e45f92 | |||
5d9944a9c4 | |||
b25a292f34 | |||
13021af8ca | |||
1c8c7cc2e7 | |||
90aeb804ae | |||
31dee00cb1 | |||
8514582bcb | |||
403708572e | |||
09b51d95f0 | |||
faa13a1588 | |||
f3f3653d2c | |||
976f44a4f8 | |||
008ab56ce8 | |||
4c24d8fba8 | |||
9f5caa2593 | |||
c4900d2505 | |||
efd39a2349 | |||
df06534d72 | |||
c1f74e43fe | |||
384dac7b85 | |||
d0c3988566 | |||
70fa409015 | |||
3602f77343 | |||
3ecc981c67 | |||
dcd8777e3a | |||
b55e1f93d2 | |||
a90b3ef408 | |||
0cac63bf8d | |||
f6f811d404 | |||
2bb6aa0b8d | |||
3967a15485 | |||
66161eebf8 | |||
84d7576be5 | |||
2703cb8e0b | |||
031c8f1a9b | |||
ca9efefc96 | |||
b9ac7dd1ce | |||
933a1f7df2 | |||
c0e4a80d4f | |||
afbf8b6122 | |||
9117e599fa | |||
efd0359c4a | |||
4369bb80c0 |
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget id="com.netsyms.PackageHelper" version="1.1.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<widget id="com.netsyms.PackageHelper" version="1.3.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<name>PackageHelper</name>
|
||||
<description>
|
||||
Assistant app for door-to-door package delivery.
|
||||
@ -32,7 +32,5 @@
|
||||
<allow-intent href="itms:*" />
|
||||
<allow-intent href="itms-apps:*" />
|
||||
</platform>
|
||||
<hook src="scripts/www_npm_install.sh" type="before_prepare" />
|
||||
<hook src="scripts/generate_credits.sh" type="before_prepare" />
|
||||
<hook src="scripts/remove_bloat.sh" type="before_prepare" />
|
||||
<hook src="scripts/npm_prepare.sh" type="before_prepare" />
|
||||
</widget>
|
||||
|
3117
license-credits.md
11
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "com.netsyms.packagehelper",
|
||||
"displayName": "PackageHelper",
|
||||
"version": "1.1.0",
|
||||
"version": "1.3.0",
|
||||
"description": "Assistant app for door-to-door package delivery.",
|
||||
"main": "www/index.html",
|
||||
"scripts": {
|
||||
@ -17,14 +17,19 @@
|
||||
"cordova-plugin-geolocation": {},
|
||||
"cordova-plugin-inappbrowser": {},
|
||||
"cordova-plugin-powermanagement-netsyms": {},
|
||||
"cordova-plugin-whitelist": {}
|
||||
"cordova-plugin-whitelist": {},
|
||||
"phonegap-plugin-barcodescanner": {},
|
||||
"cordova-plugin-device": {}
|
||||
},
|
||||
"platforms": [
|
||||
"android"
|
||||
"android",
|
||||
"browser"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"cordova-android": "^8.1.0",
|
||||
"cordova-browser": "^6.0.0",
|
||||
"cordova-plugin-device": "^2.0.3",
|
||||
"cordova-plugin-inappbrowser": "^3.1.0",
|
||||
"cordova-plugin-powermanagement-netsyms": "git+https://source.netsyms.com/Netsyms/cordova-plugin-powermanagement",
|
||||
"cordova-plugin-whitelist": "^1.3.4"
|
||||
|
@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
cd www
|
||||
yarn licenses generate-disclaimer > ../license-credits.md
|
||||
cd ..
|
||||
|
5
scripts/npm_prepare.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
./scripts/www_npm_install.sh
|
||||
./scripts/generate_credits.sh
|
||||
./scripts/remove_bloat.sh
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# This script removes some stuff in `www/node_modules` that the app doesn't need to run.
|
||||
# It removes about 6MB from the build size.
|
||||
|
||||
@ -7,55 +7,80 @@ echo "Removing bloat in node_modules..."
|
||||
pwd
|
||||
|
||||
cd www/node_modules
|
||||
rm -rf dom7
|
||||
rm -rf path-to-regexp
|
||||
rm -rf ssr-window
|
||||
rm -rf template7
|
||||
rm -rf {ansicolors,buffer-from,cardinal,concat-stream,core-util-is,csscolorparser}
|
||||
rm -rf {dom7,earcut,esprima,geojson-vt,gl-matrix,grid-index,ieee754,inherits,isarray}
|
||||
rm -rf {kdbush,leaflet-geometryutil,@mapbox,minimist,murmurhash-js}
|
||||
rm -rf {path-to-regexp,pbf,potpack,process-nextick-args}
|
||||
rm -rf {protocol-buffers-schema,quickselect,readable-stream,redeyed,resolve-protobuf-schema}
|
||||
rm -rf {rw,safe-buffer,sharkdown,split,ssr-window,string_decoder,supercluster}
|
||||
rm -rf {template7,text-encoding,through,tinyqueue,ts-custom-error,typedarray}
|
||||
rm -rf {util-deprecate,vt-pbf,wgs84}
|
||||
|
||||
# Make npm stop complaining that these don't exist by actually removing them
|
||||
rm -rf .bin/*
|
||||
|
||||
|
||||
cd @fortawesome/fontawesome-free
|
||||
rm -rf js
|
||||
rm -rf less
|
||||
rm -rf scss
|
||||
rm -rf sprites
|
||||
rm -rf svgs
|
||||
rm -rf {js,less,metadata,scss,sprites,svgs}
|
||||
find css -type f -not -name 'all.min.css' -delete
|
||||
cd ../..
|
||||
|
||||
cd jquery
|
||||
rm -rf src
|
||||
rm -rf external
|
||||
cd ..
|
||||
|
||||
cd framework7
|
||||
rm -rf components
|
||||
rm -rf lazy-components
|
||||
rm -rf less
|
||||
rm -rf modules
|
||||
rm -rf utils
|
||||
rm -f framework7.*
|
||||
rm -f framework7-lite.*
|
||||
find css -type f -not -name 'framework7.bundle.min.css' -delete
|
||||
find js -type f -not -name 'framework7.bundle.min.js' -delete
|
||||
cd ..
|
||||
|
||||
cd jquery
|
||||
rm -rf src
|
||||
rm -rf external
|
||||
find dist -type f -not -name 'jquery.min.js' -delete
|
||||
cd ..
|
||||
|
||||
cd jsbarcode
|
||||
rm -rf .dockerignore .eslintignore .eslintrcautomation bower.json CONTRIBUTING.md docker-compose.yml Dockerfile example gulpfile.js jsbarcode.d.ts README.md src test .travis.yml
|
||||
rm -rf {automation,bin}
|
||||
rm -rf dist/barcodes
|
||||
rm -rf dist/JsBarcode.all.js
|
||||
cd ..
|
||||
|
||||
cd leaflet
|
||||
rm -rf {CHANGELOG.md,src}
|
||||
find dist -type f -not -name 'leaflet.css' -not -name 'leaflet.js' -delete
|
||||
cd ..
|
||||
|
||||
cd leaflet.locatecontrol
|
||||
rm -rf {CHANGELOG.md,README.md,src}
|
||||
find dist -type f -not -name 'L.Control.Locate.min.css' -not -name 'L.Control.Locate.min.js' -delete
|
||||
cd ..
|
||||
|
||||
cd leaflet.markercluster
|
||||
rm -rf {build,example,spec,src,CHANGELOG.md}
|
||||
find dist -type f -not -name 'leaflet.markercluster.js' -not -name 'MarkerCluster.css' -not -name 'MarkerCluster.Default.css' -delete
|
||||
cd ..
|
||||
|
||||
cd material-design-icons
|
||||
rm -rf action
|
||||
rm -rf alert
|
||||
rm -rf av
|
||||
rm -rf bower.json
|
||||
rm -rf communication
|
||||
rm -rf content
|
||||
rm -rf device
|
||||
rm -rf editor
|
||||
rm -rf file
|
||||
rm -rf gulpfile.babel.js
|
||||
rm -rf hardware
|
||||
rm -rf image
|
||||
rm -rf index.js
|
||||
rm -rf maps
|
||||
rm -rf navigation
|
||||
rm -rf notification
|
||||
rm -rf package.json
|
||||
rm -rf places
|
||||
rm -rf README.md
|
||||
rm -rf social
|
||||
rm -rf sprites
|
||||
rm -rf toggle
|
||||
# Remove everything except the icon font and license, but also exclude the
|
||||
# current and parent folder (. , ..) so rm won't complain about refusing
|
||||
# to delete the whole filesystem
|
||||
find . -maxdepth 1 -not -name '.' -not -name 'LICENSE' -not -name 'iconfont' -exec rm -rf {} \;
|
||||
cd ..
|
||||
|
||||
cd mapbox-gl
|
||||
rm -rf {build,flow-typed,src}
|
||||
find dist -type f -not -name 'mapbox-gl.css' -not -name 'mapbox-gl.js' -delete
|
||||
rm -rf dist/style-spec
|
||||
cd ..
|
||||
|
||||
cd @zxing/library
|
||||
rm -rf {esm,esm5}
|
||||
rm -f umd/index.min.js.map
|
||||
cd ../..
|
||||
|
||||
echo "Cleanup finished"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
cd www
|
||||
npm install
|
||||
|
BIN
www/assets/audio/scan.mp3
Normal file
49
www/assets/css/app.css
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
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/.
|
||||
*/
|
||||
|
||||
/*
|
||||
Framework7 and FontAwesome both have a .fab class
|
||||
*/
|
||||
.fafab {
|
||||
font-family: "Font Awesome 5 Brands";
|
||||
}
|
||||
|
||||
.fab {
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-family: var(--f7-font-family);
|
||||
font-size: var(--f7-font-size);
|
||||
line-height: var(--f7-line-height);
|
||||
}
|
||||
|
||||
/*
|
||||
* Material icons are too big and disrupt the flow of text
|
||||
*/
|
||||
.block .material-icons {
|
||||
font-size: var(--f7-block-font-size);
|
||||
}
|
||||
|
||||
.material-icons.material-icons-24px {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.material-icons-intext .material-icons {
|
||||
font-size: var(--f7-block-font-size);
|
||||
}
|
||||
|
||||
#mapbox .package-marker {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
background-image: url(../images/box.png);
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
/* Allow tapping/clicking on package markers
|
||||
* when the location dot is overlapping them
|
||||
*/
|
||||
#mapbox .mapboxgl-user-location-dot {
|
||||
pointer-events: none;
|
||||
}
|
42
www/assets/css/web-barcode.css
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
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/.
|
||||
*/
|
||||
|
||||
|
||||
#web-barcode-ui {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 999999;
|
||||
display: block;
|
||||
background: rgba(0,0,0,0.75);
|
||||
}
|
||||
|
||||
#web-barcode-ui.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#web-barcode-ui video#barcode-viewer {
|
||||
max-width: calc(100% - 2em);
|
||||
max-height: calc(100% - 2em);
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
border-radius: 1em;
|
||||
}
|
||||
|
||||
#web-barcode-ui .text {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100vw;
|
||||
padding: 1em 5px 1em 5px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
background: rgba(0,0,0,0.5);
|
||||
}
|
60
www/assets/images/barcode-dashed.svg
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
class="svg-inline--fa fa-history fa-w-16"
|
||||
aria-hidden="true"
|
||||
data-icon="history"
|
||||
data-prefix="far"
|
||||
focusable="false"
|
||||
role="img"
|
||||
version="1.1"
|
||||
viewBox="0 0 512 512"
|
||||
id="svg877"
|
||||
sodipodi:docname="barcode-dashed.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<metadata
|
||||
id="metadata883">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs881" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1015"
|
||||
id="namedview879"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.4980469"
|
||||
inkscape:cx="256"
|
||||
inkscape:cy="256"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg877" />
|
||||
<path
|
||||
id="path952"
|
||||
d="M 25.36636,428.97523 V 83.02477 h 16.216428 v 345.95046 z m 24.195811,-0.24595 V 83.02477 h 8.237044 v 345.70451 z m 24.453472,0 V 83.02477 h 7.979383 v 345.70451 z m 40.412237,0 V 83.02477 h 7.97938 v 345.70451 z m 32.43286,0 V 83.02477 h 15.95876 v 345.70451 z m 40.41224,0 V 83.02477 h 7.97938 v 345.70451 z m 16.21642,0 V 83.02477 h 7.97939 v 345.70451 z m 16.21643,0 V 83.02477 h 7.97938 v 345.70451 z m 32.1761,0 V 83.02477 h 16.21642 v 345.70451 z m 40.41224,0 V 83.02477 h 16.21642 v 345.70451 z m 32.43195,0 V 83.02477 h 16.21733 v 345.70451 z m 32.43376,0 V 83.02477 h 16.21732 v 345.70451 z m 24.19581,0 V 83.02477 h 16.21642 v 345.70451 z m 40.6699,0 V 83.02477 h 24.19581 v 345.70451 z m 32.17519,0 V 83.02477 h 8.23705 v 345.70451 z m 16.21643,0.24595 V 83.02477 h 16.21643 v 345.95046 z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#9e9e9e;fill-opacity:1;stroke:none;stroke-width:10.00063038;stroke-miterlimit:4;stroke-dasharray:5.00031521, 5.00031521;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
BIN
www/assets/images/largebox.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
63
www/assets/images/largebox.svg
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
data-prefix="fas"
|
||||
data-icon="box"
|
||||
class="svg-inline--fa fa-box fa-w-16"
|
||||
role="img"
|
||||
viewBox="0 0 512 512"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="largebox.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
inkscape:export-filename="/home/skylar/Documents/Projects/Sources/Apps/Native/PackageHelper/www/assets/images/largebox.png"
|
||||
inkscape:export-xdpi="9.3800001"
|
||||
inkscape:export-ydpi="9.3800001">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1013"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.4609375"
|
||||
inkscape:cx="-451.93349"
|
||||
inkscape:cy="107.74134"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="m 117.95,255.99998 h 276.1 c 6.9025,0 12.55,-5.64696 12.55,-12.5488 V 67.76794 c 0,-6.901842 -5.6475,-12.548804 -12.55,-12.548804 H 306.19999 V 155.60955 l -50.2,-25.0976 -50.2,25.0976 V 55.219136 H 117.95 c -6.9025,0 -12.55,5.646962 -12.55,12.548804 v 175.68324 c 0,6.90184 5.6475,12.5488 12.55,12.5488 z m 376.5,100.39042 c 6.9025,0 12.55,-5.64695 12.55,-12.5488 V 318.744 c 0,-6.90185 -5.6475,-12.54881 -12.55,-12.54881 H 17.55 C 10.6475,306.19519 5,311.84215 5,318.744 v 25.0976 c 0,6.90185 5.6475,12.5488 12.55,12.5488 H 55.2 v 50.19522 H 17.55 c -6.9025,0 -12.55,5.64695 -12.55,12.5488 v 25.09764 c 0,6.90184 5.6475,12.5488 12.55,12.5488 h 476.9 c 6.9025,0 12.55,-5.64696 12.55,-12.5488 v -25.09764 c 0,-6.90185 -5.6475,-12.5488 -12.55,-12.5488 H 456.8 V 356.3904 Z M 230.89999,406.58562 H 105.4 V 356.3904 h 125.49999 z m 175.70001,0 H 281.09999 V 356.3904 H 406.6 Z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:currentColor;stroke:#ffffff;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
BIN
www/assets/images/largeboxes.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
63
www/assets/images/largeboxes.svg
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
data-prefix="fas"
|
||||
data-icon="box"
|
||||
class="svg-inline--fa fa-box fa-w-16"
|
||||
role="img"
|
||||
viewBox="0 0 512 512"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="largeboxes.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
inkscape:export-filename="/home/skylar/Documents/Projects/Sources/Apps/Native/PackageHelper/www/assets/images/largeboxes.png"
|
||||
inkscape:export-xdpi="9.3800001"
|
||||
inkscape:export-ydpi="9.3800001">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1013"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.4609375"
|
||||
inkscape:cx="-451.93349"
|
||||
inkscape:cy="107.74134"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:currentColor;stroke:#ffffff;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 67.75,256 h 175.7 c 6.9025,0 12.55,-5.64696 12.55,-12.5488 V 67.767965 c 0,-6.90184 -5.6475,-12.54881 -12.55,-12.54881 H 67.75 c -6.9025,0 -12.55,5.64697 -12.55,12.54881 V 243.4512 C 55.2,250.35304 60.8475,256 67.75,256 Z m 251,0 h 125.5 c 6.9025,0 12.55,-5.64696 12.55,-12.5488 V 117.96317 c 0,-6.90184 -5.6475,-12.5488 -12.55,-12.5488 h -125.5 c -6.9025,0 -12.55,5.64696 -12.55,12.5488 V 243.4512 c 0,6.90184 5.6475,12.5488 12.55,12.5488 z m 175.7,100.39042 c 6.9025,0 12.55,-5.64696 12.55,-12.5488 v -25.09761 c 0,-6.90184 -5.6475,-12.5488 -12.55,-12.5488 H 17.55 c -6.9025,0 -12.55,5.64696 -12.55,12.5488 v 25.09761 c 0,6.90184 5.6475,12.5488 12.55,12.5488 H 55.2 v 50.19521 H 17.55 c -6.9025,0 -12.55,5.64696 -12.55,12.5488 v 25.09761 c 0,6.90184 5.6475,12.5488 12.55,12.5488 h 476.9 c 6.9025,0 12.55,-5.64696 12.55,-12.5488 v -25.09761 c 0,-6.90184 -5.6475,-12.5488 -12.55,-12.5488 H 456.8 V 356.39042 Z M 230.9,406.58563 H 105.4 v -50.19521 h 125.5 z m 175.7,0 H 281.1 v -50.19521 h 125.5 z"
|
||||
id="path2-6" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
BIN
www/assets/images/signature.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
63
www/assets/images/signature.svg
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
data-prefix="fas"
|
||||
data-icon="box"
|
||||
class="svg-inline--fa fa-box fa-w-16"
|
||||
role="img"
|
||||
viewBox="0 0 512 512"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="signature.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
inkscape:export-filename="/home/skylar/Documents/Projects/Sources/Apps/Native/PackageHelper/www/assets/images/signature.png"
|
||||
inkscape:export-xdpi="9.3800001"
|
||||
inkscape:export-ydpi="9.3800001">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1013"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.4609375"
|
||||
inkscape:cx="-47.728814"
|
||||
inkscape:cy="256"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:currentColor;stroke:#ffffff;stroke-width:9.80799961;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 193.94336,405.45713 c -2.62221,-5.2622 -7.19108,-5.79553 -9.03996,-5.79553 -1.84888,0 -6.41775,0.52444 -8.90663,5.5022 l -6.81775,13.6355 c -5.6622,11.35995 -22.24879,10.10662 -26.20433,-1.85777 l -14.95994,-44.86203 -9.43107,28.33765 c -5.23553,15.69771 -19.893239,26.24878 -36.444279,26.24878 h -11.01329 c -7.85774,0 -14.22216,-6.36442 -14.22216,-14.22216 0,-7.85775 6.36442,-14.22216 14.22216,-14.22216 h 11.01329 c 4.29331,0 8.09774,-2.73777 9.45774,-6.80886 l 16.168809,-48.56868 c 2.93332,-8.71996 11.05773,-14.5866 20.2488,-14.5866 9.19108,0 17.31549,5.85775 20.23992,14.5866 l 12.33772,37.01317 c 17.55548,-14.39105 48.05313,-8.62218 58.66641,12.58661 1.68,3.35999 4.87998,5.28887 8.31997,5.56442 v -72.99523 l 113.77728,-112.9684 v -41.3776 H 220.4588 c -11.73328,0 -21.33324,-9.59996 -21.33324,-21.33324 V 28.44543 H 21.348551 c -11.8221703,0 -21.33324027,9.51107 -21.33324027,21.33325 v 412.44265 c 0,11.82217 9.51106997,21.33324 21.33324027,21.33324 H 320.01392 c 11.82217,0 21.33324,-9.51107 21.33324,-21.33324 v -35.5554 l -113.77728,-0.0978 c -14.32883,-0.27555 -27.18211,-8.24885 -33.62652,-21.11102 z m 147.4038,-268.65661 c 0,-5.59998 -2.22221,-11.02217 -6.22219,-15.02216 L 248.10312,34.66763 c -3.99998,-3.99998 -9.42218,-6.2222 -15.11104,-6.2222 h -5.4222 V 142.22272 H 341.34716 Z M 256.0142,336.85298 v 61.36863 h 61.32418 L 461.05331,253.5289 400.71579,193.19139 Z M 505.38201,177.18257 477.05324,148.8538 c -8.83552,-8.83552 -23.17323,-8.83552 -32.00875,0 l -24.22212,24.22212 60.33752,60.33751 24.22212,-24.22211 c 8.8444,-8.83552 8.8444,-23.17324 0,-32.00875 z"
|
||||
id="path2-3" />
|
||||
</svg>
|
After Width: | Height: | Size: 3.5 KiB |
BIN
www/assets/images/signatures.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
74
www/assets/images/signatures.svg
Normal file
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
data-prefix="fas"
|
||||
data-icon="box"
|
||||
class="svg-inline--fa fa-box fa-w-16"
|
||||
role="img"
|
||||
viewBox="0 0 512 512"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="signatures.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
inkscape:export-filename="/home/skylar/Documents/Projects/Sources/Apps/Native/PackageHelper/www/assets/images/signatures.png"
|
||||
inkscape:export-xdpi="9.3800001"
|
||||
inkscape:export-ydpi="9.3800001">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1013"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.4609375"
|
||||
inkscape:cx="-451.93349"
|
||||
inkscape:cy="107.74134"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<g
|
||||
id="g1063"
|
||||
transform="matrix(0.84074873,0,0,0.84030597,772.08632,-86.536242)"
|
||||
style="stroke-width:1.18972933">
|
||||
<path
|
||||
id="path2-5"
|
||||
d="m -606.48259,496.68926 c -2.40085,-4.818 -6.58404,-5.3064 -8.27685,-5.3064 -1.6928,0 -5.87599,0.4802 -8.15477,5.0378 l -6.24222,12.4845 c -5.18423,10.401 -20.37066,9.2534 -23.99229,-1.701 l -13.69709,-41.075 -8.63494,25.9455 c -4.79357,14.3726 -18.21395,24.033 -33.36783,24.033 h -10.0836 c -7.19443,0 -13.02159,-5.8271 -13.02159,-13.0216 0,-7.1944 5.82716,-13.0216 13.02159,-13.0216 h 10.0836 c 3.93089,0 7.41417,-2.5066 8.65936,-6.2341 l 14.80392,-44.46872 c 2.6857,-7.98386 10.12429,-13.35527 18.53949,-13.35527 8.41521,0 15.85379,5.36327 18.53136,13.35527 l 11.29623,33.8887 c 16.07353,-13.17623 43.99671,-7.89434 53.71407,11.52412 1.53818,3.0763 4.46803,4.8424 7.61763,5.0947 v -66.83334 l 104.17275,-103.43214 v -37.88469 h -110.69168 c -10.74282,0 -19.53239,-8.78958 -19.53239,-19.53239 V 151.50306 h -162.76991 c -10.8242,0 -19.53239,8.70819 -19.53239,19.53239 v 377.62621 c 0,10.8242 8.70819,19.5324 19.53239,19.5324 h 273.45345 c 10.8242,0 19.53239,-8.7082 19.53239,-19.5324 v -32.554 l -104.17275,-0.09 c -13.11925,-0.2523 -24.88752,-7.5525 -30.78793,-19.3289 z m 134.96068,-245.97794 c 0,-5.12725 -2.03462,-10.09174 -5.69695,-13.75406 L -556.89473,157.2 c -3.66232,-3.66232 -8.62681,-5.69694 -13.83544,-5.69694 h -4.96449 V 255.6758 h 104.17275 z m -78.12956,183.16498 v 56.18816 h 56.14748 l 131.5832,-132.47842 -55.24411,-55.24411 z m 228.31735,-146.1918 -25.93738,-25.93738 c -8.08966,-8.08967 -21.21706,-8.08967 -29.30672,0 l -22.1774,22.1774 55.24411,55.24411 22.17739,-22.1774 c 8.0978,-8.08967 8.0978,-21.21706 0,-29.30673 z"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:11.89729309;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
sodipodi:nodetypes="csssssscssc"
|
||||
id="path2-7"
|
||||
d="m -592.38477,599.76246 v 40 c 0,13.255 -10.745,24 -24,24 h -271.99997 c -13.255,0 -24,-10.745 -24,-24 v -368 c 0,-13.255 10.745,-24 24,-24 h 72 v 296 c 0,30.879 25.121,56 56,56 z"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:11.89729309;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.0 KiB |
BIN
www/assets/images/smallpackage.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
70
www/assets/images/smallpackage.svg
Normal file
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
data-prefix="fas"
|
||||
data-icon="envelope"
|
||||
class="svg-inline--fa fa-envelope fa-w-16"
|
||||
role="img"
|
||||
viewBox="0 0 512 512"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="smallpackage.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
inkscape:export-filename="/home/skylar/Documents/Projects/Sources/Apps/Native/PackageHelper/www/assets/images/smallpackage.png"
|
||||
inkscape:export-xdpi="9.3800001"
|
||||
inkscape:export-ydpi="9.3800001">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1015"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.921875"
|
||||
inkscape:cx="-67.254237"
|
||||
inkscape:cy="133.23159"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect812"
|
||||
width="404.61017"
|
||||
height="363.38983"
|
||||
x="57.491528"
|
||||
y="69.423721" />
|
||||
<path
|
||||
id="path885"
|
||||
d="M 450.32446,8.677964 H 61.675533 c -29.270117,0 -52.9975695,23.727453 -52.9975695,52.997571 V 450.32445 c 0,29.27014 23.7274525,52.99759 52.9975695,52.99759 H 450.32446 c 29.27013,0 52.99758,-23.72745 52.99758,-52.99759 V 61.675535 c 0,-29.270118 -23.72745,-52.997571 -52.99758,-52.997571 z M 205.33984,262.73953 C 105.20973,190.0699 106.22996,189.88663 79.341395,168.95921 v -27.78729 c 0,-14.63507 11.863732,-26.49879 26.498815,-26.49879 h 300.3196 c 14.63508,0 26.4988,11.86372 26.4988,26.49879 v 27.78729 c -26.90843,20.94397 -25.87387,21.11511 -125.99844,93.78144 -11.5932,8.45199 -34.66043,28.83951 -50.66016,28.58999 -16.01299,0.24066 -39.04928,-20.12475 -50.66017,-28.59111 z m 227.31877,-48.94437 v 157.03293 c 0,14.63504 -11.86372,26.4988 -26.4988,26.4988 h -300.3196 c -14.635083,0 -26.498815,-11.86376 -26.498815,-26.4988 V 213.79516 c 15.411275,11.91785 36.799115,27.86349 105.225585,77.52442 15.63651,11.41766 41.92884,35.49182 71.42972,35.34278 29.68639,0.14793 56.35078,-24.33584 71.45842,-35.35935 68.4088,-49.64658 89.79222,-65.59112 105.20349,-77.50785 z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:currentColor;stroke:#ffffff;stroke-width:10.00000095;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 3.3 KiB |
BIN
www/assets/images/smallpackages.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
82
www/assets/images/smallpackages.svg
Normal file
@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
data-prefix="fas"
|
||||
data-icon="envelope"
|
||||
class="svg-inline--fa fa-envelope fa-w-16"
|
||||
role="img"
|
||||
viewBox="0 0 512 512"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="smallpackages.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
inkscape:export-filename="/home/skylar/Documents/Projects/Sources/Apps/Native/PackageHelper/www/assets/images/smallpackages.png"
|
||||
inkscape:export-xdpi="9.3800001"
|
||||
inkscape:export-ydpi="9.3800001">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1015"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.921875"
|
||||
inkscape:cx="-104.19093"
|
||||
inkscape:cy="133.23159"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:10.00000095;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect917-3"
|
||||
width="204.73245"
|
||||
height="170.51152"
|
||||
x="59.80328"
|
||||
y="81.355949" />
|
||||
<path
|
||||
id="path885"
|
||||
d="M 255.50605,55.050864 H 66.934617 c -14.201783,0 -25.714281,11.51249 -25.714281,25.71428 V 269.33656 c 0,14.2018 11.512498,25.7143 25.714281,25.7143 H 255.50605 c 14.20179,0 25.71428,-11.5125 25.71428,-25.7143 V 80.765144 c 0,-14.20179 -11.51249,-25.71428 -25.71428,-25.71428 z M 136.64016,178.32086 C 88.057295,143.06174 88.552308,142.97282 75.506047,132.81889 v -13.48232 c 0,-7.10089 5.756251,-12.85714 12.857155,-12.85714 H 234.07748 c 7.1009,0 12.85714,5.75625 12.85714,12.85714 v 13.48232 c -13.0559,10.16196 -12.55393,10.245 -61.13411,45.50251 -5.62499,4.10088 -16.81715,13.99285 -24.58017,13.87179 -7.76946,0.11677 -18.94661,-9.76448 -24.58018,-13.87233 z m 110.29446,-23.74768 v 76.19196 c 0,7.10088 -5.75624,12.85715 -12.85714,12.85715 H 88.363202 c -7.100904,0 -12.857155,-5.75627 -12.857155,-12.85715 v -76.19196 c 7.47751,5.78251 17.854833,13.51929 51.055173,37.61464 7.58679,5.53982 20.34376,17.22054 34.65751,17.14822 14.40376,0.0718 27.34125,-11.80768 34.67144,-17.15626 33.19177,-24.08839 43.56695,-31.82464 51.04445,-37.6066 z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:currentColor;stroke:#ffffff;stroke-width:10.00000095;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect917"
|
||||
width="257.88498"
|
||||
height="214.77965"
|
||||
x="190.91525"
|
||||
y="212.61017" />
|
||||
<path
|
||||
style="fill:currentColor;stroke:#ffffff;stroke-width:10.00000095;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0"
|
||||
d="M 439.89346,165.76272 H 198.47941 c -18.1815,0 -32.92009,14.73859 -32.92009,32.92009 v 241.41404 c 0,18.18151 14.73859,32.92011 32.92009,32.92011 h 241.41405 c 18.1815,0 32.92009,-14.7386 32.92009,-32.92011 V 198.68281 c 0,-18.1815 -14.73859,-32.92009 -32.92009,-32.92009 z M 287.71826,323.57618 C 225.5212,278.43654 226.15494,278.3227 209.45278,265.32338 v -17.26042 c 0,-9.09074 7.3693,-16.46005 16.46006,-16.46005 h 186.54721 c 9.09075,0 16.46004,7.36931 16.46004,16.46005 v 17.26042 c -16.7145,13.0096 -16.07187,13.11591 -78.26548,58.25349 -7.20125,5.25006 -21.52975,17.91401 -31.46817,17.75903 -9.94666,0.14949 -24.25594,-12.50074 -31.46818,-17.75972 z m 141.20183,-30.4024 v 97.54293 c 0,9.09073 -7.36929,16.46006 -16.46004,16.46006 H 225.91284 c -9.09076,0 -16.46006,-7.36933 -16.46006,-16.46006 v -97.54293 c 9.5729,7.40292 22.85822,17.30775 65.36216,48.15524 9.7128,7.09223 26.04461,22.04619 44.36944,21.9536 18.44007,0.0919 35.00298,-15.1165 44.38728,-21.96389 42.49297,-30.83858 55.77554,-40.74273 65.34843,-48.14495 z"
|
||||
id="path915" />
|
||||
</svg>
|
After Width: | Height: | Size: 4.8 KiB |
81
www/assets/images/weather-clear.svg
Normal file
@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="512"
|
||||
height="512"
|
||||
viewBox="0 0 135.46666 135.46667"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="weather-clear.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.7"
|
||||
inkscape:cx="-432.10629"
|
||||
inkscape:cy="388.57143"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1015"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-161.53332)">
|
||||
<g
|
||||
id="g877"
|
||||
class="fa-group"
|
||||
transform="matrix(0.15119047,0,0,0.15119047,33.866667,216.0375)"
|
||||
style="fill:#8d6e63">
|
||||
<path
|
||||
id="path873"
|
||||
d="m 256,32 32,128 v 112 a 16,16 0 0 1 -16,16 H 176 A 16,16 0 0 1 160,272 V 160 L 192,32 Z"
|
||||
class="fa-secondary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:0.4;fill:#8d6e63;fill-opacity:1" />
|
||||
<path
|
||||
id="path875"
|
||||
d="m 446.7,160 c 0.4,-0.5 0.5,-0.7 0.9,-1.2 L 391.3,53.9 A 32,32 0 0 0 360.9,32 H 256 l 32,128 z M 160,160 192,32 H 87.1 A 32,32 0 0 0 56.7,53.9 L 0.4,158.8 c 0.4,0.5 0.5,0.7 0.9,1.2 z m 128,32 v 80 a 16,16 0 0 1 -16,16 H 176 A 16,16 0 0 1 160,272 V 192 H 0 v 256 a 32,32 0 0 0 32,32 h 384 a 32,32 0 0 0 32,-32 V 192 Z"
|
||||
class="fa-primary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#8d6e63;fill-opacity:1" />
|
||||
</g>
|
||||
<path
|
||||
id="path941"
|
||||
d="m 33.226771,181.53848 c -4.35002,0 -7.894177,3.54415 -7.894177,7.89418 0,4.35002 3.544157,7.89418 7.894177,7.89418 4.350022,0 7.894179,-3.54416 7.894179,-7.89418 0,-4.35003 -3.544157,-7.89418 -7.894179,-7.89418 z m 20.261728,6.61959 -7.787281,-3.88952 2.754742,-8.25599 c 0.370039,-1.11835 -0.69074,-2.17913 -1.800861,-1.80086 l -8.255996,2.75473 -3.89775,-7.79549 c -0.526279,-1.05257 -2.022884,-1.05257 -2.549162,0 l -3.889528,7.78727 -8.264218,-2.75473 c -1.11834,-0.37005 -2.179122,0.69073 -1.80086,1.80085 l 2.75474,8.256 -7.78728,3.89774 c -1.052558,0.52628 -1.052558,2.02289 0,2.54917 l 7.78728,3.88954 -2.75474,8.26421 c -0.370038,1.11834 0.690742,2.17911 1.80086,1.80085 l 8.255994,-2.75473 3.889529,7.78727 c 0.526278,1.05256 2.022883,1.05256 2.549161,0 l 3.889529,-7.78727 8.255994,2.75473 c 1.118344,0.37004 2.179122,-0.69073 1.80086,-1.80085 l -2.754738,-8.256 7.787278,-3.88952 c 1.069002,-0.53451 1.069002,-2.03112 0.01644,-2.5574 z m -12.819819,8.7165 c -4.103328,4.10333 -10.780488,4.10333 -14.883816,0 -4.103328,-4.10332 -4.103328,-10.78048 0,-14.88382 4.103328,-4.10333 10.780488,-4.10333 14.883816,0 4.103327,4.10334 4.103327,10.7805 0,14.88382 z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ff9800;stroke-width:0.08223102" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.8 KiB |
106
www/assets/images/weather-cloudy.svg
Normal file
@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="512"
|
||||
height="512"
|
||||
viewBox="0 0 135.46666 135.46667"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="weather-cloudy.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.7"
|
||||
inkscape:cx="-105.23468"
|
||||
inkscape:cy="388.57143"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1015"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-161.53332)">
|
||||
<g
|
||||
id="g877"
|
||||
class="fa-group"
|
||||
transform="matrix(0.15119047,0,0,0.15119047,33.866667,216.0375)"
|
||||
style="fill:#8d6e63">
|
||||
<path
|
||||
id="path873"
|
||||
d="m 256,32 32,128 v 112 a 16,16 0 0 1 -16,16 H 176 A 16,16 0 0 1 160,272 V 160 L 192,32 Z"
|
||||
class="fa-secondary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:0.4;fill:#8d6e63;fill-opacity:1" />
|
||||
<path
|
||||
id="path875"
|
||||
d="m 446.7,160 c 0.4,-0.5 0.5,-0.7 0.9,-1.2 L 391.3,53.9 A 32,32 0 0 0 360.9,32 H 256 l 32,128 z M 160,160 192,32 H 87.1 A 32,32 0 0 0 56.7,53.9 L 0.4,158.8 c 0.4,0.5 0.5,0.7 0.9,1.2 z m 128,32 v 80 a 16,16 0 0 1 -16,16 H 176 A 16,16 0 0 1 160,272 V 192 H 0 v 256 a 32,32 0 0 0 32,32 h 384 a 32,32 0 0 0 32,-32 V 192 Z"
|
||||
class="fa-primary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#8d6e63;fill-opacity:1" />
|
||||
</g>
|
||||
<g
|
||||
id="g958"
|
||||
class="fa-group"
|
||||
transform="matrix(0.08017229,0,0,0.08017229,23.06073,169.74533)"
|
||||
style="fill:#90a4ae">
|
||||
<path
|
||||
id="path954"
|
||||
d="M 161.6,288 H 96 A 96,96 0 0 1 96,96 c 0.6,0 1.1,0.2 1.6,0.2 C 105.3,41.9 151.6,0 208,0 A 111.61,111.61 0 0 1 312.5,72.7 95.07,95.07 0 0 1 352,64 a 96,96 0 0 1 96,96 93,93 0 0 1 -7,34.7 110.5,110.5 0 0 0 -31.6,11.8 A 142.54,142.54 0 0 0 304,160 c -73.9,0 -134.3,56.2 -142.4,128 z"
|
||||
class="fa-secondary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:0.4;fill:#90a4ae" />
|
||||
<path
|
||||
id="path956"
|
||||
d="m 640,416 a 96,96 0 0 1 -96,96 H 224 a 96,96 0 0 1 -96,-96 c 0,-42.5 27.8,-78.2 66.1,-90.8 A 113.72,113.72 0 0 1 192,304 111.94,111.94 0 0 1 304,192 c 43.2,0 80.4,24.9 99,60.8 14.7,-17.5 36.4,-28.8 61,-28.8 a 80,80 0 0 1 80,80 78.09,78.09 0 0 1 -1.6,16.2 c 0.5,0 1,-0.2 1.6,-0.2 a 96,96 0 0 1 96,96 z"
|
||||
class="fa-primary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#90a4ae" />
|
||||
</g>
|
||||
<g
|
||||
id="g958-9"
|
||||
class="fa-group"
|
||||
transform="matrix(-0.05876348,0,0,0.05876348,119.92766,166.32417)"
|
||||
style="fill:#90a4ae">
|
||||
<path
|
||||
id="path956-1"
|
||||
d="m 640,416 a 96,96 0 0 1 -96,96 H 224 a 96,96 0 0 1 -96,-96 c 0,-42.5 27.8,-78.2 66.1,-90.8 A 113.72,113.72 0 0 1 192,304 111.94,111.94 0 0 1 304,192 c 43.2,0 80.4,24.9 99,60.8 14.7,-17.5 36.4,-28.8 61,-28.8 a 80,80 0 0 1 80,80 78.09,78.09 0 0 1 -1.6,16.2 c 0.5,0 1,-0.2 1.6,-0.2 a 96,96 0 0 1 96,96 z"
|
||||
class="fa-primary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:0.4;fill:#90a4ae" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.1 KiB |
76
www/assets/images/weather-none.svg
Normal file
@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="512"
|
||||
height="512"
|
||||
viewBox="0 0 135.46666 135.46667"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="weather-none.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.7"
|
||||
inkscape:cx="-625.67772"
|
||||
inkscape:cy="388.57143"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1015"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-161.53332)">
|
||||
<g
|
||||
id="g877"
|
||||
class="fa-group"
|
||||
transform="matrix(0.15119047,0,0,0.15119047,33.866667,216.0375)"
|
||||
style="fill:#8d6e63">
|
||||
<path
|
||||
id="path873"
|
||||
d="m 256,32 32,128 v 112 a 16,16 0 0 1 -16,16 H 176 A 16,16 0 0 1 160,272 V 160 L 192,32 Z"
|
||||
class="fa-secondary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:0.4;fill:#8d6e63;fill-opacity:1" />
|
||||
<path
|
||||
id="path875"
|
||||
d="m 446.7,160 c 0.4,-0.5 0.5,-0.7 0.9,-1.2 L 391.3,53.9 A 32,32 0 0 0 360.9,32 H 256 l 32,128 z M 160,160 192,32 H 87.1 A 32,32 0 0 0 56.7,53.9 L 0.4,158.8 c 0.4,0.5 0.5,0.7 0.9,1.2 z m 128,32 v 80 a 16,16 0 0 1 -16,16 H 176 A 16,16 0 0 1 160,272 V 192 H 0 v 256 a 32,32 0 0 0 32,32 h 384 a 32,32 0 0 0 32,-32 V 192 Z"
|
||||
class="fa-primary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#8d6e63;fill-opacity:1" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
106
www/assets/images/weather-partly-cloudy.svg
Normal file
@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="512"
|
||||
height="512"
|
||||
viewBox="0 0 135.46666 135.46667"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="weather-partly-cloudy.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.7"
|
||||
inkscape:cx="80.126628"
|
||||
inkscape:cy="274.28572"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1015"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-161.53332)">
|
||||
<g
|
||||
id="g877"
|
||||
class="fa-group"
|
||||
transform="matrix(0.15119047,0,0,0.15119047,33.866667,216.0375)"
|
||||
style="fill:#8d6e63">
|
||||
<path
|
||||
id="path873"
|
||||
d="m 256,32 32,128 v 112 a 16,16 0 0 1 -16,16 H 176 A 16,16 0 0 1 160,272 V 160 L 192,32 Z"
|
||||
class="fa-secondary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:0.4;fill:#8d6e63;fill-opacity:1" />
|
||||
<path
|
||||
id="path875"
|
||||
d="m 446.7,160 c 0.4,-0.5 0.5,-0.7 0.9,-1.2 L 391.3,53.9 A 32,32 0 0 0 360.9,32 H 256 l 32,128 z M 160,160 192,32 H 87.1 A 32,32 0 0 0 56.7,53.9 L 0.4,158.8 c 0.4,0.5 0.5,0.7 0.9,1.2 z m 128,32 v 80 a 16,16 0 0 1 -16,16 H 176 A 16,16 0 0 1 160,272 V 192 H 0 v 256 a 32,32 0 0 0 32,32 h 384 a 32,32 0 0 0 32,-32 V 192 Z"
|
||||
class="fa-primary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#8d6e63;fill-opacity:1" />
|
||||
</g>
|
||||
<g
|
||||
id="g875"
|
||||
class="fa-group"
|
||||
transform="matrix(0.08121122,0,0,0.08121122,21.865082,168.50975)"
|
||||
style="opacity:1">
|
||||
<path
|
||||
id="path871"
|
||||
d="M 366.8,61.89 279,91.18 237.5,8.4 a 15.13,15.13 0 0 0 -27.1,0 L 169,91.18 81.1,61.89 A 15.23,15.23 0 0 0 61.9,81.08 l 29.3,87.79 -82.8,41.49 a 15.12,15.12 0 0 0 0,27.09 l 82.8,41.4 -29.3,87.78 a 15.16,15.16 0 0 0 19.2,19.19 l 76.1,-25.29 a 129,129 0 0 1 23.6,-33.53 110.27,110.27 0 0 1 -36,-24 112,112 0 1 1 180.7,-125.53 143.5,143.5 0 0 1 30.7,-7.5 L 386,81.08 A 15.16,15.16 0 0 0 366.8,61.89 Z M 224,140 a 83.85,83.85 0 0 0 -16.1,166.17 128.29,128.29 0 0 1 25.2,-11.7 144.12,144.12 0 0 1 67.4,-105 A 84.15,84.15 0 0 0 224,140 Z"
|
||||
class="fa-secondary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:1;fill:#ff9800;fill-opacity:1" />
|
||||
<path
|
||||
id="path873-3"
|
||||
d="m 575.2,325.64 c 37.6,13 64.8,48.29 64.8,90.38 a 96,96 0 0 1 -96,96 H 272 a 96,96 0 0 1 -96,-96 c 0,-50.59 39.3,-91.58 88.9,-95.28 -0.2,-2.9 -0.9,-5.7 -0.9,-8.7 a 112,112 0 0 1 112,-112 c 45.4,0 84.3,27.2 101.9,66 A 63.81,63.81 0 0 1 576,320 a 53.91,53.91 0 0 1 -0.8,5.6 z"
|
||||
class="fa-primary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#90a4ae" />
|
||||
</g>
|
||||
<g
|
||||
id="g958"
|
||||
class="fa-group"
|
||||
transform="matrix(-0.05876348,0,0,0.05876348,121.12338,164.9729)"
|
||||
style="fill:#90a4ae">
|
||||
<path
|
||||
id="path956"
|
||||
d="m 640,416 a 96,96 0 0 1 -96,96 H 224 a 96,96 0 0 1 -96,-96 c 0,-42.5 27.8,-78.2 66.1,-90.8 A 113.72,113.72 0 0 1 192,304 111.94,111.94 0 0 1 304,192 c 43.2,0 80.4,24.9 99,60.8 14.7,-17.5 36.4,-28.8 61,-28.8 a 80,80 0 0 1 80,80 78.09,78.09 0 0 1 -1.6,16.2 c 0.5,0 1,-0.2 1.6,-0.2 a 96,96 0 0 1 96,96 z"
|
||||
class="fa-primary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:0.4;fill:#90a4ae" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
81
www/assets/images/weather-rain.svg
Normal file
@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="512"
|
||||
height="512"
|
||||
viewBox="0 0 135.46666 135.46667"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="weather-rain.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.7"
|
||||
inkscape:cx="-807.14286"
|
||||
inkscape:cy="388.57143"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1015"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-161.53332)">
|
||||
<g
|
||||
id="g877"
|
||||
class="fa-group"
|
||||
transform="matrix(0.15119047,0,0,0.15119047,33.866668,216.0375)"
|
||||
style="fill:#8d6e63">
|
||||
<path
|
||||
id="path873"
|
||||
d="m 256,32 32,128 v 112 a 16,16 0 0 1 -16,16 H 176 A 16,16 0 0 1 160,272 V 160 L 192,32 Z"
|
||||
class="fa-secondary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:0.4;fill:#8d6e63;fill-opacity:1" />
|
||||
<path
|
||||
id="path875"
|
||||
d="m 446.7,160 c 0.4,-0.5 0.5,-0.7 0.9,-1.2 L 391.3,53.9 A 32,32 0 0 0 360.9,32 H 256 l 32,128 z M 160,160 192,32 H 87.1 A 32,32 0 0 0 56.7,53.9 L 0.4,158.8 c 0.4,0.5 0.5,0.7 0.9,1.2 z m 128,32 v 80 a 16,16 0 0 1 -16,16 H 176 A 16,16 0 0 1 160,272 V 192 H 0 v 256 a 32,32 0 0 0 32,32 h 384 a 32,32 0 0 0 32,-32 V 192 Z"
|
||||
class="fa-primary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#8d6e63;fill-opacity:1" />
|
||||
</g>
|
||||
<path
|
||||
id="path1019"
|
||||
d="m 80.537274,180.16754 c -0.04802,0 -0.08803,0.016 -0.128041,0.016 0.08803,-0.41613 0.128041,-0.84826 0.128041,-1.29641 0,-3.53708 -2.864884,-6.40196 -6.401972,-6.40196 -1.968606,0 -3.705141,0.90428 -4.881505,2.30471 -1.488458,-2.88089 -4.457372,-4.8655 -7.922439,-4.8655 -4.953523,0 -8.962759,4.00924 -8.962759,8.96275 0,0.58419 0.06402,1.14436 0.168053,1.69653 -3.064946,1.00831 -5.289629,3.86519 -5.289629,7.26624 0,4.24131 3.441059,7.68237 7.682366,7.68237 h 25.607885 c 4.241304,0 7.682363,-3.44106 7.682363,-7.68237 0,-4.2413 -3.441059,-7.68236 -7.682363,-7.68236 z m -29.449068,18.56571 c -0.704219,0 -1.280396,0.57618 -1.280396,1.2804 v 3.20099 c 0,0.70422 0.576177,1.28039 1.280396,1.28039 0.704216,0 1.280393,-0.57617 1.280393,-1.28039 v -3.20099 c 0,-0.70422 -0.576177,-1.2804 -1.280393,-1.2804 z m 7.682365,6.40198 c -0.704218,0 -1.280396,0.57618 -1.280396,1.2804 v 3.20097 c 0,0.70422 0.576178,1.2804 1.280396,1.2804 0.704216,0 1.280393,-0.57618 1.280393,-1.2804 v -3.20097 c 0,-0.70422 -0.576177,-1.2804 -1.280393,-1.2804 z m 7.682366,-6.40198 c -0.704219,0 -1.280396,0.57618 -1.280396,1.2804 v 3.20099 c 0,0.70422 0.576177,1.28039 1.280396,1.28039 0.704215,0 1.280393,-0.57617 1.280393,-1.28039 v -3.20099 c 0,-0.70422 -0.576178,-1.2804 -1.280393,-1.2804 z m 7.682365,6.40198 c -0.704218,0 -1.280396,0.57618 -1.280396,1.2804 v 3.20097 c 0,0.70422 0.576178,1.2804 1.280396,1.2804 0.704216,0 1.280393,-0.57618 1.280393,-1.2804 v -3.20097 c 0,-0.70422 -0.576177,-1.2804 -1.280393,-1.2804 z m 7.682366,-6.40198 c -0.704216,0 -1.280394,0.57618 -1.280394,1.2804 v 3.20099 c 0,0.70422 0.576178,1.28039 1.280394,1.28039 0.704215,0 1.280393,-0.57617 1.280393,-1.28039 v -3.20099 c 0,-0.70422 -0.576178,-1.2804 -1.280393,-1.2804 z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#03a9f4;stroke-width:0.08002464" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.3 KiB |
94
www/assets/images/weather-snow.svg
Normal file
@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="512"
|
||||
height="512"
|
||||
viewBox="0 0 135.46666 135.46667"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="weather-snow.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4"
|
||||
inkscape:cx="-76.513165"
|
||||
inkscape:cy="317.14286"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1015"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-161.53332)">
|
||||
<g
|
||||
id="g877"
|
||||
class="fa-group"
|
||||
transform="matrix(0.15119047,0,0,0.15119047,33.866668,216.0375)"
|
||||
style="fill:#8d6e63">
|
||||
<path
|
||||
id="path873"
|
||||
d="m 256,32 32,128 v 112 a 16,16 0 0 1 -16,16 H 176 A 16,16 0 0 1 160,272 V 160 L 192,32 Z"
|
||||
class="fa-secondary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:0.4;fill:#8d6e63;fill-opacity:1" />
|
||||
<path
|
||||
id="path875"
|
||||
d="m 446.7,160 c 0.4,-0.5 0.5,-0.7 0.9,-1.2 L 391.3,53.9 A 32,32 0 0 0 360.9,32 H 256 l 32,128 z M 160,160 192,32 H 87.1 A 32,32 0 0 0 56.7,53.9 L 0.4,158.8 c 0.4,0.5 0.5,0.7 0.9,1.2 z m 128,32 v 80 a 16,16 0 0 1 -16,16 H 176 A 16,16 0 0 1 160,272 V 192 H 0 v 256 a 32,32 0 0 0 32,32 h 384 a 32,32 0 0 0 32,-32 V 192 Z"
|
||||
class="fa-primary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#8d6e63;fill-opacity:1" />
|
||||
</g>
|
||||
<path
|
||||
id="path1747"
|
||||
d="m 63.700847,189.92602 -0.522471,-0.91929 c -0.284384,-0.50924 -0.9259,-0.6812 -1.421915,-0.3902 l -2.59252,1.52112 0.60184,-2.2949 c 0.14549,-0.56216 -0.17857,-1.14415 -0.73411,-1.29626 l -1.00526,-0.27116 c -0.55554,-0.15211 -1.1243,0.18518 -1.27642,0.74733 l -1.40868,5.35699 -4.75515,2.79092 v -5.58846 l 3.8557,-3.92184 c 0.40343,-0.41004 0.40343,-1.08462 0,-1.49467 l -0.7341,-0.74733 c -0.40343,-0.41004 -1.06479,-0.41004 -1.46821,0 l -1.64678,1.67985 v -3.03563 c 0,-0.58199 -0.46295,-1.05817 -1.03833,-1.05817 H 48.51611 c -0.57538,0 -1.03833,0.47618 -1.03833,1.05817 v 3.04885 l -1.64677,-1.67984 c -0.40343,-0.41004 -1.06479,-0.41004 -1.46821,0 l -0.75395,0.74733 c -0.40343,0.41004 -0.40343,1.08463 0,1.49467 l 3.85571,3.92184 v 5.58846 l -4.75515,-2.79093 -1.40869,-5.35698 c -0.1455,-0.56215 -0.72088,-0.89944 -1.27642,-0.74733 l -1.00526,0.27115 c -0.55554,0.15212 -0.88622,0.73411 -0.73411,1.29626 l 0.60184,2.29491 -2.59252,-1.52112 c -0.49601,-0.291 -1.13092,-0.11904 -1.42191,0.3902 l -0.52247,0.91928 c -0.28439,0.50925 -0.11905,1.15076 0.38358,1.44837 l 2.59252,1.52112 -2.25523,0.60184 c -0.55554,0.15211 -0.88621,0.7341 -0.7341,1.29625 l 0.27115,1.0251 c 0.1455,0.56216 0.72088,0.89945 1.27642,0.74734 l 5.27101,-1.43514 4.75515,2.79092 -4.75515,2.79092 -5.27101,-1.43514 c -0.55554,-0.15211 -1.1243,0.18518 -1.27642,0.74733 l -0.27115,1.0251 c -0.1455,0.56215 0.17856,1.14415 0.7341,1.29626 l 2.25523,0.61506 -2.59252,1.52112 c -0.49602,0.291 -0.66797,0.93912 -0.38358,1.44837 l 0.52247,0.91928 c 0.28438,0.50925 0.9259,0.6812 1.42191,0.3902 l 2.59252,-1.52111 -0.60184,2.2949 c -0.14549,0.56215 0.17857,1.14415 0.73411,1.29626 l 1.00526,0.27115 c 0.55554,0.15212 1.12431,-0.18518 1.27642,-0.74733 l 1.40869,-5.35698 4.75515,-2.79092 v 5.58845 l -3.85571,3.92185 c -0.40343,0.41004 -0.40343,1.08462 0,1.49466 l 0.73411,0.74733 c 0.40342,0.41004 1.06478,0.41004 1.46821,0 l 1.64677,-1.67984 v 3.03562 c 0,0.582 0.46295,1.05817 1.03833,1.05817 h 1.038331 c 0.57538,0 1.03833,-0.47617 1.03833,-1.05817 v -3.04885 l 1.64678,1.67985 c 0.40342,0.41003 1.06478,0.41003 1.46821,0 l 0.7341,-0.74734 c 0.40343,-0.41004 0.40343,-1.08462 0,-1.49466 l -3.8557,-3.92184 v -5.58846 l 4.75514,2.79092 1.40869,5.35699 c 0.1455,0.56215 0.72088,0.89944 1.27642,0.74733 l 1.00526,-0.27116 c 0.55554,-0.15211 0.88622,-0.7341 0.73411,-1.29626 l -0.60184,-2.2949 2.592518,1.52112 c 0.496018,0.29099 1.13092,0.11904 1.421915,-0.3902 l 0.522471,-0.91929 c 0.304226,-0.49602 0.138886,-1.14414 -0.363746,-1.43514 l -2.592514,-1.52112 2.255224,-0.61506 c 0.555539,-0.15211 0.886218,-0.73411 0.734104,-1.29626 l -0.271156,-1.0251 C 63.29742,199.476 62.722039,199.13871 62.1665,199.29082 l -5.271009,1.43514 -4.74853,-2.79092 4.75515,-2.79092 5.271003,1.43514 c 0.555539,0.15211 1.124306,-0.18518 1.276417,-0.74734 l 0.271156,-1.0251 c 0.1455,-0.56215 -0.178565,-1.14414 -0.734104,-1.29625 l -2.255224,-0.61507 2.592514,-1.52111 c 0.489404,-0.291 0.661358,-0.93913 0.376974,-1.44837 z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#40c4ff;stroke-width:0.0661356"
|
||||
sodipodi:nodetypes="ccccccccccccccccsssscccccccccccccccccccccccccccccccccccccccccccccccsssscccccccccccccccccccccccccccccccc" />
|
||||
<path
|
||||
style="fill:#40c4ff;stroke-width:0.03867185;opacity:0.4"
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 95.489081,177.22605 -0.305507,-0.53754 c -0.166287,-0.29778 -0.541407,-0.39833 -0.831441,-0.22817 l -1.51594,0.88946 0.351918,-1.34192 c 0.08507,-0.32871 -0.104416,-0.66902 -0.429261,-0.75796 l -0.587811,-0.15856 c -0.324844,-0.0889 -0.657419,0.10828 -0.746369,0.43699 l -0.823705,3.13242 -2.780508,1.63195 v -3.26777 l 2.254567,-2.29324 c 0.2359,-0.23976 0.2359,-0.63422 0,-0.87399 l -0.429254,-0.43699 c -0.2359,-0.23976 -0.622623,-0.23976 -0.858517,0 l -0.962931,0.98227 v -1.77504 c 0,-0.34031 -0.270704,-0.61875 -0.607149,-0.61875 h -0.607149 c -0.336445,0 -0.607149,0.27844 -0.607149,0.61875 v 1.78277 l -0.962925,-0.98226 c -0.2359,-0.23977 -0.622621,-0.23977 -0.858515,0 l -0.440862,0.43699 c -0.2359,0.23976 -0.2359,0.63422 0,0.87399 l 2.254572,2.29324 v 3.26777 l -2.780506,-1.63196 -0.823712,-3.13241 c -0.08508,-0.32871 -0.421524,-0.52594 -0.746368,-0.437 l -0.587812,0.15856 c -0.324844,0.089 -0.518204,0.42926 -0.42926,0.75797 l 0.351917,1.34191 -1.515939,-0.88945 c -0.290035,-0.17016 -0.661289,-0.0696 -0.831442,0.22816 l -0.305507,0.53754 c -0.166293,0.29777 -0.06961,0.67289 0.224293,0.84691 l 1.51594,0.88945 -1.318714,0.35192 c -0.324844,0.0889 -0.518199,0.42926 -0.429255,0.75797 l 0.158551,0.59941 c 0.08508,0.32871 0.421525,0.52594 0.746369,0.43699 l 3.082148,-0.83917 2.780506,1.63195 -2.780506,1.63195 -3.082148,-0.83918 c -0.324844,-0.0889 -0.657419,0.10828 -0.746369,0.43699 l -0.158551,0.59941 c -0.08508,0.32871 0.104411,0.66903 0.429255,0.75797 l 1.318714,0.35965 -1.51594,0.88945 c -0.29004,0.17016 -0.390586,0.54914 -0.224293,0.84692 l 0.305507,0.53753 c 0.166287,0.29778 0.541407,0.39833 0.831442,0.22817 l 1.515939,-0.88945 -0.351917,1.34191 c -0.08507,0.32871 0.104416,0.66903 0.42926,0.75797 l 0.587812,0.15855 c 0.324844,0.089 0.657424,-0.10828 0.746368,-0.43699 l 0.823712,-3.13242 2.780506,-1.63195 v 3.26777 l -2.254572,2.29325 c -0.2359,0.23976 -0.2359,0.63421 0,0.87398 l 0.429261,0.43699 c 0.235894,0.23976 0.622615,0.23976 0.858515,0 l 0.962925,-0.98227 v 1.77504 c 0,0.34032 0.270703,0.61875 0.607149,0.61875 h 0.607149 c 0.336445,0 0.607149,-0.27843 0.607149,-0.61875 v -1.78277 l 0.962931,0.98227 c 0.235894,0.23976 0.622617,0.23976 0.858517,0 l 0.429254,-0.437 c 0.2359,-0.23976 0.2359,-0.63422 0,-0.87398 l -2.254567,-2.29324 v -3.26777 l 2.780502,1.63195 0.823711,3.13242 c 0.08508,0.32871 0.421525,0.52594 0.746369,0.43699 l 0.587811,-0.15856 c 0.324844,-0.0889 0.518205,-0.42925 0.429261,-0.75796 l -0.351918,-1.34192 1.515934,0.88946 c 0.29004,0.17015 0.661289,0.0696 0.831447,-0.22817 l 0.305507,-0.53754 c 0.177894,-0.29004 0.08121,-0.66902 -0.212698,-0.83918 l -1.515933,-0.88945 1.318708,-0.35965 c 0.324844,-0.0889 0.518204,-0.42926 0.42926,-0.75797 l -0.158557,-0.59941 c -0.08507,-0.32871 -0.421524,-0.52593 -0.746362,-0.43699 l -3.082148,0.83918 -2.776638,-1.63195 2.780508,-1.63195 3.082143,0.83917 c 0.324844,0.089 0.657424,-0.10828 0.746368,-0.43699 l 0.158551,-0.59941 c 0.08508,-0.32871 -0.10441,-0.66902 -0.429254,-0.75797 l -1.318714,-0.35965 1.515939,-0.88945 c 0.28617,-0.17016 0.386721,-0.54914 0.220428,-0.84691 z"
|
||||
id="path1758"
|
||||
sodipodi:nodetypes="ccccccccccccccccsssscccccccccccccccccccccccccccccccccccccccccccccccsssscccccccccccccccccccccccccccccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="sssscccccccccccsssscccccccccccs"
|
||||
id="path1769"
|
||||
d="m 79.761365,206.32096 c 0,0.17015 0.13922,0.30937 0.30938,0.30937 h 0.61875 c 0.17015,0 0.30937,-0.13922 0.30937,-0.30937 v -1.09829 l 1.08282,0.62262 c 0.14695,0.0851 0.33644,0.0348 0.42152,-0.11215 l 0.30937,-0.53754 c 0.0851,-0.14695 0.0348,-0.33644 -0.11214,-0.42152 l -1.07895,-0.61875 1.07895,-0.61875 c 0.14695,-0.0851 0.19722,-0.27457 0.11214,-0.42152 l -0.30937,-0.53754 c -0.0851,-0.14695 -0.27457,-0.19723 -0.42152,-0.11215 l -1.08282,0.62262 v -1.09828 c 0,-0.17016 -0.13922,-0.30938 -0.30937,-0.30938 h -0.61875 c -0.17016,0 -0.30938,0.13922 -0.30938,0.30938 v 1.09828 l -1.08281,-0.62262 c -0.14695,-0.0851 -0.33645,-0.0348 -0.42152,0.11215 l -0.30938,0.53754 c -0.0851,0.14695 -0.0348,0.33645 0.11215,0.42152 l 1.07895,0.61875 -1.07895,0.61875 c -0.14695,0.0851 -0.19723,0.27457 -0.11215,0.42152 l 0.30938,0.53754 c 0.0851,0.14696 0.27457,0.19723 0.42152,0.11215 l 1.08281,-0.62262 z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#40c4ff;stroke-width:0.03867185" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 10 KiB |
94
www/assets/images/weather-windy.svg
Normal file
@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="512"
|
||||
height="512"
|
||||
viewBox="0 0 135.46666 135.46667"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="weather-windy.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4"
|
||||
inkscape:cx="110.00032"
|
||||
inkscape:cy="245.71429"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1015"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-161.53332)">
|
||||
<g
|
||||
id="g875"
|
||||
class="fa-group"
|
||||
transform="matrix(0.09964199,0,0,0.09964199,3.084307,203.76061)"
|
||||
style="fill:#7c4dff;fill-opacity:1">
|
||||
<path
|
||||
id="path871"
|
||||
d="m 508.88,394.71 c -9.6,41.1 -43.5,74 -84.69,82.7 -58.9,12.5 -111.6,-21.7 -129.39,-72.3 -3.7,-10.3 4.4,-21.1 15.29,-21.1 h 33.8 c 5.8,0 11.6,2.6 14.5,7.6 A 47.93,47.93 0 1 0 400,320 H 283.5 A 126.41,126.41 0 0 0 243.7,256 H 400 c 70.48,0 126,65.5 108.88,138.71 z"
|
||||
class="fa-secondary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:0.4;fill:#7c4dff;fill-opacity:1" />
|
||||
<path
|
||||
id="path873-3"
|
||||
d="M 156.76,256 H 16 A 16,16 0 0 0 0,272 v 32 a 16,16 0 0 0 16,16 h 142.26 c 15.9,0 30.81,10.9 33.41,26.6 a 32.06,32.06 0 0 1 -62,15.5 C 127.56,355.8 121.06,352 114.46,352 H 81.63 c -9.8,0 -17.71,8.8 -15.91,18.4 a 96,96 0 0 0 189.47,-31 C 249.09,291 205.47,256 156.76,256 Z M 445.83,107.28 C 438.23,71.07 408.92,41.76 372.72,34.16 a 96.22,96.22 0 0 0 -114.9,75.52 c -1.9,9.6 6.1,18.3 15.8,18.3 h 32.8 c 6.7,0 13.1,-3.8 15.2,-10.1 a 32,32 0 0 1 62,15.5 C 381,149.09 366.22,160 350.22,160 H 16 A 16,16 0 0 0 0,176 v 32 a 16,16 0 0 0 16,16 h 336 a 96.2,96.2 0 0 0 93.83,-116.72 z"
|
||||
class="fa-primary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#7c4dff;fill-opacity:1" />
|
||||
</g>
|
||||
<g
|
||||
id="g877"
|
||||
class="fa-group"
|
||||
transform="matrix(0.12285727,0.0329195,-0.0329195,0.12285727,73.213132,204.86962)"
|
||||
style="fill:#8d6e63">
|
||||
<path
|
||||
id="path873"
|
||||
d="m 256,32 32,128 v 112 a 16,16 0 0 1 -16,16 H 176 A 16,16 0 0 1 160,272 V 160 L 192,32 Z"
|
||||
class="fa-secondary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:0.4;fill:#8d6e63;fill-opacity:1" />
|
||||
<path
|
||||
id="path875"
|
||||
d="m 446.7,160 c 0.4,-0.5 0.5,-0.7 0.9,-1.2 L 391.3,53.9 A 32,32 0 0 0 360.9,32 H 256 l 32,128 z M 160,160 192,32 H 87.1 A 32,32 0 0 0 56.7,53.9 L 0.4,158.8 c 0.4,0.5 0.5,0.7 0.9,1.2 z m 128,32 v 80 a 16,16 0 0 1 -16,16 H 176 A 16,16 0 0 1 160,272 V 192 H 0 v 256 a 32,32 0 0 0 32,32 h 384 a 32,32 0 0 0 32,-32 V 192 Z"
|
||||
class="fa-primary"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#8d6e63;fill-opacity:1" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.8 KiB |
@ -20,7 +20,8 @@ function initSFX() {
|
||||
sfx = {
|
||||
"alert": new Audio("assets/audio/" + alertNoiseFile),
|
||||
"ok": new Audio("assets/audio/ok.mp3"),
|
||||
"error": new Audio("assets/audio/error.mp3")
|
||||
"error": new Audio("assets/audio/error.mp3"),
|
||||
"scan": new Audio("assets/audio/scan.mp3")
|
||||
};
|
||||
|
||||
setVolume("alert", alertVolume);
|
||||
|
@ -76,7 +76,7 @@ function addAutofillEntry(address) {
|
||||
function searchAutofill(q, number) {
|
||||
var byNumber = [];
|
||||
if (typeof number != 'undefined') {
|
||||
byNumber = searchAutofillByNumber(number);
|
||||
byNumber = searchAutofillByNumber(number, q);
|
||||
}
|
||||
|
||||
var byStreet = [];
|
||||
@ -87,7 +87,7 @@ function searchAutofill(q, number) {
|
||||
return byNumber.concat(byStreet.filter((item) => byNumber.indexOf(item) < 0));
|
||||
}
|
||||
|
||||
function searchAutofillByNumber(number) {
|
||||
function searchAutofillByNumber(number, q) {
|
||||
if (typeof autofillDB[number] == 'undefined') {
|
||||
return [];
|
||||
}
|
||||
@ -96,11 +96,19 @@ function searchAutofillByNumber(number) {
|
||||
return b[1] - a[1];
|
||||
});
|
||||
|
||||
var query = false;
|
||||
if (typeof q != 'undefined' && q != "") {
|
||||
query = true;
|
||||
}
|
||||
|
||||
var streets = [];
|
||||
|
||||
for (var i = 0; i < sorted.length; i++) {
|
||||
// if there's no search query OR if the query matches the current item
|
||||
if (!query || (query && sorted[i][0].toLowerCase().includes(q))) {
|
||||
streets.push(sorted[i][0]);
|
||||
}
|
||||
}
|
||||
|
||||
return streets;
|
||||
}
|
||||
@ -112,12 +120,12 @@ function searchAutofillByStreet(q) {
|
||||
return b[1] - a[1];
|
||||
});
|
||||
|
||||
console.log(sortedDB);
|
||||
//console.log(sortedDB);
|
||||
|
||||
q = q.toLowerCase();
|
||||
|
||||
for (var i = 0; i < sortedDB.length; i++) {
|
||||
console.log(sortedDB[i][0].toLowerCase().indexOf(q));
|
||||
//console.log(sortedDB[i][0].toLowerCase().indexOf(q));
|
||||
if (sortedDB[i][0].toLowerCase().includes(q)) {
|
||||
streets.push(sortedDB[i][0]);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ $(".view-main").on("click", "#addresslist .package-list-item .directions-btn", f
|
||||
});
|
||||
|
||||
$(".view-main").on("swipeout:delete", "#addresslist .package-list-item", function () {
|
||||
console.log("Deleting package", $(this).data("packageid"));
|
||||
console.log("Info", "Deleting package", $(this).data("packageid"));
|
||||
deletePackage($(this).data("packageid"));
|
||||
});
|
||||
|
||||
@ -62,8 +62,8 @@ function loadPackageList(sortType) {
|
||||
var anum = parseInt(a.value.address.split(" ", 1)[0], 10);
|
||||
var bnum = parseInt(b.value.address.split(" ", 1)[0], 10);
|
||||
|
||||
console.log("aalpha", aalpha);
|
||||
console.log("balpha", balpha);
|
||||
//console.log("aalpha", aalpha);
|
||||
//console.log("balpha", balpha);
|
||||
switch (sortType) {
|
||||
case "alpha_desc":
|
||||
if (aalpha > balpha) {
|
||||
|
@ -20,6 +20,21 @@ if (localStorage.getItem("user_latitude") != null && localStorage.getItem("user_
|
||||
userPosition.coords.longitude = localStorage.getItem("user_longitude");
|
||||
}
|
||||
|
||||
// Request the user's IP geolocation as a poor substitute for an actual location
|
||||
// Should improve UX for weather tool at least
|
||||
$.ajax({
|
||||
url: SETTINGS.geoipapi,
|
||||
dataType: 'json',
|
||||
timeout: 10 * 1000,
|
||||
success: function (resp) {
|
||||
if (resp.status == "OK" && userPosition.coords.accuracy > 99999) {
|
||||
userPosition.coords.latitude = resp.location.latitude;
|
||||
userPosition.coords.longitude = resp.location.longitude;
|
||||
userPosition.coords.accuracy = 99999;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var geoerrorcount = 0;
|
||||
|
||||
var mapLocationControlStarted = false;
|
||||
@ -30,14 +45,10 @@ if ("geolocation" in navigator) {
|
||||
localStorage.setItem("user_latitude", userPosition.coords.latitude);
|
||||
localStorage.setItem("user_longitude", userPosition.coords.longitude);
|
||||
if (mapLocationControlStarted) {
|
||||
//setMapLocation(position.coords.latitude, position.coords.longitude);
|
||||
// Don't refresh at an interval less than ten seconds
|
||||
var currentTimestamp = Math.floor(Date.now() / 1000);
|
||||
if (lastGpsUpdateTimestamp < (currentTimestamp - 10)) {
|
||||
updateDistances(position.coords.latitude, position.coords.longitude);
|
||||
if (map != null) {
|
||||
//map.updatePackageLayer(packages);
|
||||
}
|
||||
|
||||
var alertinterval = localStorage.getItem("alertinterval");
|
||||
if (alertinterval == null) {
|
||||
@ -74,7 +85,7 @@ if ("geolocation" in navigator) {
|
||||
}
|
||||
} else {
|
||||
if (map != null) {
|
||||
map.locateControl.start();
|
||||
map.startLocateControl();
|
||||
mapLocationControlStarted = true;
|
||||
}
|
||||
}
|
||||
@ -89,7 +100,7 @@ if ("geolocation" in navigator) {
|
||||
});
|
||||
} else {
|
||||
geoerrorcount++;
|
||||
console.log("Geolocation error #" + geoerrorcount + ": ", error);
|
||||
console.log("Warn", "Geolocation error #" + geoerrorcount + ": ", error);
|
||||
// Stop showing error toasts if they're happening a lot
|
||||
if (geoerrorcount <= 3) {
|
||||
app.toast.show({
|
||||
|
@ -63,10 +63,7 @@ router.on("pageInit", function (pagedata) {
|
||||
});
|
||||
|
||||
router.on("routeChange", function (newRoute) {
|
||||
console.log(newRoute);
|
||||
if (newRoute == "home") {
|
||||
router.refreshPage();
|
||||
}
|
||||
console.log("Info", "Navigating to ", newRoute.path);
|
||||
});
|
||||
|
||||
// Set alert radius to 100 meters by default
|
||||
|
@ -43,8 +43,15 @@ $("#addpackagebtn").click(function () {
|
||||
|
||||
var address = ($("input[name=number]").val() + " " + $("input[name=street]").val()).toUpperCase();
|
||||
$("#no-history").addClass("display-none");
|
||||
addPackageByAddress(address, $("input[name=citystate]").val().toUpperCase(), $("input[name=itemtype]:checked").val(), function (ids) {
|
||||
addPackageByAddress(
|
||||
$("input[name=number]").val().toUpperCase(),
|
||||
$("input[name=street]").val().toUpperCase(),
|
||||
$("input[name=citystate]").val().toUpperCase(),
|
||||
$("input[name=itemtype]:checked").val(),
|
||||
function (ids) {
|
||||
var packageObj = getPackage(ids.packageID);
|
||||
// Reset item type to default
|
||||
$("input[name=itemtype][data-default=1]").prop("checked", true);
|
||||
$("#historylist").prepend('<li class="history-list-item item-content" data-package="' + ids.packageID + '">'
|
||||
+ ' <div class="item-media">'
|
||||
+ ' <i class="icon ' + getIconForType(packageObj.type) + '"></i>'
|
||||
@ -64,9 +71,9 @@ $("#addpackagebtn").click(function () {
|
||||
$(".view-main").off("click", "#historylist .history-list-item");
|
||||
|
||||
$(".view-main").on("click", "#historylist .history-list-item", function () {
|
||||
console.log("Asking to delete ", $(this).data("package"));
|
||||
console.log("Info", "Asking to delete ", $(this).data("package"));
|
||||
confirmDeletePackage(getPackage($(this).data("package")), function (id) {
|
||||
console.log("Removing history item", id);
|
||||
console.log("Info", "Removing history item", id);
|
||||
$('#historylist .history-list-item[data-package="' + id + '"]').remove();
|
||||
if ($('#historylist .history-list-item').length == 0) {
|
||||
$("#no-history").removeClass("display-none");
|
||||
|
@ -6,8 +6,24 @@
|
||||
|
||||
var map = null;
|
||||
|
||||
var maptype = "mapbox";
|
||||
|
||||
function createMap() {
|
||||
if (localStorage.getItem("maptype") == null) {
|
||||
localStorage.setItem("maptype", "mapbox");
|
||||
}
|
||||
maptype = localStorage.getItem("maptype");
|
||||
if (maptype == "mapbox") {
|
||||
if (mapboxgl.supported()) {
|
||||
map = mapboxMap();
|
||||
} else {
|
||||
console.log("Warn", "mapbox-gl not supported, falling back to Leaflet");
|
||||
maptype = "leaflet";
|
||||
map = leafletMap();
|
||||
}
|
||||
} else {
|
||||
map = leafletMap();
|
||||
}
|
||||
map.updatePackageLayer(packages);
|
||||
}
|
||||
|
||||
@ -20,16 +36,37 @@ function reloadMap() {
|
||||
if (map != null && typeof map != 'undefined') {
|
||||
var mapcenter = map.getCenter();
|
||||
var mapzoom = map.getZoom();
|
||||
if (map.maptype == "mapbox") {
|
||||
var mapbearing = map.getBearing();
|
||||
var mappitch = map.getPitch();
|
||||
}
|
||||
|
||||
map.off();
|
||||
map.remove();
|
||||
map = null;
|
||||
|
||||
if (document.getElementById("mapbox") != null) {
|
||||
createMap();
|
||||
|
||||
if (map.maptype == "mapbox") {
|
||||
map.jumpTo({
|
||||
center: mapcenter,
|
||||
zoom: mapzoom,
|
||||
bearing: mapbearing,
|
||||
pitch: mappitch
|
||||
});
|
||||
} else {
|
||||
map.setView(mapcenter, mapzoom);
|
||||
}
|
||||
} else {
|
||||
console.log("Info", "Not re-creating map because #mapbox is not in DOM. Creation will be automatically triggered when map page is loaded.");
|
||||
}
|
||||
} else {
|
||||
createMap();
|
||||
}
|
||||
} catch (ex) {
|
||||
// oh well ¯\(°_o)/¯
|
||||
console.log(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,12 +85,12 @@ function openPackageInfoSheet(coordid, refreshOnly) {
|
||||
refreshOnly = false;
|
||||
}
|
||||
|
||||
console.log("Packages array: ", packages);
|
||||
//console.log("Packages array: ", packages);
|
||||
|
||||
for (var i = 0; i < packages.length; i++) {
|
||||
if (packages[i].id == coordid) {
|
||||
package = packages[i];
|
||||
console.log("Single Address:", package);
|
||||
//console.log("Single Address:", package);
|
||||
|
||||
$("#package-info-get-directions").attr("href", "geo:" + package.coords[0] + "," + package.coords[1]);
|
||||
$("#package-info-sheet-inner .list ul").html("");
|
||||
|
@ -14,6 +14,8 @@ function leafletMap() {
|
||||
attributionControl: false
|
||||
});
|
||||
|
||||
map.maptype = "leaflet";
|
||||
|
||||
if (localStorage.getItem("mapsource") == null) {
|
||||
localStorage.setItem("mapsource", "liberty");
|
||||
}
|
||||
@ -30,7 +32,7 @@ function leafletMap() {
|
||||
showPopup: false,
|
||||
locateOptions: {
|
||||
enableHighAccuracy: true,
|
||||
maxZoom: 16
|
||||
maxZoom: localStorage.getItem("trackzoom") == null ? 16 : localStorage.getItem("trackzoom") * 1
|
||||
},
|
||||
setView: "untilPanOrZoom",
|
||||
icon: "far fa-compass",
|
||||
@ -43,6 +45,14 @@ function leafletMap() {
|
||||
|
||||
map.setView({lat: userPosition.coords.latitude, lng: userPosition.coords.longitude}, 2);
|
||||
|
||||
map.startLocateControl = function () {
|
||||
map.locateControl.start();
|
||||
}
|
||||
|
||||
map.stopLocateControl = function () {
|
||||
|
||||
}
|
||||
|
||||
map.setMapHeading = function (heading) {
|
||||
|
||||
}
|
||||
@ -57,7 +67,7 @@ function leafletMap() {
|
||||
map.updatePackageLayer = function (data) {
|
||||
map.packagelayer.clearLayers();
|
||||
|
||||
console.log(data);
|
||||
//console.log(data);
|
||||
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
// JavaScript variable scope and anonymous functions are dumb
|
||||
@ -65,6 +75,7 @@ function leafletMap() {
|
||||
// of the loop, or something like that
|
||||
(function (datai) {
|
||||
var iconName = getMapIconForItems(datai.items);
|
||||
//console.log(iconName);
|
||||
|
||||
var icon = L.icon({
|
||||
iconUrl: "assets/images/" + iconName + ".png",
|
||||
|
134
www/assets/js/map_mapbox.js
Normal file
@ -0,0 +1,134 @@
|
||||
/*
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
// If true, we'll do a fancy zoom/pan in
|
||||
// Otherwise we'll just jump to the correct location
|
||||
var firstload = true;
|
||||
|
||||
function mapboxMap() {
|
||||
|
||||
if (localStorage.getItem("mapsource") == null) {
|
||||
localStorage.setItem("mapsource", "liberty");
|
||||
}
|
||||
|
||||
$("#mapbox").css("background-color", SETTINGS.maptileurls[localStorage.getItem("mapsource")].bgcolor);
|
||||
|
||||
mapboxgl.accessToken = '';
|
||||
var map = new mapboxgl.Map({
|
||||
container: 'mapbox',
|
||||
style: SETTINGS.maptileurls[localStorage.getItem("mapsource")].json,
|
||||
attributionControl: false,
|
||||
dragPan: true,
|
||||
pitch: 0,
|
||||
zoom: 2,
|
||||
maxZoom: 19
|
||||
});
|
||||
|
||||
map.maptype = "mapbox";
|
||||
|
||||
map.addControl(new mapboxgl.NavigationControl({
|
||||
visualizePitch: true
|
||||
}), 'top-left');
|
||||
|
||||
map.addControl(
|
||||
new mapboxgl.GeolocateControl({
|
||||
positionOptions: {
|
||||
enableHighAccuracy: true,
|
||||
timeout: 10 * 1000
|
||||
},
|
||||
fitBoundsOptions: {
|
||||
maxZoom: localStorage.getItem("trackzoom") == null ? 16 : localStorage.getItem("trackzoom") * 1
|
||||
},
|
||||
trackUserLocation: true
|
||||
}), 'top-left'
|
||||
);
|
||||
|
||||
map.startLocateControl = function () {
|
||||
// stub
|
||||
}
|
||||
|
||||
map.stopLocateControl = function () {
|
||||
// stub
|
||||
}
|
||||
|
||||
map.mapEasing = function (t) {
|
||||
return t * (2 - t);
|
||||
}
|
||||
|
||||
map.setMapHeading = function (heading) {
|
||||
if (typeof heading == 'number') {
|
||||
map.easeTo({
|
||||
bearing: heading,
|
||||
easing: map.mapEasing
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
map.setMapLocation = function (latitude, longitude) {
|
||||
map.easeTo({
|
||||
center: [
|
||||
longitude,
|
||||
latitude
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
map.updatePackageLayer = function (data) {
|
||||
var oldmarkers = document.getElementsByClassName("package-marker");
|
||||
if (oldmarkers.length > 0) {
|
||||
markerparent = oldmarkers[0].parentNode;
|
||||
while (oldmarkers.length > 0) {
|
||||
markerparent.removeChild(oldmarkers[0]);
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
// JavaScript variable scope and anonymous functions are dumb
|
||||
// This is necessary, otherwise all the on(click)s will fire for the last iteration
|
||||
// of the loop, or something like that
|
||||
(function (datai) {
|
||||
var iconName = getMapIconForItems(datai.items);
|
||||
//console.log(iconName);
|
||||
|
||||
var el = document.createElement("div");
|
||||
el.className = "package-marker";
|
||||
|
||||
el.style = "background-image: url(assets/images/" + iconName + ".png);";
|
||||
|
||||
el.addEventListener('click', function () {
|
||||
openPackageInfoSheet(datai.id);
|
||||
});
|
||||
|
||||
new mapboxgl.Marker(el)
|
||||
.setLngLat([datai.coords[1], datai.coords[0]])
|
||||
.addTo(map);
|
||||
})(data[i]);
|
||||
}
|
||||
}
|
||||
|
||||
map.animateMapIn = function (latitude, longitude, zoom, heading) {
|
||||
if (typeof zoom == 'undefined') {
|
||||
zoom = 16;
|
||||
}
|
||||
if (typeof heading == 'undefined') {
|
||||
heading = 0;
|
||||
}
|
||||
map.flyTo({
|
||||
center: [
|
||||
longitude,
|
||||
latitude
|
||||
],
|
||||
speed: 1,
|
||||
zoom: zoom,
|
||||
heading: heading,
|
||||
pitch: 0
|
||||
});
|
||||
}
|
||||
|
||||
map.animateMapIn(userPosition.coords.latitude, userPosition.coords.longitude, 12);
|
||||
|
||||
return map;
|
||||
}
|
@ -11,14 +11,14 @@ if (localStorage.getItem("packages") != null) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Count how many items are still undelivered for an address.
|
||||
* @param {type} address An item in the packages array.
|
||||
* Count how many items are still undelivered for a location.
|
||||
* @param {type} location An item in the packages array.
|
||||
* @returns {Number}
|
||||
*/
|
||||
function getUndeliveredCount(address) {
|
||||
function getUndeliveredCount(location) {
|
||||
var undelivered = 0;
|
||||
for (var i = 0; i < address.items.length; i++) {
|
||||
if (!address.items[i].delivered) {
|
||||
for (var i = 0; i < location.items.length; i++) {
|
||||
if (!location.items[i].delivered) {
|
||||
undelivered++;
|
||||
}
|
||||
}
|
||||
@ -35,25 +35,12 @@ function getPackage(packageid) {
|
||||
}
|
||||
}
|
||||
|
||||
function getIconForType(packagetype) {
|
||||
switch (packagetype) {
|
||||
case "package":
|
||||
return "fas fa-box";
|
||||
case "letter":
|
||||
return "fas fa-envelope";
|
||||
case "express":
|
||||
return "fas fa-shipping-fast";
|
||||
default:
|
||||
return "fas fa-box";
|
||||
}
|
||||
function getIconForType(type) {
|
||||
return SETTINGS.itemtypes[type].icon;
|
||||
}
|
||||
|
||||
function getMapIconForItems(items) {
|
||||
var types = {
|
||||
package: 0,
|
||||
letter: 0,
|
||||
express: 0
|
||||
};
|
||||
var types = {};
|
||||
var deliveredcount = 0;
|
||||
var type = "package";
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
@ -63,45 +50,63 @@ function getMapIconForItems(items) {
|
||||
deliveredcount++;
|
||||
continue;
|
||||
}
|
||||
if (isNaN(types[items[i].type])) {
|
||||
types[items[i].type] = 0;
|
||||
}
|
||||
types[items[i].type]++;
|
||||
}
|
||||
|
||||
if (deliveredcount == items.length) {
|
||||
return "check";
|
||||
}
|
||||
if (types.letter == 0 && types.express == 0) {
|
||||
if (types.package > 1) {
|
||||
return "boxes";
|
||||
|
||||
item_types = 0;
|
||||
icon = "multiple-items";
|
||||
// Count how many types we have, and set/overwrite the icon assuming we
|
||||
// only have that type. If we end up with multiple types, we return that
|
||||
// icon instead of a specific one.
|
||||
//console.log(types);
|
||||
for (var type in types) {
|
||||
//console.log(type);
|
||||
item_types++;
|
||||
if (types[type] == 1) {
|
||||
icon = SETTINGS.itemtypes[type].mapicon;
|
||||
} else {
|
||||
icon = SETTINGS.itemtypes[type].pluralmapicon;
|
||||
}
|
||||
return "box";
|
||||
}
|
||||
if (types.package == 0 && types.express == 0) {
|
||||
if (types.letter > 1) {
|
||||
return "envelopes";
|
||||
}
|
||||
return "envelope";
|
||||
}
|
||||
if (types.package == 0 && types.letter == 0) {
|
||||
return "express";
|
||||
//console.log(icon);
|
||||
}
|
||||
if (item_types > 1) {
|
||||
return "multiple-items";
|
||||
}
|
||||
return icon;
|
||||
}
|
||||
|
||||
function addPackage(address, latitude, longitude, type, callback) {
|
||||
function addPackage(address, latitude, longitude, type, callback, deadline) {
|
||||
var added = false;
|
||||
if (typeof type == 'undefined') {
|
||||
type = "package";
|
||||
type = SETTINGS.itemtypes[0].id;
|
||||
}
|
||||
if (typeof deadline == 'undefined') {
|
||||
deadline = false;
|
||||
}
|
||||
|
||||
// Extra precision makes the map stupider,
|
||||
// and doesn't really increase accuracy since four decimal places ~= 11m
|
||||
latitude = +(parseFloat("" + latitude).toFixed(4));
|
||||
longitude = +(parseFloat("" + longitude).toFixed(4));
|
||||
|
||||
var packageID = uuidv4();
|
||||
var coordsID = "";
|
||||
|
||||
for (var i = 0; i < packages.length; i++) {
|
||||
if (packages[i].coords[0] == latitude && packages[i].coords[1] == longitude && packages[i].address == address) {
|
||||
if (packages[i].coords[0] == latitude && packages[i].coords[1] == longitude) {
|
||||
coordsID = packages[i].id;
|
||||
packages[i].items.push({
|
||||
address: address,
|
||||
delivered: false,
|
||||
type: type,
|
||||
deadline: deadline,
|
||||
id: packageID
|
||||
});
|
||||
added = true;
|
||||
@ -122,6 +127,7 @@ function addPackage(address, latitude, longitude, type, callback) {
|
||||
address: address,
|
||||
delivered: false,
|
||||
type: type,
|
||||
deadline: deadline,
|
||||
id: packageID
|
||||
}
|
||||
]
|
||||
@ -132,7 +138,7 @@ function addPackage(address, latitude, longitude, type, callback) {
|
||||
playSound("ok");
|
||||
|
||||
app.toast.show({
|
||||
text: 'Package Added!<br><span style="font-size: 80%;">' + address + "</span>",
|
||||
text: SETTINGS.itemtypes[type].name + ' Added!<br><span style="font-size: 80%;">' + address + "</span>",
|
||||
position: "bottom",
|
||||
destroyOnClose: true,
|
||||
closeTimeout: 1000 * 3
|
||||
@ -152,6 +158,51 @@ function addPackage(address, latitude, longitude, type, callback) {
|
||||
addAutofillEntry(address);
|
||||
}
|
||||
|
||||
/**
|
||||
* Import a second package list and merge it with the existing one.
|
||||
* @param {type} newlist
|
||||
* @return {number} The number of packages that were skipped because they already exist locally.
|
||||
*/
|
||||
function importPackageList(newlist) {
|
||||
skipped = 0;
|
||||
for (latlng in newlist) {
|
||||
var latitude = newlist[latlng].coords[0];
|
||||
var longitude = newlist[latlng].coords[1];
|
||||
|
||||
latitude = +(parseFloat("" + latitude).toFixed(4));
|
||||
longitude = +(parseFloat("" + longitude).toFixed(4));
|
||||
|
||||
for (pkg in newlist[latlng].items) {
|
||||
var added = false;
|
||||
for (var i = 0; i < packages.length; i++) {
|
||||
if (+(parseFloat("" + packages[i].coords[0]).toFixed(4)) == latitude && +(parseFloat("" + packages[i].coords[1]).toFixed(4)) == longitude) {
|
||||
var newpackage = newlist[latlng].items[pkg];
|
||||
for (var j in packages[i].items) {
|
||||
if (packages[i].items[j].id == newpackage.id) {
|
||||
// This package already exists in the local database.
|
||||
added = true;
|
||||
skipped++;
|
||||
}
|
||||
}
|
||||
if (!added) {
|
||||
packages[i].items.push(package);
|
||||
added = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!added) {
|
||||
packages.push(newlist[latlng]);
|
||||
}
|
||||
}
|
||||
}
|
||||
localStorage.setItem("packages", JSON.stringify(packages));
|
||||
if (map != null) {
|
||||
reloadMap();
|
||||
}
|
||||
return skipped;
|
||||
}
|
||||
|
||||
function markDelivered(id, delivered) {
|
||||
for (var i = 0; i < packages.length; i++) {
|
||||
for (var j = 0; j < packages[i].items.length; j++) {
|
||||
@ -177,7 +228,7 @@ function markDelivered(id, delivered) {
|
||||
|
||||
function confirmDeletePackage(package, callback) {
|
||||
app.dialog.confirm(
|
||||
"Delete item at " + package.address + "?",
|
||||
"Delete " + SETTINGS.itemtypes[package.type].name.toLowerCase() + " at " + package.address + "?",
|
||||
"Confirm",
|
||||
function () {
|
||||
// delete
|
||||
@ -233,13 +284,59 @@ function countPackages() {
|
||||
return count;
|
||||
}
|
||||
|
||||
function addPackageByAddress(address, citystate, type, callback) {
|
||||
$.getJSON(SETTINGS.geocodeapi, {
|
||||
address: address + " " + citystate
|
||||
}, function (resp) {
|
||||
function addPackageByAddress(number, street, citystate, type, callback) {
|
||||
var requestfinished = false;
|
||||
var searchingdialogopen = false;
|
||||
var deadline = false;
|
||||
|
||||
var ajaxlookup = function () {
|
||||
var geocodecache = localStorage.getItem("geocode_cache");
|
||||
if (geocodecache == null) {
|
||||
geocodecache = "{}";
|
||||
localStorage.setItem("geocode_cache", "{}");
|
||||
}
|
||||
|
||||
geocodecache = JSON.parse(geocodecache);
|
||||
var cachekey = number + " || " + street + " || " + citystate;
|
||||
var cacheitem = geocodecache[cachekey];
|
||||
var timestamp = Math.floor(Date.now() / 1000);
|
||||
if (typeof cacheitem != 'undefined') {
|
||||
if (cacheitem.added + SETTINGS.geocodecacheexpiry < timestamp) {
|
||||
console.log("Info", "Removing expired geocode cache item " + cachekey);
|
||||
delete geocodecache[cachekey];
|
||||
localStorage.setItem("geocode_cache", JSON.stringify(geocodecache));
|
||||
} else {
|
||||
console.log("Info", "Using cached geocode result", cacheitem);
|
||||
addPackage(cacheitem.address, cacheitem.latitude, cacheitem.longitude, type, callback, deadline);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: SETTINGS.geocodeapi,
|
||||
dataType: 'json',
|
||||
data: {
|
||||
number: number,
|
||||
street: street,
|
||||
citystate: citystate
|
||||
},
|
||||
timeout: 15 * 1000,
|
||||
success: function (resp) {
|
||||
if (searchingdialogopen) {
|
||||
app.dialog.close();
|
||||
searchingdialogopen = false;
|
||||
}
|
||||
requestfinished = true;
|
||||
if (resp.status == "OK") {
|
||||
if (resp.accuracy.ok) {
|
||||
addPackage(resp.address.street, resp.coords[0], resp.coords[1], type, callback);
|
||||
addPackage(resp.address.street, resp.coords[0], resp.coords[1], type, callback, deadline);
|
||||
geocodecache[cachekey] = {
|
||||
address: resp.address.street,
|
||||
latitude: resp.coords[0],
|
||||
longitude: resp.coords[1],
|
||||
added: Math.floor(Date.now() / 1000)
|
||||
};
|
||||
localStorage.setItem("geocode_cache", JSON.stringify(geocodecache));
|
||||
} else {
|
||||
playSound("error");
|
||||
app.dialog.confirm(
|
||||
@ -247,17 +344,124 @@ function addPackageByAddress(address, citystate, type, callback) {
|
||||
"Accuracy Warning",
|
||||
function (ok) {
|
||||
if (resp.address.street == "") {
|
||||
addPackage(address, resp.coords[0], resp.coords[1], type, callback);
|
||||
addPackage(address, resp.coords[0], resp.coords[1], type, callback, deadline);
|
||||
} else {
|
||||
addPackage(resp.address.street, resp.coords[0], resp.coords[1], type, callback);
|
||||
addPackage(resp.address.street, resp.coords[0], resp.coords[1], type, callback, deadline);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
} else {
|
||||
playSound("error");
|
||||
app.dialog.alert(resp.message, "Error");
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, status, errorThrown) {
|
||||
if (searchingdialogopen) {
|
||||
app.dialog.close();
|
||||
searchingdialogopen = false;
|
||||
}
|
||||
requestfinished = true;
|
||||
playSound("error");
|
||||
app.dialog.alert("There was a network issue while finding the address. Please try adding the item again.", "Error");
|
||||
}
|
||||
});
|
||||
|
||||
// Open a loading message if there's a delay finding the address
|
||||
setTimeout(function () {
|
||||
if (!requestfinished) {
|
||||
app.dialog.preloader("Searching for address...");
|
||||
searchingdialogopen = true;
|
||||
}
|
||||
}, 750);
|
||||
}
|
||||
|
||||
if (type == "express") {
|
||||
if (localStorage.getItem("deadlinealarm_minutes") == null) {
|
||||
localStorage.setItem("deadlinealarm_minutes", 20);
|
||||
}
|
||||
var minutes = localStorage.getItem("deadlinealarm_minutes");
|
||||
app.dialog.create({
|
||||
title: 'Express Item',
|
||||
text: 'Set a reminder for ' + minutes + ' minutes before:',
|
||||
buttons: [
|
||||
{
|
||||
text: '10:30 AM',
|
||||
close: true
|
||||
},
|
||||
{
|
||||
text: '12:00 PM',
|
||||
close: true
|
||||
},
|
||||
{
|
||||
text: '3:00 PM',
|
||||
close: true
|
||||
},
|
||||
{
|
||||
text: "No reminder",
|
||||
color: "red",
|
||||
close: true
|
||||
}
|
||||
],
|
||||
verticalButtons: true,
|
||||
onClick: function (dialog, index) {
|
||||
deadline = new Date();
|
||||
switch (index) {
|
||||
case 0:
|
||||
deadline.setMinutes(30);
|
||||
deadline.setHours(10);
|
||||
break;
|
||||
case 1:
|
||||
deadline.setMinutes(00);
|
||||
deadline.setHours(12);
|
||||
break;
|
||||
case 2:
|
||||
deadline.setMinutes(00);
|
||||
deadline.setHours(12 + 3);
|
||||
break;
|
||||
case 3:
|
||||
default:
|
||||
deadline = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (deadline != false) {
|
||||
deadline = deadline.getTime() / 1000;
|
||||
}
|
||||
ajaxlookup();
|
||||
}
|
||||
}).open();
|
||||
} else {
|
||||
ajaxlookup();
|
||||
}
|
||||
}
|
||||
|
||||
function checkDeadlines() {
|
||||
if (localStorage.getItem("deadlinealarm_minutes") == null) {
|
||||
localStorage.setItem("deadlinealarm_minutes", 20);
|
||||
}
|
||||
var minutes = localStorage.getItem("deadlinealarm_minutes");
|
||||
var currentTime = new Date().getTime() / 1000;
|
||||
var deadlineTime = currentTime + (minutes * 60);
|
||||
for (i in packages) {
|
||||
for (j in packages[i].items) {
|
||||
var item = packages[i].items[j];
|
||||
if (typeof item.deadline != 'undefined' && item.deadline != false && item.delivered != true) {
|
||||
if ((typeof item.deadlinealarmed == 'undefined' || item.deadlinealarmed != true) && item.deadline <= deadlineTime) {
|
||||
playSound("alert");
|
||||
app.dialog.alert(
|
||||
"Item at " + item.address + " needs to be delivered by " + timestampToTimeString(item.deadline) + " (" + Math.floor((item.deadline - currentTime) / 60) + " minutes from now).",
|
||||
"Delivery Alarm",
|
||||
function () {
|
||||
|
||||
}
|
||||
);
|
||||
packages[i].items[j].deadlinealarmed = true;
|
||||
localStorage.setItem("packages", JSON.stringify(packages));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setInterval(checkDeadlines, 15 * 1000);
|
@ -64,30 +64,76 @@ var watchLocation = function (success, error) {
|
||||
}
|
||||
}
|
||||
|
||||
function setupHTML5BarcodeScanner() {
|
||||
$("body").append('<script src="node_modules/@zxing/library/umd/index.min.js"></script>');
|
||||
|
||||
scanBarcode = function (success, error) {
|
||||
$("#web-barcode-ui").removeClass("hidden");
|
||||
// Stolen from https://zxing-js.github.io/library/examples/multi-camera/
|
||||
const codeReader = new ZXing.BrowserMultiFormatReader();
|
||||
console.log("Info", 'ZXing code reader initialized');
|
||||
codeReader.getVideoInputDevices()
|
||||
.then((videoInputDevices) => {
|
||||
if (videoInputDevices.length == 0) {
|
||||
codeReader.reset();
|
||||
$("#web-barcode-ui").addClass("hidden");
|
||||
error("A camera is required to scan barcodes.");
|
||||
return;
|
||||
}
|
||||
selectedDeviceId = videoInputDevices[0].deviceId;
|
||||
|
||||
codeReader.decodeFromInputVideoDeviceContinuously(selectedDeviceId, 'barcode-viewer', (result, err) => {
|
||||
if (result) {
|
||||
codeReader.reset();
|
||||
$("#web-barcode-ui").addClass("hidden");
|
||||
success(result.text);
|
||||
return;
|
||||
}
|
||||
if (err && !(err instanceof ZXing.NotFoundException)) {
|
||||
console.error(err);
|
||||
codeReader.reset();
|
||||
$("#web-barcode-ui").addClass("hidden");
|
||||
error(err);
|
||||
return;
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
$("#web-barcode-ui").on("click", function () {
|
||||
codeReader.reset();
|
||||
$("#web-barcode-ui").addClass("hidden");
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function initCordova() {
|
||||
platform_type = "cordova";
|
||||
|
||||
// Handle back button to close things
|
||||
document.addEventListener("backbutton", function (event) {
|
||||
// Close map sheet if it's open
|
||||
if ($(".sheet-modal").hasClass("modal-in")) {
|
||||
app.sheet.close();
|
||||
} else {
|
||||
router.back({force: true, ignoreCache: true});
|
||||
}
|
||||
}, false);
|
||||
|
||||
document.addEventListener("deviceready", function () {
|
||||
if (localStorage.getItem("wakelock") == "true") {
|
||||
window.powerManagement.acquire(function () {
|
||||
console.log('Wakelock acquired');
|
||||
console.log("Info", 'Wakelock acquired');
|
||||
}, function () {
|
||||
console.log('Failed to acquire wakelock');
|
||||
console.log("Warn", 'Failed to acquire wakelock');
|
||||
});
|
||||
} else {
|
||||
window.powerManagement.release(function () {
|
||||
console.log('Wakelock released');
|
||||
console.log("Info", 'Wakelock released');
|
||||
}, function () {
|
||||
console.log('Failed to release wakelock');
|
||||
console.log("Warn", 'Failed to release wakelock');
|
||||
});
|
||||
}
|
||||
}, false);
|
||||
|
||||
openBrowser = function (url) {
|
||||
cordova.InAppBrowser.open(url, '_blank', 'location=yes');
|
||||
}
|
||||
@ -96,6 +142,7 @@ function initCordova() {
|
||||
window.open(url, '_system', '');
|
||||
}
|
||||
|
||||
if (typeof device != "undefined" && device.platform != "browser") {
|
||||
scanBarcode = function (success, error) {
|
||||
cordova.plugins.barcodeScanner.scan(
|
||||
function (result) {
|
||||
@ -110,18 +157,22 @@ function initCordova() {
|
||||
},
|
||||
{
|
||||
showTorchButton: true,
|
||||
showFlipCameraButton: true,
|
||||
prompt: "Scan barcode",
|
||||
resultDisplayDuration: 0,
|
||||
disableSuccessBeep: true
|
||||
disableSuccessBeep: true,
|
||||
formats: "QR_CODE,DATA_MATRIX,CODE_39,CODE_93,CODE_128,CODABAR,PDF_417,AZTEC,MAXICODE"
|
||||
}
|
||||
);
|
||||
};
|
||||
} else {
|
||||
setupHTML5BarcodeScanner();
|
||||
}
|
||||
}
|
||||
|
||||
function initNW() {
|
||||
platform_type = "nw";
|
||||
platform_theme = "md";
|
||||
|
||||
openBrowser = function (url) {
|
||||
nw.Window.open(url, {
|
||||
id: url
|
||||
@ -154,49 +205,22 @@ function initNW() {
|
||||
require('nw.gui').Shell.openExternal(url);
|
||||
}
|
||||
|
||||
$("body").append('<script src="node_modules/@zxing/library/umd/index.min.js"></script>');
|
||||
|
||||
scanBarcode = function (success, error) {
|
||||
$("#web-barcode-ui").removeClass("hidden");
|
||||
// Stolen from https://zxing-js.github.io/library/examples/multi-camera/
|
||||
const codeReader = new ZXing.BrowserMultiFormatReader();
|
||||
console.log('ZXing code reader initialized');
|
||||
codeReader.getVideoInputDevices()
|
||||
.then((videoInputDevices) => {
|
||||
selectedDeviceId = videoInputDevices[0].deviceId;
|
||||
|
||||
codeReader.decodeFromInputVideoDeviceContinuously(selectedDeviceId, 'barcode-viewer', (result, err) => {
|
||||
if (result) {
|
||||
console.log(result);
|
||||
codeReader.reset();
|
||||
$("#web-barcode-ui").addClass("hidden");
|
||||
success(result.text);
|
||||
}
|
||||
if (err && !(err instanceof ZXing.NotFoundException)) {
|
||||
console.error(err);
|
||||
codeReader.reset();
|
||||
$("#web-barcode-ui").addClass("hidden");
|
||||
error(err);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
$("#web-barcode-ui").on("click", function () {
|
||||
codeReader.reset();
|
||||
$("#web-barcode-ui").addClass("hidden");
|
||||
});
|
||||
};
|
||||
setupHTML5BarcodeScanner();
|
||||
}
|
||||
|
||||
function initBrowser() {
|
||||
platform_type = "browser";
|
||||
platform_theme = "md";
|
||||
|
||||
openBrowser = function (url) {
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
openExternalBrowser = function (url) {
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
setupHTML5BarcodeScanner();
|
||||
}
|
||||
|
||||
function initPlatform() {
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
$('.item-content[data-setting=darktheme] .toggle input').on("change", function () {
|
||||
var checked = $(this).prop('checked');
|
||||
console.log(checked);
|
||||
localStorage.setItem("darktheme", checked);
|
||||
|
||||
if (localStorage.getItem("darktheme") == "true") {
|
||||
@ -17,27 +16,35 @@ $('.item-content[data-setting=darktheme] .toggle input').on("change", function (
|
||||
}
|
||||
});
|
||||
|
||||
$('.item-content[data-setting=showhelp] .toggle input').on("change", function () {
|
||||
var checked = $(this).prop('checked');
|
||||
localStorage.setItem("show_help", checked);
|
||||
});
|
||||
|
||||
$('.item-link[data-setting=units] select').on("change", function () {
|
||||
localStorage.setItem("units", $('.item-link[data-setting=units] select').val());
|
||||
});
|
||||
|
||||
$('.item-link[data-setting=trackzoom] select').on("change", function () {
|
||||
localStorage.setItem("trackzoom", $('.item-link[data-setting=trackzoom] select').val());
|
||||
});
|
||||
|
||||
$('.item-content[data-setting=wakelock] .toggle input').on("change", function () {
|
||||
var checked = $(this).prop('checked');
|
||||
console.log(checked);
|
||||
localStorage.setItem("wakelock", checked);
|
||||
|
||||
if (platform_type == "cordova") {
|
||||
if (localStorage.getItem("wakelock") == "true") {
|
||||
window.powerManagement.acquire(function () {
|
||||
console.log('Wakelock acquired');
|
||||
console.log("Info", 'Wakelock acquired');
|
||||
}, function () {
|
||||
console.log('Failed to acquire wakelock');
|
||||
console.log("Warn", 'Failed to acquire wakelock');
|
||||
});
|
||||
} else {
|
||||
window.powerManagement.release(function () {
|
||||
console.log('Wakelock released');
|
||||
console.log("Info", 'Wakelock released');
|
||||
}, function () {
|
||||
console.log('Failed to release wakelock');
|
||||
console.log("Warn", 'Failed to release wakelock');
|
||||
});
|
||||
}
|
||||
} else {
|
||||
@ -69,7 +76,16 @@ $('.item-content[data-setting=alertinterval] .range-slider').on('range:changed',
|
||||
|
||||
$('.item-link[data-setting=mapsource] select').on("change", function () {
|
||||
localStorage.setItem("mapsource", $('.item-link[data-setting=mapsource] select').val());
|
||||
// Re-init map to load new style
|
||||
|
||||
reloadMap();
|
||||
});
|
||||
|
||||
$('.item-content[data-setting=maptype] .toggle input').on("change", function () {
|
||||
var checked = $(this).prop('checked');
|
||||
localStorage.setItem("maptype", checked ? "leaflet" : "mapbox");
|
||||
|
||||
maptype = checked ? "leaflet" : "mapbox";
|
||||
|
||||
reloadMap();
|
||||
});
|
||||
|
||||
|
271
www/assets/js/toolbox_scanner.js
Normal file
@ -0,0 +1,271 @@
|
||||
/*
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
var scannerCodes = [];
|
||||
|
||||
function resetScanner() {
|
||||
scannerCodes = [];
|
||||
app.popup.close("#scanEventTypePopup");
|
||||
app.popup.close("#scanEventPopup");
|
||||
router.refreshPage();
|
||||
}
|
||||
|
||||
function brokenScannerEsc() {
|
||||
app.dialog.confirm(
|
||||
"Clear list?",
|
||||
"Confirm",
|
||||
function () {
|
||||
resetScanner();
|
||||
},
|
||||
function () {
|
||||
// cancel
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function brokenScannerScan() {
|
||||
scanBarcode(function (code) {
|
||||
playSound("scan");
|
||||
if (code != "" && code.length > 5 && code.match(/^[0-9A-Z]+$/i)) {
|
||||
addCodeToScannerList(code);
|
||||
} else {
|
||||
app.dialog.alert("That's not a valid tracking code.", "Error");
|
||||
}
|
||||
}, function (error) {
|
||||
app.dialog.alert(error, "Error");
|
||||
});
|
||||
}
|
||||
|
||||
function brokenScannerAddTextEntry() {
|
||||
var code = $("#brokenscannerinput").val();
|
||||
if (code != "" && code.length > 5 && code.match(/^[0-9A-Z]+$/i)) {
|
||||
addCodeToScannerList(code);
|
||||
$("#brokenscannerinput").val("");
|
||||
} else {
|
||||
app.dialog.alert("That's not a valid tracking code.", "Error");
|
||||
}
|
||||
}
|
||||
|
||||
function addCodeToScannerList(code) {
|
||||
code = code.toUpperCase();
|
||||
|
||||
var signatureregexes = [
|
||||
/^E[A-Z][0-9]{9}US$/, // Priority Mail Express
|
||||
/^[RV][A-Z][0-9]{9}[A-Z]{2}$/, // Registered mail
|
||||
/^(420[0-9]{5})?7[0-9]{19}$/ // Certified Mail
|
||||
];
|
||||
|
||||
/**
|
||||
* Regex of IMpb codes that don't need anything special
|
||||
* @type {RegExp}
|
||||
*/
|
||||
var stcregex = /^(420[0-9]{5})?[0-9]{2}(001|023|055|056|112|113|134|135|138|140|141|142|164|209|211|259|265|269|346|361|389|390|419|431|490|502|551|563|612|624|671|701|702|703|704|723|746|748|790|791|793|794|905|906|907|909|971|972)[0-9]+$/;
|
||||
|
||||
var signatureRequired = false;
|
||||
for (var i = 0; i < signatureregexes.length; i++) {
|
||||
if (code.match(signatureregexes[i])) {
|
||||
signatureRequired = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!code.match(stcregex)) {
|
||||
signatureRequired = true;
|
||||
}
|
||||
|
||||
var codeEntryTemplate = Template7.compile('<li class="codelist-entry" data-code="{{code}}">'
|
||||
+ ' <div class="item-content">'
|
||||
+ ' <div class="item-inner">'
|
||||
+ ' <div class="item-title">{{code}}</div>'
|
||||
+ ' </div>'
|
||||
+ ' </div>'
|
||||
+ '</li>');
|
||||
|
||||
if (signatureRequired) {
|
||||
if (code.match(/^E[A-Z][0-9]{9}US$/)) {
|
||||
app.dialog.confirm(
|
||||
"Does this item contain a waiver of signature endorsement?",
|
||||
"Express Item",
|
||||
function () {
|
||||
$("#codelist").append(codeEntryTemplate({
|
||||
code: code
|
||||
}));
|
||||
},
|
||||
function () {
|
||||
// cancel
|
||||
}
|
||||
);
|
||||
} else {
|
||||
app.dialog.confirm(
|
||||
"It looks like this item might require a signature or other special procedures. Add it anyways?",
|
||||
"Signature Item",
|
||||
function () {
|
||||
$("#codelist").append(codeEntryTemplate({
|
||||
code: code
|
||||
}));
|
||||
},
|
||||
function () {
|
||||
// cancel
|
||||
}
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$("#codelist").append(codeEntryTemplate({
|
||||
code: code
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
function chooseScanEvent() {
|
||||
if ($("#codelist li.codelist-entry").length <= 0) {
|
||||
app.dialog.alert("Nothing was entered!");
|
||||
return;
|
||||
}
|
||||
|
||||
$("#codelist li.codelist-entry").each(function () {
|
||||
scannerCodes.push($(this).data("code"));
|
||||
});
|
||||
|
||||
|
||||
openEventPopup();
|
||||
}
|
||||
|
||||
function openEventPopup() {
|
||||
var eventItemTemplate = Template7.compile('<li data-button="{{button}}" data-title="{{title}}" class="eventbutton" onclick=\'openEventTypePopup("{{title}}");\'>'
|
||||
+ ' <div class="item-link item-content">'
|
||||
+ ' <div class="item-media">{{button}}</div>'
|
||||
+ ' <div class="item-inner">'
|
||||
+ ' <div class="item-title">{{title}}</div>'
|
||||
+ ' </div>'
|
||||
+ ' </div>'
|
||||
+ '</li>');
|
||||
|
||||
$("#scanEventPopup ul.eventlist").html("");
|
||||
for (i in SETTINGS.scannerevents) {
|
||||
var event = SETTINGS.scannerevents[i];
|
||||
$("#scanEventPopup ul.eventlist").append(eventItemTemplate({
|
||||
button: event.button,
|
||||
title: event.title
|
||||
}));
|
||||
}
|
||||
|
||||
app.popup.open("#scanEventPopup");
|
||||
}
|
||||
|
||||
function openEventTypePopup(eventname) {
|
||||
var eventItemTemplate = Template7.compile('<li data-button="{{button}}" data-title="{{title}}" data-parenttitle="{{parenttitle}}" data-form3849="{{form3849}}" class="eventbutton eventtypebutton">'
|
||||
+ ' <div class="item-link item-content">'
|
||||
+ ' <div class="item-media">{{button}}</div>'
|
||||
+ ' <div class="item-inner">'
|
||||
+ ' <div class="item-title">{{title}}</div>'
|
||||
+ ' </div>'
|
||||
+ ' </div>'
|
||||
+ '</li>');
|
||||
|
||||
var eventafter = false;
|
||||
for (i in SETTINGS.scannerevents) {
|
||||
var event = SETTINGS.scannerevents[i];
|
||||
if (event.title == eventname) {
|
||||
eventafter = event.after;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$("#scanEventTypePopup ul.eventlist").html("");
|
||||
for (i in eventafter) {
|
||||
var event = eventafter[i];
|
||||
$("#scanEventTypePopup ul.eventlist").append(eventItemTemplate({
|
||||
button: event.button,
|
||||
title: event.title,
|
||||
parenttitle: eventname,
|
||||
form3849: event.after == "3849" ? "1" : "0"
|
||||
}));
|
||||
}
|
||||
|
||||
app.popup.open("#scanEventTypePopup");
|
||||
}
|
||||
|
||||
function saveScanCode(code) {
|
||||
if (localStorage.getItem("scanevents") == null) {
|
||||
localStorage.setItem("scanevents", "[]");
|
||||
}
|
||||
var events = JSON.parse(localStorage.getItem("scanevents"));
|
||||
events.push(code);
|
||||
localStorage.setItem("scanevents", JSON.stringify(events));
|
||||
}
|
||||
|
||||
$(".view-main").off("click", "#codelist li.codelist-entry");
|
||||
|
||||
$(".view-main").on("click", "#codelist li.codelist-entry", function () {
|
||||
var entry = $(this);
|
||||
var code = entry.data("code");
|
||||
app.dialog.confirm(
|
||||
"Remove " + code + " from list?",
|
||||
"Confirm",
|
||||
function () {
|
||||
// delete
|
||||
entry.remove();
|
||||
},
|
||||
function () {
|
||||
// cancel
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$("#app").off("click", "ul li.eventtypebutton");
|
||||
$("#app").on("click", "ul li.eventtypebutton", function () {
|
||||
var eventname = $(this).data("parenttitle");
|
||||
var eventtypename = $(this).data("title");
|
||||
|
||||
var scanEvent = [];
|
||||
scanEvent.push(eventname);
|
||||
scanEvent.push(eventtypename);
|
||||
|
||||
if ($(this).data("form3849") == "1") {
|
||||
// TODO: make this not a hack
|
||||
app.dialog.prompt("Key in 3849 form", "3849 Form", function (formcode) {
|
||||
for (i in scannerCodes) {
|
||||
saveScanCode({
|
||||
code: scannerCodes[i],
|
||||
event: scanEvent,
|
||||
form3849: formcode,
|
||||
date: timestampToDateTimeString((new Date).getTime() / 1000)
|
||||
});
|
||||
}
|
||||
app.toast.show({
|
||||
text: 'Information recorded successfully!',
|
||||
position: "center",
|
||||
destroyOnClose: true,
|
||||
closeTimeout: 1000 * 3
|
||||
});
|
||||
resetScanner();
|
||||
}, function () {
|
||||
|
||||
}, "");
|
||||
} else {
|
||||
for (i in scannerCodes) {
|
||||
saveScanCode({
|
||||
code: scannerCodes[i],
|
||||
event: scanEvent,
|
||||
form3849: "",
|
||||
date: timestampToDateTimeString((new Date).getTime() / 1000)
|
||||
});
|
||||
}
|
||||
app.toast.show({
|
||||
text: 'Information recorded successfully!',
|
||||
position: "center",
|
||||
destroyOnClose: true,
|
||||
closeTimeout: 1000 * 3
|
||||
});
|
||||
resetScanner();
|
||||
}
|
||||
});
|
||||
|
||||
$("#brokenscannerinput").on('keypress', function (e) {
|
||||
if (event.key === "Enter") {
|
||||
brokenScannerAddTextEntry();
|
||||
}
|
||||
});
|
23
www/assets/js/toolbox_scannerentries.js
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
|
||||
function confirmDeleteScanEntries() {
|
||||
app.dialog.confirm(
|
||||
"Really delete all entries from scan list?",
|
||||
"Clear Entries",
|
||||
function () {
|
||||
// clear
|
||||
localStorage.setItem("scanevents", "[]");
|
||||
router.navigate("/toolbox/scanner/entries", {
|
||||
reloadCurrent: true
|
||||
});
|
||||
},
|
||||
function () {
|
||||
// cancel
|
||||
}
|
||||
);
|
||||
}
|
101
www/assets/js/toolbox_sharelist.js
Normal file
@ -0,0 +1,101 @@
|
||||
/*
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
|
||||
function uploadList() {
|
||||
if (packages.length == 0) {
|
||||
app.dialog.alert("Your list doesn't have anything to send.", "Empty List");
|
||||
return;
|
||||
}
|
||||
app.dialog.preloader("Uploading...");
|
||||
var uploadlistdialogopen = true;
|
||||
$.ajax({
|
||||
url: SETTINGS.sharelistapi,
|
||||
dataType: 'json',
|
||||
method: 'post',
|
||||
data: {
|
||||
packages: JSON.stringify(packages)
|
||||
},
|
||||
timeout: 15 * 1000,
|
||||
success: function (resp) {
|
||||
if (uploadlistdialogopen) {
|
||||
app.dialog.close();
|
||||
uploadlistdialogopen = false;
|
||||
}
|
||||
if (resp.status == "OK") {
|
||||
JsBarcode("#listidbarcode", resp.uuid, {
|
||||
format: "code128",
|
||||
ean128: false,
|
||||
width: 2,
|
||||
height: 40
|
||||
});
|
||||
$("#listidbarcodeli").css("display", "");
|
||||
} else {
|
||||
app.dialog.alert(resp.message, "Error");
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, status, errorThrown) {
|
||||
if (uploadlistdialogopen) {
|
||||
app.dialog.close();
|
||||
uploadlistdialogopen = false;
|
||||
}
|
||||
app.dialog.alert("There was a network or server issue while uploading the list. Please try again.", "Error");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function downloadItemList(code) {
|
||||
if (typeof code == "undefined") {
|
||||
code = $("#getlistidbox").val();
|
||||
}
|
||||
if (code.match(/^[a-f0-9]{10}$/i)) {
|
||||
app.dialog.preloader("Downloading...");
|
||||
var downloadlistdialogopen = true;
|
||||
$.ajax({
|
||||
url: SETTINGS.sharelistapi,
|
||||
dataType: 'json',
|
||||
method: 'get',
|
||||
data: {
|
||||
uuid: code
|
||||
},
|
||||
timeout: 15 * 1000,
|
||||
success: function (resp) {
|
||||
if (downloadlistdialogopen) {
|
||||
app.dialog.close();
|
||||
downloadlistdialogopen = false;
|
||||
}
|
||||
if (resp.status == "OK") {
|
||||
var skipped = importPackageList(resp.packages);
|
||||
if (skipped > 0) {
|
||||
app.dialog.alert("List imported and merged with the existing one. " + skipped + " items already existed locally and were skipped. Verify their delivery status manually.", "Import Complete");
|
||||
} else {
|
||||
app.dialog.alert("List imported and merged with the existing one.", "Import Complete");
|
||||
}
|
||||
} else {
|
||||
app.dialog.alert(resp.message, "Error");
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, status, errorThrown) {
|
||||
if (downloadlistdialogopen) {
|
||||
app.dialog.close();
|
||||
downloadlistdialogopen = false;
|
||||
}
|
||||
app.dialog.alert("There was a network or server issue while downloading the list. Please try again.", "Error");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
app.dialog.alert("That's not a valid list ID.", "Error");
|
||||
}
|
||||
}
|
||||
|
||||
function scanListIDBarcode() {
|
||||
scanBarcode(function (code) {
|
||||
playSound("scan");
|
||||
downloadItemList(code);
|
||||
}, function (error) {
|
||||
app.dialog.alert(error, "Error");
|
||||
});
|
||||
}
|
170
www/assets/js/toolbox_track.js
Normal file
@ -0,0 +1,170 @@
|
||||
/*
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
var lasttrackingcode = "";
|
||||
|
||||
function locationArrayToString(location) {
|
||||
var locarray = [];
|
||||
if (location.street != "" && location.street != null) {
|
||||
locarray.push(location.street);
|
||||
}
|
||||
if (location.city != "" && location.city != null) {
|
||||
locarray.push(location.city);
|
||||
}
|
||||
if (location.state != "" && location.state != null) {
|
||||
locarray.push(location.state);
|
||||
}
|
||||
if (location.zip != "" && location.zip != null) {
|
||||
locarray.push(location.zip);
|
||||
}
|
||||
if (location.country != "" && location.country != "US" && location.country != null) {
|
||||
locarray.push(location.country);
|
||||
}
|
||||
return locarray.join(", ");
|
||||
}
|
||||
|
||||
function trackingStatusToNiceString(status, icon) {
|
||||
if (typeof icon == 'undefined' || icon !== true) {
|
||||
var icon = false;
|
||||
}
|
||||
switch (status) {
|
||||
case "UNKNOWN":
|
||||
return (icon ? '<i class="fas fa-fw fa-question-circle"></i> ' : '') + "Unknown";
|
||||
case "PRE_TRANSIT":
|
||||
return (icon ? '<i class="fas fa-fw fa-ellipsis-h"></i> ' : '') + "Pre-transit";
|
||||
case "TRANSIT":
|
||||
return (icon ? '<i class="fas fa-fw fa-chevron-circle-right"></i> ' : '') + "In Transit";
|
||||
case "DELIVERED":
|
||||
return (icon ? '<i class="fas fa-fw fa-check-circle"></i> ' : '') + "Delivered";
|
||||
case "RETURNED":
|
||||
return (icon ? '<i class="fas fa-fw fa-undo-alt"></i> ' : '') + "Returned";
|
||||
case "FAILURE":
|
||||
return (icon ? '<i class="fas fa-fw fa-times-circle"></i> ' : '') + "Failure";
|
||||
default:
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
function openTrackingHistory(code) {
|
||||
var refresh = false;
|
||||
if (typeof code == "undefined") {
|
||||
trackingcode = lasttrackingcode;
|
||||
refresh = true;
|
||||
} else {
|
||||
trackingcode = code;
|
||||
}
|
||||
lasttrackingcode = trackingcode;
|
||||
var requestfinished = false;
|
||||
var trackingdialogopen = false;
|
||||
$.ajax({
|
||||
url: SETTINGS.trackingapi,
|
||||
dataType: 'json',
|
||||
data: {
|
||||
code: trackingcode
|
||||
},
|
||||
timeout: 15 * 1000,
|
||||
success: function (resp) {
|
||||
if (trackingdialogopen) {
|
||||
app.dialog.close();
|
||||
trackingdialogopen = false;
|
||||
}
|
||||
requestfinished = true;
|
||||
if (resp.status == "OK") {
|
||||
var infocontext = resp;
|
||||
|
||||
infocontext.current.location.display = locationArrayToString(infocontext.current.location);
|
||||
infocontext.current.date = timestampToDateTimeString(infocontext.current.date);
|
||||
infocontext.current.status = trackingStatusToNiceString(infocontext.current.status, true);
|
||||
infocontext.addresses.from = locationArrayToString(infocontext.addresses.from);
|
||||
infocontext.addresses.to = locationArrayToString(infocontext.addresses.to);
|
||||
|
||||
for (var i = 0; i < infocontext.history.length; i++) {
|
||||
infocontext.history[i].location.display = locationArrayToString(infocontext.history[i].location);
|
||||
infocontext.history[i].date = timestampToDateTimeString(infocontext.history[i].date);
|
||||
infocontext.history[i].status = trackingStatusToNiceString(infocontext.history[i].status, true);
|
||||
}
|
||||
|
||||
// Keep last five tracking codes in history
|
||||
var history = localStorage.getItem("trackingcodehistory");
|
||||
if (history == null) {
|
||||
history = [];
|
||||
} else {
|
||||
history = JSON.parse(history);
|
||||
}
|
||||
if (infocontext.code != "" && !history.includes(infocontext.code)) {
|
||||
history.push(infocontext.code);
|
||||
}
|
||||
while (history.length > 5) {
|
||||
history.shift();
|
||||
}
|
||||
localStorage.setItem("trackingcodehistory", JSON.stringify(history));
|
||||
|
||||
if (refresh) {
|
||||
router.navigate("/toolbox/track/info", {
|
||||
context: infocontext,
|
||||
reloadCurrent: true
|
||||
});
|
||||
} else {
|
||||
router.navigate("/toolbox/track/info", {
|
||||
context: infocontext
|
||||
});
|
||||
}
|
||||
} else {
|
||||
app.dialog.alert(resp.message, "Error");
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, status, errorThrown) {
|
||||
if (trackingdialogopen) {
|
||||
app.dialog.close();
|
||||
trackingdialogopen = false;
|
||||
}
|
||||
requestfinished = true;
|
||||
app.dialog.alert("There was a network issue while tracking the item. Please try again.", "Error");
|
||||
}
|
||||
});
|
||||
|
||||
// Open a loading message if there's a delay or we're refreshing the page
|
||||
if (refresh) {
|
||||
app.dialog.preloader("Tracking...");
|
||||
trackingdialogopen = true;
|
||||
} else {
|
||||
setTimeout(function () {
|
||||
if (!requestfinished) {
|
||||
app.dialog.preloader("Tracking...");
|
||||
trackingdialogopen = true;
|
||||
}
|
||||
}, 750);
|
||||
}
|
||||
}
|
||||
|
||||
function scanTrackingBarcode() {
|
||||
scanBarcode(function (code) {
|
||||
playSound("scan");
|
||||
if (code != "" && code.length > 5) {
|
||||
openTrackingHistory(code);
|
||||
} else {
|
||||
app.dialog.alert("That's not a valid tracking code.", "Error");
|
||||
}
|
||||
}, function (error) {
|
||||
app.dialog.alert(error, "Error");
|
||||
});
|
||||
}
|
||||
|
||||
$("#trackbtn").click(function () {
|
||||
var code = $("input[name=trackingcode]").val();
|
||||
|
||||
if (code != "" && code.length > 5) {
|
||||
openTrackingHistory(code);
|
||||
} else {
|
||||
app.dialog.alert("That's not a valid tracking code.", "Error");
|
||||
}
|
||||
});
|
||||
|
||||
$("input[name=trackingcode]").on('keypress', function (e) {
|
||||
if (event.key === "Enter") {
|
||||
$("#trackbtn").click();
|
||||
}
|
||||
});
|
86
www/assets/js/toolbox_weather.js
Normal file
@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
|
||||
function ftoc(f) {
|
||||
return (f - 32) * 5 / 9;
|
||||
}
|
||||
|
||||
function loadWeather(reload) {
|
||||
if (typeof reload == "undefined") {
|
||||
reload = false;
|
||||
} else {
|
||||
reload = reload == true;
|
||||
}
|
||||
|
||||
if (userPosition.coords.accuracy > 99999) {
|
||||
app.dialog.alert("Couldn't find your location. Wait for a GPS signal and try again.", "Error");
|
||||
return;
|
||||
}
|
||||
|
||||
var requestfinished = false;
|
||||
var weatherdialogopen = false;
|
||||
$.ajax({
|
||||
url: SETTINGS.weatherapi,
|
||||
dataType: 'json',
|
||||
data: {
|
||||
// Round the numbers off to increase user privacy
|
||||
// Accuracy with two decimal places is ~1.1km/0.6mi
|
||||
latitude: userPosition.coords.latitude.toFixed(2),
|
||||
longitude: userPosition.coords.longitude.toFixed(2)
|
||||
},
|
||||
timeout: 15 * 1000,
|
||||
success: function (resp) {
|
||||
if (weatherdialogopen) {
|
||||
app.dialog.close();
|
||||
weatherdialogopen = false;
|
||||
}
|
||||
requestfinished = true;
|
||||
if (resp.status == "OK") {
|
||||
var mintemp = (localStorage.getItem("units") == "metric" ? Math.round(ftoc(resp.temp.min)) + " °C" : Math.round(resp.temp.min) + " °F");
|
||||
var maxtemp = (localStorage.getItem("units") == "metric" ? Math.round(ftoc(resp.temp.max)) + " °C" : Math.round(resp.temp.max) + " °F");
|
||||
$("#lowtemp").html(mintemp);
|
||||
$("#hightemp").html(maxtemp);
|
||||
$("#precipchance").text(Math.round(resp.precipitation.chance * 100.0) + "% chance");
|
||||
if (localStorage.getItem("units") == "metric") {
|
||||
$("#windspeed").text(Math.round(resp.windspeed * 1.609344) + " km/h");
|
||||
} else {
|
||||
$("#windspeed").text(Math.round(resp.windspeed) + " mph");
|
||||
}
|
||||
if (SETTINGS.weathericons.includes(resp.icon)) {
|
||||
$("#weathericon").attr("src", "assets/images/weather-" + resp.icon + ".svg");
|
||||
} else {
|
||||
$("#weathericon").attr("src", "assets/images/weather-none.svg");
|
||||
}
|
||||
$("#forecast-location").text(resp.location_name);
|
||||
$("#forecast-info").text("Forecast covers the next " + resp.forecast_hours + " hours (until " + timestampToTimeString(resp.forecast_until) + ").");
|
||||
} else {
|
||||
app.dialog.alert(resp.message, "Error");
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, status, errorThrown) {
|
||||
if (weatherdialogopen) {
|
||||
app.dialog.close();
|
||||
weatherdialogopen = false;
|
||||
}
|
||||
requestfinished = true;
|
||||
app.dialog.alert("There was a network issue while checking the weather. Please try again.", "Error");
|
||||
}
|
||||
});
|
||||
|
||||
// Open a loading message if there's a delay or we're reloading
|
||||
if (reload) {
|
||||
app.dialog.preloader("Checking Weather...");
|
||||
weatherdialogopen = true;
|
||||
} else {
|
||||
setTimeout(function () {
|
||||
if (!requestfinished) {
|
||||
app.dialog.preloader("Checking Weather...");
|
||||
weatherdialogopen = true;
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
}
|
30
www/assets/js/util.js
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
|
||||
function timestampToDateTimeString(timestamp) {
|
||||
var date = new Date(timestamp * 1000);
|
||||
|
||||
var pm = date.getHours() >= 12;
|
||||
var hours = date.getHours() > 12 ? date.getHours() - 12 : date.getHours();
|
||||
hours = (hours == 0 ? 12 : hours);
|
||||
var minutes = date.getMinutes();
|
||||
var time = hours + ":" + (minutes < 10 ? "0" + minutes : minutes) + " " + (pm ? "PM" : "AM");
|
||||
|
||||
return date.toLocaleDateString() + " " + time;
|
||||
}
|
||||
|
||||
function timestampToTimeString(timestamp) {
|
||||
var date = new Date(timestamp * 1000);
|
||||
|
||||
var pm = date.getHours() >= 12;
|
||||
var hours = date.getHours() > 12 ? date.getHours() - 12 : date.getHours();
|
||||
hours = (hours == 0 ? 12 : hours);
|
||||
var minutes = date.getMinutes();
|
||||
var time = hours + ":" + (minutes < 10 ? "0" + minutes : minutes) + " " + (pm ? "PM" : "AM");
|
||||
|
||||
return time;
|
||||
}
|
@ -12,8 +12,11 @@
|
||||
<link rel="stylesheet" href="node_modules/leaflet.markercluster/dist/MarkerCluster.css" />
|
||||
<link rel="stylesheet" href="node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css" />
|
||||
<link rel="stylesheet" href="node_modules/leaflet.locatecontrol/dist/L.Control.Locate.min.css" />
|
||||
<link rel="stylesheet" href="node_modules/mapbox-gl/dist/mapbox-gl.css">
|
||||
<link rel="stylesheet" href="assets/css/app.css" />
|
||||
<link rel="stylesheet" href="assets/css/backdrop.css" />
|
||||
<link rel="stylesheet" href="assets/css/oled.css" />
|
||||
<link rel="stylesheet" href="assets/css/web-barcode.css" />
|
||||
|
||||
<script src="cordova.js"></script>
|
||||
|
||||
@ -23,22 +26,33 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div id="web-barcode-ui" class="hidden">
|
||||
<video id="barcode-viewer"></video>
|
||||
<div class="text">
|
||||
Scan a barcode with your camera. Click or tap anywhere to cancel.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="node_modules/framework7/js/framework7.bundle.min.js"></script>
|
||||
<script src="node_modules/jquery/dist/jquery.min.js"></script>
|
||||
<script src="node_modules/leaflet/dist/leaflet.js"></script>
|
||||
<script src="node_modules/leaflet.markercluster/dist/leaflet.markercluster.js"></script>
|
||||
<script src="node_modules/mapbox-gl/dist/mapbox-gl.js"></script>
|
||||
<script src="node_modules/jsbarcode/dist/JsBarcode.all.min.js"></script>
|
||||
<script src="node_modules/leaflet.locatecontrol/dist/L.Control.Locate.min.js"></script>
|
||||
|
||||
<script src="settings.js"></script>
|
||||
|
||||
<script src="assets/js/platform.js"></script>
|
||||
|
||||
<script src="assets/js/util.js"></script>
|
||||
<script src="assets/js/audio.js"></script>
|
||||
<script src="assets/js/autofill.js"></script>
|
||||
<script src="assets/js/packages.js"></script>
|
||||
<script src="assets/js/location.js"></script>
|
||||
<script src="assets/js/list.js"></script>
|
||||
<script src="assets/js/map_leaflet.js"></script>
|
||||
<script src="assets/js/map_mapbox.js"></script>
|
||||
<script src="assets/js/map.js"></script>
|
||||
<script src="assets/js/manage.js"></script>
|
||||
|
||||
|
@ -1,16 +1,19 @@
|
||||
{
|
||||
"name": "PackageHelper",
|
||||
"version": "1.1.0",
|
||||
"version": "1.3.0",
|
||||
"main": "index.html",
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.10.2",
|
||||
"framework7": "^5.0.2",
|
||||
"@zxing/library": "^0.15.2",
|
||||
"framework7": "^5.1.3",
|
||||
"jquery": "^3.4.1",
|
||||
"jsbarcode": "^3.11.0",
|
||||
"leaflet": "^1.5.1",
|
||||
"leaflet-geometryutil": "^0.9.1",
|
||||
"leaflet.locatecontrol": "^0.67.0",
|
||||
"leaflet.markercluster": "^1.4.1",
|
||||
"mapbox-gl": "^1.6.1",
|
||||
"material-design-icons": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {}
|
||||
|
@ -1,90 +0,0 @@
|
||||
<!-- 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/. -->
|
||||
|
||||
<div class="page" data-name="alertsettings">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-bg"></div>
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="#" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Alert Settings</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="page-content">
|
||||
<div class="list media-list no-hairlines tablet-inset" style="margin-top: 0;">
|
||||
<ul>
|
||||
{{#each settings}}
|
||||
<li>
|
||||
{{#if toggle}}
|
||||
<div class="item-content" data-setting="{{setting}}">
|
||||
<div class="item-inner">
|
||||
<div style="display: flex; justify-content: between;">
|
||||
<div class="item-title">
|
||||
{{title}}
|
||||
</div>
|
||||
<div class="item-after" onclick="{{onclick}}">
|
||||
<label class="toggle toggle-init">
|
||||
<input type="checkbox" {{#if checked}}checked{{/if}}>
|
||||
<span class="toggle-icon"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-text">{{text}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{{#if slider}}
|
||||
<div class="item-content" data-setting="{{setting}}">
|
||||
<div class="item-inner">
|
||||
<div class="item-title" style="background-color: rgba(0,0,0,0);">
|
||||
{{title}}
|
||||
</div>
|
||||
<div class="item-subtitle padding-horizontal padding-top">
|
||||
<div class="range-slider range-slider-init padding-top margin-top" data-label="true">
|
||||
<input type="range" min="{{min}}" max="{{max}}" step="{{step}}" value="{{value}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{{#if select}}
|
||||
<a class="item-link smart-select smart-select-init" data-open-in="popover" data-setting="{{setting}}">
|
||||
<select>
|
||||
{{#each options}}
|
||||
<option value="{{value}}"{{#if selected}} selected{{/if}}>{{label}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title">{{title}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{{else}}
|
||||
<div class="item-content" data-setting="{{setting}}" onclick="{{onclick}}">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">{{title}}</div>
|
||||
</div>
|
||||
<div class="item-text">{{text}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="assets/js/settings.js"></script>
|
||||
|
||||
</div>
|
58
www/pages/help/list.html
Normal file
@ -0,0 +1,58 @@
|
||||
<!-- 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/. -->
|
||||
<div class="panel panel-right panel-cover">
|
||||
<div class="view">
|
||||
<div class="page">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-bg"></div>
|
||||
<div class="navbar-inner">
|
||||
<div class="title">Help</div>
|
||||
<div class="right">
|
||||
<a class="link panel-close">
|
||||
<span>Close</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="block-title">Manage Items</div>
|
||||
<div class="block">
|
||||
Swipe <i class="fas fa-arrow-right"></i> left-to-right on a list entry
|
||||
to show the actions you can take.
|
||||
These actions are marking the item as delivered/undelivered, or
|
||||
navigating to its location with your device's default maps app.
|
||||
<br />
|
||||
Swipe <i class="fas fa-arrow-left"></i> right-to-left on a list entry
|
||||
and tap
|
||||
<span class="button button-small display-inline button-fill color-red text-color-white"><i class="material-icons">delete</i> Delete</span> to remove it.
|
||||
</div>
|
||||
|
||||
<div class="block-title">Clear the List</div>
|
||||
<div class="block">
|
||||
Tap the <span class="color-red text-color-primary"><i class="material-icons">delete</i></span>
|
||||
button to remove all items from the list. This cannot be undone, so it's
|
||||
a good idea to do it at the end of the day or in the morning before you start.
|
||||
Note that clearing the list does not affect the address autofill.
|
||||
</div>
|
||||
|
||||
<div class="block-title">Search</div>
|
||||
<div class="block">
|
||||
Tap the <i class="material-icons text-color-primary">search</i> button to open a search
|
||||
box. Type in this box to hide any list entries that don't contain your
|
||||
search query.
|
||||
</div>
|
||||
|
||||
<div class="block-title">Sort Items</div>
|
||||
<div class="block">
|
||||
Tap the <i class="material-icons text-color-primary">sort</i> button to sort
|
||||
the list. You can sort by distance from your current
|
||||
location, alphabetically by street name, and numerically by
|
||||
address number.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
77
www/pages/help/map.html
Normal file
@ -0,0 +1,77 @@
|
||||
<!-- 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/. -->
|
||||
<div class="panel panel-right panel-cover">
|
||||
<div class="view">
|
||||
<div class="page">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-bg"></div>
|
||||
<div class="navbar-inner">
|
||||
<div class="title">Help</div>
|
||||
<div class="right">
|
||||
<a class="link panel-close">
|
||||
<span>Close</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="block-title">Manage Items</div>
|
||||
<div class="block">
|
||||
Tap on an icon to see the item(s) at that location.
|
||||
Tap on an item to toggle it between delivered and
|
||||
undelivered. If two or more addresses are very close
|
||||
together, their items will be grouped under one icon.
|
||||
</div>
|
||||
|
||||
<div class="block-title">Move the Map</div>
|
||||
<div class="block">
|
||||
Pinch with two fingers or scroll with a mouse to zoom
|
||||
in and out. You can also double-tap to zoom in.
|
||||
Drag with one finger or a mouse to move (pan) the map.
|
||||
|
||||
<br />
|
||||
|
||||
If you prefer, tap or click
|
||||
<span class="button button-small display-inline button-fill color-white text-color-black"><i class="fas fa-plus"></i></span>
|
||||
and
|
||||
<span class="button button-small display-inline button-fill color-white text-color-black"><i class="fas fa-minus"></i></span>
|
||||
to zoom in and out.
|
||||
|
||||
<br />
|
||||
|
||||
Drag on
|
||||
<span class="button button-small display-inline button-fill color-white text-color-black"><i class="fas fa-sort"></i></span>
|
||||
to rotate and tilt the map. Dragging left and right rotates, up and down tilts.
|
||||
You can also rotate with two fingers by twisting them around each other,
|
||||
or with a keyboard by holding Ctrl and dragging the mouse.
|
||||
</div>
|
||||
|
||||
<div class="block-title">Follow Location</div>
|
||||
<div class="block">
|
||||
Tap
|
||||
<span class="button button-small display-inline button-fill color-white text-color-black"><i class='material-icons'>my_location</i></span>
|
||||
or
|
||||
<span class="button button-small display-inline button-fill color-white text-color-black"><i class='far fa-compass'></i></span>
|
||||
to show your current
|
||||
location on the map as a blue dot. The map will follow
|
||||
the dot until you zoom or move the map. If the dot goes
|
||||
off the edge of the map, press the button again to
|
||||
re-center the map. Pressing the button when the dot is
|
||||
visible will hide the dot and stop the map from
|
||||
following your location.
|
||||
</div>
|
||||
|
||||
<div class="block-title">Get Directions</div>
|
||||
<div class="block">
|
||||
<span class="text-color-primary"><i class="material-icons">directions</i></span> will open your
|
||||
default map/navigation app with the item location set as
|
||||
the destination. This is useful if you're having
|
||||
trouble finding the location.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -27,7 +27,7 @@
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list no-hairlines tablet-inset" style="margin-top: 0;">
|
||||
<div class="list no-hairlines tablet-inset no-margin-top">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/manage" class="item-link item-content">
|
||||
@ -53,6 +53,14 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/toolbox" class="item-link item-content">
|
||||
<div class="item-media"><i class="icon fas fa-tools"></i></div>
|
||||
<div class="item-inner">
|
||||
<div class="item-title">Toolbox</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/settings" class="item-link item-content">
|
||||
<div class="item-media"><i class="icon fas fa-cog"></i></div>
|
||||
|
@ -24,6 +24,12 @@
|
||||
<a class="link text-color-red" onclick="confirmDeleteAllPackages()">
|
||||
<i class="icon material-icons">delete</i>
|
||||
</a>
|
||||
|
||||
{{#if show_help}}
|
||||
<a class="link" href="/help/list">
|
||||
<i class="icon material-icons">help</i>
|
||||
</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
<form class="searchbar searchbar-expandable package-list-searchbar">
|
||||
<div class="searchbar-inner">
|
||||
|
@ -64,33 +64,17 @@
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-divider">Item Type</li>
|
||||
{{#each itemtypes}}
|
||||
<li>
|
||||
<label class="item-radio item-content">
|
||||
<input type="radio" name="itemtype" value="package" checked />
|
||||
<input type="radio" name="itemtype" value="{{id}}" {{#if selected}}data-default="1" checked{{/if}} />
|
||||
<i class="icon icon-radio"></i>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><i class="fas fa-box"></i> Package</div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="item-radio item-content">
|
||||
<input type="radio" name="itemtype" value="letter" />
|
||||
<i class="icon icon-radio"></i>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><i class="fas fa-envelope"></i> Letter</div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="item-radio item-content">
|
||||
<input type="radio" name="itemtype" value="express" />
|
||||
<i class="icon icon-radio"></i>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><i class="fas fa-shipping-fast"></i> Express</div>
|
||||
<div class="item-title"><i class="{{icon}}"></i> {{name}}</div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -15,9 +15,11 @@
|
||||
</div>
|
||||
<div class="title">Map</div>
|
||||
<div class="right">
|
||||
<a class="link" onclick="reloadMap()">
|
||||
<i class="material-icons">refresh</i>
|
||||
{{#if show_help}}
|
||||
<a class="link" href="/help/map">
|
||||
<i class="icon material-icons">help</i>
|
||||
</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -12,13 +12,13 @@
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Settings</div>
|
||||
<div class="title">{{page_title}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="page-content">
|
||||
<div class="list media-list no-hairlines tablet-inset" style="margin-top: 0;">
|
||||
<div class="list media-list no-hairlines no-margin-top tablet-inset">
|
||||
<ul>
|
||||
{{#each settings}}
|
||||
<li>
|
||||
|
57
www/pages/toolbox.html
Normal file
@ -0,0 +1,57 @@
|
||||
<!-- 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/. -->
|
||||
|
||||
<div class="page" data-name="toolbox">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-bg"></div>
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="#" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Toolbox</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="list no-hairlines tablet-inset" style="margin-top: 0;">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/toolbox/scanner" class="item-link item-content">
|
||||
<div class="item-media"><i class="icon fas fa-barcode"></i></div>
|
||||
<div class="item-inner">
|
||||
<div class="item-title">Broken Scanner</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/toolbox/track" class="item-link item-content">
|
||||
<div class="item-media"><i class="icon fas fa-search-location"></i></div>
|
||||
<div class="item-inner">
|
||||
<div class="item-title">Track Item</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/toolbox/weather" class="item-link item-content">
|
||||
<div class="item-media"><i class="icon fas fa-cloud-sun"></i></div>
|
||||
<div class="item-inner">
|
||||
<div class="item-title">Weather Lookahead</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/toolbox/sharelist" class="item-link item-content">
|
||||
<div class="item-media"><i class="icon fas fa-share-alt"></i></div>
|
||||
<div class="item-inner">
|
||||
<div class="item-title">Share Item List</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
50
www/pages/toolbox/scanner.html
Normal file
@ -0,0 +1,50 @@
|
||||
<!-- 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/. -->
|
||||
|
||||
<div class="page">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-bg"></div>
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="#" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Broken Scanner</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="list no-hairlines tablet-inset" style="margin-top: 0;">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/toolbox/scanner/scanner" class="item-link item-content">
|
||||
<div class="item-media">1</div>
|
||||
<div class="item-inner">
|
||||
<div class="item-title">Scan Barcode</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/toolbox/scanner/entries" class="item-link item-content">
|
||||
<div class="item-media">2</div>
|
||||
<div class="item-inner">
|
||||
<div class="item-title">Review Entries</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="block text-align-center">
|
||||
<i class="material-icons material-icons-24px">info</i>
|
||||
<br />
|
||||
Scan barcodes while your postal scanner is crashed or restarting.
|
||||
When the scanner is working again, you can scan all the saved
|
||||
barcodes from your phone screen using the scanner's Manual Input or
|
||||
Scan Barcode feature.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
60
www/pages/toolbox/scanner/entries.html
Normal file
@ -0,0 +1,60 @@
|
||||
<!-- 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/. -->
|
||||
|
||||
<div class="page" data-name="scanner">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-bg"></div>
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="#" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Review Entries</div>
|
||||
<div class="right">
|
||||
<a class="link text-color-red" onclick="confirmDeleteScanEntries()">
|
||||
<i class="icon material-icons">delete</i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
{{#if entries}}
|
||||
<div class="list media-list no-margin-top no-hairlines">
|
||||
<ul>
|
||||
{{#each entries}}
|
||||
<li style="padding-top: 2rem; padding-bottom: 2rem;">
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div style="background-color: white; display: flex; justify-content: center; padding-left: 1rem; padding-right: 1rem;">
|
||||
<svg class="barcode_entry" id="barcode_{{code}}" data-barcode="{{code}}"></svg>
|
||||
</div>
|
||||
<div class="item-text text-align-center">{{event}}</div>
|
||||
<div class="item-text text-align-center">{{date}}</div>
|
||||
{{#if form3849}}
|
||||
<h2 class="item-text text-align-center">Form 3849:</h2>
|
||||
<div style="background-color: white; display: flex; justify-content: center; padding-left: 1rem; padding-right: 1rem;">
|
||||
<svg class="barcode_entry" id="barcode_{{form3849}}" data-barcode="{{form3849}}"></svg>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="block text-align-center">
|
||||
<img style="width: 60%; max-width: 300px; max-height: 40vh;" src="assets/images/barcode-dashed.svg" class="margin-vertical" />
|
||||
<h2 class="margin-top">
|
||||
No scan entries.
|
||||
</h2>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<script src="assets/js/toolbox_scannerentries.js"></script>
|
||||
</div>
|
107
www/pages/toolbox/scanner/scanner.html
Normal file
@ -0,0 +1,107 @@
|
||||
<!-- 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/. -->
|
||||
|
||||
<div class="page" data-name="scanner">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-bg"></div>
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="#" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Scan Barcode</div>
|
||||
<div class="subnavbar" style="background-color: var(--f7-searchbar-bg-color,var(--f7-bars-bg-color));">
|
||||
<div class="subnavbar-inner">
|
||||
<div class="searchbar">
|
||||
<div class="searchbar-inner">
|
||||
<div class="searchbar-input-wrap">
|
||||
<input type="text" id="brokenscannerinput" placeholder="Enter Code" autocomplete="off" autocorrect="off" autocapitalize="off" style="padding-left: 1em; padding-right: 1em;" />
|
||||
</div>
|
||||
<a id="brokenscannercodeadd" onclick="brokenScannerAddTextEntry()" style="padding-right: 0.5em; padding-top: 0.3em;">
|
||||
<i class="material-icons">keyboard_return</i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fab fab-extended fab-left-bottom">
|
||||
<a href="#" onclick="brokenScannerEsc()">
|
||||
<div class="fab-text">ESC</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="fab fab-extended fab-center-bottom">
|
||||
<a href="#" onclick="brokenScannerScan()">
|
||||
<div class="fab-text">Scan</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="fab fab-extended fab-right-bottom">
|
||||
<a href="#" onclick="chooseScanEvent()">
|
||||
<div class="fab-text">Enter</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="popup" id="scanEventPopup" style="background-color: var(--f7-page-bg-color);">
|
||||
<div class="navbar">
|
||||
<div class="navbar-bg"></div>
|
||||
<div class="navbar-inner">
|
||||
<div class="title">Select Event</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="block no-margin-top padding-bottom" style="height: calc(100% - var(--f7-navbar-height)); overflow-y: auto;">
|
||||
<div class="list tablet-inset no-hairlines no-margin-top">
|
||||
<ul class="eventlist">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fab fab-extended fab-left-bottom">
|
||||
<a href="#" onclick="app.popup.close('#scanEventPopup');">
|
||||
<div class="fab-text">ESC</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="popup" id="scanEventTypePopup" style="background-color: var(--f7-page-bg-color);">
|
||||
<div class="navbar">
|
||||
<div class="navbar-bg"></div>
|
||||
<div class="navbar-inner">
|
||||
<div class="title">Event Type</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="block no-margin-top padding-bottom" style="height: calc(100% - var(--f7-navbar-height)); overflow-y: auto;">
|
||||
<div class="list tablet-inset no-hairlines no-margin-top">
|
||||
<ul class="eventlist">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fab fab-extended fab-left-bottom">
|
||||
<a href="#" onclick="app.popup.close('#scanEventTypePopup');">
|
||||
<div class="fab-text">ESC</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="list no-hairlines tablet-inset">
|
||||
<ul id="codelist">
|
||||
</ul>
|
||||
</div>
|
||||
<div style="height: 3rem;"></div>
|
||||
</div>
|
||||
|
||||
<script src="assets/js/toolbox_scanner.js"></script>
|
||||
|
||||
</div>
|
68
www/pages/toolbox/sharelist.html
Normal file
@ -0,0 +1,68 @@
|
||||
<!-- 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/. -->
|
||||
|
||||
<div class="page" data-name="sharelist">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-bg"></div>
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="#" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Share Item List</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="list media-list no-hairlines tablet-inset no-margin-top">
|
||||
<ul>
|
||||
<li class="item-divider">Send List</li>
|
||||
<li>
|
||||
<div class="item-content">
|
||||
<a class="button button-fill" id="sendlistbtn" onclick="uploadList();"><i class="fas fa-upload"></i> Upload List</a>
|
||||
</div>
|
||||
</li>
|
||||
<li style="display: none;" id="listidbarcodeli">
|
||||
<div class="item-content" style="background-color: white; display: flex; justify-content: center; padding-left: 1rem; padding-right: 1rem;">
|
||||
<svg class="barcode" id="listidbarcode"></svg>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="item-divider">Receive List</li>
|
||||
<li>
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title item-label">List ID</div>
|
||||
<div class="item-input-wrap">
|
||||
<input type="text" id="getlistidbox" placeholder="" autocomplete="off" autocorrect="off" autocapitalize="off" />
|
||||
<span class="input-clear-button"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-content">
|
||||
<a class="button button-fill" onclick="downloadItemList();"><i class="fas fa-download"></i> Download List</a>
|
||||
</li>
|
||||
<li>
|
||||
<div class="item-content">
|
||||
<a class="button button-fill" id="scanlistbarcodebtn" onclick="scanListIDBarcode();"><i class="fas fa-barcode"></i> Scan List Barcode</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="block text-align-center">
|
||||
<i class="material-icons material-icons-24px">info</i>
|
||||
<br />
|
||||
Share your delivery list to another device. The sender uploads the list,
|
||||
and the receiver(s) either scan the barcode on the sender's device, or
|
||||
type in the code beneath the barcode.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="assets/js/toolbox_sharelist.js"></script>
|
||||
</div>
|
72
www/pages/toolbox/track.html
Normal file
@ -0,0 +1,72 @@
|
||||
<!-- 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/. -->
|
||||
|
||||
<div class="page" data-name="track">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-bg"></div>
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="#" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Track Item</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fab fab-extended fab-center-bottom">
|
||||
<a href="#" onclick="scanTrackingBarcode()">
|
||||
<div class="fab-text">Scan</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="list no-hairlines tablet-inset">
|
||||
<ul>
|
||||
<li class="item-content item-input">
|
||||
<div class="item-inner">
|
||||
<div class="item-title item-label">Tracking Code</div>
|
||||
<div class="item-input-wrap">
|
||||
<input type="text" name="trackingcode" placeholder="" autocomplete="off" autocorrect="off" autocapitalize="off" />
|
||||
<span class="input-clear-button"></span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-content">
|
||||
<a class="button button-fill" id="trackbtn"><i class="fas fa-search-location"></i> Track</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="block text-align-center">
|
||||
<i class="material-icons material-icons-24px">info</i>
|
||||
<br />
|
||||
Compatible with USPS, UPS, FedEx, and DHL tracking codes.
|
||||
Can extract full delivery point address (and sometimes customer phone number)
|
||||
from 2D FedEx and UPS Mail Innovations barcodes.
|
||||
</div>
|
||||
|
||||
{{#if trackingcodehistory}}
|
||||
<div class="list no-hairlines tablet-inset">
|
||||
<ul>
|
||||
<li class="item-divider">
|
||||
History
|
||||
</li>
|
||||
{{#each trackingcodehistory}}
|
||||
<li>
|
||||
<div class="item-link item-content" onclick="openTrackingHistory('{{this}}')">
|
||||
<div class="item-inner">
|
||||
<div class="item-title">{{this}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<script src="assets/js/toolbox_track.js"></script>
|
||||
</div>
|
89
www/pages/toolbox/trackinginfo.html
Normal file
@ -0,0 +1,89 @@
|
||||
<!-- 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/. -->
|
||||
|
||||
<div class="page" data-name="trackinginfo">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-bg"></div>
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="#" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Tracking Status</div>
|
||||
<div class="right">
|
||||
<a class="link" onclick="openTrackingHistory()">
|
||||
<i class="material-icons">refresh</i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="list media-list no-hairlines tablet-inset no-margin-top">
|
||||
<ul>
|
||||
<li class="item-divider">Information</li>
|
||||
<li>
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
{{#with current}}
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">{{status}}</div>
|
||||
<div class="item-after">{{date}}</div>
|
||||
</div>
|
||||
<div class="item-text">{{details}}</div>
|
||||
<div class="item-text"><b>{{location.display}}</b></div>
|
||||
{{/with}}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-text">Tracking Code: {{code}}</div>
|
||||
<div class="item-text">Carrier: {{carrier.name}}</div>
|
||||
{{#if service.name}}<div class="item-text">Service: {{service.name}}</div>{{/if}}
|
||||
<div class="item-text">From: {{addresses.from}}</div>
|
||||
<div class="item-text">To: {{addresses.to}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="item-content" style="background-color: white; display: flex; justify-content: center; padding-left: 1rem; padding-right: 1rem;">
|
||||
<svg class="barcode" id="trackingbarcode"></svg>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-divider">History</li>
|
||||
{{#each history}}
|
||||
<li>
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">{{status}}</div>
|
||||
<div class="item-after">{{date}}</div>
|
||||
</div>
|
||||
<div class="item-text">{{details}}</div>
|
||||
<div class="item-text"><b>{{location.display}}</b></div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{else}}
|
||||
<li class="item-content">
|
||||
No item history found.
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
JsBarcode("#trackingbarcode", "{{#if barcode}}{{escape barcode}}{{else}}{{escape code}}{{/if}}", {
|
||||
format: "code128",
|
||||
ean128: true,
|
||||
width: 2,
|
||||
height: 40
|
||||
});
|
||||
</script>
|
||||
</div>
|
53
www/pages/toolbox/weather.html
Normal file
@ -0,0 +1,53 @@
|
||||
<!-- 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/. -->
|
||||
|
||||
<div class="page" data-name="weather">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-bg"></div>
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="#" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Weather</div>
|
||||
<div class="right">
|
||||
<a class="link" onclick="loadWeather(true)">
|
||||
<i class="material-icons">refresh</i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<div class="block text-align-center">
|
||||
<img id="weathericon" style="width: 60%; max-width: 300px; max-height: 40vh;" src="assets/images/weather-none.svg" class="margin-vertical" />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-50">
|
||||
<h2>Low: <span id="lowtemp">...</span></h2>
|
||||
</div>
|
||||
<div class="col-50">
|
||||
<h2>High: <span id="hightemp">...</span></h2>
|
||||
</div>
|
||||
<div class="col-100">
|
||||
<h3>Precipitation: <span id="precipchance">...</span></h3>
|
||||
<h3>Wind speed: <span id="windspeed">...</span></h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="block-footer">
|
||||
<span id="forecast-location"></span>
|
||||
<br />
|
||||
<span id="forecast-info"></span>
|
||||
<br />
|
||||
<a href="" onclick="openExternalBrowser('https://darksky.net/poweredby/')">Powered by Dark Sky</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="assets/js/toolbox_weather.js"></script>
|
||||
</div>
|
294
www/routes.js
@ -4,6 +4,10 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
var show_help = function () {
|
||||
return localStorage.getItem("show_help") != "false";
|
||||
}
|
||||
|
||||
var routes = [
|
||||
{
|
||||
path: '/home',
|
||||
@ -27,8 +31,14 @@ var routes = [
|
||||
},
|
||||
{
|
||||
path: '/manage',
|
||||
url: './pages/manage.html',
|
||||
name: 'manage',
|
||||
templateUrl: './pages/manage.html',
|
||||
options: {
|
||||
context: {
|
||||
show_help: show_help,
|
||||
itemtypes: SETTINGS.itemtypes
|
||||
}
|
||||
},
|
||||
on: {
|
||||
pageAfterIn: function () {
|
||||
app.autocomplete.create({
|
||||
@ -51,8 +61,13 @@ var routes = [
|
||||
},
|
||||
{
|
||||
path: '/list',
|
||||
templateUrl: './pages/list.html',
|
||||
name: 'list',
|
||||
templateUrl: './pages/list.html',
|
||||
options: {
|
||||
context: {
|
||||
show_help: show_help
|
||||
}
|
||||
},
|
||||
on: {
|
||||
pageAfterIn: function () {
|
||||
loadPackageList();
|
||||
@ -69,20 +84,135 @@ var routes = [
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/map',
|
||||
url: './pages/map.html',
|
||||
templateUrl: './pages/map.html',
|
||||
name: 'map',
|
||||
keepAlive: true,
|
||||
options: {
|
||||
context: {
|
||||
show_help: show_help
|
||||
}
|
||||
},
|
||||
on: {
|
||||
pageAfterIn: function () {
|
||||
reloadMap();
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/toolbox',
|
||||
url: './pages/toolbox.html',
|
||||
name: 'toolbox',
|
||||
routes: [
|
||||
{
|
||||
path: '/scanner',
|
||||
templateUrl: './pages/toolbox/scanner.html',
|
||||
routes: [
|
||||
{
|
||||
path: '/scanner',
|
||||
templateUrl: './pages/toolbox/scanner/scanner.html',
|
||||
name: 'scanner'
|
||||
},
|
||||
{
|
||||
path: '/entries',
|
||||
name: 'entries',
|
||||
async: function (routeTo, routeFrom, resolve, reject) {
|
||||
if (localStorage.getItem("scanevents") != null && localStorage.getItem("scanevents") != "[]") {
|
||||
var entries = JSON.parse(localStorage.getItem("scanevents"));
|
||||
|
||||
for (i in entries) {
|
||||
entries[i].event = entries[i].event.join(' <i class="fas fa-chevron-right"></i> ');
|
||||
}
|
||||
} else {
|
||||
var entries = false;
|
||||
}
|
||||
|
||||
resolve({
|
||||
templateUrl: './pages/toolbox/scanner/entries.html'
|
||||
}, {
|
||||
context: {
|
||||
entries: entries
|
||||
}
|
||||
});
|
||||
},
|
||||
on: {
|
||||
pageAfterIn: function () {
|
||||
$(".barcode_entry").each(function () {
|
||||
var code = $(this).data("barcode");
|
||||
JsBarcode("#barcode_" + code, code, {
|
||||
format: "code128",
|
||||
ean128: true,
|
||||
width: 2,
|
||||
height: 40
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/track',
|
||||
name: 'track',
|
||||
async: function (routeTo, routeFrom, resolve, reject) {
|
||||
var history = localStorage.getItem("trackingcodehistory");
|
||||
if (history == null) {
|
||||
history = false;
|
||||
} else {
|
||||
history = JSON.parse(history).reverse(); // Most recent on top
|
||||
}
|
||||
resolve({
|
||||
templateUrl: './pages/toolbox/track.html'
|
||||
}, {
|
||||
context: {
|
||||
trackingcodehistory: history
|
||||
}
|
||||
});
|
||||
},
|
||||
routes: [
|
||||
{
|
||||
path: '/info',
|
||||
templateUrl: './pages/toolbox/trackinginfo.html',
|
||||
name: 'trackinginfo'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/weather',
|
||||
url: './pages/toolbox/weather.html',
|
||||
name: 'weather',
|
||||
on: {
|
||||
pageAfterIn: function () {
|
||||
loadWeather();
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/sharelist',
|
||||
url: './pages/toolbox/sharelist.html',
|
||||
name: 'sharelist'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/help',
|
||||
routes: [
|
||||
{
|
||||
path: '/list',
|
||||
panel: {
|
||||
url: './pages/help/list.html'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/map',
|
||||
panel: {
|
||||
url: './pages/help/map.html'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/credits',
|
||||
url: './pages/credits.html',
|
||||
@ -92,17 +222,6 @@ var routes = [
|
||||
path: '/settings',
|
||||
name: 'settings',
|
||||
async: function (routeTo, routeFrom, resolve, reject) {
|
||||
var mapstyles = [];
|
||||
for (var id in SETTINGS.maptileurls) {
|
||||
if (SETTINGS.maptileurls.hasOwnProperty(id)) {
|
||||
mapstyles.push({
|
||||
value: id,
|
||||
label: SETTINGS.maptileurls[id].name,
|
||||
selected: localStorage.getItem("mapsource") == id
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var settings = [
|
||||
{
|
||||
setting: "alerts",
|
||||
@ -110,10 +229,17 @@ var routes = [
|
||||
text: "Change the alert sound, volume, and distance.",
|
||||
onclick: "router.navigate('/settings/alerts')",
|
||||
link: true
|
||||
},
|
||||
{
|
||||
setting: "maps",
|
||||
title: "Map and Navigation",
|
||||
text: "Change map settings and units.",
|
||||
onclick: "router.navigate('/settings/maps')",
|
||||
link: true
|
||||
}
|
||||
];
|
||||
|
||||
if (platform_type == "cordova") {
|
||||
if (platform_type == "cordova" && cordova.platformId != "browser") {
|
||||
settings.push({
|
||||
setting: "wakelock",
|
||||
title: "Keep screen on",
|
||||
@ -134,33 +260,17 @@ var routes = [
|
||||
onclick: ""
|
||||
},
|
||||
{
|
||||
setting: "units",
|
||||
title: "Measurement units",
|
||||
select: true,
|
||||
options: [
|
||||
{
|
||||
value: "metric",
|
||||
label: "Meters/Kilometers",
|
||||
selected: localStorage.getItem("units") == "metric"
|
||||
},
|
||||
{
|
||||
value: "imperial",
|
||||
label: "Feet/Miles",
|
||||
selected: localStorage.getItem("units") == "imperial"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
setting: "mapsource",
|
||||
title: "Map style",
|
||||
select: true,
|
||||
options: mapstyles,
|
||||
text: "Choose which map style to use."
|
||||
setting: "showhelp",
|
||||
title: "Show help",
|
||||
text: "Show the <span class=material-icons-intext><i class=material-icons>help</i></span> icons",
|
||||
toggle: true,
|
||||
checked: localStorage.getItem("show_help") != "false",
|
||||
onclick: ""
|
||||
},
|
||||
{
|
||||
setting: "versions",
|
||||
title: "PackageHelper app v" + app_version,
|
||||
text: "Copyright © 2019 Netsyms Technologies. Licensed under the Mozilla Public License 2.0.",
|
||||
text: "Copyright © 2019-2020 Netsyms Technologies. Licensed under the Mozilla Public License 2.0.",
|
||||
onclick: ""
|
||||
},
|
||||
{
|
||||
@ -174,7 +284,7 @@ var routes = [
|
||||
setting: "privacy",
|
||||
title: "Privacy policy and legal",
|
||||
text: "",
|
||||
onclick: "openBrowser('https://netsyms.com/legal?pk_campaign=PackageHelpterApp')",
|
||||
onclick: "openBrowser('https://netsyms.com/legal?pk_campaign=PackageHelperApp')",
|
||||
link: true
|
||||
});
|
||||
|
||||
@ -182,14 +292,15 @@ var routes = [
|
||||
templateUrl: './pages/settings.html'
|
||||
}, {
|
||||
context: {
|
||||
page_title: "Settings",
|
||||
settings: settings
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
routes: [
|
||||
{
|
||||
path: '/settings/alerts',
|
||||
name: 'alertsettings',
|
||||
path: '/alerts',
|
||||
name: 'settings',
|
||||
async: function (routeTo, routeFrom, resolve, reject) {
|
||||
var alertsounds = [];
|
||||
for (var id in SETTINGS.alertsounds) {
|
||||
@ -202,7 +313,8 @@ var routes = [
|
||||
}
|
||||
}
|
||||
|
||||
var settings = [{
|
||||
var settings = [
|
||||
{
|
||||
setting: "alertsound",
|
||||
title: "Alert sound",
|
||||
text: "Select which sound to play when a package is nearby.",
|
||||
@ -235,15 +347,101 @@ var routes = [
|
||||
step: 15,
|
||||
value: localStorage.getItem("alertinterval") == null ? 30 : localStorage.getItem("alertinterval"),
|
||||
slider: true
|
||||
}];
|
||||
}
|
||||
];
|
||||
|
||||
resolve({
|
||||
templateUrl: './pages/alertsettings.html'
|
||||
templateUrl: './pages/settings.html'
|
||||
}, {
|
||||
context: {
|
||||
page_title: "Alert Settings",
|
||||
settings: settings
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/maps',
|
||||
name: 'settings',
|
||||
async: function (routeTo, routeFrom, resolve, reject) {
|
||||
var mapstyles = [];
|
||||
for (var id in SETTINGS.maptileurls) {
|
||||
if (SETTINGS.maptileurls.hasOwnProperty(id)) {
|
||||
mapstyles.push({
|
||||
value: id,
|
||||
label: SETTINGS.maptileurls[id].name,
|
||||
selected: localStorage.getItem("mapsource") == id
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var settings = [
|
||||
{
|
||||
setting: "mapsource",
|
||||
title: "Map style",
|
||||
select: true,
|
||||
options: mapstyles,
|
||||
text: "Choose which map style to use."
|
||||
},
|
||||
{
|
||||
setting: "units",
|
||||
title: "Measurement units",
|
||||
select: true,
|
||||
options: [
|
||||
{
|
||||
value: "metric",
|
||||
label: "Meters/Kilometers",
|
||||
selected: localStorage.getItem("units") == "metric"
|
||||
},
|
||||
{
|
||||
value: "imperial",
|
||||
label: "Feet/Miles",
|
||||
selected: localStorage.getItem("units") == "imperial"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
setting: "trackzoom",
|
||||
title: "Zoom when tracking location",
|
||||
select: true,
|
||||
options: [
|
||||
{
|
||||
value: 15,
|
||||
label: "Low",
|
||||
selected: localStorage.getItem("trackzoom") == 15
|
||||
},
|
||||
{
|
||||
value: 16,
|
||||
label: "Normal",
|
||||
selected: localStorage.getItem("trackzoom") == null || localStorage.getItem("trackzoom") == 16
|
||||
},
|
||||
{
|
||||
value: 17,
|
||||
label: "High",
|
||||
selected: localStorage.getItem("trackzoom") == 17
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
setting: "maptype",
|
||||
title: "Alternative map",
|
||||
text: "Turn this on if you have problems with the map.",
|
||||
toggle: true,
|
||||
checked: localStorage.getItem("maptype") == "leaflet",
|
||||
onclick: ""
|
||||
}
|
||||
];
|
||||
|
||||
resolve({
|
||||
templateUrl: './pages/settings.html'
|
||||
}, {
|
||||
context: {
|
||||
page_title: "Map Settings",
|
||||
settings: settings
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
268
www/settings.js
@ -8,18 +8,27 @@ var SETTINGS = {
|
||||
maptileurls: {
|
||||
liberty: {
|
||||
url: "https://maps.netsyms.net/styles/osm-liberty/{z}/{x}/{y}.png",
|
||||
json: "https://maps.netsyms.net/styles/osm-liberty/style.json",
|
||||
name: "Liberty",
|
||||
bgcolor: "#EFEFEF"
|
||||
},
|
||||
terrain: {
|
||||
url: "https://maps.netsyms.net/styles/klokantech-terrain/{z}/{x}/{y}.png",
|
||||
json: "https://maps.netsyms.net/styles/klokantech-terrain/style.json",
|
||||
name: "Terrain",
|
||||
bgcolor: "#EDF5F3"
|
||||
},
|
||||
fiord: {
|
||||
url: "https://maps.netsyms.net/styles/fiord-color/{z}/{x}/{y}.png",
|
||||
json: "https://maps.netsyms.net/styles/fiord-color/style.json",
|
||||
name: "Dark Fiord",
|
||||
bgcolor: "#45516E"
|
||||
},
|
||||
oledblack: {
|
||||
url: "https://maps.netsyms.net/styles/oled-black/{z}/{x}/{y}.png",
|
||||
json: "https://maps.netsyms.net/styles/oled-black/style.json",
|
||||
name: "OLED Black",
|
||||
bgcolor: "#000000"
|
||||
}
|
||||
},
|
||||
alertsounds: {
|
||||
@ -40,5 +49,262 @@ var SETTINGS = {
|
||||
file: "alert.sonar.mp3"
|
||||
}
|
||||
},
|
||||
geocodeapi: "https://apis.netsyms.net/packagehelper/geocode.php"
|
||||
itemtypes: {
|
||||
package: {
|
||||
id: "package",
|
||||
name: "Package",
|
||||
icon: "fas fa-box fa-fw",
|
||||
mapicon: "box",
|
||||
pluralmapicon: "boxes",
|
||||
selected: true
|
||||
},
|
||||
large: {
|
||||
id: "large",
|
||||
name: "Large Package",
|
||||
icon: "fas fa-pallet fa-fw",
|
||||
mapicon: "largebox",
|
||||
pluralmapicon: "largeboxes"
|
||||
},
|
||||
small: {
|
||||
id: "small",
|
||||
name: "Small Package",
|
||||
icon: "fas fa-envelope-square fa-fw",
|
||||
mapicon: "smallpackage",
|
||||
pluralmapicon: "smallpackages"
|
||||
},
|
||||
letter: {
|
||||
id: "letter",
|
||||
name: "Letter",
|
||||
icon: "fas fa-envelope fa-fw",
|
||||
mapicon: "envelope",
|
||||
pluralmapicon: "envelopes"
|
||||
},
|
||||
signature: {
|
||||
id: "signature",
|
||||
name: "Signature Item",
|
||||
icon: "fas fa-file-signature fa-fw",
|
||||
mapicon: "signature",
|
||||
pluralmapicon: "signatures"
|
||||
},
|
||||
express: {
|
||||
id: "express",
|
||||
name: "Express Item",
|
||||
icon: "fas fa-shipping-fast fa-fw",
|
||||
mapicon: "express",
|
||||
pluralmapicon: "multiple-items"
|
||||
}
|
||||
},
|
||||
weathericons: [
|
||||
"clear",
|
||||
"cloudy",
|
||||
"partly-cloudy",
|
||||
"rain",
|
||||
"snow",
|
||||
"windy",
|
||||
"none"
|
||||
],
|
||||
scannerevents: [
|
||||
{
|
||||
button: 1,
|
||||
title: "Delivered",
|
||||
type: "event",
|
||||
after: [
|
||||
{
|
||||
button: 1,
|
||||
title: "In/At Mailbox",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 2,
|
||||
title: "Front Door/Porch",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 3,
|
||||
title: "Left with Individual at Address",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 4,
|
||||
title: "Front Desk/Reception/Mail Room",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 5,
|
||||
title: "Parcel Locker",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 6,
|
||||
title: "Garage or Other Location at Address",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 7,
|
||||
title: "Left with Neighbor",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 'G',
|
||||
title: "Authorized Agent",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 'U',
|
||||
title: "Tendered to Authorized Agent",
|
||||
type: "type",
|
||||
after: false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
button: 2,
|
||||
title: "Attempted",
|
||||
type: "event",
|
||||
after: [
|
||||
{
|
||||
button: 2,
|
||||
title: "No Secure Location Available",
|
||||
type: "type",
|
||||
after: "3849"
|
||||
},
|
||||
{
|
||||
button: 3,
|
||||
title: "No Access or Business Closed",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 4,
|
||||
title: "Receptacle Full/Item Oversized",
|
||||
type: "type",
|
||||
after: "3849"
|
||||
},
|
||||
{
|
||||
button: 5,
|
||||
title: "Customer Hold",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 6,
|
||||
title: "Animal Interference",
|
||||
type: "type",
|
||||
after: false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
button: 3,
|
||||
title: "Return to Sender or Forward",
|
||||
type: "event",
|
||||
after: [
|
||||
{
|
||||
button: 1,
|
||||
title: "Forwarded",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 2,
|
||||
title: "Insufficient Address",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 3,
|
||||
title: "No Such Number",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 4,
|
||||
title: "Addressee Unknown",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 5,
|
||||
title: "Vacant",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 6,
|
||||
title: "Unable to Forward / Forward Order Expired",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 7,
|
||||
title: "Deceased",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 8,
|
||||
title: "Refused",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 9,
|
||||
title: "Returned for Other Reason",
|
||||
type: "type",
|
||||
after: false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
button: 4,
|
||||
title: "Other",
|
||||
type: "event",
|
||||
after: [
|
||||
{
|
||||
button: 'X',
|
||||
title: "Dispatch to Military/Diplomatic PO",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 1,
|
||||
title: "Return to Post Office Not Attempted / Delivery Delay",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 2,
|
||||
title: "Local Weather Delay",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 3,
|
||||
title: "Visible Damage",
|
||||
type: "type",
|
||||
after: false
|
||||
},
|
||||
{
|
||||
button: 4,
|
||||
title: "Out for Delivery",
|
||||
type: "type",
|
||||
after: false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
geocodecacheexpiry: 604800, // One week
|
||||
geocodeapi: "https://apis.netsyms.net/packagehelper/geocode.php",
|
||||
trackingapi: "https://apis.netsyms.net/packagehelper/track.php",
|
||||
weatherapi: "https://apis.netsyms.net/packagehelper/weather.php",
|
||||
geoipapi: "https://apis.netsyms.net/packagehelper/geoip.php",
|
||||
sharelistapi: "https://apis.netsyms.net/packagehelper/sharepackagelist.php"
|
||||
}
|
||||
|