Merge branch 'develop' into feature/kilojoules

This commit is contained in:
vabene1111
2021-11-01 09:46:04 +01:00
committed by GitHub
44 changed files with 1284 additions and 1655 deletions

View File

@@ -4,6 +4,14 @@ import i18n from '@/i18n'
Vue.config.productionTip = false
// TODO move this and other default stuff to centralized JS file (verify nothing breaks)
let publicPath = localStorage.STATIC_URL + 'vue/'
if (process.env.NODE_ENV === 'development') {
publicPath = 'http://localhost:8080/'
}
export default __webpack_public_path__ = publicPath // eslint-disable-line
new Vue({
i18n,
render: h => h(App),

View File

@@ -61,10 +61,10 @@ import Vue from 'vue'
import {BootstrapVue} from 'bootstrap-vue'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import {ApiApiFactory} from "../../utils/openapi/api";
import CookbookSlider from "../../components/CookbookSlider";
import LoadingSpinner from "../../components/LoadingSpinner";
import {StandardToasts} from "../../utils/utils";
import {ApiApiFactory} from "@/utils/openapi/api";
import CookbookSlider from "@/components/CookbookSlider";
import LoadingSpinner from "@/components/LoadingSpinner";
import {StandardToasts} from "@/utils/utils";
Vue.use(BootstrapVue)

View File

@@ -4,6 +4,14 @@ import i18n from '@/i18n'
Vue.config.productionTip = false
// TODO move this and other default stuff to centralized JS file (verify nothing breaks)
let publicPath = localStorage.STATIC_URL + 'vue/'
if (process.env.NODE_ENV === 'development') {
publicPath = 'http://localhost:8080/'
}
export default __webpack_public_path__ = publicPath // eslint-disable-line
new Vue({
i18n,
render: h => h(App),

View File

@@ -4,6 +4,14 @@ import i18n from '@/i18n'
Vue.config.productionTip = false
// TODO move this and other default stuff to centralized JS file (verify nothing breaks)
let publicPath = localStorage.STATIC_URL + 'vue/'
if (process.env.NODE_ENV === 'development') {
publicPath = 'http://localhost:8080/'
}
export default __webpack_public_path__ = publicPath // eslint-disable-line
new Vue({
i18n,
render: h => h(App),

View File

@@ -231,22 +231,24 @@
<script>
import Vue from "vue";
import {BootstrapVue} from 'bootstrap-vue'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import ContextMenu from "@/components/ContextMenu/ContextMenu";
import ContextMenuItem from "@/components/ContextMenu/ContextMenuItem";
import {CalendarView, CalendarMathMixin} from "vue-simple-calendar/src/components/bundle";
import Vue from "vue";
import {ApiApiFactory} from "@/utils/openapi/api";
import MealPlanCard from "../../components/MealPlanCard";
import moment from 'moment'
import {ApiMixin, StandardToasts} from "@/utils/utils";
import MealPlanEditModal from "../../components/MealPlanEditModal";
import VueCookies from "vue-cookies";
import MealPlanCard from "@/components/MealPlanCard";
import MealPlanEditModal from "@/components/MealPlanEditModal";
import MealPlanCalenderHeader from "@/components/MealPlanCalenderHeader";
import EmojiInput from "../../components/Modals/EmojiInput";
import draggable from 'vuedraggable'
import EmojiInput from "@/components/Modals/EmojiInput";
import moment from "moment"
import draggable from "vuedraggable"
import VueCookies from "vue-cookies";
import {ApiMixin, StandardToasts} from "@/utils/utils";
import {CalendarView, CalendarMathMixin} from "vue-simple-calendar/src/components/bundle";
import {ApiApiFactory} from "@/utils/openapi/api";
const {makeToast} = require("@/utils/utils");

View File

@@ -4,6 +4,13 @@ import i18n from '@/i18n'
Vue.config.productionTip = false
// TODO move this and other default stuff to centralized JS file (verify nothing breaks)
let publicPath = localStorage.STATIC_URL + 'vue/'
if (process.env.NODE_ENV === 'development') {
publicPath = 'http://localhost:8080/'
}
export default __webpack_public_path__ = publicPath // eslint-disable-line
new Vue({
i18n,
render: h => h(App),

View File

@@ -4,6 +4,14 @@ import i18n from '@/i18n'
Vue.config.productionTip = false
// TODO move this and other default stuff to centralized JS file (verify nothing breaks)
let publicPath = localStorage.STATIC_URL + 'vue/'
if (process.env.NODE_ENV === 'development') {
publicPath = 'http://localhost:8080/'
}
export default __webpack_public_path__ = publicPath // eslint-disable-line
new Vue({
i18n,
render: h => h(App),

View File

@@ -4,6 +4,14 @@ import i18n from "@/i18n";
Vue.config.productionTip = false
// TODO move this and other default stuff to centralized JS file (verify nothing breaks)
let publicPath = localStorage.STATIC_URL + 'vue/'
if (process.env.NODE_ENV === 'development') {
publicPath = 'http://localhost:8080/'
}
export default __webpack_public_path__ = publicPath // eslint-disable-line
new Vue({
i18n,
render: h => h(App),

View File

@@ -93,22 +93,28 @@
<h5 class="d-table-cell align-middle">{{ $t('Nutrition') }}</h5>
</div>
<div class="col-md-3">
<button type="button" @click="addNutrition()"
class="btn btn-sm btn-light shadow-none float-right" v-b-toggle.id_nutrition_collapse
v-if="recipe.nutrition === null"><i class="fas fa-plus-circle"></i>
<button type="button" @click="addNutrition()" v-if="recipe.nutrition === null"
v-b-tooltip.hover v-bind:title="$t('Add_nutrition_recipe')"
class="btn btn-sm btn-success shadow-none float-right" ><i class="fas fa-plus-circle"></i>
</button>
<button type="button" @click="removeNutrition()" v-if="recipe.nutrition !== null"
v-b-toggle.id_nutrition_collapse
class="btn btn-sm btn-light shadow-none float-right"><i class="fas fa-minus-circle"></i>
v-b-tooltip.hover v-bind:title="$t('Remove_nutrition_recipe')"
class="btn btn-sm btn-danger shadow-none float-right"><i class="fas fa-trash-alt"></i>
</button>
</div>
</div>
</div>
<b-collapse id="id_nutrition_collapse" class="mt-2">
<div class="card-body " v-if="recipe.nutrition">
<b-collapse id="id_nutrition_collapse" class="mt-2" v-model="nutrition_visible">
<div class="card-body " v-if="recipe.nutrition !== null">
<b-alert show>
There is currently only very basic support for tracking nutritional information.
A <a href="https://github.com/vabene1111/recipes/issues/896" target="_blank" rel="noreferrer nofollow">big update</a> is planned to improve on this in many different areas.
</b-alert>
<label for="id_name"> {{ $t(energy()) }}</label>
<input class="form-control" id="id_calories" v-model="recipe.nutrition.calories">
<label for="id_name"> {{ $t('Carbohydrates') }}</label>
@@ -461,7 +467,8 @@
</button>
</div>
<div class="col-md-3 col-6">
<button type="button" @click="updateRecipe(true)" v-b-tooltip.hover :title="`${$t('Key_Ctrl')} + ${$t('Key_Shift')} + S`"
<button type="button" @click="updateRecipe(true)" v-b-tooltip.hover
:title="`${$t('Key_Ctrl')} + ${$t('Key_Shift')} + S`"
class="btn btn-sm btn-block btn-success shadow-none">{{ $t('Save_and_View') }}
</button>
</div>
@@ -505,7 +512,7 @@ Vue.use(VueMarkdownEditor);
Vue.use(BootstrapVue)
export default {
name: 'RecipeSearchView',
name: 'RecipeEditView',
mixins: [ResolveUrlMixin, ApiMixin],
components: {Multiselect, LoadingSpinner, draggable},
data() {
@@ -527,7 +534,11 @@ export default {
}
},
computed: {},
computed: {
nutrition_visible: function () {
return this.recipe.nutrition !== null
}
},
mounted() {
this.loadRecipe()

View File

@@ -4,6 +4,14 @@ import i18n from '@/i18n'
Vue.config.productionTip = false
// TODO move this and other default stuff to centralized JS file (verify nothing breaks)
let publicPath = localStorage.STATIC_URL + 'vue/'
if (process.env.NODE_ENV === 'development') {
publicPath = 'http://localhost:8080/'
}
export default __webpack_public_path__ = publicPath // eslint-disable-line
new Vue({
i18n,
render: h => h(App),

View File

@@ -4,6 +4,14 @@ import i18n from '@/i18n'
Vue.config.productionTip = false
// TODO move this and other default stuff to centralized JS file (verify nothing breaks)
let publicPath = localStorage.STATIC_URL + 'vue/'
if (process.env.NODE_ENV === 'development') {
publicPath = 'http://localhost:8080/'
}
export default __webpack_public_path__ = publicPath // eslint-disable-line
new Vue({
i18n,
render: h => h(App),

View File

@@ -4,6 +4,14 @@ import i18n from "@/i18n";
Vue.config.productionTip = false
// TODO move this and other default stuff to centralized JS file (verify nothing breaks)
let publicPath = localStorage.STATIC_URL + 'vue/'
if (process.env.NODE_ENV === 'development') {
publicPath = 'http://localhost:8080/'
}
export default __webpack_public_path__ = publicPath // eslint-disable-line
new Vue({
i18n,
render: h => h(App),

View File

@@ -4,6 +4,14 @@ import i18n from '@/i18n'
Vue.config.productionTip = false
// TODO move this and other default stuff to centralized JS file (verify nothing breaks)
let publicPath = localStorage.STATIC_URL + 'vue/'
if (process.env.NODE_ENV === 'development') {
publicPath = 'http://localhost:8080/'
}
export default __webpack_public_path__ = publicPath // eslint-disable-line
new Vue({
i18n,
render: h => h(App),