diff --git a/frontend/.env.development b/frontend/.env.development index a974085c..4afc44f7 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -1 +1,2 @@ -VUE_APP_API_BASE_URL=http://localhost:9000 \ No newline at end of file +VUE_APP_API_BASE_URL=http://localhost:9000 +PREVIEW_BUNDLE=true \ No newline at end of file diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 9adedd60..d13917bd 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -2202,6 +2202,12 @@ "integrity": "sha512-jswRF6q3eq8NWpWiqct6q+6Fg/I7nUhrxYJfiEM8JJpap0wVJLQdbKtyS65GdlK7S7Ytnx3TTi/bmw+tBhkGmg==", "dev": true }, + "@mdi/js": { + "version": "5.9.55", + "resolved": "https://registry.npmjs.org/@mdi/js/-/js-5.9.55.tgz", + "integrity": "sha512-BbeHMgeK2/vjdJIRnx12wvQ6s8xAYfvMmEAVsUx9b+7GiQGQ9Za8jpwp17dMKr9CgKRvemlAM4S7S3QOtEbp4A==", + "dev": true + }, "@mrmlnc/readdir-enhanced": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", @@ -2218,6 +2224,12 @@ "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", "dev": true }, + "@polka/url": { + "version": "1.0.0-next.15", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.15.tgz", + "integrity": "sha512-15spi3V28QdevleWBNXE4pIls3nFZmBbUGrW9IVPwiQczuSb9n76TCB4bsk8TSel+I1OkHEdPhu5QKMfY6rQHA==", + "dev": true + }, "@soda/friendly-errors-webpack-plugin": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/@soda/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.8.0.tgz", @@ -11189,6 +11201,17 @@ } } }, + "sirv": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.12.tgz", + "integrity": "sha512-+jQoCxndz7L2tqQL4ZyzfDhky0W/4ZJip3XoOuxyQWnAwMxindLl3Xv1qT4x1YX/re0leShvTm8Uk0kQspGhBg==", + "dev": true, + "requires": { + "@polka/url": "^1.0.0-next.15", + "mime": "^2.3.1", + "totalist": "^1.0.0" + } + }, "slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", @@ -12222,6 +12245,12 @@ "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", "dev": true }, + "totalist": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz", + "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==", + "dev": true + }, "tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -12751,6 +12780,116 @@ } } }, + "vue-cli-plugin-webpack-bundle-analyzer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/vue-cli-plugin-webpack-bundle-analyzer/-/vue-cli-plugin-webpack-bundle-analyzer-4.0.0.tgz", + "integrity": "sha512-gEQt8RMh0j9aD591PXjuMJMoKG6Aaylsi2rZHDiDRE9zGEk7wlUMrIVGwL9bYnMAHSHkojQL4oQinM3WBxCDew==", + "dev": true, + "requires": { + "webpack-bundle-analyzer": "^4.2.0" + }, + "dependencies": { + "acorn": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.0.tgz", + "integrity": "sha512-ULr0LDaEqQrMFGyQ3bhJkLsbtrQ8QibAseGZeaSUiT/6zb9IvIkomWHJIvgvwad+hinRAgsI51JcWk2yvwyL+w==", + "dev": true + }, + "acorn-walk": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.0.tgz", + "integrity": "sha512-mjmzmv12YIG/G8JQdQuz2MUDShEJ6teYpT5bmWA4q7iwoGen8xtt3twF3OvzIUl+Q06aWIjvnwQUKvQ6TtMRjg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true + }, + "gzip-size": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "dev": true, + "requires": { + "duplexer": "^0.1.2" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "webpack-bundle-analyzer": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.4.2.tgz", + "integrity": "sha512-PIagMYhlEzFfhMYOzs5gFT55DkUdkyrJi/SxJp8EF3YMWhS+T9vvs2EoTetpk5qb6VsCq02eXTlRDOydRhDFAQ==", + "dev": true, + "requires": { + "acorn": "^8.0.4", + "acorn-walk": "^8.0.0", + "chalk": "^4.1.0", + "commander": "^6.2.0", + "gzip-size": "^6.0.0", + "lodash": "^4.17.20", + "opener": "^1.5.2", + "sirv": "^1.0.7", + "ws": "^7.3.1" + } + }, + "ws": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.0.tgz", + "integrity": "sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgi4vw==", + "dev": true + } + } + }, "vue-eslint-parser": { "version": "7.6.0", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.6.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 8cac49d4..5fe3fd57 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -27,6 +27,7 @@ "devDependencies": { "@intlify/vue-i18n-loader": "^1.1.0", "@mdi/font": "^5.9.55", + "@mdi/js": "^5.9.55", "@vue/cli-plugin-babel": "^4.5.13", "@vue/cli-plugin-eslint": "^4.5.13", "@vue/cli-plugin-pwa": "~4.5.0", @@ -38,6 +39,7 @@ "sass-loader": "^8.0.2", "vue-cli-plugin-i18n": "~1.0.1", "vue-cli-plugin-vuetify": "^2.4.1", + "vue-cli-plugin-webpack-bundle-analyzer": "^4.0.0", "vue-template-compiler": "^2.6.14", "vuetify-loader": "^1.7.2" }, diff --git a/frontend/src/components/Fallbacks/The404.vue b/frontend/src/components/Fallbacks/The404.vue index cf88a33c..885a722e 100644 --- a/frontend/src/components/Fallbacks/The404.vue +++ b/frontend/src/components/Fallbacks/The404.vue @@ -32,9 +32,9 @@ export default { data() { return { buttons: [ - { icon: "mdi-home", to: "/", text: "Home" }, + { icon: this.$globals.icons.home, to: "/", text: "Home" }, { icon: this.$globals.icons.primary, to: "/recipes/all", text: "All Recipes" }, - { icon: "mdi-magnify", to: "/search", text: "Search" }, + { icon: this.$globals.icons.search, to: "/search", text: "Search" }, ], }; }, diff --git a/frontend/src/components/FormHelpers/LanguageSelector.vue b/frontend/src/components/FormHelpers/LanguageSelector.vue index ca6621fc..c1959003 100644 --- a/frontend/src/components/FormHelpers/LanguageSelector.vue +++ b/frontend/src/components/FormHelpers/LanguageSelector.vue @@ -4,7 +4,7 @@ :items="allLanguages" item-text="name" :label="$t('settings.language')" - prepend-icon="mdi-translate" + :prepend-icon="$globals.icons.translate" :value="selectedItem" @input="setLanguage" > diff --git a/frontend/src/components/FormHelpers/TimePickerDialog.vue b/frontend/src/components/FormHelpers/TimePickerDialog.vue index 2d5eaf6b..8a7c9e85 100644 --- a/frontend/src/components/FormHelpers/TimePickerDialog.vue +++ b/frontend/src/components/FormHelpers/TimePickerDialog.vue @@ -4,7 +4,7 @@ - mdi-import + {{ $globals.icons.import }} {{ $t("settings.backup.import-summary") }} diff --git a/frontend/src/components/Login/LoginForm.vue b/frontend/src/components/Login/LoginForm.vue index c36d0785..d3bda238 100644 --- a/frontend/src/components/Login/LoginForm.vue +++ b/frontend/src/components/Login/LoginForm.vue @@ -14,18 +14,21 @@ diff --git a/frontend/src/components/Login/SignUpForm.vue b/frontend/src/components/Login/SignUpForm.vue index e2f1110c..4aa118f8 100644 --- a/frontend/src/components/Login/SignUpForm.vue +++ b/frontend/src/components/Login/SignUpForm.vue @@ -34,7 +34,7 @@ diff --git a/frontend/src/components/MealPlan/MealPlanNew.vue b/frontend/src/components/MealPlan/MealPlanNew.vue index 47740940..75450279 100644 --- a/frontend/src/components/MealPlan/MealPlanNew.vue +++ b/frontend/src/components/MealPlan/MealPlanNew.vue @@ -3,7 +3,7 @@ {{ $t("meal-plan.create-a-new-meal-plan") }} - mdi-calendar-minus + {{ $globals.icons.calendarMinus }} {{ $t("meal-plan.quick-week") }} @@ -26,7 +26,7 @@ v-model="startComputedDateFormatted" :label="$t('meal-plan.start-date')" persistent-hint - prepend-icon="mdi-calendar" + :prepend-icon="$globals.icons.calendarMinus" readonly v-bind="attrs" v-on="on" @@ -50,7 +50,7 @@ v-model="endComputedDateFormatted" :label="$t('meal-plan.end-date')" persistent-hint - prepend-icon="mdi-calendar" + :prepend-icon="$globals.icons.calendarMinus" readonly v-bind="attrs" v-on="on" @@ -69,7 +69,7 @@ {{ $t("general.random") }} diff --git a/frontend/src/components/Recipe/CommentSection/index.vue b/frontend/src/components/Recipe/CommentSection/index.vue index 29edd42a..f504fd1f 100644 --- a/frontend/src/components/Recipe/CommentSection/index.vue +++ b/frontend/src/components/Recipe/CommentSection/index.vue @@ -2,9 +2,9 @@ - mdi-comment-text-multiple-outline + {{ $globals.icons.commentTextMultipleOutline }} - {{ $t('recipe.comments') }} + {{ $t("recipe.comments") }} @@ -43,7 +43,7 @@
- {{ $t('recipe.comment-action') }} + {{ $t("recipe.comment-action") }}
diff --git a/frontend/src/components/Recipe/ContextMenu.vue b/frontend/src/components/Recipe/ContextMenu.vue index 8cde1278..5f73d5cf 100644 --- a/frontend/src/components/Recipe/ContextMenu.vue +++ b/frontend/src/components/Recipe/ContextMenu.vue @@ -4,7 +4,7 @@ :title="$t('recipe.delete-recipe')" :message="$t('recipe.delete-confirmation')" color="error" - icon="mdi-alert-circle" + :icon="$globals.icons.alertCircle" ref="deleteRecipieConfirm" v-on:confirm="deleteRecipe()" /> @@ -21,7 +21,7 @@ > @@ -65,7 +65,7 @@ export default { type: String, }, menuIcon: { - default: "mdi-dots-vertical", + default: null, }, name: { type: String, @@ -76,6 +76,9 @@ export default { }, }, computed: { + effMenuIcon() { + return this.menuIcon ? this.menuIcon : this.$globals.icons.dotsVertical; + }, loggedIn() { return this.$store.getters.getIsLoggedIn; }, @@ -89,13 +92,13 @@ export default { return [ { title: this.$t("general.print"), - icon: "mdi-printer", + icon: this.$globals.icons.printer, color: "accent", action: "print", }, { title: this.$t("general.share"), - icon: "mdi-share-variant", + icon: this.$globals.icons.shareVariant, color: "accent", action: "share", }, diff --git a/frontend/src/components/Recipe/FavoriteBadge.vue b/frontend/src/components/Recipe/FavoriteBadge.vue index 85f8721b..35c7b2d1 100644 --- a/frontend/src/components/Recipe/FavoriteBadge.vue +++ b/frontend/src/components/Recipe/FavoriteBadge.vue @@ -12,7 +12,7 @@ v-on="on" > - {{ isFavorite ? "mdi-heart" : "mdi-heart-outline" }} + {{ isFavorite ? $globals.icons.heart : $globals.icons.heartOutline }} diff --git a/frontend/src/components/Recipe/MobileRecipeCard.vue b/frontend/src/components/Recipe/MobileRecipeCard.vue index acde72e2..58c95fe6 100644 --- a/frontend/src/components/Recipe/MobileRecipeCard.vue +++ b/frontend/src/components/Recipe/MobileRecipeCard.vue @@ -34,11 +34,7 @@ :value="rating" > - + diff --git a/frontend/src/components/Recipe/Parts/Assets.vue b/frontend/src/components/Recipe/Parts/Assets.vue index 3fc7ad48..9933ea88 100644 --- a/frontend/src/components/Recipe/Parts/Assets.vue +++ b/frontend/src/components/Recipe/Parts/Assets.vue @@ -8,14 +8,14 @@ - + - mdi-download + {{ $globals.icons.download }}
@@ -29,7 +29,7 @@
- +