Commit 05588046 authored by thibaut-felten's avatar thibaut-felten

customization

parent 7ec9a830
frontend/public/favicon.ico

4.19 KB | W: | H:

frontend/public/favicon.ico

15 KB | W: | H:

frontend/public/favicon.ico
frontend/public/favicon.ico
frontend/public/favicon.ico
frontend/public/favicon.ico
  • 2-up
  • Swipe
  • Onion skin
......@@ -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>
......
......@@ -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;
}
......
......@@ -2,6 +2,9 @@ let user = {
token: "",
name: "",
id: Math.floor(Math.random() * 1000000 + 1000000),
first:"",
last:"",
email:"",
win:0,
lost:0,
paper:0,
......
......@@ -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("/"))
}
......
......@@ -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":firstname,
"USER_LASTNAME":lastname,
"USER_LOGIN":login,
"USER_EMAIL":email
"USER_FIRSTNAME":first,
"USER_LASTNAME":last,
"USER_LOGIN":log,
"USER_EMAIL":mail
}
this.call(data)
......@@ -126,13 +149,13 @@ 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('/'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment