replaced trylater with meal planner

This commit is contained in:
Vishnu Raghav B 2020-11-17 00:48:25 +05:30
parent fd0b8ac4c0
commit bb54dd67c9
7 changed files with 86 additions and 38 deletions

View file

@ -32,7 +32,7 @@
<Label col="0" row="0" class="bx" :text="icon[item.icon]" /> <Label col="0" row="0" class="bx" :text="icon[item.icon]" />
<Label col="2" row="0" :text="item.title" /> <Label col="2" row="0" :text="item.title" />
</GridLayout> </GridLayout>
<StackLayout class="hr m-8"></StackLayout> <!-- <StackLayout class="hr m-8"></StackLayout> -->
<GridLayout <GridLayout
rows="48" rows="48"
columns="auto, 24, *" columns="auto, 24, *"
@ -180,11 +180,11 @@ export default {
component: "Favorites", component: "Favorites",
icon: "heart", icon: "heart",
}, },
{ // {
title: "Try Later", // title: "Try Later",
component: "Try Later", // component: "Try Later",
icon: "trylater", // icon: "trylater",
}, // },
], ],
bottommenu: [ bottommenu: [
{ {

View file

@ -13,26 +13,87 @@
<Label class="title orkm" text="Meal Planner" col="1" /> <Label class="title orkm" text="Meal Planner" col="1" />
</GridLayout> </GridLayout>
</ActionBar> </ActionBar>
<GridLayout rows="*, auto, *, 88" columns="*" class="emptyStateContainer"> <AbsoluteLayout>
<TabView width="100%" height="100%">
<TabViewItem title="Today">
<ScrollView>
<StackLayout>
<Label text="Today" textWrap="true" />
</StackLayout>
</ScrollView>
</TabViewItem>
<TabViewItem title="Tomorrow">
<ScrollView>
<StackLayout>
<Label text="Today" textWrap="true" />
</StackLayout>
</ScrollView>
</TabViewItem>
<TabViewItem title="In 2 days">
<ScrollView>
<StackLayout>
<Label text="Today" textWrap="true" />
</StackLayout>
</ScrollView>
</TabViewItem>
<TabViewItem title="In 3 days">
<ScrollView>
<StackLayout>
<Label text="Today" textWrap="true" />
</StackLayout>
</ScrollView>
</TabViewItem>
<TabViewItem title="In 4 days">
<ScrollView>
<StackLayout>
<Label text="Today" textWrap="true" />
</StackLayout>
</ScrollView>
</TabViewItem>
<TabViewItem title="In 5 days">
<ScrollView>
<StackLayout>
<Label text="Today" textWrap="true" />
</StackLayout>
</ScrollView>
</TabViewItem>
<TabViewItem title="In 6 days">
<ScrollView>
<StackLayout>
<Label text="Today" textWrap="true" />
</StackLayout>
</ScrollView>
</TabViewItem>
</TabView>
<GridLayout id="btnFabContainer" rows="*, auto" columns="*, auto">
<MDFloatingActionButton
row="1"
col="1"
src="res://check"
@tap="recipeTried"
v-if="filterTrylater"
/>
<transition name="dolly" appear>
<MDFloatingActionButton
row="1"
col="1"
src="res://share"
@tap="shareHandler"
v-if="!filterTrylater && showFab"
/>
</transition>
</GridLayout>
</AbsoluteLayout>
<!-- <GridLayout rows="*, auto, *, 88" columns="*" class="emptyStateContainer">
<StackLayout row="1" class="emptyState"> <StackLayout row="1" class="emptyState">
<Label class="title orkm" text="Coming soon!" textWrap="true" /> <Label class="title orkm" text="Coming soon!" textWrap="true" />
</StackLayout> </StackLayout>
</GridLayout> </GridLayout> -->
<!-- <RadCalendar
:viewMode="viewMode"
:transitionMode="transitionMode"
></RadCalendar> -->
</Page> </Page>
</template> </template>
<script> <script>
import { ApplicationSettings } from "@nativescript/core" import { ApplicationSettings, Color } from "@nativescript/core"
import {
CalendarViewMode,
CalendarTransitionMode,
CalendarEvent,
} from "nativescript-ui-calendar"
import { mapState, mapActions } from "vuex" import { mapState, mapActions } from "vuex"
export default { export default {
props: ["showDrawer", "releaseGlobalBackEvent"], props: ["showDrawer", "releaseGlobalBackEvent"],
@ -40,8 +101,6 @@ export default {
return { return {
viewIsScrolled: false, viewIsScrolled: false,
appTheme: "Light", appTheme: "Light",
viewMode: CalendarViewMode.Day,
transitionMode: CalendarTransitionMode.Slide,
} }
}, },
computed: { computed: {
@ -60,6 +119,8 @@ export default {
? (this.viewIsScrolled = true) ? (this.viewIsScrolled = true)
: (this.viewIsScrolled = false) : (this.viewIsScrolled = false)
}, },
// CALENDAR EVENTS
}, },
created() { created() {
this.appTheme = ApplicationSettings.getString("appTheme", "Light") this.appTheme = ApplicationSettings.getString("appTheme", "Light")

View file

@ -39,16 +39,16 @@
:text="recipe.isFavorite ? icon.heart : icon.heartOutline" :text="recipe.isFavorite ? icon.heart : icon.heartOutline"
@tap="toggleFavorite" @tap="toggleFavorite"
/> />
<MDButton <!-- <MDButton
variant="text" variant="text"
v-if="!filterTrylater" v-if="!filterTrylater"
class="bx" class="bx"
:text="recipe.tried ? icon.trylaterOutline : icon.trylater" :text="recipe.tried ? icon.trylaterOutline : icon.trylater"
@tap="toggleTrylater" @tap="toggleTrylater"
/> /> -->
<MDButton <MDButton
variant="text" variant="text"
v-else v-if="filterTrylater"
class="bx" class="bx"
:text="icon.share" :text="icon.share"
@tap="shareHandler" @tap="shareHandler"

View file

@ -20,9 +20,6 @@ Vue.use(FloatingActionButtonPlugin)
import ProgressPlugin from "@nativescript-community/ui-material-progress/vue" import ProgressPlugin from "@nativescript-community/ui-material-progress/vue"
Vue.use(ProgressPlugin) Vue.use(ProgressPlugin)
import CalendarView from "nativescript-ui-calendar/vue"
Vue.use(CalendarView)
Vue.registerElement( Vue.registerElement(
"RadSideDrawer", "RadSideDrawer",
() => require("nativescript-ui-sidedrawer").RadSideDrawer () => require("nativescript-ui-sidedrawer").RadSideDrawer

View file

@ -183,7 +183,7 @@ export default new Vuex.Store({
export: "\ued07", export: "\ued07",
import: "\ued0c", import: "\ued0c",
outline: "\ueb07", outline: "\ueb07",
calendar: "\uec55", calendar: "\uec57",
}, },
currentComponent: "EnRecipes", currentComponent: "EnRecipes",
}, },

9
package-lock.json generated
View file

@ -5893,15 +5893,6 @@
"resolved": "https://registry.npmjs.org/nativescript-toast/-/nativescript-toast-2.0.0.tgz", "resolved": "https://registry.npmjs.org/nativescript-toast/-/nativescript-toast-2.0.0.tgz",
"integrity": "sha512-xqyNfFS894oGfrEVO7CjpioAQLiLNNcd77Euq9XIUTf1U3W0PsIgAJbLP7+kkVGIJxdLtlBkbcQ4wDmf2DCi1w==" "integrity": "sha512-xqyNfFS894oGfrEVO7CjpioAQLiLNNcd77Euq9XIUTf1U3W0PsIgAJbLP7+kkVGIJxdLtlBkbcQ4wDmf2DCi1w=="
}, },
"nativescript-ui-calendar": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/nativescript-ui-calendar/-/nativescript-ui-calendar-7.0.2.tgz",
"integrity": "sha512-yzSZPLFsboYj73BnVG0IYsiKHpPtmL/35QcXd7hC7kWdfjoaiE1eZgtqIRiTsNJaGAp9MeSrBdvuOCe7hI9rEA==",
"requires": {
"nativescript-ui-core": "~4.0.0",
"ts-node": "^8.10.2"
}
},
"nativescript-ui-core": { "nativescript-ui-core": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/nativescript-ui-core/-/nativescript-ui-core-4.0.0.tgz", "resolved": "https://registry.npmjs.org/nativescript-ui-core/-/nativescript-ui-core-4.0.0.tgz",

View file

@ -24,7 +24,6 @@
"nativescript-imagecropper": "^4.0.1", "nativescript-imagecropper": "^4.0.1",
"nativescript-plugin-filepicker": "^1.0.0", "nativescript-plugin-filepicker": "^1.0.0",
"nativescript-toast": "^2.0.0", "nativescript-toast": "^2.0.0",
"nativescript-ui-calendar": "^7.0.2",
"nativescript-ui-listview": "^9.0.4", "nativescript-ui-listview": "^9.0.4",
"nativescript-ui-sidedrawer": "^9.0.3", "nativescript-ui-sidedrawer": "^9.0.3",
"nativescript-vue": "^2.6.1", "nativescript-vue": "^2.6.1",