mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 07:39:41 +02:00
security: enforce min length for user password (#1555)
* fix typing on auth context * extract user password strength meter * fix broken useToggle method * extend form to accept arguments for validators * enforce password length on update * fix user password change form
This commit is contained in:
parent
b3c41a4bd0
commit
54c4f19a5c
9 changed files with 105 additions and 95 deletions
|
@ -6,8 +6,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, watch } from "@nuxtjs/composition-api";
|
||||
import { useToggle } from "@vueuse/core";
|
||||
import { defineComponent, ref, watch } from "@nuxtjs/composition-api";
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
|
@ -21,7 +20,11 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
setup(_, context) {
|
||||
const [state, toggle] = useToggle();
|
||||
const state = ref(false);
|
||||
|
||||
const toggle = () => {
|
||||
state.value = !state.value;
|
||||
};
|
||||
|
||||
watch(state, () => {
|
||||
context.emit("input", state);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue