From 7889eceea45dba8c40c4e175ae33ac5f21865172 Mon Sep 17 00:00:00 2001 From: vishnuraghavb Date: Fri, 18 Jun 2021 18:22:03 +0530 Subject: [PATCH] ready for v2.0.0 --- app/app.scss | 267 ++++++-------- app/components/CookingTimer.vue | 52 ++- app/components/EditRecipe.vue | 105 +++--- app/components/EnRecipes.vue | 261 +++++++------- app/components/MealPlanner.vue | 318 ++++++++++------- app/components/ViewRecipe.vue | 129 +++---- app/components/modals/Action.vue | 17 +- app/components/modals/ActionWithSearch.vue | 34 +- app/components/modals/Confirm.vue | 6 +- app/components/modals/DMYPicker.vue | 6 +- app/components/modals/Filter.vue | 54 ++- app/components/modals/Prompt.vue | 6 +- app/components/modals/TimePickerHM.vue | 6 +- app/components/modals/TimePickerHMS.vue | 17 +- app/components/settings/About.vue | 17 +- app/components/settings/AppSettings.vue | 7 + app/components/settings/CTSettings.vue | 10 + app/components/settings/Database.vue | 11 +- app/components/settings/Interface.vue | 22 +- app/components/settings/MPSettings.vue | 13 +- app/components/settings/Options.vue | 39 ++- app/components/settings/Reset.vue | 9 +- app/components/sub/OptionsList.vue | 12 +- app/components/sub/SnackBar.vue | 4 +- app/components/sub/Timer.vue | 22 +- app/components/sub/Toast.vue | 2 +- app/fonts/{enrecipes.ttf => EnRecipes.ttf} | Bin 17940 -> 18568 bytes app/main.ts | 75 ++-- app/rtl-ui/dock-layout/index.android.ts | 52 --- app/rtl-ui/dock-layout/index.d.ts | 1 - app/rtl-ui/index.ts | 1 - app/shared/mixins.ts | 30 +- app/shared/utils.ts | 6 +- app/store.ts | 78 +++-- package-lock.json | 382 +++++++++++++++------ package.json | 4 +- translations/store-listing/hi/title.txt | 1 + translations/store-listing/nb-NO/title.txt | 1 + 38 files changed, 1133 insertions(+), 944 deletions(-) rename app/fonts/{enrecipes.ttf => EnRecipes.ttf} (89%) delete mode 100644 app/rtl-ui/dock-layout/index.android.ts delete mode 100644 app/rtl-ui/dock-layout/index.d.ts create mode 100644 translations/store-listing/hi/title.txt create mode 100644 translations/store-listing/nb-NO/title.txt diff --git a/app/app.scss b/app/app.scss index ddb33624..a0baa493 100644 --- a/app/app.scss +++ b/app/app.scss @@ -17,7 +17,7 @@ $t1: 25; $t2: 21; $t3: 17; $t4: 14; -$t5: 12; // Base size +$t5: 12; // Base $t6: 10; Page { @@ -25,29 +25,31 @@ Page { font-size: $t4; } .ico { - font-family: 'enrecipes'; - font-size: 24; - vertical-alignment: center; - &.sm { + font-family: 'EnRecipes'; + font-size: 23; + &.s { font-size: $t3; opacity: 0.5; } } +.vc { + vertical-align: center; +} .tb { font-family: 'Inter-Bold', sans-serif; } -.tac { +.tc { text-align: center; } .tw { text-wrap: true; } -.pageTitle { - @extend .tb; - @extend .tw; + +.pTitle { font-size: $t1; padding: 16 16 24; } + .Light { color: $gray9; background: $gray1; @@ -67,8 +69,9 @@ Page { .appbar, .modal { background: $gray0; + box-shadow: 0 2 rgba($gray10, 0.1); } - .fieldLabel, + .fLabel, .sub { color: $gray6; } @@ -105,7 +108,7 @@ Page { color: $gray0; background: $gray8; } - .fieldLabel, + .fLabel, .sub { color: $gray5; } @@ -142,7 +145,7 @@ Page { color: $gray1; background: $gray9; } - .fieldLabel, + .fLabel, .sub { color: $gray6; } @@ -158,8 +161,9 @@ Page { color: $gray10; } } + TextField.combField, -#searchBar { +#search { border-color: transparent; } @@ -167,28 +171,24 @@ TextField.combField, // Elements TextField, TextView { - width: 100%; + // width: 100%; padding: 14 8; border-bottom-width: 1; } TextView { line-height: 4; } -#searchBar { +#search { padding: 13 12; } -.inputField { +.inputC { margin-bottom: 24; } -.fieldLabel { +.fLabel { font-size: $t5; } -.progressContainer { - width: 100%; -} progress { color: $orange; - width: 100%; height: 2; background-color: $gray5; } @@ -197,12 +197,17 @@ Switch { off-background-color: $gray5; } button { - background-color: transparent; z-index: 0; padding: 8; border-radius: 12; min-width: 0; min-height: 0; + text-transform: none; + background-color: transparent; + &.sst { + width: 48; + height: 48; + } &.ico { width: 48; height: 48; @@ -212,36 +217,28 @@ button { @extend .fade; } } + &.si { + width: 40; + height: 40; + } &.text { - @extend .tb; color: $orange; - &:active { - @extend .fade; - } + } + &.st { + font-size: $t5; + padding: 12; } &.big { margin-top: 8; padding: 16 0; } - &.sm { - font-size: $t5; - padding: 12; - } - &.min { - width: 40; - height: 40; - vertical-alignment: center; - } - &.fb:active { - @extend .fade; - } &.rate { margin: 0 4 0 0; width: 32; height: 32; - &:active { - @extend .fade; - } + } + &.fb:active { + @extend .fade; } } ActivityIndicator { @@ -255,52 +252,44 @@ ActivityIndicator { // Home .segment { border-radius: 12; - margin: 0 4 0 0; - padding: 0 12; - .value { - padding: 0 0 0 8; - vertical-alignment: center; - &.r { - padding: 0 8 0 0; - transform: scaleX(-1); - } + padding: 8; + .v { + padding: 0 4; } } .select { color: $orange; @extend .hl; } -.emptyState { +.t3 { + font-size: $t3; +} +.empty { padding: 16 16 8; - label { - @extend .tw; - } - .title { - @extend .tb; - font-size: $t3; - } } // ----------------------------- // Recipe Item -.recipeItem { +.recipe { padding: 8 16; - .recipeInfo { - vertical-alignment: center; + .info { padding: 0 8 4; } .title { padding: 0 0 4; } } -.attrs { +.oh { orientation: horizontal; } +.t6 { + font-size: $t6; +} .attr { font-size: $t6; - padding: 1 4; + padding: 0 4 2; } -.simple .recipeInfo { +.simple .info { padding: 8 0; } .minimal .title { @@ -308,7 +297,7 @@ ActivityIndicator { } .grid { padding: 8; - .recipeInfo { + .info { padding: 8 0 4; } &.odd { @@ -318,7 +307,7 @@ ActivityIndicator { padding: 8 16 8 8; } } -.photogrid .recipeInfo { +.photogrid .info { padding: 8 0 0; } .lastItem { @@ -401,7 +390,7 @@ ActivityIndicator { margin: 24 16 0 0; vertical-align: top; } -.photoviewer { +.imgViewer { width: 96; height: 96; opacity: 0; @@ -417,92 +406,53 @@ ActivityIndicator { @extend .tw; } } -.ingredient { +.check { padding: 0 16; - .value { - @extend .tw; - vertical-align: center; - padding: 14 16; - line-height: 4; - } -} -.instruction { - padding: 0 16; - .count { - @extend .tb; - font-size: $t3; - } - .value { - @extend .tw; + .v { padding: 14 16; line-height: 4; } } .done { opacity: 0.5; - .value { + .v { text-decoration: line-through; } } -.combination { - @extend .tw; - text-align: left; - padding: 16; +.comb { + padding: 16 24; line-height: 4; } .note { - @extend .tw; - line-height: 4; - padding: 16 0; -} -.dateInfo { - padding: 32 16 16; - font-size: $t5; + padding: 16 24; line-height: 4; } // ----------------------------- // AppBar + .appbar { - z-index: 4; - min-height: 56; margin: 8; padding: 4; border-radius: 16; - .title { - @extend .tb; - @extend .tw; - vertical-align: center; - margin: 0 12; - line-height: 4; - } - .msg { - padding: 14 16; - margin: 0; - } .fab { margin-left: 8; } - &.home { - margin: 8 8 0; - } } .sidebar { margin-bottom: 0; } .toolbar { - z-index: 4; - padding: 4; - margin: 0 0 52; + vertical-align: bottom; + height: 1; + transform: translateY(48); .tool { padding: 0 8; - label { - vertical-alignment: center; - } - .value, - .ico { - padding: 0 4; - } + orientation: horizontal; + } + .v, + .ico { + padding: 0 4; } } .fab { @@ -512,64 +462,44 @@ ActivityIndicator { // ----------------------------- // EditRecipe -.sectionTitle { - @extend .tb; - @extend .tw; - font-size: $t2; - padding: 0; +.section { + padding: 0 16; margin: 32 0 16; } +.t2 { + font-size: $t2; +} .sticky { width: 100%; padding: 0 16 16; - margin: 0; -} -.countdown { - font-size: $t3; - color: $orange; } // ----------------------------- // MealPlanner -.monthSwitcher { - padding: 0 16; - .month { - vertical-alignment: center; - text-align: center; - font-size: $t3; - } -} .calendar { padding: 0 16; - .dayName { - vertical-alignment: center; - text-align: center; - font-size: $t5; - } .accent.sub { - color: rgba($orange, 0.5); + color: rgba($orange, 0.6); } } .plans { - padding: 8 16 80; - width: 100%; + margin: 16 16 0; .date { - font-size: $t2; - padding: 16 0; + margin: 16 0 8; + } + .type { + padding: 8 0; } .plan { - padding: 8 0; - } - .meal { - font-size: $t3; - padding: 8 0; - } - .planContent { min-height: 48; - padding: 8; + padding: 4 0; } - .attr { - padding: 0; + .info { + min-height: 40; + padding: 0 8; + } + .note { + padding: 4 0; } } @@ -626,12 +556,6 @@ ActivityIndicator { margin: 0 0 8; } } -.noResInfo { - @extend .tac; - @extend .tw; - padding: 16; - line-height: 4; -} // ----------------------------- // Transitions @@ -646,7 +570,7 @@ ActivityIndicator { background-color: transparent; } 100% { - background-color: rgba($orange, 0.2); + background-color: rgba($orange, 0.1); } } .fade { @@ -660,7 +584,7 @@ ActivityIndicator { opacity: 1; } 100% { - opacity: 0.5; + opacity: 0.75; } } @@ -678,3 +602,12 @@ ActivityIndicator { horizontal-alignment: right; } } +.har { + horizontal-alignment: right; + &.r { + horizontal-alignment: left; + } +} +.edge { + width: 16; +} diff --git a/app/components/CookingTimer.vue b/app/components/CookingTimer.vue index d0e4351f..b231369c 100644 --- a/app/components/CookingTimer.vue +++ b/app/components/CookingTimer.vue @@ -1,5 +1,5 @@ @@ -58,7 +70,6 @@ import { localize } from "@nativescript/localize"; import { Observable, - CoreTypes, Application, Utils, Device, @@ -128,12 +139,8 @@ export default { object.bindingContext = new Observable(); if (this.activeTimers.filter((e: any) => e.done).length) this.openReminder(); - this.keepScreenOnCountUp(); setNumber("isTimer", 1); }, - pgUnload() { - utils.keepScreenOn(0); - }, abLoad({ object }) { this.appbar = object; }, @@ -151,19 +158,8 @@ export default { scrollUp = y < this.scrollPos; this.scrollPos = Math.abs(y); let ab = this.appbar.translateY; - if (!scrollUp && ab == 0) { - this.appbar.animate({ - translate: { x: 0, y: 64 }, - duration: 200, - curve: CoreTypes.AnimationCurve.ease, - }); - } else if (scrollUp && ab == 64) { - this.appbar.animate({ - translate: { x: 0, y: 0 }, - duration: 200, - curve: CoreTypes.AnimationCurve.ease, - }); - } + if (!scrollUp && ab == 0) this.animateBar(this.appbar, 0); + else if (scrollUp && ab == 64) this.animateBar(this.appbar, 1); } }, @@ -210,7 +206,6 @@ export default { } if (this.FGService) setTimeout(() => this.activeTimers.length && show(), 250); - this.keepScreenOnCountUp(); utils.wakeLock(ongoingCount); }, timerAlert() { @@ -390,7 +385,7 @@ export default { this.animateBar(this.appbar, 0).then(() => { this.showUndo = 0; this.toast = localize(data); - this.animateBar(this.toastbar, 1); + this.animateBar(this.toastbar, 1, 1); let a = 5; clearInterval(barTimer); barTimer = setInterval(() => a-- < 1 && this.hideBar(), 1000); @@ -404,7 +399,7 @@ export default { this.showUndo = 1; this.snackMsg = message; this.countdown = 5; - this.animateBar(this.snackbar, 1).then(() => { + this.animateBar(this.snackbar, 1, 1).then(() => { let a = 5; clearInterval(barTimer); barTimer = setInterval(() => { @@ -456,11 +451,6 @@ export default { }, // HELPERS - keepScreenOnCountUp() { - utils.keepScreenOn( - this.activeTimers.filter((e: any) => !e.isPaused).length - ); - }, }, created() { this.clearTimerInterval(); diff --git a/app/components/EditRecipe.vue b/app/components/EditRecipe.vue index 0a54e8fd..d944bc63 100644 --- a/app/components/EditRecipe.vue +++ b/app/components/EditRecipe.vue @@ -3,7 +3,11 @@ - + - -