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
0
Issues
0
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
Thibaut Felten
projet-cdaw
Commits
05588046
Commit
05588046
authored
Dec 04, 2020
by
thibaut-felten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
customization
parent
7ec9a830
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
17 deletions
+46
-17
favicon.ico
frontend/public/favicon.ico
+0
-0
index.html
frontend/public/index.html
+1
-1
App.vue
frontend/src/App.vue
+2
-0
logo.png
frontend/src/assets/logo.png
+0
-0
user.js
frontend/src/model/user.js
+3
-0
Login.vue
frontend/src/views/Login.vue
+1
-0
UpdateUser.vue
frontend/src/views/UpdateUser.vue
+39
-16
No files found.
frontend/public/favicon.ico
View replaced file @
7ec9a830
View file @
05588046
4.19 KB
|
W:
|
H:
15 KB
|
W:
|
H:
2-up
Swipe
Onion skin
frontend/public/index.html
View file @
05588046
...
...
@@ -5,7 +5,7 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title>
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
</title>
<title>
Not a mahjong
</title>
</head>
<body>
<noscript>
...
...
frontend/src/App.vue
View file @
05588046
...
...
@@ -18,6 +18,8 @@
background-image
:
url('assets/img/panda.jpg')
;
background-position-x
:
right
;
background-position-y
:
bottom
;
background-repeat
:
no-repeat
;
background-size
:
cover
;
height
:
100vh
;
}
...
...
frontend/src/assets/logo.png
deleted
100644 → 0
View file @
7ec9a830
6.69 KB
frontend/src/model/user.js
View file @
05588046
...
...
@@ -2,6 +2,9 @@ let user = {
token
:
""
,
name
:
""
,
id
:
Math
.
floor
(
Math
.
random
()
*
1000000
+
1000000
),
first
:
""
,
last
:
""
,
email
:
""
,
win
:
0
,
lost
:
0
,
paper
:
0
,
...
...
frontend/src/views/Login.vue
View file @
05588046
...
...
@@ -117,6 +117,7 @@ export default {
user
.
first
=
response
.
data
.
firstname
user
.
last
=
response
.
data
.
lastname
user
.
email
=
response
.
data
.
email
console
.
log
(
user
.
last
)
})
.
then
(
this
.
$router
.
push
(
"/"
))
}
...
...
frontend/src/views/UpdateUser.vue
View file @
05588046
...
...
@@ -4,7 +4,7 @@
<div
class=
"row _centered"
>
<div
class=
"column _600"
>
<h1>
Mise à jour du profil
</h1>
<form
action=
"post"
class=
"form"
v-on:submit
.
prevent=
"check"
>
<form
v-if=
"user.id
<
1000000
"
action=
"post"
class=
"form"
v-on:submit
.
prevent=
"check"
>
<div
class=
"row lmargin"
>
<label
for=
"FirstName"
>
Prénom
</label>
<input
v-model=
"firstname"
type=
"text"
name=
"FirstName"
>
...
...
@@ -25,6 +25,7 @@
<button
type=
"submit"
class=
"btn"
>
Valider
</button>
</div>
</form>
<center
v-if=
"user.id >= 1000000"
>
Vous devez être connectés pour changer vos informations...
</center>
</div>
</div>
</div>
...
...
@@ -94,20 +95,42 @@ export default {
firstname
:
""
,
lastname
:
""
,
login
:
""
,
email
:
""
email
:
""
,
user
}
},
methods
:
{
check
:
function
(){
let
firstname
=
this
.
firstname
let
lastname
=
this
.
lastname
let
login
=
this
.
login
let
email
=
this
.
email
if
(
this
.
firstname
==
""
){
var
first
=
user
.
first
}
else
{
first
=
this
.
firstname
}
if
(
this
.
lastname
==
""
){
var
last
=
user
.
last
}
else
{
last
=
this
.
lastname
}
if
(
this
.
email
==
""
){
var
mail
=
user
.
email
}
else
{
mail
=
this
.
email
}
if
(
this
.
login
==
""
){
var
log
=
user
.
name
}
else
{
log
=
this
.
login
}
let
data
=
{
"USER_FIRSTNAME"
:
first
name
,
"USER_LASTNAME"
:
last
name
,
"USER_LOGIN"
:
log
in
,
"USER_EMAIL"
:
e
mail
"USER_FIRSTNAME"
:
first
,
"USER_LASTNAME"
:
last
,
"USER_LOGIN"
:
log
,
"USER_EMAIL"
:
mail
}
this
.
call
(
data
)
...
...
@@ -126,14 +149,14 @@ export default {
},
body
:
JSON
.
stringify
(
data
)
};
console
.
log
(
params
.
body
.
lastname
)
fetch
(
url
,
params
)
.
then
(
response
=>
response
.
json
())
.
then
(
response
=>
{
user
.
token
=
response
.
jwt_token
user
.
id
=
response
.
id
})
.
then
(()
=>
{
user
.
first
=
data
.
USER_FIRSTNAME
user
.
last
=
data
.
USER_LASTNAME
user
.
name
=
data
.
USER_LOGIN
user
.
mail
=
data
.
USER_EMAIL
})
.
then
(
this
.
$router
.
push
(
'/'
))
...
...
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