Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quentin Vrel
projet-cdaw
Commits
55cd0722
Commit
55cd0722
authored
Dec 03, 2020
by
quentin.vrel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prevents logged users to log in or register again
parent
595b4651
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
Home.vue
frontend/src/views/Home.vue
+5
-0
Login.vue
frontend/src/views/Login.vue
+6
-5
Register.vue
frontend/src/views/Register.vue
+5
-0
No files found.
frontend/src/views/Home.vue
View file @
55cd0722
...
@@ -18,6 +18,11 @@ export default {
...
@@ -18,6 +18,11 @@ export default {
PageTitle
,
PageTitle
,
ButtonText
ButtonText
},
},
beforeCreate
()
{
if
(
localStorage
.
getItem
(
'user'
)
!=
null
)
{
this
.
$router
.
push
(
'/lobby'
);
}
},
methods
:
{
methods
:
{
onSubmit
:
function
(){
onSubmit
:
function
(){
if
(
event
.
submitter
.
id
==
'login'
)
{
if
(
event
.
submitter
.
id
==
'login'
)
{
...
...
frontend/src/views/Login.vue
View file @
55cd0722
...
@@ -5,8 +5,6 @@
...
@@ -5,8 +5,6 @@
<div
class=
"form-content"
>
<div
class=
"form-content"
>
<text-input
id=
"login"
label=
"Pseudo"
/>
<text-input
id=
"login"
label=
"Pseudo"
/>
<pwd-input
id=
"password"
label=
"Mot de passe"
/>
<pwd-input
id=
"password"
label=
"Mot de passe"
/>
<checkbox-input
id=
"remember"
label=
"Se souvenir de moi"
/>
</div>
</div>
<svg-button
id=
"back"
svg=
"/icons/back.svg"
/>
<svg-button
id=
"back"
svg=
"/icons/back.svg"
/>
...
@@ -21,15 +19,18 @@ import PageTitle from '@/components/PageTitle.vue'
...
@@ -21,15 +19,18 @@ import PageTitle from '@/components/PageTitle.vue'
import
SvgButton
from
'@/components/SvgButton.vue'
import
SvgButton
from
'@/components/SvgButton.vue'
import
TextInput
from
'@/components/form/TextInput.vue'
import
TextInput
from
'@/components/form/TextInput.vue'
import
PwdInput
from
'@/components/form/PwdInput.vue'
import
PwdInput
from
'@/components/form/PwdInput.vue'
import
CheckboxInput
from
'@/components/form/CheckboxInput.vue'
export
default
{
export
default
{
name
:
'Login'
,
name
:
'Login'
,
components
:
{
components
:
{
PageTitle
,
PageTitle
,
SvgButton
,
SvgButton
,
TextInput
,
TextInput
,
PwdInput
,
PwdInput
CheckboxInput
},
beforeCreate
()
{
if
(
localStorage
.
getItem
(
'user'
)
!=
null
)
{
this
.
$router
.
push
(
'/lobby'
);
}
},
},
data
()
{
data
()
{
return
{
return
{
...
...
frontend/src/views/Register.vue
View file @
55cd0722
...
@@ -43,6 +43,11 @@ export default {
...
@@ -43,6 +43,11 @@ export default {
showNotFilledError
:
false
,
showNotFilledError
:
false
,
}
}
},
},
beforeCreate
()
{
if
(
localStorage
.
getItem
(
'user'
)
!=
null
)
{
this
.
$router
.
push
(
'/lobby'
);
}
},
methods
:
{
methods
:
{
onSubmit
:
async
function
(){
onSubmit
:
async
function
(){
// If we press back, we go back
// If we press back, we go back
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment