mirror of
https://github.com/hay-kot/mealie.git
synced 2025-07-05 20:42:23 -07:00
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Docker Nightly Production / Backend Server Tests (push) Waiting to run
Docker Nightly Production / Frontend Tests (push) Waiting to run
Docker Nightly Production / Build Package (push) Waiting to run
Docker Nightly Production / Build Tagged Release (push) Blocked by required conditions
Docker Nightly Production / Notify Discord (push) Blocked by required conditions
Release Drafter / ✏️ Draft release (push) Waiting to run
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
39 lines
1 KiB
Vue
39 lines
1 KiB
Vue
<template>
|
|
<div>
|
|
<v-switch
|
|
v-for="(_, key) in model"
|
|
:key="key"
|
|
v-model="model[key]"
|
|
color="primary"
|
|
xs
|
|
density="compact"
|
|
:disabled="key == 'locked' && !isOwner"
|
|
class="my-1"
|
|
:label="labels[key]"
|
|
hide-details
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { defineModel, defineProps } from "vue";
|
|
import type { RecipeSettings } from "~/lib/api/types/recipe";
|
|
import { useI18n } from "#imports";
|
|
|
|
defineProps<{ isOwner?: boolean }>();
|
|
|
|
const model = defineModel<RecipeSettings>({ required: true });
|
|
|
|
const i18n = useI18n();
|
|
const labels: Record<keyof RecipeSettings, string> = {
|
|
public: i18n.t("recipe.public-recipe"),
|
|
showNutrition: i18n.t("recipe.show-nutrition-values"),
|
|
showAssets: i18n.t("asset.show-assets"),
|
|
landscapeView: i18n.t("recipe.landscape-view-coming-soon"),
|
|
disableComments: i18n.t("recipe.disable-comments"),
|
|
disableAmount: i18n.t("recipe.disable-amount"),
|
|
locked: i18n.t("recipe.locked"),
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped></style>
|