diff --git a/frontend/app/components/Domain/Recipe/RecipeDialogAddToShoppingList.vue b/frontend/app/components/Domain/Recipe/RecipeDialogAddToShoppingList.vue index a217facdf..f315c4ce3 100644 --- a/frontend/app/components/Domain/Recipe/RecipeDialogAddToShoppingList.vue +++ b/frontend/app/components/Domain/Recipe/RecipeDialogAddToShoppingList.vue @@ -170,12 +170,12 @@ + @@ -79,7 +79,7 @@ variant="text" class="ml-2" icon - @click="toggleEdit(true)" + @click="toggleEdit(!edit)" > {{ $globals.icons.edit }} @@ -113,24 +113,17 @@ - - - - - + +
https://stackoverflow.com/questions/3942878/how-to-decide-font-color-in-white-or-black-depending-on-background-color -*/ -export function getTextColor(bgColor: string | undefined): string { - if (!bgColor) { - return DARK_COLOR; - } - - try { - const color = new Color(bgColor); - - // if opacity is less than 0.3 always return dark color - if (color._rgba[3] < 0.3) { - return DARK_COLOR; - } - - const uicolors = [color._rgba[0] / 255, color._rgba[1] / 255, color._rgba[2] / 255]; - const c = uicolors.map((col) => { - if (col <= 0.03928) { - return col / 12.92; - } - return Math.pow((col + 0.055) / 1.055, 2.4); - }); - const L = 0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2]; - return L > ACCESSIBILITY_THRESHOLD ? DARK_COLOR : LIGHT_COLOR; - } - catch (error) { - console.warn(error); - return DARK_COLOR; - } -} diff --git a/frontend/app/lib/icons/icons.ts b/frontend/app/lib/icons/icons.ts index 72db028fe..39f57d556 100644 --- a/frontend/app/lib/icons/icons.ts +++ b/frontend/app/lib/icons/icons.ts @@ -31,9 +31,9 @@ import { mdiChartLine, mdiCheck, mdiCheckBold, - mdiCheckboxBlankOutline, mdiCheckboxMarkedCircle, - mdiCheckboxOutline, + mdiCheckboxMultipleBlankOutline, + mdiCheckboxMultipleOutline, mdiChefHat, mdiChevronDown, mdiChevronRight, @@ -198,8 +198,8 @@ export const icons = { cartCheck: mdiCartCheck, check: mdiCheck, checkBold: mdiCheckBold, - checkboxBlankOutline: mdiCheckboxBlankOutline, - checkboxOutline: mdiCheckboxOutline, + checkboxMultipleBlankOutline: mdiCheckboxMultipleBlankOutline, + checkboxMultipleMarkedOutline: mdiCheckboxMultipleOutline, checkboxMarkedCircle: mdiCheckboxMarkedCircle, chefHat: mdiChefHat, clipboardCheck: mdiClipboardCheck, diff --git a/frontend/app/pages/shopping-lists/[id].vue b/frontend/app/pages/shopping-lists/[id].vue index 6b289c0d8..1cf25498e 100644 --- a/frontend/app/pages/shopping-lists/[id].vue +++ b/frontend/app/pages/shopping-lists/[id].vue @@ -71,84 +71,72 @@ - {{ $globals.icons.primary }} + {{ $globals.icons.silverwareForkKnife }} {{ $t('shopping-list.linked-recipes-count', shoppingList.recipeReferences @@ -361,7 +349,7 @@ import { useLabelStore, useUnitStore, useFoodStore } from "~/composables/store"; import { alert } from "~/composables/use-toast"; import type { ShoppingListItemOut } from "~/lib/api/types/household"; -const { mdAndUp } = useDisplay(); +const { smAndUp } = useDisplay(); const i18n = useI18n(); useSeoMeta({ diff --git a/frontend/package.json b/frontend/package.json index cfab6d552..26877a002 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -23,7 +23,6 @@ "@mdi/js": "^7.4.47", "@nuxt/fonts": "^0.11.4", "@nuxtjs/i18n": "^9.2.1", - "@sphinxxxx/color-conversion": "^2.2.2", "@vite-pwa/nuxt": "^0.10.6", "@vueuse/core": "^12.7.0", "@vueuse/shared": "^14.3.0",