This commit is contained in:
@@ -2,31 +2,34 @@
|
|||||||
<v-container fluid>
|
<v-container fluid>
|
||||||
<v-layout row wrap="">
|
<v-layout row wrap="">
|
||||||
<v-flex xs12 class="text-xs-center" mt-5>
|
<v-flex xs12 class="text-xs-center" mt-5>
|
||||||
<v-img
|
<v-img :src="require('../assets/logo.svg')" class="my-3" contain height="200"></v-img>
|
||||||
:src="require('../assets/logo.svg')"
|
|
||||||
class="my-3"
|
|
||||||
contain
|
|
||||||
height="200"
|
|
||||||
></v-img>
|
|
||||||
</v-flex>
|
</v-flex>
|
||||||
<v-flex xs12 sm6 offset-sm3 mt-3>
|
<v-flex xs12 sm6 offset-sm3 mt-3>
|
||||||
<form>
|
<form>
|
||||||
<v-layout column>
|
<v-layout column>
|
||||||
<v-flex>
|
<v-flex>
|
||||||
<v-text-field name="username" v-model="input.username" label="Username" required></v-text-field>
|
<v-text-field
|
||||||
|
name="username"
|
||||||
|
v-model="input.username"
|
||||||
|
prepend-icon="fa-user"
|
||||||
|
label="User"
|
||||||
|
required
|
||||||
|
></v-text-field>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
<v-flex>
|
<v-flex>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
name="password"
|
name="password"
|
||||||
v-model="input.password"
|
v-model="input.password"
|
||||||
|
prepend-icon="fa-key"
|
||||||
label="Password"
|
label="Password"
|
||||||
type="password"
|
type="password"
|
||||||
required
|
required
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
<v-flex class="text-xs-center" mt-5>
|
<v-flex class="text-xs-center" mt-5>
|
||||||
<v-btn color="primary" v-on:click="login()">Login</v-btn>
|
<v-btn color="primary" v-on:click="login()">
|
||||||
<v-btn color="primary" v-on:click="showlog()">Show log in console</v-btn>
|
<v-icon>fa-sign-in-alt</v-icon>
|
||||||
|
</v-btn>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
</form>
|
</form>
|
||||||
@@ -37,7 +40,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import auth from "../api/auth";
|
import auth from "../api/auth";
|
||||||
import logger from "../utils/logit";
|
|
||||||
export default {
|
export default {
|
||||||
name: "Login",
|
name: "Login",
|
||||||
data() {
|
data() {
|
||||||
@@ -58,15 +60,8 @@ export default {
|
|||||||
})
|
})
|
||||||
.catch(function(error) {
|
.catch(function(error) {
|
||||||
alert("login failed: " + error);
|
alert("login failed: " + error);
|
||||||
//logger.log("LOGIN.VUE::login() !CATCH! -> Request failed", error);
|
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
alert("A username and password are required");
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
showlog() {
|
|
||||||
// eslint-disable-next-line
|
|
||||||
console.log(logger.getLog());
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeRouteEnter(to, from, next) {
|
beforeRouteEnter(to, from, next) {
|
||||||
|
|||||||
Reference in New Issue
Block a user