mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-01-07 09:31:22 -05:00
backend-events + code-cleanup (#395)
* additional server events * sort 'recent recipes' by updated * remove duplicate code * fixes #396 * set color * consolidate tag/category pages * set colors * list unorganized recipes * cleanup old code * remove flash message, switch to global snackbar * cancel to close * cleanup Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
30
frontend/src/components/UI/GlobalSnackbar.vue
Normal file
30
frontend/src/components/UI/GlobalSnackbar.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<div class="text-center ma-2">
|
||||
<v-snackbar v-model="snackbar.open" top :color="snackbar.color" timeout="3500">
|
||||
{{ snackbar.title }}
|
||||
{{ snackbar.text }}
|
||||
|
||||
<template v-slot:action="{ attrs }">
|
||||
<v-btn text v-bind="attrs" @click="snackbar.open = false">
|
||||
{{ $t("general.close") }}
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-snackbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data: () => ({}),
|
||||
computed: {
|
||||
snackbar: {
|
||||
set(val) {
|
||||
this.$store.commit("setSnackbar", val);
|
||||
},
|
||||
get() {
|
||||
return this.$store.getters.getSnackbar;
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -106,7 +106,7 @@ export default {
|
||||
this.processing = false;
|
||||
},
|
||||
isValidWebUrl(url) {
|
||||
let regEx = /^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)$/gm;
|
||||
let regEx = /^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,256}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)$/gm;
|
||||
return regEx.test(url) ? true : "Must be a Valid URL";
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user