Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Fullstack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Madeleine Stenberg Jonassen
Fullstack
Merge requests
!17
complete api requests for testing
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
complete api requests for testing
frontend-api-req
into
main
Overview
0
Commits
1
Pipelines
1
Changes
3
Merged
Kristiane Skogvang Kolshus
requested to merge
frontend-api-req
into
main
1 year ago
Overview
0
Commits
1
Pipelines
1
Changes
3
Expand
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
d7d0233e
1 commit,
1 year ago
3 files
+
25
−
12
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
FullstackProsjekt/src/frontend/src/views/LoginView.vue
+
8
−
2
Options
@@ -8,6 +8,7 @@ export default {
//components: {Svg},
data
()
{
return
{
username
:
''
,
email
:
''
,
password
:
''
,
showPassword
:
false
,
// Add showPassword property
@@ -17,8 +18,8 @@ export default {
methods
:
{
async
handleSubmit
()
{
try
{
await
apiClient
.
post
(
'
/login
'
,
{
email
:
this
.
email
,
await
apiClient
.
post
(
'
/
auth/
login
'
,
{
username
:
this
.
username
,
password
:
this
.
password
}).
then
(
response
=>
{
setToken
(
response
.
data
.
token
);
//TODO: check token name
@@ -43,14 +44,19 @@ export default {
<h1
id=
"login"
>
Login
</h1>
<p>
Sign in to your already existing account
</p>
<div
class=
"loginBox"
>
<label>
Username
</label>
<br>
<input
type=
"text"
required
v-model=
"username"
placeholder=
"username"
/>
<br>
<!--
<label>
Email
</label>
<br>
<input
type=
"email"
placeholder=
"JohnDoe@email.com"
required
v-model=
"email"
/>
<br>
-->
<label>
Password
</label>
<br>
<input
:type=
"showPassword ? 'text' : 'password'"
required
v-model=
"password"
/>
<button
type=
"button"
class=
"showPasswordIcon"
@
click=
"togglePasswordVisibility"
>
<Svg
v-if=
"showPassword"
:name=
"'hide-password-icon'"
/>
<Svg
v-else
:name=
"'show-password-icon'"
/>
</button><br>
<label></label>
{{
errorMsg
}}
<br>
<router-link
to=
"/signup"
id=
"signUpLink"
>
SIGNUP
</router-link>
</div>
</div>
Loading