ready for v2.0.0

This commit is contained in:
vishnuraghavb 2021-06-18 18:22:03 +05:30
parent d2af7fd3e6
commit 7889eceea4
38 changed files with 1133 additions and 944 deletions

View file

@ -17,7 +17,7 @@ $t1: 25;
$t2: 21; $t2: 21;
$t3: 17; $t3: 17;
$t4: 14; $t4: 14;
$t5: 12; // Base size $t5: 12; // Base
$t6: 10; $t6: 10;
Page { Page {
@ -25,29 +25,31 @@ Page {
font-size: $t4; font-size: $t4;
} }
.ico { .ico {
font-family: 'enrecipes'; font-family: 'EnRecipes';
font-size: 24; font-size: 23;
vertical-alignment: center; &.s {
&.sm {
font-size: $t3; font-size: $t3;
opacity: 0.5; opacity: 0.5;
} }
} }
.vc {
vertical-align: center;
}
.tb { .tb {
font-family: 'Inter-Bold', sans-serif; font-family: 'Inter-Bold', sans-serif;
} }
.tac { .tc {
text-align: center; text-align: center;
} }
.tw { .tw {
text-wrap: true; text-wrap: true;
} }
.pageTitle {
@extend .tb; .pTitle {
@extend .tw;
font-size: $t1; font-size: $t1;
padding: 16 16 24; padding: 16 16 24;
} }
.Light { .Light {
color: $gray9; color: $gray9;
background: $gray1; background: $gray1;
@ -67,8 +69,9 @@ Page {
.appbar, .appbar,
.modal { .modal {
background: $gray0; background: $gray0;
box-shadow: 0 2 rgba($gray10, 0.1);
} }
.fieldLabel, .fLabel,
.sub { .sub {
color: $gray6; color: $gray6;
} }
@ -105,7 +108,7 @@ Page {
color: $gray0; color: $gray0;
background: $gray8; background: $gray8;
} }
.fieldLabel, .fLabel,
.sub { .sub {
color: $gray5; color: $gray5;
} }
@ -142,7 +145,7 @@ Page {
color: $gray1; color: $gray1;
background: $gray9; background: $gray9;
} }
.fieldLabel, .fLabel,
.sub { .sub {
color: $gray6; color: $gray6;
} }
@ -158,8 +161,9 @@ Page {
color: $gray10; color: $gray10;
} }
} }
TextField.combField, TextField.combField,
#searchBar { #search {
border-color: transparent; border-color: transparent;
} }
@ -167,28 +171,24 @@ TextField.combField,
// Elements // Elements
TextField, TextField,
TextView { TextView {
width: 100%; // width: 100%;
padding: 14 8; padding: 14 8;
border-bottom-width: 1; border-bottom-width: 1;
} }
TextView { TextView {
line-height: 4; line-height: 4;
} }
#searchBar { #search {
padding: 13 12; padding: 13 12;
} }
.inputField { .inputC {
margin-bottom: 24; margin-bottom: 24;
} }
.fieldLabel { .fLabel {
font-size: $t5; font-size: $t5;
} }
.progressContainer {
width: 100%;
}
progress { progress {
color: $orange; color: $orange;
width: 100%;
height: 2; height: 2;
background-color: $gray5; background-color: $gray5;
} }
@ -197,12 +197,17 @@ Switch {
off-background-color: $gray5; off-background-color: $gray5;
} }
button { button {
background-color: transparent;
z-index: 0; z-index: 0;
padding: 8; padding: 8;
border-radius: 12; border-radius: 12;
min-width: 0; min-width: 0;
min-height: 0; min-height: 0;
text-transform: none;
background-color: transparent;
&.sst {
width: 48;
height: 48;
}
&.ico { &.ico {
width: 48; width: 48;
height: 48; height: 48;
@ -212,36 +217,28 @@ button {
@extend .fade; @extend .fade;
} }
} }
&.text { &.si {
@extend .tb; width: 40;
color: $orange; height: 40;
&:active {
@extend .fade;
} }
&.text {
color: $orange;
}
&.st {
font-size: $t5;
padding: 12;
} }
&.big { &.big {
margin-top: 8; margin-top: 8;
padding: 16 0; padding: 16 0;
} }
&.sm {
font-size: $t5;
padding: 12;
}
&.min {
width: 40;
height: 40;
vertical-alignment: center;
}
&.fb:active {
@extend .fade;
}
&.rate { &.rate {
margin: 0 4 0 0; margin: 0 4 0 0;
width: 32; width: 32;
height: 32; height: 32;
&:active {
@extend .fade;
} }
&.fb:active {
@extend .fade;
} }
} }
ActivityIndicator { ActivityIndicator {
@ -255,52 +252,44 @@ ActivityIndicator {
// Home // Home
.segment { .segment {
border-radius: 12; border-radius: 12;
margin: 0 4 0 0; padding: 8;
padding: 0 12; .v {
.value { padding: 0 4;
padding: 0 0 0 8;
vertical-alignment: center;
&.r {
padding: 0 8 0 0;
transform: scaleX(-1);
}
} }
} }
.select { .select {
color: $orange; color: $orange;
@extend .hl; @extend .hl;
} }
.emptyState { .t3 {
padding: 16 16 8;
label {
@extend .tw;
}
.title {
@extend .tb;
font-size: $t3; font-size: $t3;
} }
.empty {
padding: 16 16 8;
} }
// ----------------------------- // -----------------------------
// Recipe Item // Recipe Item
.recipeItem { .recipe {
padding: 8 16; padding: 8 16;
.recipeInfo { .info {
vertical-alignment: center;
padding: 0 8 4; padding: 0 8 4;
} }
.title { .title {
padding: 0 0 4; padding: 0 0 4;
} }
} }
.attrs { .oh {
orientation: horizontal; orientation: horizontal;
} }
.t6 {
font-size: $t6;
}
.attr { .attr {
font-size: $t6; font-size: $t6;
padding: 1 4; padding: 0 4 2;
} }
.simple .recipeInfo { .simple .info {
padding: 8 0; padding: 8 0;
} }
.minimal .title { .minimal .title {
@ -308,7 +297,7 @@ ActivityIndicator {
} }
.grid { .grid {
padding: 8; padding: 8;
.recipeInfo { .info {
padding: 8 0 4; padding: 8 0 4;
} }
&.odd { &.odd {
@ -318,7 +307,7 @@ ActivityIndicator {
padding: 8 16 8 8; padding: 8 16 8 8;
} }
} }
.photogrid .recipeInfo { .photogrid .info {
padding: 8 0 0; padding: 8 0 0;
} }
.lastItem { .lastItem {
@ -401,7 +390,7 @@ ActivityIndicator {
margin: 24 16 0 0; margin: 24 16 0 0;
vertical-align: top; vertical-align: top;
} }
.photoviewer { .imgViewer {
width: 96; width: 96;
height: 96; height: 96;
opacity: 0; opacity: 0;
@ -417,94 +406,55 @@ ActivityIndicator {
@extend .tw; @extend .tw;
} }
} }
.ingredient { .check {
padding: 0 16; padding: 0 16;
.value { .v {
@extend .tw;
vertical-align: center;
padding: 14 16;
line-height: 4;
}
}
.instruction {
padding: 0 16;
.count {
@extend .tb;
font-size: $t3;
}
.value {
@extend .tw;
padding: 14 16; padding: 14 16;
line-height: 4; line-height: 4;
} }
} }
.done { .done {
opacity: 0.5; opacity: 0.5;
.value { .v {
text-decoration: line-through; text-decoration: line-through;
} }
} }
.combination { .comb {
@extend .tw; padding: 16 24;
text-align: left;
padding: 16;
line-height: 4; line-height: 4;
} }
.note { .note {
@extend .tw; padding: 16 24;
line-height: 4;
padding: 16 0;
}
.dateInfo {
padding: 32 16 16;
font-size: $t5;
line-height: 4; line-height: 4;
} }
// ----------------------------- // -----------------------------
// AppBar // AppBar
.appbar { .appbar {
z-index: 4;
min-height: 56;
margin: 8; margin: 8;
padding: 4; padding: 4;
border-radius: 16; border-radius: 16;
.title {
@extend .tb;
@extend .tw;
vertical-align: center;
margin: 0 12;
line-height: 4;
}
.msg {
padding: 14 16;
margin: 0;
}
.fab { .fab {
margin-left: 8; margin-left: 8;
} }
&.home {
margin: 8 8 0;
}
} }
.sidebar { .sidebar {
margin-bottom: 0; margin-bottom: 0;
} }
.toolbar { .toolbar {
z-index: 4; vertical-align: bottom;
padding: 4; height: 1;
margin: 0 0 52; transform: translateY(48);
.tool { .tool {
padding: 0 8; padding: 0 8;
label { orientation: horizontal;
vertical-alignment: center;
} }
.value, .v,
.ico { .ico {
padding: 0 4; padding: 0 4;
} }
} }
}
.fab { .fab {
border-radius: 12; border-radius: 12;
background: $orange; background: $orange;
@ -512,64 +462,44 @@ ActivityIndicator {
// ----------------------------- // -----------------------------
// EditRecipe // EditRecipe
.sectionTitle { .section {
@extend .tb; padding: 0 16;
@extend .tw;
font-size: $t2;
padding: 0;
margin: 32 0 16; margin: 32 0 16;
} }
.t2 {
font-size: $t2;
}
.sticky { .sticky {
width: 100%; width: 100%;
padding: 0 16 16; padding: 0 16 16;
margin: 0;
}
.countdown {
font-size: $t3;
color: $orange;
} }
// ----------------------------- // -----------------------------
// MealPlanner // MealPlanner
.monthSwitcher {
padding: 0 16;
.month {
vertical-alignment: center;
text-align: center;
font-size: $t3;
}
}
.calendar { .calendar {
padding: 0 16; padding: 0 16;
.dayName {
vertical-alignment: center;
text-align: center;
font-size: $t5;
}
.accent.sub { .accent.sub {
color: rgba($orange, 0.5); color: rgba($orange, 0.6);
} }
} }
.plans { .plans {
padding: 8 16 80; margin: 16 16 0;
width: 100%;
.date { .date {
font-size: $t2; margin: 16 0 8;
padding: 16 0; }
.type {
padding: 8 0;
} }
.plan { .plan {
padding: 8 0;
}
.meal {
font-size: $t3;
padding: 8 0;
}
.planContent {
min-height: 48; min-height: 48;
padding: 8; padding: 4 0;
} }
.attr { .info {
padding: 0; min-height: 40;
padding: 0 8;
}
.note {
padding: 4 0;
} }
} }
@ -626,12 +556,6 @@ ActivityIndicator {
margin: 0 0 8; margin: 0 0 8;
} }
} }
.noResInfo {
@extend .tac;
@extend .tw;
padding: 16;
line-height: 4;
}
// ----------------------------- // -----------------------------
// Transitions // Transitions
@ -646,7 +570,7 @@ ActivityIndicator {
background-color: transparent; background-color: transparent;
} }
100% { 100% {
background-color: rgba($orange, 0.2); background-color: rgba($orange, 0.1);
} }
} }
.fade { .fade {
@ -660,7 +584,7 @@ ActivityIndicator {
opacity: 1; opacity: 1;
} }
100% { 100% {
opacity: 0.5; opacity: 0.75;
} }
} }
@ -678,3 +602,12 @@ ActivityIndicator {
horizontal-alignment: right; horizontal-alignment: right;
} }
} }
.har {
horizontal-alignment: right;
&.r {
horizontal-alignment: left;
}
}
.edge {
width: 16;
}

View file

