Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
boco-frontend
Manage
Activity
Members
Labels
Plan
Issues
21
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container 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
idatt2106_2022_02
boco-frontend
Commits
7aaa3e64
Commit
7aaa3e64
authored
2 years ago
by
Titus Netland
Browse files
Options
Downloads
Plain Diff
Merge branch 'home' into 'main'
Home fix See merge request
!27
parents
56acbb95
9c27e834
No related branches found
Branches containing commit
No related tags found
1 merge request
!27
Home fix
Pipeline
#176638
passed with stages
in 1 minute and 30 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/components/HomeComponent.vue
+1
-1
1 addition, 1 deletion
src/components/HomeComponent.vue
src/components/ResetPassword.vue
+68
-6
68 additions, 6 deletions
src/components/ResetPassword.vue
src/views/HomeView.vue
+3
-3
3 additions, 3 deletions
src/views/HomeView.vue
with
72 additions
and
10 deletions
src/components/H
elloWorld
.vue
→
src/components/H
omeComponent
.vue
+
1
−
1
View file @
7aaa3e64
...
...
@@ -13,7 +13,7 @@
<
script
>
export
default
{
name
:
"
H
elloWorld
"
,
name
:
"
H
omeComponent
"
,
data
:
()
=>
({}),
...
...
This diff is collapsed.
Click to expand it.
src/components/ResetPassword.vue
+
68
−
6
View file @
7aaa3e64
<
template
>
<div
class=
"resetPassword"
>
<v-img
:src=
"require('../assets/logo3.svg')"
class=
"image"
contain
/>
<form
class=
"resetPasswordForm"
>
<label
class=
"label"
id=
"emailLabelId"
>
Skriv inn E-posten din
</label>
<input
type=
"email"
name=
"email"
v-model=
"email"
class=
"input"
/>
<button
class=
"resetPasswordButton"
id=
"newPassword"
>
Send inn
</button>
</form>
<div
id=
"emailField"
class=
"m-6"
:class=
"
{ error: v$.email.$errors.length }">
<div
class=
"mb-6"
>
<label
for=
"email"
class=
"block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
>
E-post
</label
>
<input
type=
"email"
id=
"email"
class=
"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
placeholder=
"eksempel@eksempel.no"
v-model=
"v$.email.$model"
required
/>
<!-- error message -->
<div
v-for=
"(error, index) of v$.email.$errors"
:key=
"index"
>
<div
class=
"text-red-600 text-sm"
v-show=
"showError"
id=
"emailErrorId"
>
{{
error
.
$message
}}
</div>
</div>
</div>
</div>
<button
@
click=
"sendHome"
class=
"flex justify-center align-items: flex-end; text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
>
Send e-post
</button>
</div>
</
template
>
<
script
>
import
useVuelidate
from
"
@vuelidate/core
"
;
import
{
required
,
email
,
helpers
}
from
"
@vuelidate/validators
"
;
export
default
{
name
:
"
ResetPassword.vue
"
,
data
()
{
return
{
showError
:
false
,
email
:
""
,
};
},
setup
()
{
return
{
v
$
:
useVuelidate
()
};
},
validations
()
{
return
{
email
:
{
required
,
email
:
helpers
.
withMessage
(
`E-posten er ugyldig`
,
email
),
},
};
},
methods
:
{
sendHome
(){
this
.
showError
=
true
;
this
.
v$
.
email
.
$touch
();
if
(
this
.
v$
.
email
.
$invalid
)
{
console
.
log
(
"
Ugyldig, avslutter...
"
);
return
;
}
else
{
this
.
$router
.
push
(
'
/
'
);}
}
},
validate
()
{
this
.
$refs
.
form
.
validate
();
},
};
</
script
>
This diff is collapsed.
Click to expand it.
src/views/HomeView.vue
+
3
−
3
View file @
7aaa3e64
<
template
>
<H
elloWorld
/>
<H
ome
/>
</
template
>
<
script
>
import
{
defineComponent
}
from
"
vue
"
;
// Components
import
H
elloWorld
from
"
../components/H
elloWorld
.vue
"
;
import
H
ome
from
"
../components/H
omeComponent
.vue
"
;
export
default
defineComponent
({
name
:
"
HomeView
"
,
components
:
{
H
elloWorld
,
H
ome
,
},
});
</
script
>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment