mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-30 17:53:31 -04:00 
			
		
		
		
	feat: Add Households to Mealie (#3970)
This commit is contained in:
		| @@ -2,30 +2,11 @@ | ||||
|   <div v-if="preferences"> | ||||
|     <BaseCardSectionTitle :title="$tc('group.general-preferences')"></BaseCardSectionTitle> | ||||
|     <v-checkbox v-model="preferences.privateGroup" class="mt-n4" :label="$t('group.private-group')"></v-checkbox> | ||||
|     <v-select | ||||
|       v-model="preferences.firstDayOfWeek" | ||||
|       :prepend-icon="$globals.icons.calendarWeekBegin" | ||||
|       :items="allDays" | ||||
|       item-text="name" | ||||
|       item-value="value" | ||||
|       :label="$t('settings.first-day-of-week')" | ||||
|     /> | ||||
|  | ||||
|     <BaseCardSectionTitle class="mt-5" :title="$tc('group.group-recipe-preferences')"></BaseCardSectionTitle> | ||||
|     <template v-for="(_, key) in preferences"> | ||||
|       <v-checkbox | ||||
|         v-if="labels[key]" | ||||
|         :key="key" | ||||
|         v-model="preferences[key]" | ||||
|         class="mt-n4" | ||||
|         :label="labels[key]" | ||||
|       ></v-checkbox> | ||||
|     </template> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script lang="ts"> | ||||
| import { defineComponent, computed, useContext } from "@nuxtjs/composition-api"; | ||||
| import { defineComponent, computed } from "@nuxtjs/composition-api"; | ||||
|  | ||||
| export default defineComponent({ | ||||
|   props: { | ||||
| @@ -35,48 +16,6 @@ export default defineComponent({ | ||||
|     }, | ||||
|   }, | ||||
|   setup(props, context) { | ||||
|     const { i18n } = useContext(); | ||||
|  | ||||
|     const labels = { | ||||
|       recipePublic: i18n.tc("group.allow-users-outside-of-your-group-to-see-your-recipes"), | ||||
|       recipeShowNutrition: i18n.tc("group.show-nutrition-information"), | ||||
|       recipeShowAssets: i18n.tc("group.show-recipe-assets"), | ||||
|       recipeLandscapeView: i18n.tc("group.default-to-landscape-view"), | ||||
|       recipeDisableComments: i18n.tc("group.disable-users-from-commenting-on-recipes"), | ||||
|       recipeDisableAmount: i18n.tc("group.disable-organizing-recipe-ingredients-by-units-and-food"), | ||||
|     }; | ||||
|  | ||||
|     const allDays = [ | ||||
|       { | ||||
|         name: i18n.t("general.sunday"), | ||||
|         value: 0, | ||||
|       }, | ||||
|       { | ||||
|         name: i18n.t("general.monday"), | ||||
|         value: 1, | ||||
|       }, | ||||
|       { | ||||
|         name: i18n.t("general.tuesday"), | ||||
|         value: 2, | ||||
|       }, | ||||
|       { | ||||
|         name: i18n.t("general.wednesday"), | ||||
|         value: 3, | ||||
|       }, | ||||
|       { | ||||
|         name: i18n.t("general.thursday"), | ||||
|         value: 4, | ||||
|       }, | ||||
|       { | ||||
|         name: i18n.t("general.friday"), | ||||
|         value: 5, | ||||
|       }, | ||||
|       { | ||||
|         name: i18n.t("general.saturday"), | ||||
|         value: 6, | ||||
|       }, | ||||
|     ]; | ||||
|  | ||||
|     const preferences = computed({ | ||||
|       get() { | ||||
|         return props.value; | ||||
| @@ -87,8 +26,6 @@ export default defineComponent({ | ||||
|     }); | ||||
|  | ||||
|     return { | ||||
|       allDays, | ||||
|       labels, | ||||
|       preferences, | ||||
|     }; | ||||
|   }, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user