@ -1,5 +1,5 @@
<template> <template>
<Page @loaded="pgLoad" @unloaded="pgUnload" actionBarHidden="true"> <Page @loaded="pgLoad" actionBarHidden="true">
<GridLayout rows="*, auto" columns="*"> <GridLayout rows="*, auto" columns="*">
<ScrollView <ScrollView
@scroll="svScroll($event)" @scroll="svScroll($event)"
@ -8,7 +8,7 @@
> >
<StackLayout> <StackLayout>
<RGridLayout :rtl="RTL" rows="auto" columns="*, auto, 12"> <RGridLayout :rtl="RTL" rows="auto" columns="*, auto, 12">
<RLabel class="pageTitle" :text="'timer' | L" /> <RLabel class="pTitle tw tb" :text="'timer' | L" />
<Button col="1" class="ico" :text="icon.cog" @tap="navigateTo" /> <Button col="1" class="ico" :text="icon.cog" @tap="navigateTo" />
</RGridLayout> </RGridLayout>
<Timer <Timer
@ -25,9 +25,9 @@
</StackLayout> </StackLayout>
</ScrollView> </ScrollView>
<GridLayout v-if="!activeTimers.length" rows="*, auto"> <GridLayout v-if="!activeTimers.length" rows="*, auto">
<StackLayout row="1" class="emptyState"> <StackLayout row="1" class="empty">
<RLabel class="title" :text="'ccwt' | L" /> <RLabel class="tb t3 tw" :text="'ccwt' | L" />
<RLabel :text="'plsAdd' | L" /> <RLabel class="tw" :text="'plsAdd' | L" />
</StackLayout> </StackLayout>
</GridLayout> </GridLayout>
<RGridLayout <RGridLayout
@ -50,6 +50,18 @@
:onload="sbLoad" :onload="sbLoad"
/> />
<Toast :onload="tbLoad" :toast="toast" :action="hideBar" /> <Toast :onload="tbLoad" :toast="toast" :action="hideBar" />
<Label
rowSpan="2"
class="edge hal"
:class="{ 'f r': RTL }"
@swipe="swipeBack($event, navigateBack)"
/>
<Label
rowSpan="2"
class="edge har rtl"
:class="{ r: RTL, f: !RTL }"
@swipe="swipeBack($event, navigateBack)"
/>
</GridLayout> </GridLayout>
</Page> </Page>
</template> </template>
@ -58,7 +70,6 @@
import { localize } from "@nativescript/localize"; import { localize } from "@nativescript/localize";
import { import {
Observable, Observable,
CoreTypes,
Application, Application,
Utils, Utils,
Device, Device,
@ -128,12 +139,8 @@ export default {
object.bindingContext = new Observable(); object.bindingContext = new Observable();
if (this.activeTimers.filter((e: any) => e.done).length) if (this.activeTimers.filter((e: any) => e.done).length)
this.openReminder(); this.openReminder();
this.keepScreenOnCountUp();
setNumber("isTimer", 1); setNumber("isTimer", 1);
}, },
pgUnload() {
utils.keepScreenOn(0);
},
abLoad({ object }) { abLoad({ object }) {
this.appbar = object; this.appbar = object;
}, },
@ -151,19 +158,8 @@ export default {
scrollUp = y < this.scrollPos; scrollUp = y < this.scrollPos;
this.scrollPos = Math.abs(y); this.scrollPos = Math.abs(y);
let ab = this.appbar.translateY; let ab = this.appbar.translateY;
if (!scrollUp && ab == 0) { if (!scrollUp && ab == 0) this.animateBar(this.appbar, 0);
this.appbar.animate({ else if (scrollUp && ab == 64) this.animateBar(this.appbar, 1);
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,
});
}
} }
}, },
@ -210,7 +206,6 @@ export default {
} }
if (this.FGService) if (this.FGService)
setTimeout(() => this.activeTimers.length && show(), 250); setTimeout(() => this.activeTimers.length && show(), 250);
this.keepScreenOnCountUp();
utils.wakeLock(ongoingCount); utils.wakeLock(ongoingCount);
}, },
timerAlert() { timerAlert() {
@ -390,7 +385,7 @@ export default {
this.animateBar(this.appbar, 0).then(() => { this.animateBar(this.appbar, 0).then(() => {
this.showUndo = 0; this.showUndo = 0;
this.toast = localize(data); this.toast = localize(data);
this.animateBar(this.toastbar, 1); this.animateBar(this.toastbar, 1, 1);
let a = 5; let a = 5;
clearInterval(barTimer); clearInterval(barTimer);
barTimer = setInterval(() => a-- < 1 && this.hideBar(), 1000); barTimer = setInterval(() => a-- < 1 && this.hideBar(), 1000);
@ -404,7 +399,7 @@ export default {
this.showUndo = 1; this.showUndo = 1;
this.snackMsg = message; this.snackMsg = message;
this.countdown = 5; this.countdown = 5;
this.animateBar(this.snackbar, 1).then(() => { this.animateBar(this.snackbar, 1, 1).then(() => {
let a = 5; let a = 5;
clearInterval(barTimer); clearInterval(barTimer);
barTimer = setInterval(() => { barTimer = setInterval(() => {
@ -456,11 +451,6 @@ export default {
}, },
// HELPERS // HELPERS
keepScreenOnCountUp() {
utils.keepScreenOn(
this.activeTimers.filter((e: any) => !e.isPaused).length
);
},
}, },
created() { created() {
this.clearTimerInterval(); this.clearTimerInterval();

View file

@ -3,7 +3,11 @@
<GridLayout rows="*, auto" columns="auto, *, auto"> <GridLayout rows="*, auto" columns="auto, *, auto">
<ScrollView rowSpan="2" colSpan="3" @scroll="!showUndo && svLoad($event)"> <ScrollView rowSpan="2" colSpan="3" @scroll="!showUndo && svLoad($event)">
<StackLayout padding="0 16 72"> <StackLayout padding="0 16 72">
<RLabel class="pageTitle" padding="16 0 24" :text="`${title}` | L" /> <RLabel
class="pTitle tw tb"
padding="16 0 24"
:text="`${title}` | L"
/>
<Image <Image
margin="0 0 32" margin="0 0 32"
v-if="recipe.image" v-if="recipe.image"
@ -25,8 +29,8 @@
@tap="imageHandler" @tap="imageHandler"
/> />
<!-- OVERVIEW --> <!-- OVERVIEW -->
<StackLayout class="inputField"> <StackLayout class="inputC">
<Label class="fieldLabel" :text="'title' | L" /> <Label class="fLabel" :text="'title' | L" />
<TextField <TextField
:hint="'recTitle' | L" :hint="'recTitle' | L"
v-model="recipe.title" v-model="recipe.title"
@ -34,8 +38,8 @@
/> />
</StackLayout> </StackLayout>
<RGridLayout :rtl="RTL" class="" columns="*, 8, *"> <RGridLayout :rtl="RTL" class="" columns="*, 8, *">
<StackLayout class="inputField"> <StackLayout class="inputC">
<Label class="fieldLabel" :text="'cui' | L" /> <Label class="fLabel" :text="'cui' | L" />
<TextField <TextField
@loaded="setGravity" @loaded="setGravity"
:text="recipe.cuisine | L" :text="recipe.cuisine | L"
@ -44,8 +48,8 @@
@tap="showCuisine(0)" @tap="showCuisine(0)"
/> />
</StackLayout> </StackLayout>
<StackLayout class="inputField" col="2"> <StackLayout class="inputC" col="2">
<Label class="fieldLabel" :text="'cat' | L" /> <Label class="fLabel" :text="'cat' | L" />
<TextField <TextField
@loaded="setGravity" @loaded="setGravity"
ref="category" ref="category"
@ -56,8 +60,8 @@
/> />
</StackLayout> </StackLayout>
</RGridLayout> </RGridLayout>
<StackLayout class="inputField"> <StackLayout class="inputC">
<Label class="fieldLabel" :text="'ts' | L" /> <Label class="fLabel" :text="'ts' | L" />
<TextField <TextField
@loaded="setGravity" @loaded="setGravity"
:hint="'tsInfo' | L" :hint="'tsInfo' | L"
@ -69,8 +73,8 @@
/> />
</StackLayout> </StackLayout>
<RGridLayout :rtl="RTL" columns="*, 8, *"> <RGridLayout :rtl="RTL" columns="*, 8, *">
<StackLayout class="inputField"> <StackLayout class="inputC">
<Label class="fieldLabel" :text="'prepT' | L" /> <Label class="fLabel" :text="'prepT' | L" />
<TextField <TextField
@loaded="setGravity" @loaded="setGravity"
:text="timeRequired('prepTime')" :text="timeRequired('prepTime')"
@ -79,8 +83,8 @@
@tap="setTimeRequired(0, 'prepTime')" @tap="setTimeRequired(0, 'prepTime')"
/> />
</StackLayout> </StackLayout>
<StackLayout class="inputField" col="2"> <StackLayout class="inputC" col="2">
<Label class="fieldLabel" :text="'cookT' | L" /> <Label class="fLabel" :text="'cookT' | L" />
<TextField <TextField
@loaded="setGravity" @loaded="setGravity"
ref="cookTime" ref="cookTime"
@ -92,8 +96,8 @@
</StackLayout> </StackLayout>
</RGridLayout> </RGridLayout>
<RGridLayout :rtl="RTL" columns="*, 8, *"> <RGridLayout :rtl="RTL" columns="*, 8, *">
<StackLayout class="inputField"> <StackLayout class="inputC">
<Label class="fieldLabel" :text="'yieldQ' | L" /> <Label class="fLabel" :text="'yieldQ' | L" />
<TextField <TextField
@loaded="setGravity" @loaded="setGravity"
ref="yieldQuantity" ref="yieldQuantity"
@ -103,8 +107,8 @@
returnKeyType="next" returnKeyType="next"
/> />
</StackLayout> </StackLayout>
<StackLayout class="inputField" col="2"> <StackLayout class="inputC" col="2">
<Label class="fieldLabel" :text="'yieldU' | L" /> <Label class="fLabel" :text="'yieldU' | L" />
<TextField <TextField
@loaded="setGravity" @loaded="setGravity"
:text="`${recipe.yieldUnit}` | L" :text="`${recipe.yieldUnit}` | L"
@ -115,8 +119,8 @@
</StackLayout> </StackLayout>
</RGridLayout> </RGridLayout>
<GridLayout columns="*, 8, *"> <GridLayout columns="*, 8, *">
<StackLayout class="inputField" :col="RTL ? 2 : 0"> <StackLayout class="inputC" :col="RTL ? 2 : 0">
<Label class="fieldLabel" :text="'Difficulty level' | L" /> <Label class="fLabel" :text="'Difficulty level' | L" />
<TextField <TextField
@loaded="setGravity" @loaded="setGravity"
ref="difficultyLevel" ref="difficultyLevel"
@ -130,7 +134,8 @@
<!-- INGREDIENTS --> <!-- INGREDIENTS -->
<Label <Label
:text="getTitleCount('ings', 'ingredients')" :text="getTitleCount('ings', 'ingredients')"
class="sectionTitle" padding="0"
class="section t2 tb tw"
/> />
<RGridLayout <RGridLayout
:rtl="RTL" :rtl="RTL"
@ -168,13 +173,13 @@
/> />
<Button <Button
col="5" col="5"
class="ico min" class="ico si"
:text="icon.x" :text="icon.x"
@tap="removeIngredient(index)" @tap="removeIngredient(index)"
/> />
</RGridLayout> </RGridLayout>
<Button <Button
class="text big hal" class="text tb big hal fb"
:class="{ r: RTL }" :class="{ r: RTL }"
:text="'aIngBtn' | L" :text="'aIngBtn' | L"
@tap="addIngredient()" @tap="addIngredient()"
@ -182,7 +187,8 @@
<!-- INSTRUCTIONS --> <!-- INSTRUCTIONS -->
<Label <Label
:text="getTitleCount('inss', 'instructions')" :text="getTitleCount('inss', 'instructions')"
class="sectionTitle" padding="0"
class="section t2 tb tw"
/> />
<RGridLayout <RGridLayout
:rtl="RTL" :rtl="RTL"
@ -197,13 +203,13 @@
/> />
<Button <Button
col="1" col="1"
class="ico min" class="ico si"
:text="icon.x" :text="icon.x"
@tap="removeInstruction(index)" @tap="removeInstruction(index)"
/> />
</RGridLayout> </RGridLayout>
<Button <Button
class="text big hal" class="text tb big hal fb"
:class="{ r: RTL }" :class="{ r: RTL }"
:text="'aStpBtn' | L" :text="'aStpBtn' | L"
@tap="addInstruction" @tap="addInstruction"
@ -211,7 +217,8 @@
<!-- COMBINATIONS --> <!-- COMBINATIONS -->
<Label <Label
:text="getTitleCount('cmbs', 'combinations')" :text="getTitleCount('cmbs', 'combinations')"
class="sectionTitle" padding="0"
class="section t2 tb tw"
/> />
<RGridLayout <RGridLayout
:rtl="RTL" :rtl="RTL"
@ -227,19 +234,23 @@
/> />
<Button <Button
col="1" col="1"
class="ico min" class="ico si"
:text="icon.x" :text="icon.x"
@tap="removeCombination(combination)" @tap="removeCombination(combination)"
/> />
</RGridLayout> </RGridLayout>
<Button <Button
class="text big hal" class="text tb big hal fb"
:class="{ r: RTL }" :class="{ r: RTL }"
:text="'addCmbBtn' | L" :text="'addCmbBtn' | L"
@tap="showCombinations" @tap="showCombinations"
/> />
<!-- NOTES --> <!-- NOTES -->
<Label :text="getTitleCount('nos', 'notes')" class="sectionTitle" /> <Label
:text="getTitleCount('nos', 'notes')"
padding="0"
class="section t2 tb tw"
/>
<RGridLayout <RGridLayout
:rtl="RTL" :rtl="RTL"
columns="*, auto" columns="*, auto"
@ -253,13 +264,13 @@
/> />
<Button <Button
col="1" col="1"
class="ico min" class="ico si"
:text="icon.x" :text="icon.x"
@tap="removeNote(index)" @tap="removeNote(index)"
/> />
</RGridLayout> </RGridLayout>
<Button <Button
class="text big hal" class="text tb big hal fb"
:class="{ r: RTL }" :class="{ r: RTL }"
:text="'aNoBtn' | L" :text="'aNoBtn' | L"
@tap="addNote" @tap="addNote"
@ -300,6 +311,19 @@
:action="hideBar" :action="hideBar"
:onload="sbLoad" :onload="sbLoad"
/> />
<Label
rowSpan="2"
colSpan="3"
class="edge hal"
:class="{ 'f r': RTL }"
@swipe="swipeBack($event, navigateBack)"
/>
<Label
rowSpan="2"
colSpan="3"
class="edge har rtl f"
@swipe="swipeBack($event, navigateBack)"
/>
</GridLayout> </GridLayout>
</Page> </Page>
</template> </template>
@ -315,10 +339,8 @@ import {
Screen, Screen,
Utils, Utils,
Observable, Observable,
CoreTypes,
Frame, Frame,
Application, Application,
GridLayout,
} from "@nativescript/core"; } from "@nativescript/core";
import { getString, setString } from "@nativescript/core/application-settings"; import { getString, setString } from "@nativescript/core/application-settings";
import { localize } from "@nativescript/localize"; import { localize } from "@nativescript/localize";
@ -430,19 +452,10 @@ export default {
scrollUp = y < this.scrollPos; scrollUp = y < this.scrollPos;
this.scrollPos = Math.abs(y); this.scrollPos = Math.abs(y);
let ab = this.appbar.translateY; let ab = this.appbar.translateY;
if (!scrollUp && ab == 0) { if (!scrollUp && ab == 0) this.animateBar(this.appbar, 0);
this.appbar.animate({ else if (scrollUp && ab == 64) {
translate: { x: 0, y: 64 },
duration: 200,
curve: CoreTypes.AnimationCurve.ease,
});
} else if (scrollUp && ab == 64) {
Utils.ad.dismissSoftInput(); Utils.ad.dismissSoftInput();
this.appbar.animate({ this.animateBar(this.appbar, 1);
translate: { x: 0, y: 0 },
duration: 200,
curve: CoreTypes.AnimationCurve.ease,
});
} }
} }
}, },
@ -844,7 +857,7 @@ export default {
this.showUndo = 1; this.showUndo = 1;
this.snackMsg = message; this.snackMsg = message;
this.countdown = 5; this.countdown = 5;
this.animateBar(this.snackbar, 1).then(() => { this.animateBar(this.snackbar, 1, 1).then(() => {
let a = 5; let a = 5;
barTimer = setInterval(() => { barTimer = setInterval(() => {
if (this.undo) { if (this.undo) {

View file

@ -1,6 +1,6 @@
<template> <template>
<Page @loaded="pgLoad" @unloaded="onPageUnload" actionBarHidden="true"> <Page @loaded="pgLoad" @unloaded="pgUnload" actionBarHidden="true">
<GridLayout rows="*, auto, 64, 8" columns="*"> <GridLayout rows="*, 104, auto" columns="*">
<CollectionView <CollectionView
rowSpan="4" rowSpan="4"
:spanSize="getSpanSize" :spanSize="getSpanSize"
@ -12,7 +12,7 @@
> >
<v-template name="header"> <v-template name="header">
<RGridLayout :rtl="RTL" rows="auto" columns="*, auto, 12"> <RGridLayout :rtl="RTL" rows="auto" columns="*, auto, 12">
<RLabel class="pageTitle" :text="`${currentComp}` | L" /> <RLabel class="pTitle tw tb" :text="`${currentComp}` | L" />
<Button <Button
col="1" col="1"
class="ico" class="ico"
@ -24,39 +24,39 @@
<v-template name="lists"> <v-template name="lists">
<RStackLayout :rtl="RTL" orientation="horizontal" padding="0 16 24"> <RStackLayout :rtl="RTL" orientation="horizontal" padding="0 16 24">
<GridLayout <GridLayout
rows="48" rows="32"
columns="auto, auto" columns="32, auto"
class="segment rtl" class="segment rtl"
v-for="(item, index) in topmenu" v-for="(item, index) in topmenu"
:key="index" :key="index"
:class="{ :class="{
select: currentComp === item.title, select: currentComp == item.title,
}" }"
@touch="touchSelector($event, item.title, item.title)" @touch="touchSelector($event, item.title, item.title)"
> >
<Label class="ico" :text="icon[item.icon]" /> <Label class="ico tc vc" :text="icon[item.icon]" />
<Label <Label
col="1" col="1"
class="value" class="v vc"
:class="{ r: RTL }" :class="{ f: RTL }"
:hidden="!getRecipeCount(item.title)" :hidden="!getRecipeCount(item.title)"
:text="getRecipeCount(item.title)" :text="getRecipeCount(item.title)"
/> />
</GridLayout> </GridLayout>
<GridLayout <GridLayout
:hidden="currentComp !== 'Filtered recipes'" :hidden="currentComp !== 'Filtered recipes'"
rows="48" rows="32"
columns="auto, auto" columns="32, auto"
class="segment rtl" class="segment rtl"
:class="{ :class="{
select: currentComp === 'Filtered recipes', select: currentComp === 'Filtered recipes',
}" }"
> >
<Label class="ico" :text="icon.filter" /> <Label class="ico tc vc" :text="icon.filter" />
<Label <Label
col="1" col="1"
class="value" class="v vc"
:class="{ r: RTL }" :class="{ f: RTL }"
:text="getRecipeCount('filtered')" :text="getRecipeCount('filtered')"
/> />
</GridLayout> </GridLayout>
@ -65,7 +65,7 @@
<v-template name="detailed"> <v-template name="detailed">
<RGridLayout <RGridLayout
:rtl="RTL" :rtl="RTL"
class="recipeItem" class="recipe"
:class="getItemPos(recipe.id)" :class="getItemPos(recipe.id)"
rows="auto" rows="auto"
columns="96, *" columns="96, *"
@ -97,31 +97,27 @@
decodeHeight="96" decodeHeight="96"
loadMode="async" loadMode="async"
/> />
<StackLayout class="recipeInfo" col="1"> <StackLayout class="info vc" col="1">
<RLabel :text="recipe.title" class="tb title tw" /> <RLabel :text="recipe.title" class="tb title tw" />
<RStackLayout :rtl="RTL" class="attrs" <RStackLayout :rtl="RTL" class="oh"
><Label class="ico sm rtl" :text="icon.cuisine" /> ><Label class="ico s rtl vc" :text="icon.cuisine" />
<Label class="attr" :text="recipe.cuisine | L" /> <Label class="attr" :text="recipe.cuisine | L" />
<Label class="ico sm" :text="icon.category" /> <Label class="ico s vc" :text="icon.category" />
<Label class="attr" :text="recipe.category | L" /> <Label class="attr" :text="recipe.category | L" />
</RStackLayout> </RStackLayout>
<RStackLayout <RStackLayout :rtl="RTL" :hidden="!recipe.tags.length" class="oh">
:rtl="RTL" <Label class="ico s rtl vc" :text="icon.tag" />
:hidden="!recipe.tags.length"
class="attrs"
>
<Label class="ico sm rtl" :text="icon.tag" />
<Label class="attr" :text="getTags(recipe.tags)" /> <Label class="attr" :text="getTags(recipe.tags)" />
</RStackLayout> </RStackLayout>
<RStackLayout :rtl="RTL" class="attrs"> <RStackLayout :rtl="RTL" class="oh">
<Label class="ico sm" :text="icon.star" /> <Label class="ico s vc" :text="icon.star" />
<Label class="attr" :text="getLocaleN(recipe.rating)" /> <Label class="attr" :text="getLocaleN(recipe.rating)" />
<Label class="ico sm" :text="icon.time" /> <Label class="ico s vc" :text="icon.time" />
<Label <Label
class="attr" class="attr"
:text="`${totalTime(recipe.prepTime, recipe.cookTime).time}`" :text="`${totalTime(recipe.prepTime, recipe.cookTime).time}`"
/> />
<Label class="ico sm" :text="icon.diff" /> <Label class="ico s vc" :text="icon.diff" />
<Label class="attr" :text="recipe.difficulty | L" /> <Label class="attr" :text="recipe.difficulty | L" />
</RStackLayout> </RStackLayout>
</StackLayout> </StackLayout>
@ -129,7 +125,7 @@
</v-template> </v-template>
<v-template name="grid"> <v-template name="grid">
<GridLayout <GridLayout
class="recipeItem grid" class="recipe grid"
:class="getItemPos(recipe.id)" :class="getItemPos(recipe.id)"
rows="auto, auto" rows="auto, auto"
columns="*" columns="*"
@ -159,28 +155,24 @@
:fontSize="imgWidth / 2" :fontSize="imgWidth / 2"
:text="icon.img" :text="icon.img"
/> />
<StackLayout class="recipeInfo" row="1"> <StackLayout class="info" row="1">
<RLabel :text="recipe.title" class="tb title tw" /> <RLabel :text="recipe.title" class="tb title tw" />
<FlexboxLayout <FlexboxLayout
flexWrap="wrap" flexWrap="wrap"
:justifyContent="RTL ? 'flex-end' : 'flex-start'" :justifyContent="RTL ? 'flex-end' : 'flex-start'"
> >
<RStackLayout :rtl="RTL" class="attrs"> <RStackLayout :rtl="RTL" class="oh">
<Label class="ico sm rtl" :text="icon.cuisine" /> <Label class="ico s rtl vc" :text="icon.cuisine" />
<Label class="attr" :text="recipe.cuisine | L" /> <Label class="attr" :text="recipe.cuisine | L" />
</RStackLayout> </RStackLayout>
<RStackLayout :rtl="RTL" class="attrs"> <RStackLayout :rtl="RTL" class="oh">
<Label class="ico sm" :text="icon.category" /> <Label class="ico s vc" :text="icon.category" />
<Label class="attr" :text="recipe.category | L" /> <Label class="attr" :text="recipe.category | L" />
</RStackLayout> </RStackLayout>
</FlexboxLayout> </FlexboxLayout>
<RStackLayout <RStackLayout :rtl="RTL" :hidden="!recipe.tags.length" class="oh">
:rtl="RTL" <Label class="ico s rtl vc" :text="icon.tag" />
:hidden="!recipe.tags.length"
class="attrs"
>
<Label class="ico sm rtl" :text="icon.tag" />
<Label class="attr" :text="getTags(recipe.tags)" /> <Label class="attr" :text="getTags(recipe.tags)" />
</RStackLayout> </RStackLayout>
</StackLayout> </StackLayout>
@ -189,7 +181,7 @@
<v-template name="photogrid"> <v-template name="photogrid">
<RGridLayout <RGridLayout
:rtl="RTL" :rtl="RTL"
class="recipeItem grid photogrid" class="recipe grid photogrid"
:class="getItemPos(recipe.id)" :class="getItemPos(recipe.id)"
rows="auto, auto" rows="auto, auto"
columns="*" columns="*"
@ -219,7 +211,7 @@
:fontSize="imgWidth / 2" :fontSize="imgWidth / 2"
:text="icon.img" :text="icon.img"
/> />
<StackLayout class="recipeInfo" row="1"> <StackLayout class="info" row="1">
<RLabel :text="recipe.title" class="tb title tw" /> <RLabel :text="recipe.title" class="tb title tw" />
</StackLayout> </StackLayout>
</RGridLayout> </RGridLayout>
@ -227,7 +219,7 @@
<v-template name="simple"> <v-template name="simple">
<RGridLayout <RGridLayout
:rtl="RTL" :rtl="RTL"
class="recipeItem simple" class="recipe simple"
:class="getItemPos(recipe.id)" :class="getItemPos(recipe.id)"
columns="*" columns="*"
@longPress=" @longPress="
@ -238,20 +230,16 @@
selectMode ? addToSelection(recipe.id) : viewRecipe(recipe.id) selectMode ? addToSelection(recipe.id) : viewRecipe(recipe.id)
" "
> >
<StackLayout class="recipeInfo"> <StackLayout class="info">
<RLabel :text="recipe.title" class="tb title tw" /> <RLabel :text="recipe.title" class="tb title tw" />
<RStackLayout :rtl="RTL" class="attrs"> <RStackLayout :rtl="RTL" class="oh">
<Label class="ico sm rtl" :text="icon.cuisine" /> <Label class="ico s rtl vc" :text="icon.cuisine" />
<Label class="attr" :text="recipe.cuisine | L" /> <Label class="attr" :text="recipe.cuisine | L" />
<Label class="ico sm" :text="icon.category" /> <Label class="ico s vc" :text="icon.category" />
<Label class="attr" :text="recipe.category | L" /> <Label class="attr" :text="recipe.category | L" />
</RStackLayout> </RStackLayout>
<RStackLayout <RStackLayout :rtl="RTL" :hidden="!recipe.tags.length" class="oh">
:rtl="RTL" <Label class="ico s rtl vc" :text="icon.tag" />
:hidden="!recipe.tags.length"
class="attrs"
>
<Label class="ico sm rtl" :text="icon.tag" />
<Label class="attr" :text="getTags(recipe.tags)" /> <Label class="attr" :text="getTags(recipe.tags)" />
</RStackLayout> </RStackLayout>
</StackLayout> </StackLayout>
@ -259,7 +247,7 @@
</v-template> </v-template>
<v-template name="minimal"> <v-template name="minimal">
<GridLayout <GridLayout
class="recipeItem simple minimal" class="recipe simple minimal"
:class="getItemPos(recipe.id)" :class="getItemPos(recipe.id)"
columns="*" columns="*"
@longPress=" @longPress="
@ -270,7 +258,7 @@
selectMode ? addToSelection(recipe.id) : viewRecipe(recipe.id) selectMode ? addToSelection(recipe.id) : viewRecipe(recipe.id)
" "
> >
<StackLayout class="recipeInfo"> <StackLayout class="info">
<RLabel :text="recipe.title" class="tb title tw" /> <RLabel :text="recipe.title" class="tb title tw" />
</StackLayout> </StackLayout>
</GridLayout> </GridLayout>
@ -278,66 +266,55 @@
</CollectionView> </CollectionView>
<GridLayout <GridLayout
rowSpan="2" rowSpan="2"
class="emptyState" class="empty"
v-if="emptyState" :hidden="!empty"
rows="*, auto, auto" rows="*, auto, auto"
columns="*" columns="*"
> >
<RLabel row="1" class="title" :text="emptyState.title | L" /> <RLabel row="1" class="tb t3 tw" :text="empty.title | L" />
<Button <Button
row="2" row="2"
v-if=" v-if="
emptyState.action && empty.action && (filterFavourites || filterTrylater || selCuisine)
(filterFavourites || filterTrylater || selCuisine)
" "
class="text big" class="text tb big fb"
@loaded="setGravity" @loaded="setGravity"
:text="emptyState.sub | L" :text="empty.sub | L"
@tap="emptyState.action" @tap="empty.action"
/> />
<RLabel <RLabel
class="tw"
row="2" row="2"
v-else-if="!emptyState.action" v-else-if="!empty.action"
:text="emptyState.sub | L" :text="empty.sub | L"
/> />
</GridLayout> </GridLayout>
<StackLayout row="1" rowSpan="2" margin="12 8">
<GridLayout <GridLayout
@loaded="tbLoad"
rows="auto, auto"
columns="auto"
class="appbar toolbar hal"
:class="{ r: RTL }"
:hidden="!showTools"
>
<RGridLayout
:rtl="RTL"
rows="48"
class="tool"
columns="auto, *"
@touch="touchTool($event, CookingTimer, 'timer')"
>
<Label class="ico" :text="icon.timer" />
<Label col="1" class="value" :text="'timer' | L" />
</RGridLayout>
<RGridLayout
:rtl="RTL"
row="1" row="1"
rows="48" @loaded="tbLoad"
class="tool" :rows="tbRows"
columns="auto, *" columns="auto"
@touch="touchTool($event, MealPlanner, 'planner')" class="appbar toolbar sidebar hal"
:class="{ r: RTL }"
:visibility="showTools ? 'visible' : 'hidden'"
> >
<Label class="ico" :text="icon.cal" /> <RStackLayout
<Label col="1" class="value" :text="'planner' | L" /> v-for="(item, i) in tbItems"
</RGridLayout> :key="i"
:row="i"
:rtl="RTL"
class="tool"
@touch="touchTool($event, item.comp, item.title)"
>
<Label class="ico vc" :text="icon[item.icon]" />
<Label col="1" class="v vc" :text="item.title | L" />
</RStackLayout>
</GridLayout> </GridLayout>
</StackLayout>
<RGridLayout <RGridLayout
row="2" row="2"
@loaded="abLoad" @loaded="abLoad"
:rtl="RTL" :rtl="RTL"
class="appbar home" class="appbar"
columns="auto, *, auto, auto, auto, auto" columns="auto, *, auto, auto, auto, auto"
@swipe="stSwipe" @swipe="stSwipe"
@touch="() => null" @touch="() => null"
@ -363,7 +340,7 @@
" "
/> />
<TextField <TextField
id="searchBar" id="search"
:class="{ f: RTL }" :class="{ f: RTL }"
@loaded="focusField" @loaded="focusField"
autocapitalizationType="words" autocapitalizationType="words"
@ -376,7 +353,7 @@
/> />
<Label <Label
:hidden="!selectMode" :hidden="!selectMode"
class="title" class="tb tw vc lh4"
:text="`${selection.length} ${$options.filters.L('sltd')}`" :text="`${selection.length} ${$options.filters.L('sltd')}`"
col="1" col="1"
/> />
@ -451,7 +428,7 @@ let lastShake = 0;
let lastForce = 0; let lastForce = 0;
let shakeCount = 0; let shakeCount = 0;
let typingTimer; let typingTimer;
let filterTimer;
export default { export default {
data() { data() {
return { return {
@ -554,6 +531,23 @@ export default {
getRecipes() { getRecipes() {
return [{}, {}].concat(this.filteredRecipes); return [{}, {}].concat(this.filteredRecipes);
}, },
tbItems() {
return [
{
title: "timer",
icon: "timer",
comp: CookingTimer,
},
{
title: "planner",
icon: "cal",
comp: MealPlanner,
},
];
},
tbRows() {
return "48, ".repeat(this.tbItems.length) + 48;
},
noResultFor() { noResultFor() {
if (this.filterFavourites || this.filterTrylater || this.selCuisine) if (this.filterFavourites || this.filterTrylater || this.selCuisine)
return "noRecsInL"; return "noRecsInL";
@ -562,17 +556,18 @@ export default {
imgWidth() { imgWidth() {
return Screen.mainScreen.widthDIPs / 2 - 24; return Screen.mainScreen.widthDIPs / 2 - 24;
}, },
emptyState() { empty() {
let rl = this.recipes.length; let rl = this.recipes.length;
let fr = this.filteredRecipes.length; let fr = this.filteredRecipes.length;
let ff = this.filterFavourites; let ff = this.filterFavourites;
let ftl = this.filterTrylater; let ftl = this.filterTrylater;
let sq = this.searchQuery; let sq = this.searchQuery;
let r: { interface EmptyState {
title: string; title: string;
sub: string; sub: string;
action?: Function; action?: Function;
}; }
let r = <EmptyState>{};
if (!rl && !ff && !ftl) { if (!rl && !ff && !ftl) {
r.title = "strAdd"; r.title = "strAdd";
r.sub = "plsAdd"; r.sub = "plsAdd";
@ -626,9 +621,8 @@ export default {
setTimeout(() => { setTimeout(() => {
if (this.listview) this.listview.refresh(); if (this.listview) this.listview.refresh();
}, 1000); }, 1000);
this.showTools && this.toggleTools();
}, },
onPageUnload() { pgUnload() {
if (this.shake) stopAccelerometerUpdates(); if (this.shake) stopAccelerometerUpdates();
}, },
abLoad({ object }) { abLoad({ object }) {
@ -656,19 +650,11 @@ export default {
} }
}, },
showBars() { showBars() {
this.appbar.animate({ this.animateBar(this.appbar, 1);
translate: { x: 0, y: 0 },
duration: 200,
curve: CoreTypes.AnimationCurve.ease,
});
}, },
hideBars() { hideBars() {
this.showTools && this.toggleTools(); this.showTools && this.toggleTools();
this.appbar.animate({ this.animateBar(this.appbar, 0);
translate: { x: 0, y: 64 },
duration: 200,
curve: CoreTypes.AnimationCurve.ease,
});
}, },
getSpanSize(index) { getSpanSize(index) {
return (this.layout == "grid" || this.layout == "photogrid") && return (this.layout == "grid" || this.layout == "photogrid") &&
@ -736,22 +722,25 @@ export default {
// Tools // Tools
toggleTools() { toggleTools() {
if (this.showTools) { if (this.showTools) {
this.toolbar.translateY = 0;
this.toolbar this.toolbar
.animate({ .animate({
translate: { x: 0, y: 112 }, height: 0,
translate: { x: 0, y: 48 },
duration: 200, duration: 200,
curve: CoreTypes.AnimationCurve.ease, curve: CoreTypes.AnimationCurve.easeIn,
}) })
.then(() => (this.showTools = 0)); .then(() => (this.showTools = 0));
} else { } else {
this.toolbar.height = 1;
this.showTools = 1; this.showTools = 1;
this.toolbar.translateY = 112; setTimeout(() => {
this.toolbar.animate({ this.toolbar.animate({
translate: { x: 0, y: 0 }, height: 104,
duration: 200, duration: 200,
curve: CoreTypes.AnimationCurve.ease, translate: { x: 0, y: 0 },
curve: CoreTypes.AnimationCurve.easeOut,
}); });
}, 1);
} }
}, },
@ -1126,24 +1115,16 @@ export default {
}); });
}, },
touchSelector({ object, action }, comp, title) { touchSelector({ object, action }, comp, title) {
let selected = this.currentComp == comp; if (this.currentComp != title) {
object.className = action.match(/down|move/) this.touchFade(object, action);
? `segment r ${selected ? "select" : "fade"}`
: `segment r ${selected && "select"}`;
if (action == "up") this.navigateTo(comp, title); if (action == "up") this.navigateTo(comp, title);
},
touchRecipe({ object, action }) {
let classes = object.className;
if (!this.selectMode) {
object.className = action.match(/down|move/)
? !classes.includes("fade")
? classes + " fade"
: classes
: classes.replace(/ fade/g, "");
} }
}, },
touchRecipe({ object, action }) {
if (!this.selectMode) this.touchFade(object, action);
},
touchTool({ object, action }, comp, value) { touchTool({ object, action }, comp, value) {
object.className = action.match(/down|move/) ? `tool fade` : `tool`; this.touchFade(object, action);
if (action == "up") this.navigateTo(comp, value, 1); if (action == "up") this.navigateTo(comp, value, 1);
}, },
}, },

View file

@ -6,34 +6,35 @@
rowSpan="3" rowSpan="3"
scrollBarIndicatorVisible="false" scrollBarIndicatorVisible="false"
> >
<StackLayout> <StackLayout rows="auto, auto, auto, *">
<RGridLayout :rtl="RTL" columns="*, auto, 12"> <RGridLayout :rtl="RTL" columns="*, auto, 12">
<Label class="pageTitle a" :text="'planner' | L" /> <Label class="pTitle tw tb a" :text="'planner' | L" />
<Button col="1" class="ico" :text="icon.cog" @tap="navigateTo" /> <Button col="1" class="ico" :text="icon.cog" @tap="navigateTo" />
</RGridLayout> </RGridLayout>
<GridLayout class="monthSwitcher" columns="auto, *, auto"> <GridLayout row="1" padding="0 16" columns="auto, *, auto">
<Button class="ico min" :text="icon.left" @tap="navigate(0)" /> <Button class="ico si" :text="icon.left" @tap="navigate(0)" />
<Label <Button
class="month" class="t3"
@touch="mYPicker" @touch="mYPicker"
col="1" col="1"
:text="formattedDate(0)" :text="formattedDate(0)"
/> />
<Button <Button
class="ico min" class="ico si"
col="2" col="2"
:text="icon.right" :text="icon.right"
@tap="navigate(1)" @tap="navigate(1)"
/> />
</GridLayout> </GridLayout>
<RGridLayout <RGridLayout
row="2"
:rtl="RTL" :rtl="RTL"
class="calendar" class="calendar"
columns="*, *, *, *, *, *, *" columns="*, *, *, *, *, *, *"
:rows="calRows" :rows="calRows"
> >
<Label <Label
class="dayName sub rtl" class="sub rtl t5 vc tc"
:class="{ f: RTL }" :class="{ f: RTL }"
:col="i" :col="i"
v-for="(d, i) in getDayNames" v-for="(d, i) in getDayNames"
@ -50,85 +51,97 @@
@tap="setDate(cal)" @tap="setDate(cal)"
/> />
</RGridLayout> </RGridLayout>
<StackLayout class="plans"> <StackLayout row="3" class="plans">
<RLabel <CollectionView
v-if="plannerView != 'd' && mealPlans.length" @loaded="cvLoad"
class="date tb" for="item in mpItems"
:text="formattedDate(1)" :height="listHeight"
textWrap="true"
/>
<StackLayout v-for="(meal, i) in mealTypes" :key="'meal' + i">
<Label
:hidden="!getRecipes[meal]"
class="meal tb"
:class="[meal]"
:text="meal | L"
/>
<RGridLayout
:rtl="RTL"
v-for="(plan, i) in getRecipes[meal]"
:key="meal + i"
class="plan"
columns="*, auto"
> >
<v-template if="item.type == 0">
<RLabel class="date tb t2" :text="item.date" textWrap="true" />
</v-template>
<v-template if="item.type == 1">
<Label
class="type t3"
:class="{ tb: plannerView == 'd' }"
:text="item.mealType | L"
/>
</v-template>
<v-template if="item.type == 2">
<RGridLayout <RGridLayout
:rtl="RTL" :rtl="RTL"
class="rtl" class="plan vc"
:hidden="!plan.recipeID" columns="auto, *, auto"
:columns="noImg ? '*' : '48, *'" @touch="!edit && touchRecipe"
@touch="touchRecipe" @tap="!edit && viewRecipe(item.id)"
@tap="viewRecipe(plan.id)"
> >
<Image <Image
class="imgHolder" class="imgHolder"
verticalAlignment="middle" verticalAlignment="middle"
v-if="!noImg && getRecipeImage(plan.recipeID)" v-if="!noImg && item.image"
:src="getRecipeImage(plan.recipeID)" :src="item.image"
stretch="none" stretch="none"
decodeWidth="48" decodeWidth="48"
decodeHeight="48" decodeHeight="48"
loadMode="async" loadMode="async"
/> />
<Label <Label
v-else-if="!noImg && !getRecipeImage(plan.recipeID)" v-else-if="!noImg && !item.image"
verticalAlignment="middle" verticalAlignment="middle"
class="ico imgHolder" class="ico imgHolder"
@loaded="centerLabel($event, 17)" @loaded="centerLabel($event, 17)"
width="48" width="48"
height="48" height="48"
fontSize="24" fontSize="23"
:text="icon.img" :text="icon.img"
/> />
<StackLayout class="planContent" col="1"> <GridLayout rows="auto, auto" class="info vc" col="1">
<RLabel :text="item.title" />
<RLabel <RLabel
class="title" row="1"
:text="getRecipeTitle(plan.recipeID)" :hidden="!item.size"
class="t6"
:text="item.size"
/>
</GridLayout>
<Button
:hidden="!edit"
col="2"
class="ico si"
:text="icon.x"
@tap="removeRecipe(item.id)"
/> />
<RLabel class="attr" :text="getYield(plan.id)" />
</StackLayout>
</RGridLayout> </RGridLayout>
</v-template>
<v-template if="item.type == 3">
<RGridLayout :rtl="RTL" class="plan vc" columns="*, auto">
<Label <Label
class="planContent tw" class="info lh4 tw"
:class="{ note: !noImg }"
@loaded="centerLabel($event, 16)" @loaded="centerLabel($event, 16)"
:hidden="!plan.note" :hidden="!item.note"
:text="plan.note" :text="item.note"
/> />
<Button <Button
:hidden="!edit" :hidden="!edit"
col="1" col="2"
class="ico min" class="ico si"
:text="icon.x" :text="icon.x"
@tap="removeRecipe(plan.id)" @tap="removeRecipe(item.id)"
/> />
</RGridLayout> </RGridLayout>
</StackLayout> </v-template>
<v-template>
<StackLayout class="listSpace"> </StackLayout>
</v-template>
</CollectionView>
</StackLayout> </StackLayout>
</StackLayout> </StackLayout>
</ScrollView> </ScrollView>
<GridLayout rowSpan="2" rows="*, auto" v-if="!mealPlans.length"> <GridLayout rowSpan="2" rows="*, auto" v-if="!mealPlans.length">
<StackLayout row="1" class="emptyState"> <StackLayout row="1" class="empty">
<RLabel class="title" :text="'ehwmp' | L" /> <RLabel class="tb t3 tw" :text="'ehwmp' | L" />
<RLabel :text="'plsCrt' | L" /> <RLabel class="tw" :text="'plsCrt' | L" />
</StackLayout> </StackLayout>
</GridLayout> </GridLayout>
<RGridLayout <RGridLayout
@ -172,12 +185,24 @@
:action="hideBar" :action="hideBar"
:onload="sbLoad" :onload="sbLoad"
/> />
<Label
rowSpan="3"
class="edge hal"
:class="{ 'f r': RTL }"
@swipe="swipeBack($event, navigateBack)"
/>
<Label
rowSpan="3"
class="edge har rtl"
:class="{ r: RTL, f: !RTL }"
@swipe="swipeBack($event, navigateBack)"
/>
</GridLayout> </GridLayout>
</Page> </Page>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Frame, Observable, CoreTypes, Screen } from "@nativescript/core"; import { Frame, Observable, Screen } from "@nativescript/core";
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import ViewRecipe from "./ViewRecipe.vue"; import ViewRecipe from "./ViewRecipe.vue";
import EditRecipe from "./EditRecipe.vue"; import EditRecipe from "./EditRecipe.vue";
@ -200,29 +225,16 @@ export default {
data() { data() {
return { return {
mealTypes: ["breakfast", "lunch", "dinner", "snacks"], mealTypes: ["breakfast", "lunch", "dinner", "snacks"],
year: 2021, year: 0,
monthNames: [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
],
month: 0, month: 0,
date: null, date: 0,
edit: 0, edit: 0,
scrollPos: 1, scrollPos: 1,
appbar: null, appbar: 0,
snackbar: null, snackbar: 0,
listView: 0,
countdown: 5, countdown: 5,
snackMsg: null, snackMsg: 0,
showUndo: 0, showUndo: 0,
undo: 0, undo: 0,
temp: 0, temp: 0,
@ -241,6 +253,9 @@ export default {
todaysTime() { todaysTime() {
return new Date(this.year, this.month, this.date, 0).getTime(); return new Date(this.year, this.month, this.date, 0).getTime();
}, },
listHeight() {
return Math.floor(Screen.mainScreen.heightDIPs);
},
getRecipes() { getRecipes() {
if (this.mealPlans.length) { if (this.mealPlans.length) {
return this.mealPlans.reduce((acc, e) => { return this.mealPlans.reduce((acc, e) => {
@ -253,6 +268,7 @@ export default {
}, },
calRows() { calRows() {
let h = (Screen.mainScreen.widthDIPs - 32) / 8; let h = (Screen.mainScreen.widthDIPs - 32) / 8;
if (h < 48) h = 48;
let pv = this.plannerView; let pv = this.plannerView;
return pv != "d" ? `${h}, `.repeat(pv == "wk" ? 1 : 6) + h : 0; return pv != "d" ? `${h}, `.repeat(pv == "wk" ? 1 : 6) + h : 0;
}, },
@ -296,7 +312,7 @@ export default {
date.setDate(date.getDate() - date.getDay() + this.mondayFirst), date.setDate(date.getDate() - date.getDay() + this.mondayFirst),
date.setDate(date.getDate() + (pv == "mnth" ? 41 : 6)) date.setDate(date.getDate() + (pv == "mnth" ? 41 : 6))
) )
: 0; : [];
}, },
isExactlyToday() { isExactlyToday() {
let d = new Date(); let d = new Date();
@ -307,9 +323,7 @@ export default {
); );
}, },
hasRecipes() { hasRecipes() {
return this.mealTypes.filter( return this.mpItems.length > 1;
(e) => this.getRecipes[e] && this.getRecipes[e].length
).length;
}, },
noImg() { noImg() {
return /simple|minimal/.test(this.layout); return /simple|minimal/.test(this.layout);
@ -317,12 +331,65 @@ export default {
noAttr() { noAttr() {
return /minimal/.test(this.layout); return /minimal/.test(this.layout);
}, },
mpItems() {
let pv = this.plannerView;
let days =
pv == "wk"
? this.getCal.slice(0, 7)
: [
{
d: this.date,
m: this.month,
y: this.year,
},
];
let meals = {};
for (let i = 0; i < (pv == "wk" ? 7 : 1); i++)
meals[i] = this.getRecipesOn(days[i]);
let plans = [];
for (const k1 in meals) {
if (Object.keys(meals[k1]).length && pv != "d")
plans.push({
type: 0,
date: this.formattedDate(1, days[k1]),
d: days[k1].d,
});
if (Object.keys(meals[k1]).length) {
this.mealTypes.forEach((e) => {
if (meals[k1][e]) {
plans.push({
type: 1,
mealType: e,
});
meals[k1][e].forEach(({ id, recipeID, note }) => {
if (recipeID) {
plans.push({
type: 2,
id,
image: this.getRecipeImage(recipeID),
title: this.getRecipeTitle(recipeID),
size: this.getYield(id),
});
} else {
plans.push({
type: 3,
id,
note,
});
}
});
}
});
}
}
plans.push({});
return plans;
},
}, },
methods: { methods: {
...mapActions(["addMealPlanAction", "deleteMealPlanAction"]), ...mapActions(["addMealPlanAction", "deleteMealPlanAction"]),
pgLoad({ object }) { pgLoad({ object }) {
object.bindingContext = new Observable(); object.bindingContext = new Observable();
if (!this.date || this.date === new Date().getDate()) this.goToToday();
this.showBar(); this.showBar();
}, },
abLoad({ object }) { abLoad({ object }) {
@ -331,6 +398,9 @@ export default {
sbLoad({ object }) { sbLoad({ object }) {
this.snackbar = object; this.snackbar = object;
}, },
cvLoad({ object }) {
this.listView = object;
},
svScroll(args) { svScroll(args) {
let scrollUp; let scrollUp;
let y = args.scrollY; let y = args.scrollY;
@ -338,19 +408,8 @@ export default {
scrollUp = y < this.scrollPos; scrollUp = y < this.scrollPos;
this.scrollPos = Math.abs(y); this.scrollPos = Math.abs(y);
let ab = this.appbar.translateY; let ab = this.appbar.translateY;
if (!scrollUp && ab == 0) { if (!scrollUp && ab == 0) this.animateBar(this.appbar, 0);
this.appbar.animate({ else if (scrollUp && ab == 64) this.animateBar(this.appbar, 1);
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,
});
}
} }
}, },
@ -359,12 +418,7 @@ export default {
object.android.setGravity(n); object.android.setGravity(n);
}, },
showBar() { showBar() {
// this.appbar.translateY = 0; this.animateBar(this.appbar, 1);
this.appbar.animate({
translate: { x: 0, y: 0 },
duration: 200,
curve: CoreTypes.AnimationCurve.ease,
});
}, },
getrow(i) { getrow(i) {
return Math.floor(1 + i / 7); return Math.floor(1 + i / 7);
@ -382,14 +436,10 @@ export default {
let r = this.recipes.filter((e) => e.id === id)[0]; let r = this.recipes.filter((e) => e.id === id)[0];
return r ? r.title : `[ ${this.$options.filters.L("resNF")} ]`; return r ? r.title : `[ ${this.$options.filters.L("resNF")} ]`;
}, },
getRecipeTotalTime(id) {
let r = this.recipes.filter((e) => e.id === id)[0];
return r ? this.totalTime(r.prepTime, r.cookTime).time : "00:00";
},
getYield(id) { getYield(id) {
let mp = this.mealPlans.filter((e) => e.id == id)[0]; let mp = this.mealPlans.filter((e) => e.id == id)[0];
let r = this.recipes.filter((e) => e.id === mp.recipeID)[0]; let r = this.recipes.filter((e) => e.id === mp.recipeID)[0];
return r ? `${this.getLocaleN(mp.quantity)} ${localize(r.yieldUnit)}` : 1; return r ? `${this.getLocaleN(mp.quantity)} ${localize(r.yieldUnit)}` : 0;
}, },
// NavigationHandlers // NavigationHandlers
@ -447,7 +497,7 @@ export default {
this.date = d.getDate(); this.date = d.getDate();
}, },
dayClasses({ d, m }) { dayClasses({ d, m }) {
let classes = "min "; let classes = "sst ";
let dt1 = new Date(); let dt1 = new Date();
let dt2 = new Date(this.year, m, d, 0).getTime(); let dt2 = new Date(this.year, m, d, 0).getTime();
if ( if (
@ -457,7 +507,7 @@ export default {
d == dt1.getDate() d == dt1.getDate()
) )
classes += "tb "; classes += "tb ";
classes += this.date == d && this.month == m ? "hl " : "fb "; classes += this.date == d && this.month == m ? "select " : "fb ";
if (!!this.mealPlans.filter((e) => e.date == dt2).length) if (!!this.mealPlans.filter((e) => e.date == dt2).length)
classes += "accent "; classes += "accent ";
if (this.month != m) classes += "sub"; if (this.month != m) classes += "sub";
@ -471,12 +521,18 @@ export default {
}, },
toggleEditMode() { toggleEditMode() {
this.edit = !this.edit; this.edit = !this.edit;
this.listView.refresh();
}, },
openMonthYearPicker() { openMonthYearPicker() {
let monthNames = [...Array(12).keys()].map((m) =>
new Intl.DateTimeFormat("en-IN", {
month: "short",
}).format(new Date(2021, m, 1, 0))
);
this.$showModal(DMYPicker, { this.$showModal(DMYPicker, {
props: { props: {
title: "gtD", title: "gtD",
monthNames: this.monthNames, monthNames,
currentD: this.date, currentD: this.date,
currentM: this.month, currentM: this.month,
currentY: this.year, currentY: this.year,
@ -621,7 +677,7 @@ export default {
this.showUndo = 1; this.showUndo = 1;
this.snackMsg = message; this.snackMsg = message;
this.countdown = 5; this.countdown = 5;
this.animateBar(this.snackbar, 1).then(() => { this.animateBar(this.snackbar, 1, 1).then(() => {
let a = 5; let a = 5;
clearInterval(barTimer); clearInterval(barTimer);
barTimer = setInterval(() => { barTimer = setInterval(() => {
@ -651,9 +707,23 @@ export default {
this.undo = 1; this.undo = 1;
}, },
// ListHandlers
getRecipesOn(d) {
let date = new Date(d.y, d.m, d.d, 0, 0, 0);
if (this.mealPlans.length) {
return this.mealPlans.reduce((acc, e) => {
if (e.date == date.getTime()) {
acc[e.mealType] = [...(acc[e.mealType] || []), e];
}
return acc;
}, {});
} else return {};
},
// Helpers // Helpers
formattedDate(v) { formattedDate(v, fd) {
let d = new Date(this.year, this.month, this.date, 0, 0, 0); if (fd) fd = new Date(fd.y, fd.m, fd.d, 0, 0, 0);
let dt = new Date(this.year, this.month, this.date, 0, 0, 0);
let today = new Date(); let today = new Date();
let myToday = new Date( let myToday = new Date(
today.getFullYear(), today.getFullYear(),
@ -685,9 +755,9 @@ export default {
options.day = "numeric"; options.day = "numeric";
options.month = "short"; options.month = "short";
} }
let date = new Intl.DateTimeFormat(null, options).format(d); let date = new Intl.DateTimeFormat(null, options).format(fd || dt);
let val; let val;
switch (d.getTime()) { switch ((fd || dt).getTime()) {
case ystr: case ystr:
val = "ystr"; val = "ystr";
break; break;
@ -699,18 +769,22 @@ export default {
break; break;
} }
return v return v
? [ystr, tdy, tmrw].some((e) => e == d.getTime()) ? [ystr, tdy, tmrw].some((e) => e == (fd || dt).getTime())
? localize(val) ? localize(val)
: date : date
: date; : date;
}, },
mYPicker({ object, action }) { mYPicker({ object, action }) {
object.className = action.match(/down|move/) ? "month fade" : "month"; this.touchFade(object, action);
if (action == "up") this.openMonthYearPicker(); if (action == "up") this.openMonthYearPicker();
}, },
touchRecipe({ object, action }) { touchRecipe({ object, action }) {
object.className = action.match(/down|move/) ? "fade" : ""; this.touchFade(object, action);
}, },
}, },
created() {
// if (!this.date || this.date === new Date().getDate()) this.goToToday();
this.goToToday();
},
}; };
</script> </script>

View file

@ -10,7 +10,11 @@
paddingBottom="24" paddingBottom="24"
> >
<StackLayout> <StackLayout>
<RLabel class="pageTitle" paddingBottom="8" :text="recipe.title" /> <RLabel
class="pTitle tw tb"
paddingBottom="8"
:text="recipe.title"
/>
<StackLayout <StackLayout
:class="{ f: RTL }" :class="{ f: RTL }"
margin="0 12" margin="0 12"
@ -22,10 +26,7 @@
v-for="n in 5" v-for="n in 5"
:key="n" :key="n"
:text="recipe.rating < n ? icon.star : icon.starred" :text="recipe.rating < n ? icon.star : icon.starred"
@tap=" @touch="touchRate($event, n)"
recipe.rating == 1 && n == 1 ? setRating(0) : setRating(n)
"
@longPress="setRating(n)"
/> />
</StackLayout> </StackLayout>
</StackLayout> </StackLayout>
@ -108,8 +109,7 @@
</RGridLayout> </RGridLayout>
<StackLayout @loaded="onIngsLoad"> <StackLayout @loaded="onIngsLoad">
<RLabel <RLabel
padding="0 16" class="section t2 tb tw"
class="sectionTitle"
:hidden="!recipe.ingredients.length" :hidden="!recipe.ingredients.length"
:text="getTitleCount('ings', 'ingredients')" :text="getTitleCount('ings', 'ingredients')"
/> />
@ -118,18 +118,17 @@
orientation="horizontal" orientation="horizontal"
v-for="(item, index) in recipe.ingredients" v-for="(item, index) in recipe.ingredients"
:key="index + 'ing'" :key="index + 'ing'"
class="ingredient" class="check"
@touch="touchIngredient($event, index)" @touch="touchIngredient($event, index)"
> >
<Button class="ico min" :text="icon.uncheck" /> <Button class="ico si" :text="icon.uncheck" />
<RLabel class="value tw" :text="getIngredientItem(item)" /> <RLabel class="v tw" :text="getIngredientItem(item)" />
</RStackLayout> </RStackLayout>
</StackLayout> </StackLayout>
<StackLayout @loaded="onInsLoad"> <StackLayout @loaded="onInsLoad">
<RLabel <RLabel
padding="0 16"
:hidden="!recipe.instructions.length" :hidden="!recipe.instructions.length"
class="sectionTitle" class="section t2 tb tw"
:text="getTitleCount('inss', 'instructions')" :text="getTitleCount('inss', 'instructions')"
/> />
<RStackLayout <RStackLayout
@ -138,40 +137,43 @@
@touch="touchInstruction" @touch="touchInstruction"
v-for="(instruction, index) in recipe.instructions" v-for="(instruction, index) in recipe.instructions"
:key="index + 'ins'" :key="index + 'ins'"
class="instruction" class="check"
> >
<Button class="count ico min" :text="getLocaleN(index + 1)" /> <Button class="tb t3 ico si" :text="getLocaleN(index + 1)" />
<RLabel class="value tw" :text="instruction" /> <RLabel class="v tw" :text="instruction" />
</RStackLayout> </RStackLayout>
</StackLayout> </StackLayout>
<RLabel <RLabel
@loaded="onCmbLoad" @loaded="onCmbLoad"
padding="0 16"
:hidden="!recipe.combinations.length" :hidden="!recipe.combinations.length"
class="sectionTitle" class="section t2 tb tw"
:text="getTitleCount('cmbs', 'combinations')" :text="getTitleCount('cmbs', 'combinations')"
/> />
<Button <Button
v-for="(combination, index) in recipe.combinations" v-for="(combination, index) in recipe.combinations"
:key="index + 'comb'" :key="index + 'comb'"
class="combination" class="comb tw hal lh4 fb"
:class="{ r: RTL }"
:text="getCombinationTitle(combination)" :text="getCombinationTitle(combination)"
@tap="viewCombination(combination)" @tap="viewCombination(combination)"
/> />
<RLabel <RLabel
@loaded="onNosTLoad" @loaded="onNosTLoad"
padding="0 16"
:hidden="!recipe.notes.length" :hidden="!recipe.notes.length"
class="sectionTitle" class="section t2 tb tw"
:text="getTitleCount('nos', 'notes')" :text="getTitleCount('nos', 'notes')"
/> />
<StackLayout @loaded="onNosLoad" padding="0 16"> </StackLayout> <StackLayout @loaded="onNosLoad"> </StackLayout>
<Label class="dateInfo sub tw" :text="getDates().uc" /> <Label
padding="32 16 16"
class="lh4 t5 sub tw"
:text="getDates().uc"
/>
</StackLayout> </StackLayout>
</ScrollView> </ScrollView>
<RLabel <RLabel
@loaded="onStickyLoad" @loaded="onStickyLoad"
class="sectionTitle sticky" class="t2 tb tw sticky"
:hidden="!stickyTitle" :hidden="!stickyTitle"
:text="stickyTitle" :text="stickyTitle"
/> />
@ -262,10 +264,23 @@
stretch="aspectFit" stretch="aspectFit"
@loaded="onImgViewLoad" @loaded="onImgViewLoad"
:src="recipe.image" :src="recipe.image"
class="photoviewer" class="imgViewer"
/> />
</AbsoluteLayout> </AbsoluteLayout>
<WebView @loaded="wvLoad" hidden /> <WebView @loaded="wvLoad" hidden />
<Label
rowSpan="3"
colSpan="3"
class="edge hal"
:class="{ 'f r': RTL }"
@swipe="swipeBack"
/>
<Label
rowSpan="3"
colSpan="3"
class="edge har rtl f"
@swipe="swipeBack"
/>
</GridLayout> </GridLayout>
</Page> </Page>
</template> </template>
@ -328,7 +343,7 @@ export default {
}; };
}, },
computed: { computed: {
...mapState(["icon", "recipes", "RTL"]), ...mapState(["icon", "recipes", "RTL", "awakeViewer"]),
tempYieldQuantity() { tempYieldQuantity() {
return Math.abs(this.yieldMultiplier) > 0 return Math.abs(this.yieldMultiplier) > 0
? Math.abs(parseFloat(this.yieldMultiplier)) ? Math.abs(parseFloat(this.yieldMultiplier))
@ -363,7 +378,7 @@ export default {
object.bindingContext = new Observable(); object.bindingContext = new Observable();
if (this.yieldMultiplier == this.recipe.yieldQuantity) if (this.yieldMultiplier == this.recipe.yieldQuantity)
this.yieldMultiplier = this.recipe.yieldQuantity; this.yieldMultiplier = this.recipe.yieldQuantity;
utils.keepScreenOn(1); if (this.awakeViewer) utils.keepScreenOn(1);
this.syncCombinations(); this.syncCombinations();
this.view = object.page.getViewById("printview"); this.view = object.page.getViewById("printview");
}, },
@ -465,27 +480,15 @@ export default {
} }
}, },
showBars() { showBars() {
this.appbar.animate({ this.animateBar(this.appbar, 1);
translate: { x: 0, y: 0 }, this.animateBar(this.sidebar, 1);
duration: 200,
curve: CoreTypes.AnimationCurve.ease,
});
this.sidebar.animate({
translate: { x: 0, y: 0 },
duration: 200,
curve: CoreTypes.AnimationCurve.ease,
});
}, },
hideBars() { hideBars() {
this.appbar.animate({ this.animateBar(this.appbar, 0);
translate: { x: 0, y: 64 },
duration: 200,
curve: CoreTypes.AnimationCurve.ease,
});
this.sidebar.animate({ this.sidebar.animate({
translate: { x: this.RTL ? -64 : 64, y: 0 }, translate: { x: this.RTL ? -64 : 64, y: 0 },
duration: 200, duration: 200,
curve: CoreTypes.AnimationCurve.ease, curve: CoreTypes.AnimationCurve.easeIn,
}); });
}, },
@ -554,7 +557,7 @@ export default {
"triedInfo", "triedInfo",
this.niceDate(this.recipe.lastTried) this.niceDate(this.recipe.lastTried)
); );
this.animateBar(this.toastbar, 1); this.animateBar(this.toastbar, 1, 1);
let a = 10; let a = 10;
clearInterval(barTimer); clearInterval(barTimer);
barTimer = setInterval(() => a-- < 1 && this.hideBar(), 1000); barTimer = setInterval(() => a-- < 1 && this.hideBar(), 1000);
@ -657,9 +660,7 @@ export default {
// }); // });
}, },
touchIngredient({ object, action }, index) { touchIngredient({ object, action }, index) {
object.className = action.match(/down|move/) this.touchFade(object, action);
? "ingredient fade"
: "ingredient";
if (action == "up") this.checkChange(object, index); if (action == "up") this.checkChange(object, index);
}, },
checkChange(obj, index) { checkChange(obj, index) {
@ -681,25 +682,23 @@ export default {
}, },
touchInstruction({ object, action }) { touchInstruction({ object, action }) {
let hasDone = object.className.includes("done"); let hasDone = object.className.includes("done");
object.className = action.match(/down|move/) if (!hasDone) this.touchFade(object, action);
? `instruction ${hasDone ? "done" : "fade"}`
: `instruction ${hasDone ? "done" : ""}`;
if (action == "up") this.stepDone(object); if (action == "up") this.stepDone(object);
}, },
stepDone(object) { stepDone(object) {
let a = object; let a = object;
if (a.className.includes("done")) { if (a.className.includes("done")) {
a.className = "instruction"; a.className = "check";
this.stepsDid--; this.stepsDid--;
} else { } else {
a.className = "instruction done"; a.className = "check done";
this.stepsDid++; this.stepsDid++;
} }
}, },
clearSteps() { clearSteps() {
this.stepsDid = 0; this.stepsDid = 0;
for (let i = 1; i < this.inscon.getChildrenCount(); i++) { for (let i = 1; i < this.inscon.getChildrenCount(); i++) {
this.inscon.getChildAt(i).className = "instruction"; this.inscon.getChildAt(i).className = "check";
} }
}, },
getDates() { getDates() {
@ -838,11 +837,16 @@ export default {
}); });
if (setDate) this.$navigateBack(); if (setDate) this.$navigateBack();
}, },
setRating(rating) { touchRate({ object, action }, r) {
if (rating !== this.recipe.rating || rating === 1) { this.touchFade(object, action);
if (action == "up") this.setRating(r);
},
setRating(r) {
if (r !== this.recipe.rating || r === 1) {
if (this.recipe.rating == 1 && r == 1) r = 0;
this.setRatingAction({ this.setRatingAction({
id: this.currentRecipeID, id: this.currentRecipeID,
rating, rating: r,
}); });
} }
}, },
@ -861,7 +865,7 @@ export default {
createNote(note) { createNote(note) {
let regex = /(https?:\/\/[^\s]+)/g; let regex = /(https?:\/\/[^\s]+)/g;
const lbl = new RLabel(); const lbl = new RLabel();
lbl.className = "note"; lbl.className = "note tw";
lbl.textWrap = true; lbl.textWrap = true;
let fString = new FormattedString(); let fString = new FormattedString();
let arr = note.split(regex); let arr = note.split(regex);
@ -928,7 +932,7 @@ export default {
height: sw, height: sw,
translate: { x: this.RTL ? -16 : 112 - sw, y: (sh - sw) / 3 }, translate: { x: this.RTL ? -16 : 112 - sw, y: (sh - sw) / 3 },
duration: 200, duration: 200,
curve: CoreTypes.AnimationCurve.ease, curve: CoreTypes.AnimationCurve.easeOut,
}) })
) )
.then(() => .then(() =>
@ -936,7 +940,7 @@ export default {
height: sh, height: sh,
translate: { x: this.RTL ? -16 : 112 - sw, y: -((sh - sw) / 6) }, translate: { x: this.RTL ? -16 : 112 - sw, y: -((sh - sw) / 6) },
duration: 200, duration: 200,
curve: CoreTypes.AnimationCurve.ease, curve: CoreTypes.AnimationCurve.easeOut,
}) })
); );
}, },
@ -949,7 +953,7 @@ export default {
height: sw, height: sw,
translate: { x: this.RTL ? -16 : 112 - sw, y: (sh - sw) / 3 }, translate: { x: this.RTL ? -16 : 112 - sw, y: (sh - sw) / 3 },
duration: 200, duration: 200,
curve: CoreTypes.AnimationCurve.ease, curve: CoreTypes.AnimationCurve.easeIn,
}) })
.then(() => .then(() =>
pv.animate({ pv.animate({
@ -957,7 +961,7 @@ export default {
height: 96, height: 96,
translate: { x: 0, y: 0 }, translate: { x: 0, y: 0 },
duration: 200, duration: 200,
curve: CoreTypes.AnimationCurve.ease, curve: CoreTypes.AnimationCurve.easeIn,
}) })
) )
.then(() => .then(() =>
@ -1112,9 +1116,8 @@ export default {
// Helpers // Helpers
touchYield({ object, action }) { touchYield({ object, action }) {
object.className = action.match(/down|move/) this.touchFade(object, action);
? "value accent fade"
: "value accent";
if (action == "up") this.changeYield(); if (action == "up") this.changeYield();
}, },
}, },

View file

@ -1,9 +1,5 @@
<template> <template>
<Page <Page @loaded="mLoad" backgroundColor="transparent" :class="theme">
@loaded="transparentPage"
backgroundColor="transparent"
:class="theme"
>
<GridLayout <GridLayout
columns="*" columns="*"
:rows="`auto, auto, ${stretch ? '*' : 'auto'}, auto`" :rows="`auto, auto, ${stretch ? '*' : 'auto'}, auto`"
@ -30,13 +26,13 @@
<RGridLayout :rtl="RTL" row="3" columns="auto, *, auto" class="actions"> <RGridLayout :rtl="RTL" row="3" columns="auto, *, auto" class="actions">
<Button <Button
:hidden="!action" :hidden="!action"
class="text sm" class="text tb st fb"
:text="action | L" :text="action | L"
@tap="$modal.close(action)" @tap="$modal.close(action)"
/> />
<Button <Button
col="2" col="2"
class="text sm" class="text tb st fb"
:text="'cBtn' | L" :text="'cBtn' | L"
@tap="$modal.close(0)" @tap="$modal.close(0)"
/> />
@ -158,12 +154,7 @@ export default {
} }
}, },
touch({ object, action }): void { touch({ object, action }): void {
let classes = object.className; this.touchFade(object, action);
object.className = action.match(/down|move/)
? !classes.includes("fade")
? classes + " fade"
: classes
: classes.replace(/ fade/g, "");
}, },
}, },
created() { created() {

View file

@ -1,9 +1,5 @@
<template> <template>
<Page <Page @loaded="mLoad" backgroundColor="transparent" :class="theme">
@loaded="transparentPage"
backgroundColor="transparent"
:class="theme"
>
<GridLayout columns="*" rows="auto, auto, *, auto" class="modal"> <GridLayout columns="*" rows="auto, auto, *, auto" class="modal">
<RLabel class="title" :text="title | L" /> <RLabel class="title" :text="title | L" />
<StackLayout <StackLayout
@ -29,26 +25,22 @@
</ListView> </ListView>
<Label <Label
row="2" row="2"
class="noResInfo" padding="16"
:hidden="recipes.length" lineHeight="4"
:text="'recListEmp' | L" class="tc tw"
/> :hidden="!noResult"
<Label :text="noResult | L"
row="2"
class="noResInfo"
:hidden="filteredRecipes.length || !searchQuery"
:text="'noRecs' | L"
/> />
<RGridLayout :rtl="RTL" row="3" columns="auto, *, auto" class="actions"> <RGridLayout :rtl="RTL" row="3" columns="auto, *, auto" class="actions">
<Button <Button
:hidden="!action" :hidden="!action"
class="text sm" class="text tb st fb"
:text="action | L" :text="action | L"
@tap="$modal.close(action)" @tap="$modal.close(action)"
/> />
<Button <Button
col="2" col="2"
class="text sm" class="text tb st fb"
:text="'cBtn' | L" :text="'cBtn' | L"
@tap="$modal.close(0)" @tap="$modal.close(0)"
/> />
@ -82,6 +74,12 @@ export default {
}) })
.filter((e) => this.recipeFilter(e)); .filter((e) => this.recipeFilter(e));
}, },
noResult() {
if (!this.recipes.length) return "recListEmp";
else if (!this.filteredRecipes.length && this.searchQuery)
return "noRecs";
else 0;
},
}, },
methods: { methods: {
tapAction(recipe) { tapAction(recipe) {
@ -101,9 +99,7 @@ export default {
); );
}, },
touch({ object, action }, recipe) { touch({ object, action }, recipe) {
object.className = action.match(/down|move/) this.touchFade(object, action);
? "listItem fade"
: "listItem ";
if (action == "up") this.tapAction(recipe); if (action == "up") this.tapAction(recipe);
}, },
}, },

View file

@ -1,6 +1,6 @@
<template> <template>
<Page <Page
@loaded="transparentPage" @loaded="mLoad"
backgroundColor="transparent" backgroundColor="transparent"
:class="theme" :class="theme"
> >
@ -16,13 +16,13 @@
<Button <Button
v-if="cancelButtonText" v-if="cancelButtonText"
col="1" col="1"
class="text sm" class="text tb st fb"
:text="cancelButtonText | L" :text="cancelButtonText | L"
@tap="$modal.close(0)" @tap="$modal.close(0)"
/> />
<Button <Button
col="2" col="2"
class="text sm" class="text tb st fb"
:text="okButtonText | L" :text="okButtonText | L"
@tap="$modal.close(1)" @tap="$modal.close(1)"
/> />

View file

@ -1,6 +1,6 @@
<template> <template>
<Page <Page
@loaded="transparentPage" @loaded="mLoad"
backgroundColor="transparent" backgroundColor="transparent"
:class="theme" :class="theme"
> >
@ -33,13 +33,13 @@
<RGridLayout :rtl="RTL" row="2" columns="*, auto, auto" class="actions"> <RGridLayout :rtl="RTL" row="2" columns="*, auto, auto" class="actions">
<Button <Button
col="1" col="1"
class="text sm" class="text tb st fb"
:text="'cBtn' | L" :text="'cBtn' | L"
@tap="$modal.close(0)" @tap="$modal.close(0)"
/> />
<Button <Button
col="2" col="2"
class="text sm" class="text tb st fb"
:text="'SET' | L" :text="'SET' | L"
@tap="$modal.close(selected)" @tap="$modal.close(selected)"
/> />

View file

@ -5,19 +5,19 @@
<ScrollView orientation="horizontal" row="1" @loaded="onScrollLoad"> <ScrollView orientation="horizontal" row="1" @loaded="onScrollLoad">
<RStackLayout :rtl="RTL" class="filters" orientation="horizontal"> <RStackLayout :rtl="RTL" class="filters" orientation="horizontal">
<GridLayout <GridLayout
rows="48" rows="32"
columns="auto, auto" columns="32, auto"
class="segment rtl" class="segment rtl"
v-for="(item, index) in pathList" v-for="(item, index) in pathList"
:key="index" :key="index"
:class="{ select: filterType === item.type }" :class="{ select: filter === item.type }"
@touch="touchSelector($event, item.type)" @touch="touchSelector($event, item.type)"
> >
<Label class="ico" :text="icon[item.type]" /> <Label class="ico tc vc" :text="icon[item.type]" />
<Label <Label
:hidden="!item.title" :hidden="!item.title"
class="value" class="v vc"
:class="{ r: RTL }" :class="{ f: RTL }"
:text="item.title" :text="item.title"
col="1" col="1"
/> />
@ -41,16 +41,16 @@
columns="auto, *, auto, auto" columns="auto, *, auto, auto"
class="actions" class="actions"
> >
<Button class="text sm" :text="'rest' | L" @tap="resetFilter" /> <Button class="text tb st fb" :text="'rstBtn' | L" @tap="resetFilter" />
<Button <Button
col="2" col="2"
class="text sm" class="text tb st fb"
:text="'cBtn' | L" :text="'cBtn' | L"
@tap="$modal.close()" @tap="$modal.close()"
/> />
<Button <Button
col="3" col="3"
class="text sm" class="text tb st fb"
:text="'apply' | L" :text="'apply' | L"
@tap="applyFilter" @tap="applyFilter"
/> />
@ -66,7 +66,7 @@ let filterTimer;
export default { export default {
data() { data() {
return { return {
filterType: "cuisine", filter: "cuisine",
localCuisine: null, localCuisine: null,
localCategory: null, localCategory: null,
localTag: null, localTag: null,
@ -100,7 +100,7 @@ export default {
title: localize(this.localTag), title: localize(this.localTag),
}, },
]; ];
switch (this.filterType) { switch (this.filter) {
case "cuisine": case "cuisine":
return arr.slice(0, -2); return arr.slice(0, -2);
case "category": case "category":
@ -109,7 +109,7 @@ export default {
return arr; return arr;
}, },
filterList() { filterList() {
switch (this.filterType) { switch (this.filter) {
case "cuisine": case "cuisine":
return this.cuisineList; return this.cuisineList;
case "category": case "category":
@ -175,19 +175,19 @@ export default {
methods: { methods: {
...mapActions(["setCuisine", "setCategory", "setTag", "clearFilter"]), ...mapActions(["setCuisine", "setCategory", "setTag", "clearFilter"]),
pgLoad(args) { pgLoad(args) {
this.transparentPage(args); this.mLoad(args);
this.localCuisine = this.selCuisine; this.localCuisine = this.selCuisine;
this.localCategory = this.selCategory; this.localCategory = this.selCategory;
this.localTag = this.selTag; this.localTag = this.selTag;
if (this.localCuisine) this.filterType = "category"; if (this.localCuisine) this.filter = "category";
if (this.localCategory && this.localTag) this.filterType = "tag"; if (this.localCategory && this.localTag) this.filter = "tag";
this.scrollToRight(); this.scrollToRight();
}, },
onScrollLoad(args) { onScrollLoad(args) {
this.scrollview = args.object; this.scrollview = args.object;
}, },
setFilterType(type) { setFilterType(type) {
this.filterType = type; this.filter = type;
switch (type) { switch (type) {
case "cuisine": case "cuisine":
this.localCategory = null; this.localCategory = null;
@ -210,14 +210,14 @@ export default {
}, },
setRecipeFilter(item) { setRecipeFilter(item) {
this.reset = 0; this.reset = 0;
switch (this.filterType) { switch (this.filter) {
case "cuisine": case "cuisine":
this.localCuisine = item; this.localCuisine = item;
this.filterType = "category"; this.filter = "category";
break; break;
case "category": case "category":
this.localCategory = item; this.localCategory = item;
if (this.tagList.length) this.filterType = "tag"; if (this.tagList.length) this.filter = "tag";
break; break;
default: default:
this.localTag = item; this.localTag = item;
@ -233,23 +233,19 @@ export default {
this.$modal.close(this.reset); this.$modal.close(this.reset);
}, },
resetFilter() { resetFilter() {
this.filterType = "cuisine"; this.filter = "cuisine";
this.localCuisine = this.localCategory = this.localTag = null; this.localCuisine = this.localCategory = this.localTag = null;
this.reset = 1; this.reset = 1;
}, },
touch({ object, action }, item) { touch({ object, action }, item) {
object.className = action.match(/down|move/) this.touchFade(object, action);
? "listItem fade"
: "listItem ";
if (action == "up") this.setRecipeFilter(item); if (action == "up") this.setRecipeFilter(item);
}, },
touchSelector({ object, action }, type) { touchSelector({ object, action }, type) {
let selected = this.filterType == type; if (this.filter != type) {
let classes = `segment ${this.RTL ? "rtl" : ""} `; this.touchFade(object, action);
object.className = action.match(/down|move/)
? `${classes}${selected ? "select" : "fade"}`
: `${classes}${selected && "select"}`;
if (action == "up") this.setFilterType(type); if (action == "up") this.setFilterType(type);
}
}, },
}, },
}; };

View file

@ -1,6 +1,6 @@
<template> <template>
<Page <Page
@loaded="transparentPage" @loaded="mLoad"
backgroundColor="transparent" backgroundColor="transparent"
:class="theme" :class="theme"
> >
@ -28,13 +28,13 @@
<RGridLayout :rtl="RTL" row="2" columns="*, auto, auto" class="actions"> <RGridLayout :rtl="RTL" row="2" columns="*, auto, auto" class="actions">
<Button <Button
col="1" col="1"
class="text sm" class="text tb st fb"
:text="'cBtn' | L" :text="'cBtn' | L"
@tap="$modal.close(0)" @tap="$modal.close(0)"
/> />
<Button <Button
col="2" col="2"
class="text sm" class="text tb st fb"
:text="action | L" :text="action | L"
@tap="$modal.close(text)" @tap="$modal.close(text)"
/> />

View file

@ -1,6 +1,6 @@
<template> <template>
<Page <Page
@loaded="transparentPage" @loaded="mLoad"
backgroundColor="transparent" backgroundColor="transparent"
:class="theme" :class="theme"
> >
@ -28,13 +28,13 @@
<RGridLayout :rtl="RTL" row="2" columns="*, auto, auto" class="actions"> <RGridLayout :rtl="RTL" row="2" columns="*, auto, auto" class="actions">
<Button <Button
col="1" col="1"
class="text sm" class="text tb st fb"
:text="'cBtn' | L" :text="'cBtn' | L"
@tap="$modal.close(0)" @tap="$modal.close(0)"
/> />
<Button <Button
col="2" col="2"
class="text sm" class="text tb st fb"
:text="'SET' | L" :text="'SET' | L"
@tap="$modal.close(selectedTime)" @tap="$modal.close(selectedTime)"
/> />

View file

@ -1,9 +1,5 @@
<template> <template>
<Page <Page @loaded="mLoad" backgroundColor="transparent" :class="theme">
@loaded="transparentPage"
backgroundColor="transparent"
:class="theme"
>
<GridLayout rows="auto, auto, auto" class="modal"> <GridLayout rows="auto, auto, auto" class="modal">
<RLabel class="title" :text="title | L" /> <RLabel class="title" :text="title | L" />
<StackLayout row="1"> <StackLayout row="1">
@ -47,17 +43,22 @@
> >
<Button <Button
v-if="showPreset" v-if="showPreset"
class="text sm" class="text tb st fb"
:text="'prstBtn' | L" :text="'prstBtn' | L"
@tap="$modal.close('presets')" @tap="$modal.close('presets')"
/> />
<Button <Button
col="2" col="2"
class="text sm" class="text tb st fb"
:text="'cBtn' | L" :text="'cBtn' | L"
@tap="$modal.close(0)" @tap="$modal.close(0)"
/> />
<Button col="3" class="text sm" :text="action | L" @tap="sendRespose" /> <Button
col="3"
class="text tb st fb"
:text="action | L"
@tap="sendRespose"
/>
</RGridLayout> </RGridLayout>
</GridLayout> </GridLayout>
</Page> </Page>

View file

@ -3,15 +3,15 @@
<RGridLayout :rtl="RTL" rows="*, auto" columns="auto, *"> <RGridLayout :rtl="RTL" rows="*, auto" columns="auto, *">
<ListView rowSpan="2" colSpan="2" class="options" for="item in items"> <ListView rowSpan="2" colSpan="2" class="options" for="item in items">
<v-template if="$index == 0"> <v-template if="$index == 0">
<Label class="pageTitle" :text="'About' | L" /> <Label class="pTitle tw tb" :text="'About' | L" />
</v-template> </v-template>
<v-template if="$index == 1"> <v-template if="$index == 1">
<StackLayout class="app-info"> <StackLayout class="app-info">
<Image class="icon" src="res://logo" stretch="none" /> <Image class="icon" src="res://logo" stretch="none" />
<Label class="name tb tac" :text="'EnRecipes' | L" /> <Label class="name tb tc" :text="'EnRecipes' | L" />
<Label :text="getVersion" class="version tb tac" /> <Label :text="getVersion" class="version tb tc" />
<Label class="info tac tw" :text="'appInfo' | L" /> <Label class="info tc tw" :text="'appInfo' | L" />
</StackLayout> </StackLayout>
</v-template> </v-template>
<v-template if="$index == 8"> <v-template if="$index == 8">
@ -37,6 +37,13 @@
<GridLayout row="1" class="appbar rtl" rows="*" columns="auto, *"> <GridLayout row="1" class="appbar rtl" rows="*" columns="auto, *">
<Button class="ico" :text="icon.back" @tap="$navigateBack()" /> <Button class="ico" :text="icon.back" @tap="$navigateBack()" />
</GridLayout> </GridLayout>
<Label rowSpan="2" class="edge hal rtl" @swipe="swipeBack" />
<Label
rowSpan="2"
colSpan="2"
class="edge har rtl f"
@swipe="swipeBack"
/>
</RGridLayout> </RGridLayout>
</Page> </Page>
</template> </template>
@ -103,7 +110,7 @@ export default {
Utils.openUrl(url); Utils.openUrl(url);
}, },
touch({ object, action }, url) { touch({ object, action }, url) {
object.className = action.match(/down|move/) ? "option fade" : "option"; this.touchFade(object, action);
if (action == "up") this.openURL(url); if (action == "up") this.openURL(url);
}, },
}, },

View file

@ -5,6 +5,13 @@
<GridLayout row="1" class="appbar rtl" rows="*" columns="auto, *"> <GridLayout row="1" class="appbar rtl" rows="*" columns="auto, *">
<Button class="ico" :text="icon.back" @tap="$navigateBack()" /> <Button class="ico" :text="icon.back" @tap="$navigateBack()" />
</GridLayout> </GridLayout>
<Label rowSpan="2" class="edge hal rtl" @swipe="swipeBack" />
<Label
rowSpan="2"
colSpan="2"
class="edge har rtl f"
@swipe="swipeBack"
/>
</RGridLayout> </RGridLayout>
</Page> </Page>
</template> </template>

View file

@ -5,6 +5,13 @@
<GridLayout row="1" class="appbar rtl" rows="*" columns="auto, *"> <GridLayout row="1" class="appbar rtl" rows="*" columns="auto, *">
<Button class="ico" :text="icon.back" @tap="$navigateBack()" /> <Button class="ico" :text="icon.back" @tap="$navigateBack()" />
</GridLayout> </GridLayout>
<Label rowSpan="2" class="edge hal rtl" @swipe="swipeBack" />
<Label
rowSpan="2"
colSpan="2"
class="edge har rtl f"
@swipe="swipeBack"
/>
</RGridLayout> </RGridLayout>
</Page> </Page>
</template> </template>
@ -113,6 +120,9 @@ export default {
props: { props: {
title: "tmrSnd", title: "tmrSnd",
list: getTones.tones.map((e) => e.title), list: getTones.tones.map((e) => e.title),
selected: getTones.tones.findIndex(
(e) => e.title == this.timerSound.title
),
}, },
}).then( }).then(
(tone) => (tone) =>

View file

@ -22,8 +22,15 @@
columns="auto, *" columns="auto, *"
> >
<ActivityIndicator :busy="!!progress" /> <ActivityIndicator :busy="!!progress" />
<RLabel col="1" class="title" :text="progress" /> <RLabel margin="0 12" col="1" class="tb tw vc lh4" :text="progress" />
</RGridLayout> </RGridLayout>
<Label rowSpan="2" class="edge hal rtl" @swipe="swipeBack" />
<Label
rowSpan="2"
colSpan="2"
class="edge har rtl f"
@swipe="swipeBack"
/>
</RGridLayout> </RGridLayout>
</Page> </Page>
</template> </template>
@ -474,7 +481,7 @@ export default {
showToast(data) { showToast(data) {
this.animateBar(this.appbar, 0).then(() => { this.animateBar(this.appbar, 0).then(() => {
this.toast = data; this.toast = data;
this.animateBar(this.toastbar, 1); this.animateBar(this.toastbar, 1, 1);
utils.timer(5, (val) => !val && this.hideBar()); utils.timer(5, (val) => !val && this.hideBar());
}); });
}, },

View file

@ -5,6 +5,13 @@
<GridLayout row="1" class="appbar rtl" rows="*" columns="auto, *"> <GridLayout row="1" class="appbar rtl" rows="*" columns="auto, *">
<Button class="ico" :text="icon.back" @tap="$navigateBack()" /> <Button class="ico" :text="icon.back" @tap="$navigateBack()" />
</GridLayout> </GridLayout>
<Label rowSpan="2" class="edge hal rtl" @swipe="swipeBack" />
<Label
rowSpan="2"
colSpan="2"
class="edge har rtl f"
@swipe="swipeBack"
/>
</RGridLayout> </RGridLayout>
</Page> </Page>
</template> </template>
@ -42,9 +49,7 @@ export default {
icon: "theme", icon: "theme",
rtl: 0, rtl: 0,
title: "Theme", title: "Theme",
subTitle: localize( subTitle: localize(ApplicationSettings.getString("theme", "sysDef")),
ApplicationSettings.getString("theme", "sysDef")
),
action: this.selectThemes, action: this.selectThemes,
}, },
{ {
@ -71,6 +76,7 @@ export default {
props: { props: {
title: "lang", title: "lang",
list: [...languages], list: [...languages],
selected: this.applang,
}, },
}).then((action) => { }).then((action) => {
if (action && this.applang !== action) { if (action && this.applang !== action) {
@ -97,6 +103,7 @@ export default {
props: { props: {
title: "Theme", title: "Theme",
list: ["Light", "Dark", "Black", "sysDef", "sysDefB"], list: ["Light", "Dark", "Black", "sysDef", "sysDefB"],
selected: ApplicationSettings.getString("theme", "sysDef"),
}, },
}).then((action) => { }).then((action) => {
if ( if (
@ -116,13 +123,10 @@ export default {
props: { props: {
title: "listVM", title: "listVM",
list: ["detailed", "grid", "photogrid", "simple", "minimal"], list: ["detailed", "grid", "photogrid", "simple", "minimal"],
selected: this.layout,
}, },
}).then((action) => { }).then((mode) => {
if (action && this.layoutMode !== action) { if (mode && this.layout !== mode) this.setLayout(mode.toLowerCase());
let act = action.toLowerCase();
ApplicationSettings.setString("layout", act);
this.setLayout(act);
}
}); });
}, },
}, },

View file

@ -5,6 +5,13 @@
<GridLayout row="1" class="appbar rtl" rows="*" columns="auto, *"> <GridLayout row="1" class="appbar rtl" rows="*" columns="auto, *">
<Button class="ico" :text="icon.back" @tap="$navigateBack()" /> <Button class="ico" :text="icon.back" @tap="$navigateBack()" />
</GridLayout> </GridLayout>
<Label rowSpan="2" class="edge hal rtl" @swipe="swipeBack" />
<Label
rowSpan="2"
colSpan="2"
class="edge har rtl f"
@swipe="swipeBack"
/>
</RGridLayout> </RGridLayout>
</Page> </Page>
</template> </template>
@ -60,7 +67,8 @@ export default {
this.$showModal(Action, { this.$showModal(Action, {
props: { props: {
title: "calVM", title: "calVM",
list: ["mnth", "wk", "d"], list: ["d", "wk", "mnth"],
selected: this.plannerView,
}, },
}).then((res) => { }).then((res) => {
if (res && this.plannerView != res) this.setPlannerView(res); if (res && this.plannerView != res) this.setPlannerView(res);
@ -70,7 +78,8 @@ export default {
this.$showModal(Action, { this.$showModal(Action, {
props: { props: {
title: "admp", title: "admp",
list: ["otay", "otam", "otaw", "nvr"], list: ["otaw", "otam", "otay", "nvr"],
selected: this.planDeletion,
}, },
}).then((res) => { }).then((res) => {
if (res && this.planDeletion != res) this.setPlanDeletion(res); if (res && this.planDeletion != res) this.setPlanDeletion(res);

View file

@ -13,6 +13,13 @@
<Button class="ico" :text="icon.back" @tap="$navigateBack()" /> <Button class="ico" :text="icon.back" @tap="$navigateBack()" />
</GridLayout> </GridLayout>
<Toast :onload="tbLoad" :toast="toast" :action="hideBar" /> <Toast :onload="tbLoad" :toast="toast" :action="hideBar" />
<Label rowSpan="2" class="edge hal rtl" @swipe="swipeBack" />
<Label
rowSpan="2"
colSpan="2"
class="edge har rtl f"
@swipe="swipeBack"
/>
</RGridLayout> </RGridLayout>
</Page> </Page>
</template> </template>
@ -35,7 +42,7 @@ export default {
}; };
}, },
computed: { computed: {
...mapState(["icon", "shake", "RTL"]), ...mapState(["icon", "shake", "RTL", "edgeSwipe", "awakeViewer"]),
items() { items() {
return [ return [
{}, {},
@ -47,12 +54,28 @@ export default {
checked: !!this.shake, checked: !!this.shake,
action: this.toggleShake, action: this.toggleShake,
}, },
{
type: "switch",
icon: "awake",
title: "ksavr",
subTitle: localize("ksavrInfo"),
checked: !!this.awakeViewer,
action: this.toggleAwake,
},
{
type: "switch",
icon: "edge",
title: "esgb",
subTitle: localize("esgbInfo"),
checked: !!this.edgeSwipe,
action: this.toggleSwipe,
},
{}, {},
]; ];
}, },
}, },
methods: { methods: {
...mapActions(["setShake"]), ...mapActions(["setShake", "toggleEdgeSwipe", "toggleAwakeViewer"]),
pgLoad({ object }) { pgLoad({ object }) {
object.bindingContext = new Observable(); object.bindingContext = new Observable();
}, },
@ -63,17 +86,23 @@ export default {
this.toastbar = object; this.toastbar = object;
}, },
// SHAKE VIEW RANDOM RECIPE
toggleShake() { toggleShake() {
let checked = this.shake; let checked = this.shake;
if (checked && !utils.hasAccelerometer()) if (checked && !utils.hasAccelerometer())
this.showToast(localize("noAccSensor")); this.showToast(localize("noAccSensor"));
else this.setShake(!checked | 0); else this.setShake(+!checked);
}, },
toggleSwipe() {
this.toggleEdgeSwipe(+!this.edgeSwipe);
},
toggleAwake() {
this.toggleAwakeViewer(+!this.awakeViewer);
},
showToast(data) { showToast(data) {
this.animateBar(this.appbar, 0).then(() => { this.animateBar(this.appbar, 0).then(() => {
this.toast = data; this.toast = data;
this.animateBar(this.toastbar, 1); this.animateBar(this.toastbar, 1, 1);
utils.timer(5, (val) => !val && this.hideBar()); utils.timer(5, (val) => !val && this.hideBar());
}); });
}, },

View file

@ -12,6 +12,13 @@
<Button class="ico" :text="icon.back" @tap="$navigateBack()" /> <Button class="ico" :text="icon.back" @tap="$navigateBack()" />
</GridLayout> </GridLayout>
<Toast :onload="tbLoad" :toast="toast" :action="hideToast" /> <Toast :onload="tbLoad" :toast="toast" :action="hideToast" />
<Label rowSpan="2" class="edge hal rtl" @swipe="swipeBack" />
<Label
rowSpan="2"
colSpan="2"
class="edge har rtl f"
@swipe="swipeBack"
/>
</RGridLayout> </RGridLayout>
</Page> </Page>
</template> </template>
@ -94,7 +101,7 @@ export default {
showToast() { showToast() {
this.animateBar(this.appbar, 0).then(() => { this.animateBar(this.appbar, 0).then(() => {
this.toast = localize("restDone"); this.toast = localize("restDone");
this.animateBar(this.toastbar, 1); this.animateBar(this.toastbar, 1, 1);
}); });
utils.timer(5, (val) => !val && this.hideToast()); utils.timer(5, (val) => !val && this.hideToast());
}, },

View file

@ -1,7 +1,7 @@
<template> <template>
<ListView colSpan="2" rowSpan="2" class="options" for="item in items"> <ListView colSpan="2" rowSpan="2" class="options" for="item in items">
<v-template if="$index == 0"> <v-template if="$index == 0">
<Label class="pageTitle" :text="title | L" /> <Label class="pTitle tw tb" :text="title | L" />
</v-template> </v-template>
<v-template if="item.type == 'switch'"> <v-template if="item.type == 'switch'">
<RGridLayout <RGridLayout
@ -10,7 +10,7 @@
class="option" class="option"
@touch="touch($event, item.data, item.action)" @touch="touch($event, item.data, item.action)"
> >
<Label class="ico rtl" :text="icon[item.icon]" /> <Label class="ico vc rtl" :text="icon[item.icon]" />
<StackLayout col="1" class="info"> <StackLayout col="1" class="info">
<RLabel :text="item.title | L" class="tw" /> <RLabel :text="item.title | L" class="tw" />
<RLabel <RLabel
@ -35,7 +35,11 @@
class="option" class="option"
@touch="touch($event, item.data, item.action)" @touch="touch($event, item.data, item.action)"
> >
<Label class="ico" :class="{ rtl: item.rtl }" :text="icon[item.icon]" /> <Label
class="ico vc"
:class="{ rtl: item.rtl }"
:text="icon[item.icon]"
/>
<StackLayout col="1" class="info"> <StackLayout col="1" class="info">
<RLabel :text="item.title | L" class="tw" /> <RLabel :text="item.title | L" class="tw" />
<RLabel <RLabel
@ -75,7 +79,7 @@ export default {
); );
}, },
touch({ object, action }, data, localAction) { touch({ object, action }, data, localAction) {
object.className = action.match(/down|move/) ? "option fade" : "option"; this.touchFade(object, action);
if (action == "up") localAction ? localAction(data) : this.action(data); if (action == "up") localAction ? localAction(data) : this.action(data);
}, },
}, },

View file

@ -7,8 +7,8 @@
@swipe="action" @swipe="action"
@loaded="onload" @loaded="onload"
> >
<Button @tap="action" :text="count" class="ico countdown tb" /> <Button @tap="action" :text="count" class="ico t3 accent tb" />
<RLabel @tap="action" class="title" col="1" :text="msg | L" /> <RLabel @tap="action" margin="0 4" class="tb tw vc lh4" col="1" :text="msg | L" />
<Button class="ico fab rtl" :text="icon.undo" @tap="undo" col="3" /> <Button class="ico fab rtl" :text="icon.undo" @tap="undo" col="3" />
</RGridLayout> </RGridLayout>
</template> </template>

View file

@ -6,7 +6,7 @@
class="timer" class="timer"
> >
<Button <Button
class="ico min rtl" class="ico si rtl"
:text="done ? icon.ring : timer.isPaused ? icon.start : icon.pause" :text="done ? icon.ring : timer.isPaused ? icon.start : icon.pause"
@tap="!done && toggleProgress()" @tap="!done && toggleProgress()"
/> />
@ -18,7 +18,7 @@
<RLabel :text="timer.label" class="tb title tw a" /> <RLabel :text="timer.label" class="tb title tw a" />
<RLabel <RLabel
:hidden="!timer.recipeID && done" :hidden="!timer.recipeID && done"
@touch="!done && touch($event)" @touch="!timer.recipeID && !done && touch($event)"
:text="getRecipeTitle" :text="getRecipeTitle"
class="a" class="a"
:class="timer.recipeID ? 'sub' : 'accent'" :class="timer.recipeID ? 'sub' : 'accent'"
@ -48,7 +48,7 @@
/> />
<Button <Button
col="4" col="4"
class="ico min" class="ico si"
:text="icon.x" :text="icon.x"
@tap="removeTimer(timer.id, done)" @tap="removeTimer(timer.id, done)"
/> />
@ -61,7 +61,7 @@ import { ApplicationSettings } from "@nativescript/core";
import { localize } from "@nativescript/localize"; import { localize } from "@nativescript/localize";
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import ActionWithSearch from "../modals/ActionWithSearch"; import ActionWithSearch from "../modals/ActionWithSearch";
import ViewRecipe from "../ViewRecipe"; import EditRecipe from "../EditRecipe";
import * as utils from "~/shared/utils"; import * as utils from "~/shared/utils";
import { EvtBus } from "~/main"; import { EvtBus } from "~/main";
export default { export default {
@ -150,13 +150,6 @@ export default {
); );
this.initTimer(); this.initTimer();
}, },
viewRecipe(recipeID) {
this.$navigateTo(ViewRecipe, {
props: {
recipeID,
},
});
},
attachRecipe() { attachRecipe() {
this.$showModal(ActionWithSearch, { this.$showModal(ActionWithSearch, {
props: { props: {
@ -251,12 +244,7 @@ export default {
// HELPERS // HELPERS
touch({ object, action }) { touch({ object, action }) {
let classes = object.className; this.touchFade(object, action);
classes = action.match(/down|move/)
? !classes.includes("fade")
? classes + " fade"
: classes
: classes.replace(/ fade/g, "");
if (action == "up") this.attachRecipe(); if (action == "up") this.attachRecipe();
}, },
}, },

View file

@ -10,7 +10,7 @@
@loaded="onload" @loaded="onload"
> >
<StackLayout minHeight="48"> <StackLayout minHeight="48">
<RLabel class="title msg" :text="toast" /> <RLabel padding="14 20" :text="toast" />
</StackLayout> </StackLayout>
</GridLayout> </GridLayout>
</template> </template>

View file

@ -3,47 +3,51 @@ import store from './store'
import { import {
Application, Application,
AndroidApplication, AndroidApplication,
ApplicationSettings,
Utils, Utils,
Frame, Frame,
} from '@nativescript/core' } from '@nativescript/core'
import {
setNumber,
getNumber,
getString,
} from '@nativescript/core/application-settings'
import { localize } from '@nativescript/localize' import { localize } from '@nativescript/localize'
import EnRecipes from './components/EnRecipes.vue' import EnRecipes from './components/EnRecipes.vue'
import EditRecipe from './components/EditRecipe.vue' import EditRecipe from './components/EditRecipe.vue'
import MealPlanner from './components/MealPlanner.vue' import MealPlanner from './components/MealPlanner.vue'
import CookingTimer from './components/CookingTimer.vue' import CookingTimer from './components/CookingTimer.vue'
// import GroceryList from './components/GroceryList.vue' // import GroceryList from './components/GroceryList.vue'
import * as utils from '~/shared/utils' import * as utils from '~/shared/utils'
export const EvtBus = new Vue() export const EvtBus = new Vue()
let renderView = EnRecipes let renderView: any = EnRecipes
import CollectionView from '@nativescript-community/ui-collectionview/vue' import CollectionView from '@nativescript-community/ui-collectionview/vue'
Vue.use(CollectionView) Vue.use(CollectionView)
import { RGridLayout, RStackLayout, RDockLayout, RLabel } from './rtl-ui' import { RGridLayout, RStackLayout, RLabel } from './rtl-ui'
Vue.registerElement('RGridLayout', () => RGridLayout) Vue.registerElement('RGridLayout', () => RGridLayout)
Vue.registerElement('RStackLayout', () => RStackLayout) Vue.registerElement('RStackLayout', () => RStackLayout)
Vue.registerElement('RDockLayout', () => RDockLayout)
Vue.registerElement('RLabel', () => RLabel) Vue.registerElement('RLabel', () => RLabel)
import { myMixin } from './shared/mixins' import { myMixin } from './shared/mixins'
Vue.mixin(myMixin) Vue.mixin(myMixin)
Vue.filter('L', localize)
const initFrame = () => { const initFrame = () => {
const vm = store const s = store
// MainInit // MainInit
vm.commit('setTheme', ApplicationSettings.getString('theme', 'sysDef')) s.commit('setTheme', getString('theme', 'sysDef'))
vm.commit('initRecipes') s.commit('initRecipes')
vm.commit('initMealPlans') s.commit('initMealPlans')
vm.commit('initListItems') s.commit('initListItems')
vm.commit('initTimerPresets') s.commit('initTimerPresets')
if (!Object.keys(vm.state.timerSound).length) { if (!Object.keys(s.state.timerSound).length) {
let hasTimerSound = ApplicationSettings.getString('timerSound', null) let hasTimerSound = getString('timerSound', null)
vm.commit( s.commit(
'setTimerSound', 'setTimerSound',
hasTimerSound ? JSON.parse(hasTimerSound) : utils.getTones().defaultTone hasTimerSound ? JSON.parse(hasTimerSound) : utils.getTones().defaultTone
) )
@ -51,15 +55,14 @@ const initFrame = () => {
// InitFrame // InitFrame
const window = Application.android.startActivity.getWindow() const window = Application.android.startActivity.getWindow()
const decorView = window.getDecorView() const decorView = window.getDecorView()
utils.setBarColors(window, decorView, vm.state.theme) utils.setBarColors(window, decorView, s.state.theme)
Frame.topmost().className = vm.state.theme Frame.topmost().className = s.state.theme
} }
const showOverLockscreen = () => { const showOverLockscreen = () => {
let ctx = Utils.ad.getApplicationContext() let ctx = Utils.ad.getApplicationContext()
const pm = ctx.getSystemService(android.content.Context.POWER_SERVICE) const pm = ctx.getSystemService(android.content.Context.POWER_SERVICE)
let isScreenOff = !pm.isInteractive() let isScreenOff = !pm.isInteractive()
if (isScreenOff) { if (isScreenOff) {
console.log('showOverLockscreen')
const window = Application.android.startActivity.getWindow() const window = Application.android.startActivity.getWindow()
const windowMgr = android.view.WindowManager const windowMgr = android.view.WindowManager
const flags = const flags =
@ -82,19 +85,21 @@ const intentListener = ({ intent, android }: any) => {
break break
case 'timer': case 'timer':
renderView = CookingTimer renderView = CookingTimer
switch (ApplicationSettings.getNumber('isTimer', 0)) { switch (getNumber('isTimer', 0)) {
case 0: case 0:
// Closing all modals if available before navigation // Closing all modals if available before navigation
if (Frame.topmost()) {
let modals = Frame.topmost()._getRootModalViews() let modals = Frame.topmost()._getRootModalViews()
for (let i = modals.length - 1; i >= 0; i--) { for (let i = modals.length - 1; i >= 0; i--) {
Frame.topmost() Frame.topmost()
._getRootModalViews() ._getRootModalViews()
[i].closeModal() [i].closeModal()
} }
}
Vue.navigateTo(CookingTimer as any, { Vue.navigateTo(CookingTimer as any, {
animated: false, animated: false,
}) })
ApplicationSettings.setNumber('isTimer', 1) setNumber('isTimer', 1)
break break
case 2: case 2:
Vue.navigateBack() Vue.navigateBack()
@ -108,17 +113,6 @@ const intentListener = ({ intent, android }: any) => {
} }
} }
Application.on(Application.resumeEvent, () => {
showOverLockscreen()
if (
utils.sysLocale() !==
ApplicationSettings.getString('sysLocale', utils.sysLocale())
) {
Frame.reloadPage()
utils.updateLocale()
}
})
Application.on(Application.launchEvent, (args) => { Application.on(Application.launchEvent, (args) => {
utils.updateLocale() utils.updateLocale()
store.commit('setRTL') store.commit('setRTL')
@ -130,6 +124,15 @@ Application.on(Application.launchEvent, (args) => {
Frame.on(Frame.loadedEvent, initFrame) Frame.on(Frame.loadedEvent, initFrame)
}) })
Application.on(Application.resumeEvent, () => {
showOverLockscreen()
if (utils.sysLocale() !== getString('sysLocale', utils.sysLocale())) {
Frame.reloadPage()
utils.updateLocale()
store.commit('setRTL')
}
})
Application.on(Application.exitEvent, () => { Application.on(Application.exitEvent, () => {
renderView = EnRecipes renderView = EnRecipes
Application.android.off( Application.android.off(
@ -140,8 +143,6 @@ Application.on(Application.exitEvent, () => {
Vue.config.silent = false Vue.config.silent = false
Vue.filter('L', localize)
new Vue({ new Vue({
store, store,
render: (h) => h('Frame', [h(renderView)]), render: (h) => h('Frame', [h(renderView)]),

View file

@ -1,52 +0,0 @@
import { Property, DockLayout } from '@nativescript/core'
class Common extends DockLayout {
public rtl: boolean
}
const RTLProperty = new Property({
name: 'rtl',
defaultValue: false,
valueConverter(v): boolean {
return !!v
},
})
RTLProperty.register(Common)
export class RDockLayout extends Common {
public initNativeView(): void {
super.initNativeView()
this._updateDirection()
}
[RTLProperty.setNative](rtl: boolean): void {
this.rtl = rtl
this._updateDirection()
}
public addChild(view): void {
super.addChild(view)
if (view.nativeViewProtected) {
this._updateDirection()
}
}
public removeChild(view): void {
super.removeChild(view)
if (view.nativeViewProtected) {
this._updateDirection()
}
}
private _updateDirection(): void {
let v = this
setTimeout(() => {
v.nativeViewProtected.setRotationY(v.rtl ? 180 : 0)
for (let i = 0; i < v.getChildrenCount(); i++) {
let c = v.getChildAt(i).className
let r = /(^|\s)rtl($|\s)/.test(c)
let a = /(^|\s)a($|\s)/.test(c)
if (!v.rtl) r = !r
if (/(^|\s)a($|\s)/.test(c))
v.getChildAt(i).horizontalAlignment = a ? 'left' : 'right'
v.getChildAt(i).nativeView &&
v.getChildAt(i).nativeView.setRotationY(v.rtl ? (r ? 0 : 180) : 0)
}
}, 1)
}
}

View file

@ -1 +0,0 @@
export { RDockLayout } from './index.android'

View file

@ -1,4 +1,3 @@
export { RGridLayout } from './grid-layout' export { RGridLayout } from './grid-layout'
export { RStackLayout } from './stack-layout' export { RStackLayout } from './stack-layout'
export { RDockLayout } from './dock-layout'
export { RLabel } from './label' export { RLabel } from './label'

View file

@ -5,7 +5,7 @@ const Intl = require('nativescript-intl')
export const myMixin = { export const myMixin = {
methods: { methods: {
transparentPage({ object }) { mLoad({ object }) {
object._dialogFragment object._dialogFragment
.getDialog() .getDialog()
.getWindow() .getWindow()
@ -15,16 +15,14 @@ export const myMixin = {
) )
) )
}, },
animateBar(obj, op) { animateBar(obj, x: number, y?: number) {
if (op) { let c = CoreTypes.AnimationCurve
obj.translateY = 64 if (y) obj.translateY = 64
obj.opacity = 0
}
return obj.animate({ return obj.animate({
opacity: op, opacity: 1,
translate: { x: 0, y: op ? 0 : 64 }, translate: { x: 0, y: x ? 0 : 64 },
duration: 200, duration: 200,
curve: CoreTypes.AnimationCurve.ease, curve: x ? c.easeOut : c.easeIn,
}) })
}, },
totalTime(prepTime, cookTime) { totalTime(prepTime, cookTime) {
@ -47,7 +45,19 @@ export const myMixin = {
;(args.object || args).android.setGravity(this.RTL ? 5 : 3) ;(args.object || args).android.setGravity(this.RTL ? 5 : 3)
}, },
getLocaleN(n) { getLocaleN(n) {
return new Intl.NumberFormat(null).format(n) return new Intl.NumberFormat(null).format(Number(n))
},
touchFade(object, action) {
let c = object.className
object.className = action.match(/down|move/)
? !c.includes('fade')
? c + ' fade'
: c
: c.replace(/ fade/g, '')
},
swipeBack({ direction }, method) {
if (this.$store.state.edgeSwipe)
if (direction == 1) method ? method(0) : this.$navigateBack()
}, },
}, },
} }

View file

@ -328,12 +328,12 @@ export function shareImage(image, subject, title) {
share(intent, subject) share(intent, subject)
} }
export function keepScreenOn(bool) { export function keepScreenOn(n: number) {
let ctx = let ctx =
Application.android.foregroundActivity || Application.android.startActivity Application.android.foregroundActivity || Application.android.startActivity
let window = ctx.getWindow() let window = ctx.getWindow()
let flag = android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON let flag = android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
bool ? window.addFlags(flag) : window.clearFlags(flag) n ? window.addFlags(flag) : window.clearFlags(flag)
} }
// TIMER NOTIFICATION // TIMER NOTIFICATION
@ -600,6 +600,8 @@ export function updateLocale() {
ctx.createConfigurationContext(config) ctx.createConfigurationContext(config)
res.updateConfiguration(config, res.getDisplayMetrics()) res.updateConfiguration(config, res.getDisplayMetrics())
ApplicationSettings.setNumber('RTL', config.getLayoutDirection() | 0) ApplicationSettings.setNumber('RTL', config.getLayoutDirection() | 0)
} else {
ApplicationSettings.setNumber('RTL', sysRTL() | 0)
} }
ApplicationSettings.setString('sysLocale', sysLocale()) ApplicationSettings.setString('sysLocale', sysLocale())
} }

View file

@ -246,6 +246,8 @@ export default new Vuex.Store({
calv: '\ue941', calv: '\ue941',
mpd: '\ue942', mpd: '\ue942',
madd: '\ue943', madd: '\ue943',
awake: '\ue944',
edge: '\ue945',
}, },
sortType: 'random', sortType: 'random',
language: [ language: [
@ -264,15 +266,15 @@ export default new Vuex.Store({
}, },
{ {
locale: 'en-IN', locale: 'en-IN',
title: 'English (IN)', title: 'English (India)',
}, },
{ {
locale: 'en-GB', locale: 'en-GB',
title: 'English (UK)', title: 'English (United Kingdom)',
}, },
{ {
locale: 'en-US', locale: 'en-US',
title: 'English (US)', title: 'English (United States)',
}, },
{ {
locale: 'es', locale: 'es',
@ -284,15 +286,15 @@ export default new Vuex.Store({
}, },
{ {
locale: 'fr-BE', locale: 'fr-BE',
title: 'Français (BE)', title: 'Français (Belgium)',
}, },
{ {
locale: 'fr-CA', locale: 'fr-CA',
title: 'Français (CA)', title: 'Français (Canada)',
}, },
{ {
locale: 'fr-CH', locale: 'fr-CH',
title: 'Français (CH)', title: 'Français (Switzerland)',
}, },
{ {
locale: 'hi', locale: 'hi',
@ -306,14 +308,14 @@ export default new Vuex.Store({
locale: 'it', locale: 'it',
title: 'Italiano', title: 'Italiano',
}, },
// { {
// locale: 'ja', locale: 'ja',
// title: '日本語', title: '日本語',
// }, },
// { {
// locale: 'ml', locale: 'ml',
// title: 'മലയാളം', title: 'മലയാളം',
// }, },
{ {
locale: 'nb-NO', locale: 'nb-NO',
title: 'Norsk bokmål', title: 'Norsk bokmål',
@ -328,7 +330,7 @@ export default new Vuex.Store({
}, },
{ {
locale: 'pt-BR', locale: 'pt-BR',
title: 'Português (BR)', title: 'Português (Brazil)',
}, },
{ {
locale: 'ru', locale: 'ru',
@ -364,8 +366,18 @@ export default new Vuex.Store({
RTL: getNumber('RTL', 0), RTL: getNumber('RTL', 0),
plannerView: getString('plannerView', 'wk'), plannerView: getString('plannerView', 'wk'),
planDeletion: getString('planDeletion', 'nvr'), planDeletion: getString('planDeletion', 'nvr'),
edgeSwipe: getNumber('edgeSwipe', 1),
awakeViewer: getNumber('awakeViewer', 1),
}, },
mutations: { mutations: {
toggleAwakeViewer(state) {
state.awakeViewer = +!state.awakeViewer
setNumber('awakeViewer', state.awakeViewer)
},
toggleEdgeSwipe(state) {
state.edgeSwipe = +!state.edgeSwipe
setNumber('edgeSwipe', state.edgeSwipe)
},
setPlanDeletion(state, s) { setPlanDeletion(state, s) {
state.planDeletion = s state.planDeletion = s
setString('planDeletion', s) setString('planDeletion', s)
@ -483,6 +495,7 @@ export default new Vuex.Store({
}, },
setLayout(state, type) { setLayout(state, type) {
state.layout = type state.layout = type
setString('layout', type)
}, },
setSortType(state, sortType) { setSortType(state, sortType) {
state.sortType = sortType state.sortType = sortType
@ -817,7 +830,6 @@ export default new Vuex.Store({
let c = state.planDeletion let c = state.planDeletion
let date = new Date() let date = new Date()
let d = new Date() let d = new Date()
if (c != 'nvr') {
d.setHours(0, 0, 0, 0) d.setHours(0, 0, 0, 0)
let ld = let ld =
c == 'otay' c == 'otay'
@ -826,15 +838,13 @@ export default new Vuex.Store({
? new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate() ? new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate()
: 7 : 7
d.setDate(d.getDate() - ld) d.setDate(d.getDate() - ld)
}
db.select(`SELECT * FROM mealPlans`).then((res) => db.select(`SELECT * FROM mealPlans`).then((res) =>
res.forEach((p: any) => { res.forEach((p: any) =>
if (p.date < d.getTime()) c !== 'nvr' && p.date < d.getTime()
// DeletingOldMealPlans ? db.execute(`DELETE FROM mealPlans WHERE id = '${p.id}'`)
db.execute(`DELETE FROM mealPlans WHERE id = '${p.id}'`) : state.mealPlans.push(p)
else state.mealPlans.push(p) )
})
) )
} }
}, },
@ -1024,6 +1034,12 @@ export default new Vuex.Store({
}, },
}, },
actions: { actions: {
toggleAwakeViewer({ commit }) {
commit('toggleAwakeViewer')
},
toggleEdgeSwipe({ commit }) {
commit('toggleEdgeSwipe')
},
setPlanDeletion({ commit }, s) { setPlanDeletion({ commit }, s) {
commit('setPlanDeletion', s) commit('setPlanDeletion', s)
}, },

382
package-lock.json generated
View file

@ -11,7 +11,7 @@
"dependencies": { "dependencies": {
"@akylas/nativescript-sqlite": "^3.3.12", "@akylas/nativescript-sqlite": "^3.3.12",
"@nativescript-community/ui-collectionview": "^4.0.32", "@nativescript-community/ui-collectionview": "^4.0.32",
"@nativescript/core": "^8.0.7", "@nativescript/core": "^8.0.8",
"@nativescript/localize": "^5.0.4", "@nativescript/localize": "^5.0.4",
"@triniwiz/nativescript-accelerometer": "^4.0.3", "@triniwiz/nativescript-accelerometer": "^4.0.3",
"nativescript-imagecropper": "^4.0.1", "nativescript-imagecropper": "^4.0.1",
@ -25,7 +25,7 @@
"@nativescript/webpack": "^5.0.0-beta.14", "@nativescript/webpack": "^5.0.0-beta.14",
"@types/node": "^15.12.2", "@types/node": "^15.12.2",
"nativescript-vue-template-compiler": "~2.9.0", "nativescript-vue-template-compiler": "~2.9.0",
"sass": "^1.34.1", "sass": "^1.35.1",
"typescript": "^4.2.4", "typescript": "^4.2.4",
"vue": "^2.6.13" "vue": "^2.6.13"
} }
@ -64,17 +64,17 @@
} }
}, },
"node_modules/@babel/core": { "node_modules/@babel/core": {
"version": "7.14.5", "version": "7.14.6",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.5.tgz", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.6.tgz",
"integrity": "sha512-RN/AwP2DJmQTZSfiDaD+JQQ/J99KsIpOCfBE5pL+5jJSt7nI3nYGoAXZu+ffYSQ029NLs2DstZb+eR81uuARgg==", "integrity": "sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/code-frame": "^7.14.5", "@babel/code-frame": "^7.14.5",
"@babel/generator": "^7.14.5", "@babel/generator": "^7.14.5",
"@babel/helper-compilation-targets": "^7.14.5", "@babel/helper-compilation-targets": "^7.14.5",
"@babel/helper-module-transforms": "^7.14.5", "@babel/helper-module-transforms": "^7.14.5",
"@babel/helpers": "^7.14.5", "@babel/helpers": "^7.14.6",
"@babel/parser": "^7.14.5", "@babel/parser": "^7.14.6",
"@babel/template": "^7.14.5", "@babel/template": "^7.14.5",
"@babel/traverse": "^7.14.5", "@babel/traverse": "^7.14.5",
"@babel/types": "^7.14.5", "@babel/types": "^7.14.5",
@ -294,9 +294,9 @@
} }
}, },
"node_modules/@babel/helpers": { "node_modules/@babel/helpers": {
"version": "7.14.5", "version": "7.14.6",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.5.tgz", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.6.tgz",
"integrity": "sha512-xtcWOuN9VL6nApgVHtq3PPcQv5qFBJzoSZzJ/2c0QK/IP/gxVcoWSNQwFEGvmbQsuS9rhYqjILDGGXcTkA705Q==", "integrity": "sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/template": "^7.14.5", "@babel/template": "^7.14.5",
@ -384,9 +384,9 @@
} }
}, },
"node_modules/@babel/parser": { "node_modules/@babel/parser": {
"version": "7.14.5", "version": "7.14.6",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.5.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.6.tgz",
"integrity": "sha512-TM8C+xtH/9n1qzX+JNHi7AN2zHMTiPUtspO0ZdHflW8KaskkALhMmuMHb4bCmNdv9VAPzJX3/bXqkVLnAvsPfg==", "integrity": "sha512-oG0ej7efjEXxb4UgE+klVx+3j4MVo+A2vCzm7OUN4CLo6WhQ+vSOD2yJ8m7B+DghObxtLxt3EfgMWpq+AsWehQ==",
"dev": true, "dev": true,
"bin": { "bin": {
"parser": "bin/babel-parser.js" "parser": "bin/babel-parser.js"
@ -463,9 +463,9 @@
"dev": true "dev": true
}, },
"node_modules/@nativescript/core": { "node_modules/@nativescript/core": {
"version": "8.0.7", "version": "8.0.8",
"resolved": "https://registry.npmjs.org/@nativescript/core/-/core-8.0.7.tgz", "resolved": "https://registry.npmjs.org/@nativescript/core/-/core-8.0.8.tgz",
"integrity": "sha512-2OLwPa5Y+9aKLyo0zWl0YSjWS0f+EFG8SdZe+uuU2mzEhCb8q9djdICjHynuXZkmrtQsx/lKjLhbtnoYQsMRvA==", "integrity": "sha512-oeJIeHggLSXMBMwhIORW5WV3UyG4zu7M1G2VtG7Z6/Kd9JCUwglJTcP+1YPKt9emAPAz9bhGSCzMFpasNBPQzw==",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"@nativescript/hook": "~2.0.0", "@nativescript/hook": "~2.0.0",
@ -709,15 +709,16 @@
"dev": true "dev": true
}, },
"node_modules/@vue/component-compiler-utils": { "node_modules/@vue/component-compiler-utils": {
"version": "3.2.1", "version": "3.2.2",
"resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.2.1.tgz", "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.2.2.tgz",
"integrity": "sha512-Mci9WJYLRjyJEBkGHMPxZ1ihJ9l6gOy2Gr6hpYZUNpQoe5+nbpeb3w00aP+PSHJygCF+fxJsqp7Af1zGDITzuw==", "integrity": "sha512-rAYMLmgMuqJFWAOb3Awjqqv5X3Q3hVr4jH/kgrFJpiU0j3a90tnNBplqbj+snzrgZhC9W128z+dtgMifOiMfJg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"consolidate": "^0.15.1", "consolidate": "^0.15.1",
"hash-sum": "^1.0.2", "hash-sum": "^1.0.2",
"lru-cache": "^4.1.2", "lru-cache": "^4.1.2",
"merge-source-map": "^1.1.0", "merge-source-map": "^1.1.0",
"postcss": "^7.0.36",
"postcss-selector-parser": "^6.0.2", "postcss-selector-parser": "^6.0.2",
"source-map": "~0.6.1", "source-map": "~0.6.1",
"vue-template-es2015-compiler": "^1.9.0" "vue-template-es2015-compiler": "^1.9.0"
@ -726,6 +727,86 @@
"prettier": "^1.18.2" "prettier": "^1.18.2"
} }
}, },
"node_modules/@vue/component-compiler-utils/node_modules/ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"dependencies": {
"color-convert": "^1.9.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@vue/component-compiler-utils/node_modules/chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"dependencies": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@vue/component-compiler-utils/node_modules/chalk/node_modules/supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@vue/component-compiler-utils/node_modules/color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"dependencies": {
"color-name": "1.1.3"
}
},
"node_modules/@vue/component-compiler-utils/node_modules/color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"node_modules/@vue/component-compiler-utils/node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true,
"engines": {
"node": ">=4"
}
},
"node_modules/@vue/component-compiler-utils/node_modules/postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"dependencies": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
},
"engines": {
"node": ">=6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
}
},
"node_modules/@vue/component-compiler-utils/node_modules/source-map": { "node_modules/@vue/component-compiler-utils/node_modules/source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@ -735,6 +816,18 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/@vue/component-compiler-utils/node_modules/supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/@webassemblyjs/ast": { "node_modules/@webassemblyjs/ast": {
"version": "1.11.0", "version": "1.11.0",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.0.tgz", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.0.tgz",
@ -1344,24 +1437,24 @@
} }
}, },
"node_modules/chokidar": { "node_modules/chokidar": {
"version": "3.5.1", "version": "3.5.2",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz",
"integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"anymatch": "~3.1.1", "anymatch": "~3.1.2",
"braces": "~3.0.2", "braces": "~3.0.2",
"glob-parent": "~5.1.0", "glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0", "is-binary-path": "~2.1.0",
"is-glob": "~4.0.1", "is-glob": "~4.0.1",
"normalize-path": "~3.0.0", "normalize-path": "~3.0.0",
"readdirp": "~3.5.0" "readdirp": "~3.6.0"
}, },
"engines": { "engines": {
"node": ">= 8.10.0" "node": ">= 8.10.0"
}, },
"optionalDependencies": { "optionalDependencies": {
"fsevents": "~2.3.1" "fsevents": "~2.3.2"
} }
}, },
"node_modules/chokidar/node_modules/glob-parent": { "node_modules/chokidar/node_modules/glob-parent": {
@ -2279,9 +2372,9 @@
} }
}, },
"node_modules/globby": { "node_modules/globby": {
"version": "11.0.3", "version": "11.0.4",
"resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz", "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz",
"integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==", "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"array-union": "^2.1.0", "array-union": "^2.1.0",
@ -3222,9 +3315,9 @@
} }
}, },
"node_modules/postcss": { "node_modules/postcss": {
"version": "8.3.2", "version": "8.3.5",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.2.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.5.tgz",
"integrity": "sha512-y1FK/AWdZlBF5lusS5j5l4/vF67+vQZt1SXPVJ32y1kRGDQyrs1zk32hG1cInRTu14P0V+orPz+ifwW/7rR4bg==", "integrity": "sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"colorette": "^1.2.2", "colorette": "^1.2.2",
@ -3528,9 +3621,9 @@
} }
}, },
"node_modules/readdirp": { "node_modules/readdirp": {
"version": "3.5.0", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"picomatch": "^2.2.1" "picomatch": "^2.2.1"
@ -3657,9 +3750,9 @@
"dev": true "dev": true
}, },
"node_modules/sass": { "node_modules/sass": {
"version": "1.34.1", "version": "1.35.1",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.34.1.tgz", "resolved": "https://registry.npmjs.org/sass/-/sass-1.35.1.tgz",
"integrity": "sha512-scLA7EIZM+MmYlej6sdVr0HRbZX5caX5ofDT9asWnUJj21oqgsC+1LuNfm0eg+vM0fCTZHhwImTiCU0sx9h9CQ==", "integrity": "sha512-oCisuQJstxMcacOPmxLNiLlj4cUyN2+8xJnG7VanRoh2GOLr9RqkvI4AxA4a6LHVg/rsu+PmxXeGhrdSF9jCiQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"chokidar": ">=3.0.0 <4.0.0" "chokidar": ">=3.0.0 <4.0.0"
@ -4170,9 +4263,10 @@
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.3.tgz",
"integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==", "integrity": "sha512-rUvLW0WtF7PF2b9yenwWUi9Da9euvDRhmH7BLyBG4DCFfOJ850LGNknmRpp8Z8kXNUPObdZQEfKOiHtXuQHHKA==",
"dev": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
"tsserver": "bin/tsserver" "tsserver": "bin/tsserver"
@ -4214,7 +4308,8 @@
"node_modules/vue": { "node_modules/vue": {
"version": "2.6.14", "version": "2.6.14",
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz", "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz",
"integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==" "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==",
"dev": true
}, },
"node_modules/vue-hot-reload-api": { "node_modules/vue-hot-reload-api": {
"version": "2.3.4", "version": "2.3.4",
@ -4337,9 +4432,9 @@
} }
}, },
"node_modules/webpack": { "node_modules/webpack": {
"version": "5.38.1", "version": "5.39.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.38.1.tgz", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.39.0.tgz",
"integrity": "sha512-OqRmYD1OJbHZph6RUMD93GcCZy4Z4wC0ele4FXyYF0J6AxO1vOSuIlU1hkS/lDlR9CDYBz64MZRmdbdnFFoT2g==", "integrity": "sha512-25CHmuDj+oOTyteI13sUqNlCnjCnySuhiKWE/cRYPQYeoQ3ijHgyWX27CiyUKLNGq27v8S0mrksyTreT/xo7pg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@types/eslint-scope": "^3.7.0", "@types/eslint-scope": "^3.7.0",
@ -4592,9 +4687,9 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}, },
"node_modules/ws": { "node_modules/ws": {
"version": "7.4.6", "version": "7.5.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.0.tgz",
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", "integrity": "sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgi4vw==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=8.3.0" "node": ">=8.3.0"
@ -4725,17 +4820,17 @@
"dev": true "dev": true
}, },
"@babel/core": { "@babel/core": {
"version": "7.14.5", "version": "7.14.6",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.5.tgz", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.6.tgz",
"integrity": "sha512-RN/AwP2DJmQTZSfiDaD+JQQ/J99KsIpOCfBE5pL+5jJSt7nI3nYGoAXZu+ffYSQ029NLs2DstZb+eR81uuARgg==", "integrity": "sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.14.5", "@babel/code-frame": "^7.14.5",
"@babel/generator": "^7.14.5", "@babel/generator": "^7.14.5",
"@babel/helper-compilation-targets": "^7.14.5", "@babel/helper-compilation-targets": "^7.14.5",
"@babel/helper-module-transforms": "^7.14.5", "@babel/helper-module-transforms": "^7.14.5",
"@babel/helpers": "^7.14.5", "@babel/helpers": "^7.14.6",
"@babel/parser": "^7.14.5", "@babel/parser": "^7.14.6",
"@babel/template": "^7.14.5", "@babel/template": "^7.14.5",
"@babel/traverse": "^7.14.5", "@babel/traverse": "^7.14.5",
"@babel/types": "^7.14.5", "@babel/types": "^7.14.5",
@ -4901,9 +4996,9 @@
"dev": true "dev": true
}, },
"@babel/helpers": { "@babel/helpers": {
"version": "7.14.5", "version": "7.14.6",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.5.tgz", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.6.tgz",
"integrity": "sha512-xtcWOuN9VL6nApgVHtq3PPcQv5qFBJzoSZzJ/2c0QK/IP/gxVcoWSNQwFEGvmbQsuS9rhYqjILDGGXcTkA705Q==", "integrity": "sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/template": "^7.14.5", "@babel/template": "^7.14.5",
@ -4975,9 +5070,9 @@
} }
}, },
"@babel/parser": { "@babel/parser": {
"version": "7.14.5", "version": "7.14.6",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.5.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.6.tgz",
"integrity": "sha512-TM8C+xtH/9n1qzX+JNHi7AN2zHMTiPUtspO0ZdHflW8KaskkALhMmuMHb4bCmNdv9VAPzJX3/bXqkVLnAvsPfg==", "integrity": "sha512-oG0ej7efjEXxb4UgE+klVx+3j4MVo+A2vCzm7OUN4CLo6WhQ+vSOD2yJ8m7B+DghObxtLxt3EfgMWpq+AsWehQ==",
"dev": true "dev": true
}, },
"@babel/template": { "@babel/template": {
@ -5036,9 +5131,9 @@
"dev": true "dev": true
}, },
"@nativescript/core": { "@nativescript/core": {
"version": "8.0.7", "version": "8.0.8",
"resolved": "https://registry.npmjs.org/@nativescript/core/-/core-8.0.7.tgz", "resolved": "https://registry.npmjs.org/@nativescript/core/-/core-8.0.8.tgz",
"integrity": "sha512-2OLwPa5Y+9aKLyo0zWl0YSjWS0f+EFG8SdZe+uuU2mzEhCb8q9djdICjHynuXZkmrtQsx/lKjLhbtnoYQsMRvA==", "integrity": "sha512-oeJIeHggLSXMBMwhIORW5WV3UyG4zu7M1G2VtG7Z6/Kd9JCUwglJTcP+1YPKt9emAPAz9bhGSCzMFpasNBPQzw==",
"requires": { "requires": {
"@nativescript/hook": "~2.0.0", "@nativescript/hook": "~2.0.0",
"css-tree": "^1.1.2", "css-tree": "^1.1.2",
@ -5227,26 +5322,99 @@
"dev": true "dev": true
}, },
"@vue/component-compiler-utils": { "@vue/component-compiler-utils": {
"version": "3.2.1", "version": "3.2.2",
"resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.2.1.tgz", "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.2.2.tgz",
"integrity": "sha512-Mci9WJYLRjyJEBkGHMPxZ1ihJ9l6gOy2Gr6hpYZUNpQoe5+nbpeb3w00aP+PSHJygCF+fxJsqp7Af1zGDITzuw==", "integrity": "sha512-rAYMLmgMuqJFWAOb3Awjqqv5X3Q3hVr4jH/kgrFJpiU0j3a90tnNBplqbj+snzrgZhC9W128z+dtgMifOiMfJg==",
"dev": true, "dev": true,
"requires": { "requires": {
"consolidate": "^0.15.1", "consolidate": "^0.15.1",
"hash-sum": "^1.0.2", "hash-sum": "^1.0.2",
"lru-cache": "^4.1.2", "lru-cache": "^4.1.2",
"merge-source-map": "^1.1.0", "merge-source-map": "^1.1.0",
"postcss": "^7.0.36",
"postcss-selector-parser": "^6.0.2", "postcss-selector-parser": "^6.0.2",
"prettier": "^1.18.2", "prettier": "^1.18.2",
"source-map": "~0.6.1", "source-map": "~0.6.1",
"vue-template-es2015-compiler": "^1.9.0" "vue-template-es2015-compiler": "^1.9.0"
}, },
"dependencies": { "dependencies": {
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
"dependencies": {
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"postcss": {
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"requires": {
"chalk": "^2.4.2",
"source-map": "^0.6.1",
"supports-color": "^6.1.0"
}
},
"source-map": { "source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true "dev": true
},
"supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
} }
} }
}, },
@ -5400,8 +5568,7 @@
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.4.tgz", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.4.tgz",
"integrity": "sha512-cs3XLy+UcxiP6bj0A6u7MLLuwdXJ1c3Dtc0RkKg+wiI1g/Ti1om8+/2hc2A2B60NbBNAbMgyBMHvyymWm/j4wQ==", "integrity": "sha512-cs3XLy+UcxiP6bj0A6u7MLLuwdXJ1c3Dtc0RkKg+wiI1g/Ti1om8+/2hc2A2B60NbBNAbMgyBMHvyymWm/j4wQ==",
"dev": true, "dev": true
"requires": {}
}, },
"@webpack-cli/info": { "@webpack-cli/info": {
"version": "1.3.0", "version": "1.3.0",
@ -5416,8 +5583,7 @@
"version": "1.5.1", "version": "1.5.1",
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.5.1.tgz", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.5.1.tgz",
"integrity": "sha512-4vSVUiOPJLmr45S8rMGy7WDvpWxfFxfP/Qx/cxZFCfvoypTYpPPL1X8VIZMe0WTA+Jr7blUxwUSEZNkjoMTgSw==", "integrity": "sha512-4vSVUiOPJLmr45S8rMGy7WDvpWxfFxfP/Qx/cxZFCfvoypTYpPPL1X8VIZMe0WTA+Jr7blUxwUSEZNkjoMTgSw==",
"dev": true, "dev": true
"requires": {}
}, },
"@xtuc/ieee754": { "@xtuc/ieee754": {
"version": "1.2.0", "version": "1.2.0",
@ -5450,8 +5616,7 @@
"version": "0.2.7", "version": "0.2.7",
"resolved": "https://registry.npmjs.org/acorn-private-class-elements/-/acorn-private-class-elements-0.2.7.tgz", "resolved": "https://registry.npmjs.org/acorn-private-class-elements/-/acorn-private-class-elements-0.2.7.tgz",
"integrity": "sha512-+GZH2wOKNZOBI4OOPmzpo4cs6mW297sn6fgIk1dUI08jGjhAaEwvC39mN2gJAg2lmAQJ1rBkFqKWonL3Zz6PVA==", "integrity": "sha512-+GZH2wOKNZOBI4OOPmzpo4cs6mW297sn6fgIk1dUI08jGjhAaEwvC39mN2gJAg2lmAQJ1rBkFqKWonL3Zz6PVA==",
"dev": true, "dev": true
"requires": {}
}, },
"acorn-private-methods": { "acorn-private-methods": {
"version": "0.3.3", "version": "0.3.3",
@ -5504,8 +5669,7 @@
"version": "3.5.2", "version": "3.5.2",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
"dev": true, "dev": true
"requires": {}
}, },
"ansi-html": { "ansi-html": {
"version": "0.0.7", "version": "0.0.7",
@ -5709,19 +5873,19 @@
} }
}, },
"chokidar": { "chokidar": {
"version": "3.5.1", "version": "3.5.2",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz",
"integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"anymatch": "~3.1.1", "anymatch": "~3.1.2",
"braces": "~3.0.2", "braces": "~3.0.2",
"fsevents": "~2.3.1", "fsevents": "~2.3.2",
"glob-parent": "~5.1.0", "glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0", "is-binary-path": "~2.1.0",
"is-glob": "~4.0.1", "is-glob": "~4.0.1",
"normalize-path": "~3.0.0", "normalize-path": "~3.0.0",
"readdirp": "~3.5.0" "readdirp": "~3.6.0"
}, },
"dependencies": { "dependencies": {
"glob-parent": { "glob-parent": {
@ -6425,9 +6589,9 @@
"dev": true "dev": true
}, },
"globby": { "globby": {
"version": "11.0.3", "version": "11.0.4",
"resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz", "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz",
"integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==", "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==",
"dev": true, "dev": true,
"requires": { "requires": {
"array-union": "^2.1.0", "array-union": "^2.1.0",
@ -6502,8 +6666,7 @@
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
"integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
"dev": true, "dev": true
"requires": {}
}, },
"ignore": { "ignore": {
"version": "5.1.8", "version": "5.1.8",
@ -7141,9 +7304,9 @@
} }
}, },
"postcss": { "postcss": {
"version": "8.3.2", "version": "8.3.5",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.2.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.5.tgz",
"integrity": "sha512-y1FK/AWdZlBF5lusS5j5l4/vF67+vQZt1SXPVJ32y1kRGDQyrs1zk32hG1cInRTu14P0V+orPz+ifwW/7rR4bg==", "integrity": "sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA==",
"dev": true, "dev": true,
"requires": { "requires": {
"colorette": "^1.2.2", "colorette": "^1.2.2",
@ -7216,8 +7379,7 @@
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz",
"integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==",
"dev": true, "dev": true
"requires": {}
}, },
"postcss-modules-local-by-default": { "postcss-modules-local-by-default": {
"version": "4.0.0", "version": "4.0.0",
@ -7343,9 +7505,9 @@
} }
}, },
"readdirp": { "readdirp": {
"version": "3.5.0", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true, "dev": true,
"requires": { "requires": {
"picomatch": "^2.2.1" "picomatch": "^2.2.1"
@ -7437,9 +7599,9 @@
"dev": true "dev": true
}, },
"sass": { "sass": {
"version": "1.34.1", "version": "1.35.1",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.34.1.tgz", "resolved": "https://registry.npmjs.org/sass/-/sass-1.35.1.tgz",
"integrity": "sha512-scLA7EIZM+MmYlej6sdVr0HRbZX5caX5ofDT9asWnUJj21oqgsC+1LuNfm0eg+vM0fCTZHhwImTiCU0sx9h9CQ==", "integrity": "sha512-oCisuQJstxMcacOPmxLNiLlj4cUyN2+8xJnG7VanRoh2GOLr9RqkvI4AxA4a6LHVg/rsu+PmxXeGhrdSF9jCiQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"chokidar": ">=3.0.0 <4.0.0" "chokidar": ">=3.0.0 <4.0.0"
@ -7804,9 +7966,10 @@
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
}, },
"typescript": { "typescript": {
"version": "4.3.2", "version": "4.3.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.3.tgz",
"integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==" "integrity": "sha512-rUvLW0WtF7PF2b9yenwWUi9Da9euvDRhmH7BLyBG4DCFfOJ850LGNknmRpp8Z8kXNUPObdZQEfKOiHtXuQHHKA==",
"dev": true
}, },
"universalify": { "universalify": {
"version": "2.0.0", "version": "2.0.0",
@ -7838,7 +8001,8 @@
"vue": { "vue": {
"version": "2.6.14", "version": "2.6.14",
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz", "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz",
"integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==" "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==",
"dev": true
}, },
"vue-hot-reload-api": { "vue-hot-reload-api": {
"version": "2.3.4", "version": "2.3.4",
@ -7922,8 +8086,7 @@
"vuex": { "vuex": {
"version": "3.6.2", "version": "3.6.2",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz", "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
"integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==", "integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw=="
"requires": {}
}, },
"watchpack": { "watchpack": {
"version": "2.2.0", "version": "2.2.0",
@ -7936,9 +8099,9 @@
} }
}, },
"webpack": { "webpack": {
"version": "5.38.1", "version": "5.39.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.38.1.tgz", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.39.0.tgz",
"integrity": "sha512-OqRmYD1OJbHZph6RUMD93GcCZy4Z4wC0ele4FXyYF0J6AxO1vOSuIlU1hkS/lDlR9CDYBz64MZRmdbdnFFoT2g==", "integrity": "sha512-25CHmuDj+oOTyteI13sUqNlCnjCnySuhiKWE/cRYPQYeoQ3ijHgyWX27CiyUKLNGq27v8S0mrksyTreT/xo7pg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/eslint-scope": "^3.7.0", "@types/eslint-scope": "^3.7.0",
@ -8115,11 +8278,10 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}, },
"ws": { "ws": {
"version": "7.4.6", "version": "7.5.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.0.tgz",
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", "integrity": "sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgi4vw==",
"dev": true, "dev": true
"requires": {}
}, },
"xmlbuilder": { "xmlbuilder": {
"version": "9.0.7", "version": "9.0.7",

View file

@ -20,7 +20,7 @@
"dependencies": { "dependencies": {
"@akylas/nativescript-sqlite": "^3.3.12", "@akylas/nativescript-sqlite": "^3.3.12",
"@nativescript-community/ui-collectionview": "^4.0.32", "@nativescript-community/ui-collectionview": "^4.0.32",
"@nativescript/core": "^8.0.7", "@nativescript/core": "^8.0.8",
"@nativescript/localize": "^5.0.4", "@nativescript/localize": "^5.0.4",
"@triniwiz/nativescript-accelerometer": "^4.0.3", "@triniwiz/nativescript-accelerometer": "^4.0.3",
"nativescript-imagecropper": "^4.0.1", "nativescript-imagecropper": "^4.0.1",
@ -34,7 +34,7 @@
"@nativescript/webpack": "^5.0.0-beta.14", "@nativescript/webpack": "^5.0.0-beta.14",
"@types/node": "^15.12.2", "@types/node": "^15.12.2",
"nativescript-vue-template-compiler": "~2.9.0", "nativescript-vue-template-compiler": "~2.9.0",
"sass": "^1.34.1", "sass": "^1.35.1",
"typescript": "^4.2.4", "typescript": "^4.2.4",
"vue": "^2.6.13" "vue": "^2.6.13"
} }

View file

@ -0,0 +1 @@
EnRecipes

View file

@ -0,0 +1 @@
EnRecipes