diff --git a/frontend/src/api/index.js b/frontend/src/api/index.js index adb20277c..0082dba12 100644 --- a/frontend/src/api/index.js +++ b/frontend/src/api/index.js @@ -7,6 +7,7 @@ import migration from "./migration"; import myUtils from "./upload"; import category from "./category"; import meta from "./meta"; +import users from "./users" export default { @@ -19,4 +20,5 @@ export default { utils: myUtils, categories: category, meta: meta, + users: users }; diff --git a/frontend/src/api/users.js b/frontend/src/api/users.js new file mode 100644 index 000000000..e3f1d0aca --- /dev/null +++ b/frontend/src/api/users.js @@ -0,0 +1,23 @@ +import { baseURL } from "./api-utils"; +import { apiReq } from "./api-utils"; +const authPrefix = baseURL + "auth/"; + +const authURLs = { + token: `${authPrefix}token`, +}; + +// const usersURLs = { + +// } + +export default { + async login(formData) { + let response = await apiReq.post(authURLs.token, formData, { + headers: { + "Content-Type": "application/x-www-form-urlencoded", + }, + }); + console.log(response); + return response.data; + }, +}; diff --git a/frontend/src/components/Login/LoginForm.vue b/frontend/src/components/Login/LoginForm.vue index 4d7f3db95..f0a981974 100644 --- a/frontend/src/components/Login/LoginForm.vue +++ b/frontend/src/components/Login/LoginForm.vue @@ -32,7 +32,9 @@ light="light" prepend-icon="mdi-lock" :label="$t('login.password')" - type="password" + :type="showPassword ? 'text' : 'password'" + :append-icon="showPassword ? 'mdi-eye' : 'mdi-eye-off'" + @click:append="showPassword = !showPassword" > - - + + mdi-link + + + {{ $t("new-recipe.from-url") }} @@ -40,7 +49,12 @@ {{ $t("general.close") }} - + {{ $t("general.submit") }}