mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-05-31 04:05:33 -04:00
fix recipe assets build (#1286)
This commit is contained in:
parent
7609715d9e
commit
d66d6c55ae
@ -23,14 +23,14 @@
|
|||||||
</v-list-item-title>
|
</v-list-item-title>
|
||||||
</v-list-item-content>
|
</v-list-item-content>
|
||||||
<v-list-item-action>
|
<v-list-item-action>
|
||||||
<v-btn v-if="!edit" color="primary" icon :href="assetURL(item.fileName as string)" target="_blank" top>
|
<v-btn v-if="!edit" color="primary" icon :href="assetURL(item.fileName)" target="_blank" top>
|
||||||
<v-icon> {{ $globals.icons.download }} </v-icon>
|
<v-icon> {{ $globals.icons.download }} </v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<v-btn color="error" icon top @click="value.splice(i, 1)">
|
<v-btn color="error" icon top @click="value.splice(i, 1)">
|
||||||
<v-icon>{{ $globals.icons.delete }}</v-icon>
|
<v-icon>{{ $globals.icons.delete }}</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<AppButtonCopy color="" :copy-text="assetEmbed(item.fileName as string)" />
|
<AppButtonCopy color="" :copy-text="assetEmbed(item.fileName)" />
|
||||||
</div>
|
</div>
|
||||||
</v-list-item-action>
|
</v-list-item-action>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
@ -39,21 +39,21 @@
|
|||||||
<div class="d-flex ml-auto mt-2">
|
<div class="d-flex ml-auto mt-2">
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<BaseDialog
|
<BaseDialog
|
||||||
v-model="newAssetDialog"
|
v-model="state.newAssetDialog"
|
||||||
:title="$tc('asset.new-asset')"
|
:title="$tc('asset.new-asset')"
|
||||||
:icon="getIconDefinition(newAsset.icon).icon"
|
:icon="getIconDefinition(state.newAsset.icon).icon"
|
||||||
@submit="addAsset"
|
@submit="addAsset"
|
||||||
>
|
>
|
||||||
<template #activator>
|
<template #activator>
|
||||||
<BaseButton v-if="edit" small create @click="newAssetDialog = true" />
|
<BaseButton v-if="edit" small create @click="newAssetDialog = true" />
|
||||||
</template>
|
</template>
|
||||||
<v-card-text class="pt-4">
|
<v-card-text class="pt-4">
|
||||||
<v-text-field v-model="newAsset.name" dense :label="$t('general.name')"></v-text-field>
|
<v-text-field v-model="state.newAsset.name" dense :label="$t('general.name')"></v-text-field>
|
||||||
<div class="d-flex justify-space-between">
|
<div class="d-flex justify-space-between">
|
||||||
<v-select
|
<v-select
|
||||||
v-model="newAsset.icon"
|
v-model="state.newAsset.icon"
|
||||||
dense
|
dense
|
||||||
:prepend-icon="getIconDefinition(newAsset.icon).icon"
|
:prepend-icon="getIconDefinition(state.newAsset.icon).icon"
|
||||||
:items="iconOptions"
|
:items="iconOptions"
|
||||||
item-text="title"
|
item-text="title"
|
||||||
item-value="name"
|
item-value="name"
|
||||||
@ -70,7 +70,7 @@
|
|||||||
</v-select>
|
</v-select>
|
||||||
<AppButtonUpload :post="false" file-name="file" :text-btn="false" @uploaded="setFileObject" />
|
<AppButtonUpload :post="false" file-name="file" :text-btn="false" @uploaded="setFileObject" />
|
||||||
</div>
|
</div>
|
||||||
{{ fileObject.name }}
|
{{ state.fileObject.name }}
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</BaseDialog>
|
</BaseDialog>
|
||||||
</div>
|
</div>
|
||||||
@ -78,7 +78,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, reactive, toRefs, useContext } from "@nuxtjs/composition-api";
|
import { defineComponent, reactive, useContext } from "@nuxtjs/composition-api";
|
||||||
import { useStaticRoutes, useUserApi } from "~/composables/api";
|
import { useStaticRoutes, useUserApi } from "~/composables/api";
|
||||||
import { alert } from "~/composables/use-toast";
|
import { alert } from "~/composables/use-toast";
|
||||||
import { RecipeAsset } from "~/types/api-types/recipe";
|
import { RecipeAsset } from "~/types/api-types/recipe";
|
||||||
@ -186,7 +186,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
state,
|
||||||
addAsset,
|
addAsset,
|
||||||
assetURL,
|
assetURL,
|
||||||
assetEmbed,
|
assetEmbed,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user