playing with bottom nav
This commit is contained in:
@ -53,6 +53,8 @@
|
|||||||
@reload="openBook(current_book, true)"
|
@reload="openBook(current_book, true)"
|
||||||
></cookbook-slider>
|
></cookbook-slider>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
|
<bottom-navigation-bar></bottom-navigation-bar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -66,13 +68,14 @@ import { ApiApiFactory } from "@/utils/openapi/api"
|
|||||||
import CookbookSlider from "@/components/CookbookSlider"
|
import CookbookSlider from "@/components/CookbookSlider"
|
||||||
import LoadingSpinner from "@/components/LoadingSpinner"
|
import LoadingSpinner from "@/components/LoadingSpinner"
|
||||||
import { StandardToasts, ApiMixin } from "@/utils/utils"
|
import { StandardToasts, ApiMixin } from "@/utils/utils"
|
||||||
|
import BottomNavigationBar from "@/components/BottomNavigationBar.vue";
|
||||||
|
|
||||||
Vue.use(BootstrapVue)
|
Vue.use(BootstrapVue)
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CookbookView",
|
name: "CookbookView",
|
||||||
mixins: [ApiMixin],
|
mixins: [ApiMixin],
|
||||||
components: { LoadingSpinner, CookbookSlider },
|
components: { LoadingSpinner, CookbookSlider, BottomNavigationBar },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
cookbooks: [],
|
cookbooks: [],
|
||||||
|
@ -223,12 +223,12 @@
|
|||||||
{{ $t("Export_To_ICal") }}
|
{{ $t("Export_To_ICal") }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 col-6 mb-1 mb-md-0">
|
<!-- <div class="col-md-3 col-6 mb-1 mb-md-0">-->
|
||||||
<button class="btn btn-block btn-primary shadow-none disabled" v-b-tooltip.focus.top
|
<!-- <button class="btn btn-block btn-primary shadow-none disabled" v-b-tooltip.focus.top-->
|
||||||
:title="$t('Coming_Soon')">
|
<!-- :title="$t('Coming_Soon')">-->
|
||||||
{{ $t("Auto_Planner") }}
|
<!-- {{ $t("Auto_Planner") }}-->
|
||||||
</button>
|
<!-- </button>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="col-12 d-flex justify-content-center mt-2 d-block d-md-none">
|
<div class="col-12 d-flex justify-content-center mt-2 d-block d-md-none">
|
||||||
<b-button-toolbar key-nav aria-label="Toolbar with button groups">
|
<b-button-toolbar key-nav aria-label="Toolbar with button groups">
|
||||||
<b-button-group class="mx-1">
|
<b-button-group class="mx-1">
|
||||||
@ -250,6 +250,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
|
<bottom-navigation-bar></bottom-navigation-bar>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -272,6 +274,7 @@ import VueCookies from "vue-cookies"
|
|||||||
import {ApiMixin, StandardToasts, ResolveUrlMixin} from "@/utils/utils"
|
import {ApiMixin, StandardToasts, ResolveUrlMixin} from "@/utils/utils"
|
||||||
import {CalendarView, CalendarMathMixin} from "vue-simple-calendar/src/components/bundle"
|
import {CalendarView, CalendarMathMixin} from "vue-simple-calendar/src/components/bundle"
|
||||||
import {ApiApiFactory} from "@/utils/openapi/api"
|
import {ApiApiFactory} from "@/utils/openapi/api"
|
||||||
|
import BottomNavigationBar from "@/components/BottomNavigationBar.vue";
|
||||||
|
|
||||||
const {makeToast} = require("@/utils/utils")
|
const {makeToast} = require("@/utils/utils")
|
||||||
|
|
||||||
@ -292,6 +295,7 @@ export default {
|
|||||||
MealPlanCalenderHeader,
|
MealPlanCalenderHeader,
|
||||||
EmojiInput,
|
EmojiInput,
|
||||||
draggable,
|
draggable,
|
||||||
|
BottomNavigationBar,
|
||||||
},
|
},
|
||||||
mixins: [CalendarMathMixin, ApiMixin, ResolveUrlMixin],
|
mixins: [CalendarMathMixin, ApiMixin, ResolveUrlMixin],
|
||||||
data: function () {
|
data: function () {
|
||||||
|
@ -938,6 +938,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<bottom-navigation-bar></bottom-navigation-bar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -962,6 +964,7 @@ import GenericMultiselect from "@/components/GenericMultiselect"
|
|||||||
import RecipeSwitcher from "@/components/Buttons/RecipeSwitcher"
|
import RecipeSwitcher from "@/components/Buttons/RecipeSwitcher"
|
||||||
import {ApiApiFactory} from "@/utils/openapi/api"
|
import {ApiApiFactory} from "@/utils/openapi/api"
|
||||||
import {useMealPlanStore} from "@/stores/MealPlanStore";
|
import {useMealPlanStore} from "@/stores/MealPlanStore";
|
||||||
|
import BottomNavigationBar from "@/components/BottomNavigationBar.vue";
|
||||||
|
|
||||||
Vue.use(VueCookies)
|
Vue.use(VueCookies)
|
||||||
Vue.use(BootstrapVue)
|
Vue.use(BootstrapVue)
|
||||||
@ -972,7 +975,7 @@ let UI_COOKIE_NAME = "ui_search_settings"
|
|||||||
export default {
|
export default {
|
||||||
name: "RecipeSearchView",
|
name: "RecipeSearchView",
|
||||||
mixins: [ResolveUrlMixin, ApiMixin, ToastMixin],
|
mixins: [ResolveUrlMixin, ApiMixin, ToastMixin],
|
||||||
components: {GenericMultiselect, RecipeCard, Treeselect, RecipeSwitcher, Multiselect},
|
components: {GenericMultiselect, RecipeCard, Treeselect, RecipeSwitcher, Multiselect, BottomNavigationBar},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// this.Models and this.Actions inherited from ApiMixin
|
// this.Models and this.Actions inherited from ApiMixin
|
||||||
@ -1177,6 +1180,9 @@ export default {
|
|||||||
},
|
},
|
||||||
isMobile: function () { //TODO move to central helper
|
isMobile: function () { //TODO move to central helper
|
||||||
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
|
||||||
|
},
|
||||||
|
isTouch: function () {
|
||||||
|
return window.matchMedia("(pointer: coarse)").matches
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app" style="margin-bottom: 4vh">
|
<div id="app" style="margin-bottom: 4vh">
|
||||||
<b-alert :show="!online" dismissible class="small float-up" variant="warning">{{ $t("OfflineAlert") }}</b-alert>
|
<b-alert :show="!online" dismissible class="small float-up" variant="warning">{{ $t("OfflineAlert") }}</b-alert>
|
||||||
<b-button @click="replaySyncQueue">SYNC</b-button>
|
|
||||||
<div class="row float-top w-100">
|
<div class="row float-top w-100">
|
||||||
<div class="col-auto no-gutter ml-auto">
|
<div class="col-auto no-gutter ml-auto">
|
||||||
<b-button variant="link" class="px-1 pt-0 pb-1 d-none d-md-inline-block">
|
<b-button variant="link" class="px-1 pt-0 pb-1 d-none d-md-inline-block">
|
||||||
@ -589,6 +589,8 @@
|
|||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
<shopping-modal v-if="new_recipe.id" :recipe="new_recipe" :servings="parseInt(add_recipe_servings)"
|
<shopping-modal v-if="new_recipe.id" :recipe="new_recipe" :servings="parseInt(add_recipe_servings)"
|
||||||
:modal_id="new_recipe.id" @finish="finishShopping" :list_recipe="new_recipe.list_recipe"/>
|
:modal_id="new_recipe.id" @finish="finishShopping" :list_recipe="new_recipe.list_recipe"/>
|
||||||
|
|
||||||
|
<bottom-navigation-bar></bottom-navigation-bar>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -617,6 +619,7 @@ Vue.use(BootstrapVue)
|
|||||||
Vue.use(VueCookies)
|
Vue.use(VueCookies)
|
||||||
let SETTINGS_COOKIE_NAME = "shopping_settings"
|
let SETTINGS_COOKIE_NAME = "shopping_settings"
|
||||||
import {Workbox} from 'workbox-window';
|
import {Workbox} from 'workbox-window';
|
||||||
|
import BottomNavigationBar from "@/components/BottomNavigationBar.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ShoppingListView",
|
name: "ShoppingListView",
|
||||||
@ -632,7 +635,8 @@ export default {
|
|||||||
CopyToClipboard,
|
CopyToClipboard,
|
||||||
ShoppingModal,
|
ShoppingModal,
|
||||||
draggable,
|
draggable,
|
||||||
ShoppingSettingsComponent
|
ShoppingSettingsComponent,
|
||||||
|
BottomNavigationBar,
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
39
vue/src/components/BottomNavigationBar.vue
Normal file
39
vue/src/components/BottomNavigationBar.vue
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<template>
|
||||||
|
<!-- bottom button nav -->
|
||||||
|
<div class="fixed-bottom p-1 pt-2 border-top text-center d-md-none" style="background: white">
|
||||||
|
<div class="d-flex flex-row justify-content-around">
|
||||||
|
<div class="flex-column"><a class="nav-link bottom-nav-link p-0" v-bind:href="resolveDjangoUrl('view_search')">
|
||||||
|
<i class="fas fa-fw fa-book " style="font-size: 1.5em"></i><br/><small>Recipes</small></a>
|
||||||
|
</div>
|
||||||
|
<div class="flex-column"><a class="nav-link bottom-nav-link p-0" v-bind:href="resolveDjangoUrl('view_plan')">
|
||||||
|
<i class="fas fa-calendar-alt" style="font-size: 1.5em"></i><br/><small>Plans</small></a>
|
||||||
|
</div>
|
||||||
|
<div class="flex-column"><a class="nav-link bottom-nav-link p-0" v-bind:href="resolveDjangoUrl('new_recipe')">
|
||||||
|
<i class="fas fa-plus-circle fa-2x"></i><br/></a>
|
||||||
|
</div>
|
||||||
|
<div class="flex-column"><a class="nav-link bottom-nav-link p-0" v-bind:href="resolveDjangoUrl('view_shopping')">
|
||||||
|
<i class="fas fa-shopping-cart" style="font-size: 1.5em"></i><br/><small>Shopping</small></a>
|
||||||
|
</div>
|
||||||
|
<div class="flex-column"><a class="nav-link bottom-nav-link p-0" v-bind:href="resolveDjangoUrl('view_books')">
|
||||||
|
<i class="fas fa-book-open" style="font-size: 1.5em"></i><br/><small>Books</small></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {ResolveUrlMixin} from "@/utils/utils";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "BottomNavigationBar",
|
||||||
|
mixins: [ResolveUrlMixin]
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
.bottom-nav-link {
|
||||||
|
color: #666666
|
||||||
|
}
|
||||||
|
</style>
|
Reference in New Issue
Block a user