mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-01-17 14:31:21 -05:00
Upload component (#113)
* unified upload button + download backups * javascript toolings * fix vuetur config * fixed type check error * refactor: clean up bag javascript * UI updates + name validation * docs: changelog + sp * fixed route links * changelog Co-authored-by: Hayden <hay-kot@pm.me>
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
<v-card
|
||||
:class="{ 'on-hover': hover }"
|
||||
:elevation="hover ? 12 : 2"
|
||||
@click="moreInfo(slug)"
|
||||
:to="route ? `/recipe/${slug}` : ''"
|
||||
@click="$emit('click')"
|
||||
>
|
||||
<v-img height="200" :src="getImage(image)"></v-img>
|
||||
<v-card-title class="my-n3 mb-n6">{{ name | truncate(30) }}</v-card-title>
|
||||
@@ -52,11 +53,6 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
moreInfo(recipeSlug) {
|
||||
if (this.route) {
|
||||
this.$router.push(`/recipe/${recipeSlug}`);
|
||||
} else this.$emit("click");
|
||||
},
|
||||
getImage(image) {
|
||||
return utils.getImageURL(image);
|
||||
},
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
<template>
|
||||
<v-form ref="file">
|
||||
<input ref="uploader" class="d-none" type="file" @change="onFileChanged" />
|
||||
<v-btn
|
||||
:loading="isSelecting"
|
||||
@click="onButtonClick"
|
||||
color="success"
|
||||
text
|
||||
>
|
||||
<v-icon left > mdi-cloud-upload </v-icon>
|
||||
<v-btn :loading="isSelecting" @click="onButtonClick" color="accent" text>
|
||||
<v-icon left> mdi-cloud-upload </v-icon>
|
||||
Upload
|
||||
</v-btn>
|
||||
</v-form>
|
||||
|
||||
Reference in New Issue
Block a user