diff --git a/www/assets/css/app.css b/www/assets/css/app.css index 3646983..6fc5370 100644 --- a/www/assets/css/app.css +++ b/www/assets/css/app.css @@ -4,6 +4,20 @@ 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/. */ +:root { + --theme-background-color: #d0f2fc; + --translucent-color: rgba(255,255,255,0.5); + --solid-translucent-color: #e8f9fe; /* Halfway between the background color and white */ + --background-image: url(../images/background.svg); +} + +.theme-dark { + --theme-background-color: black; + --translucent-color: rgba(0,0,0,0.5); + --solid-translucent-color: black; + --background-image: url(../images/background-transparent.svg); +} + /* Framework7 and FontAwesome both have a .fab class */ @@ -24,17 +38,8 @@ Framework7 and FontAwesome both have a .fab class } .page { - background-color: #d0f2fc; - background-image: url(../images/background.svg); - background-repeat: no-repeat; - background-size: contain; - background-position: bottom; - background-attachment: fixed; -} - -.theme-dark .page { - background-color: black; - background-image: url(../images/background-transparent.svg); + background-color: var(--theme-background-color); + background-image: var(--background-image); background-repeat: no-repeat; background-size: contain; background-position: bottom; @@ -42,30 +47,21 @@ Framework7 and FontAwesome both have a .fab class } .list.transparent ul { - background-color: rgba(255,255,255,0.65); + background-color: var(--translucent-color); } .list.transparent ul li.item-divider { - background-color: rgba(255,255,255,0.5); + background-color: var(--translucent-color); } .popup { overflow-y: auto; } -.theme-dark .list.transparent ul { - background-color: rgba(0,0,0,0.65); -} -.theme-dark .list.transparent ul li.item-divider { - background-color: rgba(0,0,0,0.5); -} + .theme-dark .popup { background-color: rgba(0,0,0,0.95); } -.navbar, .navbar-bg { - background-color: #d0f2fc; -} - -.theme-dark .navbar, .theme-dark .navbar-bg { - background-color: black; +.navbar, .navbar-bg, .subnavbar, .subnavbar *, .subnavbar .searchbar-inner .searchbar-input-wrap * { + background-color: var(--solid-translucent-color); } .page-content-fab-pad { diff --git a/www/assets/js/main.js b/www/assets/js/main.js index 6e3124e..6ca1c0a 100644 --- a/www/assets/js/main.js +++ b/www/assets/js/main.js @@ -107,18 +107,14 @@ function setAppTheme(theme) { if (theme == "light") { $("body").removeClass("theme-dark"); if (platform_type == "cordova" && typeof StatusBar !== 'undefined') { + StatusBar.backgroundColorByHexString("#e8f9fe"); StatusBar.styleDefault(); - if (device.platform == "Android") { - StatusBar.backgroundColorByHexString("#9ebfc9"); - } else { - StatusBar.backgroundColorByHexString("#d0f2fc"); - } } } else if (theme == "dark") { $("body").addClass("theme-dark"); if (platform_type == "cordova" && typeof StatusBar !== 'undefined') { + StatusBar.backgroundColorByName("black"); StatusBar.styleLightContent(); - StatusBar.backgroundColorByHexString("#000000"); } } } diff --git a/www/assets/js/track.js b/www/assets/js/track.js index 32a91cd..74f8e7e 100644 --- a/www/assets/js/track.js +++ b/www/assets/js/track.js @@ -236,6 +236,14 @@ function trackOpenAsync( {to, resolve, reject}) { }, "GET"); } +$("#app").on("submit", "#tracking-searchbar-form", function (evt) { + evt.preventDefault(); + + openTrackingInfoPage($('input[name=\'trackingcode\']').val()); + + return false; +}); + $("#app").on("contextmenu taphold", ".tracking-code-history-link", function (evt) { evt.preventDefault(); diff --git a/www/pages/track.html b/www/pages/track.html index 2ae890c..6e133d4 100644 --- a/www/pages/track.html +++ b/www/pages/track.html @@ -14,87 +14,78 @@
Track
+
+ + + Scan + +
+
-
-
-
-
+
+
+
+
+
    -
    -
      -
    • -
      -
      Tracking Code
      -
      - - -
      -
      -
    • -
    -
    -
    -
    Track
    -
    -
    Scan Receipt
    -
    -
- -
-
-
-
-
    - -
-
-
-
-
-
    -
  • -
    -
    Loading...
    -
    -
  • -
+
+
+
+
    +
  • +
    +
    Loading...
    -
-
-
-
    -
  • -
    -
    Loading...
    -
    -
  • -
+ + +
+
+
+
+
    +
  • +
    +
    Loading...
    -
-
+ +
+
\ No newline at end of file