feat: add remember me style login #1339

Merged
konrad merged 3 commits from feature/long-tokens into main 2022-02-06 13:17:56 +00:00
Owner

Frontend PR for vikunja/api#1085

Frontend PR for https://kolaente.dev/vikunja/api/pulls/1085
konrad added 1 commit 2022-01-08 17:11:58 +00:00
continuous-integration/drone/pr Build is passing Details
e108b3a2fe
feat: add remember me style login
konrad requested review from dpschen 2022-01-08 17:12:07 +00:00
Member

Hi konrad!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://1339-featurelong-tokens--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi konrad! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://1339-featurelong-tokens--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
dpschen reviewed 2022-02-05 18:20:08 +00:00
@ -93,6 +93,7 @@ export default {
const data = {
username: credentials.username,
password: credentials.password,
long_token: credentials.longToken,

Why dont we simply convert credentials to snakecase for this object?

		async login(ctx, credentials) {
			const HTTP = HTTPFactory()
			ctx.commit(LOADING, true, {root: true})

			// Delete an eventually preexisting old token
			removeToken()

			try {
				const response = await HTTP.post('login', objectToSnakeCase(credentials))
Why dont we simply convert credentials to snakecase for this object? ```js async login(ctx, credentials) { const HTTP = HTTPFactory() ctx.commit(LOADING, true, {root: true}) // Delete an eventually preexisting old token removeToken() try { const response = await HTTP.post('login', objectToSnakeCase(credentials)) ```
Author
Owner

Very good point! I've changed it accordingly.

Very good point! I've changed it accordingly.
konrad marked this conversation as resolved
konrad force-pushed feature/long-tokens from e108b3a2fe to 197d5dc301 2022-02-06 11:38:51 +00:00 Compare
dpschen reviewed 2022-02-06 12:48:47 +00:00
@ -1,5 +1,6 @@
import {HTTPFactory} from '@/http-common'
import {i18n, getCurrentLanguage, saveLanguage} from '@/i18n'
import {objectToSnakeCase} from '../../helpers/case'

Use @

Use `@`
Author
Owner

Done!

Done!
konrad marked this conversation as resolved
dpschen approved these changes 2022-02-06 12:48:55 +00:00
konrad added 1 commit 2022-02-06 13:04:02 +00:00
continuous-integration/drone/pr Build is passing Details
bad06a2947
chore: use @ for import
konrad merged commit 3d3ccf629a into main 2022-02-06 13:17:56 +00:00
konrad deleted branch feature/long-tokens 2022-02-06 13:17:56 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.