mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-05-24 01:12:54 -04:00
fix linter issues
This commit is contained in:
parent
a1b1b529a3
commit
3ed197a843
@ -57,9 +57,11 @@ export default {
|
||||
props: {
|
||||
comments: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
slug: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
@ -85,7 +87,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
resetImage() {
|
||||
this.hideImage == false;
|
||||
this.hideImage = false;
|
||||
},
|
||||
getProfileImage(id) {
|
||||
return api.users.userProfileImage(id);
|
||||
|
@ -41,7 +41,7 @@ export default {
|
||||
const split = this.inputText.split("\n");
|
||||
|
||||
split.forEach((element, index) => {
|
||||
if ((element === "\n") | (element == false)) {
|
||||
if ((element === "\n") | (element === false)) {
|
||||
split.splice(index, 1);
|
||||
}
|
||||
});
|
||||
|
@ -49,7 +49,10 @@
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
extras: Object,
|
||||
extras: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -57,8 +60,8 @@ export default {
|
||||
dialog: false,
|
||||
formKey: 1,
|
||||
rules: {
|
||||
required: v => !!v || this.$i18n.t("recipe.key-name-required"),
|
||||
whiteSpace: v => !v || v.split(" ").length <= 1 || this.$i18n.t("recipe.no-white-space-allowed"),
|
||||
required: (v) => !!v || this.$i18n.t("recipe.key-name-required"),
|
||||
whiteSpace: (v) => !v || v.split(" ").length <= 1 || this.$i18n.t("recipe.no-white-space-allowed"),
|
||||
},
|
||||
};
|
||||
},
|
||||
|
@ -84,6 +84,7 @@ export default {
|
||||
props: {
|
||||
value: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
|
||||
edit: {
|
||||
|
@ -97,6 +97,7 @@ export default {
|
||||
props: {
|
||||
value: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
|
||||
edit: {
|
||||
@ -115,13 +116,13 @@ export default {
|
||||
value: {
|
||||
handler() {
|
||||
this.disabledSteps = [];
|
||||
this.showTitleEditor = this.value.map(x => this.validateTitle(x.title));
|
||||
this.showTitleEditor = this.value.map((x) => this.validateTitle(x.title));
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.showTitleEditor = this.value.map(x => this.validateTitle(x.title));
|
||||
this.showTitleEditor = this.value.map((x) => this.validateTitle(x.title));
|
||||
},
|
||||
|
||||
methods: {
|
||||
@ -148,8 +149,6 @@ export default {
|
||||
isChecked(stepIndex) {
|
||||
if (this.disabledSteps.includes(stepIndex) && !this.edit) {
|
||||
return "disabled-card";
|
||||
} else {
|
||||
|
||||
}
|
||||
},
|
||||
toggleShowTitle(index) {
|
||||
|
@ -43,6 +43,7 @@ export default {
|
||||
props: {
|
||||
value: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
|
||||
edit: {
|
||||
|
@ -21,7 +21,7 @@
|
||||
<v-list v-if="showViewer" dense class="mt-0 pt-0">
|
||||
<v-list-item v-for="(item, key, index) in labels" :key="index">
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="pl-4 text-subtitle-1 flex row ">
|
||||
<v-list-item-title class="pl-4 text-subtitle-1 flex row">
|
||||
<div>{{ item.label }}</div>
|
||||
<div class="ml-auto mr-1">{{ value[key] }}</div>
|
||||
<div>{{ item.suffix }}</div>
|
||||
@ -36,7 +36,10 @@
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
value: {},
|
||||
value: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
edit: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
|
@ -69,7 +69,10 @@ export default {
|
||||
VueMarkdown,
|
||||
},
|
||||
props: {
|
||||
recipe: Object,
|
||||
recipe: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -37,7 +37,10 @@
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
value: Object,
|
||||
value: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
@ -36,9 +36,11 @@
|
||||
export default {
|
||||
props: {
|
||||
copyText: {
|
||||
type: String,
|
||||
default: "Default Copy Text",
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: "primary",
|
||||
},
|
||||
},
|
||||
|
@ -24,6 +24,7 @@
|
||||
export default {
|
||||
props: {
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
small: {
|
||||
@ -62,7 +63,7 @@ export default {
|
||||
},
|
||||
waitingText() {
|
||||
return this.$t("general.loading-recipes");
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -23,8 +23,14 @@
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
buttonText: String,
|
||||
value: String,
|
||||
buttonText: {
|
||||
type: String,
|
||||
default: "Choose a color",
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: "#ff0000",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -200,7 +200,8 @@ const icons = {
|
||||
accountPlusOutline: mdiAccountPlusOutline,
|
||||
};
|
||||
|
||||
export default ({ app }, inject) => {
|
||||
// eslint-disable-next-line no-empty-pattern
|
||||
export default ({}, inject) => {
|
||||
// Inject $hello(msg) in Vue, context and store.
|
||||
inject("globals", { icons });
|
||||
};
|
||||
|
@ -4,7 +4,7 @@ import { store } from "@/store";
|
||||
// TODO: Migrate to Mixins
|
||||
|
||||
export const utils = {
|
||||
recipe: recipe,
|
||||
recipe,
|
||||
generateUniqueKey(item, index) {
|
||||
return `${item}-${index}`;
|
||||
},
|
||||
@ -16,35 +16,35 @@ export const utils = {
|
||||
return `${year}-${month}-${day}`;
|
||||
},
|
||||
notify: {
|
||||
info: function(text, title = null) {
|
||||
info(text, title = null) {
|
||||
store.commit("setSnackbar", {
|
||||
open: true,
|
||||
title: title,
|
||||
text: text,
|
||||
title,
|
||||
text,
|
||||
color: "info",
|
||||
});
|
||||
},
|
||||
success: function(text, title = null) {
|
||||
success(text, title = null) {
|
||||
store.commit("setSnackbar", {
|
||||
open: true,
|
||||
title: title,
|
||||
text: text,
|
||||
title,
|
||||
text,
|
||||
color: "success",
|
||||
});
|
||||
},
|
||||
error: function(text, title = null) {
|
||||
error(text, title = null) {
|
||||
store.commit("setSnackbar", {
|
||||
open: true,
|
||||
title: title,
|
||||
text: text,
|
||||
title,
|
||||
text,
|
||||
color: "error",
|
||||
});
|
||||
},
|
||||
warning: function(text, title = null) {
|
||||
warning(text, title = null) {
|
||||
store.commit("setSnackbar", {
|
||||
open: true,
|
||||
title: title,
|
||||
text: text,
|
||||
title,
|
||||
text,
|
||||
color: "warning",
|
||||
});
|
||||
},
|
||||
|
@ -6,8 +6,8 @@ export const recipe = {
|
||||
*/
|
||||
sortAToZ(list) {
|
||||
list.sort((a, b) => {
|
||||
var textA = a.name.toUpperCase();
|
||||
var textB = b.name.toUpperCase();
|
||||
const textA = a.name.toUpperCase();
|
||||
const textB = b.name.toUpperCase();
|
||||
return textA < textB ? -1 : textA > textB ? 1 : 0;
|
||||
});
|
||||
},
|
||||
@ -42,7 +42,7 @@ const rand = n =>
|
||||
Math.floor(Math.random() * n)
|
||||
|
||||
function swap(t, i, j) {
|
||||
let q = t[i];
|
||||
const q = t[i];
|
||||
t[i] = t[j];
|
||||
t[j] = q;
|
||||
return t;
|
||||
|
Loading…
x
Reference in New Issue
Block a user