1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-23 15:19:41 +02:00

Fix/fix broken pwa (#1086)

* remove fetch / use axios fix #1077

* revert checkbox change

* add password peek

* fix bool check
This commit is contained in:
Hayden 2022-03-22 20:41:54 -08:00 committed by GitHub
parent e743d2c66b
commit ba325c12f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 17 deletions

View file

@ -0,0 +1,22 @@
import { computed, ref, useContext } from "@nuxtjs/composition-api";
export function usePasswordField() {
const show = ref(false);
const { $globals } = useContext();
const passwordIcon = computed(() => {
return show.value ? $globals.icons.eyeOff : $globals.icons.eye;
});
const inputType = computed(() => (show.value ? "text" : "password"));
const togglePasswordShow = () => {
show.value = !show.value;
};
return {
inputType,
togglePasswordShow,
passwordIcon,
};
}