mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-27 14:14:05 -05:00
Bug/general fixes (#450)
* Fix asset link * remove unused var * fix no meal-plan returned * cleanup redundant code * Fix dates off in UI * quick set dark/light mode * user image fixes Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
@@ -91,7 +91,7 @@ export default {
|
||||
this.hideImage == false;
|
||||
},
|
||||
getProfileImage(id) {
|
||||
return `api/users/${id}/image`;
|
||||
return api.users.userProfileImage(id);
|
||||
},
|
||||
editComment(id) {
|
||||
this.$set(this.editKeys, id, true);
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
<v-btn color="error" icon @click="deleteAsset(i)" top>
|
||||
<v-icon>{{ $globals.icons.delete }}</v-icon>
|
||||
</v-btn>
|
||||
<v-btn color="primary" icon @click="copyLink(item.name, item.fileName)" top>
|
||||
<v-icon>mdi-content-copy</v-icon>
|
||||
</v-btn>
|
||||
<TheCopyButton :copy-text="copyLink(item.fileName)" />
|
||||
</div>
|
||||
</v-list-item-action>
|
||||
</v-list-item>
|
||||
@@ -60,6 +58,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TheCopyButton from "@/components/UI/Buttons/TheCopyButton";
|
||||
import TheUploadBtn from "@/components/UI/Buttons/TheUploadBtn";
|
||||
import BaseDialog from "@/components/UI/Dialogs/BaseDialog";
|
||||
import { api } from "@/api";
|
||||
@@ -67,6 +66,7 @@ export default {
|
||||
components: {
|
||||
BaseDialog,
|
||||
TheUploadBtn,
|
||||
TheCopyButton,
|
||||
},
|
||||
props: {
|
||||
slug: String,
|
||||
@@ -130,13 +130,9 @@ export default {
|
||||
deleteAsset(index) {
|
||||
this.value.splice(index, 1);
|
||||
},
|
||||
copyLink(name, fileName) {
|
||||
copyLink(fileName) {
|
||||
const assetLink = api.recipes.recipeAssetPath(this.slug, fileName);
|
||||
const copyText = ``;
|
||||
navigator.clipboard.writeText(copyText).then(
|
||||
() => console.log("Copied", copyText),
|
||||
() => console.log("Copied Failed", copyText)
|
||||
);
|
||||
return `<img src="${this.baseURL}${assetLink}" height="100%" width="100%"> </img>`;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user