slcing registrasi awal

This commit is contained in:
2024-10-31 15:53:59 +07:00
parent 54f56d9602
commit 8d24534928
27 changed files with 1079 additions and 854 deletions

View File

@@ -10,23 +10,22 @@
style="background-repeat: repeat-y"
class="bg-white"
src="./images/bg-left.jpg"
cover
></v-img>
</v-col>
<v-col lg="4" md="5">
<div class="d-flex justify-center mb-6 mt-16 bg-surface-variant">
<v-img
class="bg-white"
height="12px"
aspect-ratio="1"
src="../globalimages/logo.png"
></v-img>
</div>
<v-container class="mt-16">
<v-container class="fill-height" fluid>
<v-row no-gutters justify="center">
<v-col>
<div class="d-flex justify-center">
<v-card class="mx-auto px-12" elevation="0" rounded="lg">
<div class="d-flex justify-center mb-16 bg-surface-variant">
<v-img
class="bg-white"
height="86px"
aspect-ratio="16/9"
src="../globalimages/logo.png"
></v-img>
</div>
<div class="d-flex mb-6">
<v-sheet class="">
<h2 class="text-h6 font-weight-black">
@@ -55,19 +54,6 @@
:placeholder="$t('message.placeholderEmail')"
variant="outlined"
></v-text-field>
<!-- <div
class="text-subtitle-1 text-medium-emphasis d-flex align-center justify-space-between"
>
{{ $t("message.password") }}
<a
class="text-caption text-decoration-none text-blue"
href="#"
rel="noopener noreferrer"
target="_blank"
>
{{ $t("message.forgotPassword") }}</a
>
</div> -->
<v-text-field
:label="$t('message.password')"
v-model="password"
@@ -93,6 +79,16 @@
<v-progress-circular indeterminate></v-progress-circular>
</template>
</v-btn>
<v-btn
class="my-5 text-none"
size="large"
@click="loginGoogle"
variant="outlined"
block
>
<v-img class="mr-2" src="./images/logo_google.svg" width="20px" height="20px"></v-img>
SIGN IN WITH GOOGLE
</v-btn>
</div>
</v-card>
</div>
@@ -135,6 +131,9 @@ export default {
set(val) {
this.$store.commit("login/setPassword", val);
},
loginGoogle() {
this.$store.dispatch("login/loginGoogle")
}
},
},
methods: {

View File

@@ -1,86 +1,95 @@
<template>
<div style="background-image: url(./images/bg-left.jpg);">
<v-container class="h-100 w-100">
<v-col align-self="center">
<v-card
class="mx-auto px-5 py-12"
elevation="0"
rounded="lg"
width="90%"
>
<div class="d-flex justify-center mb-6 bg-surface-variant">
<v-img
class="bg-white"
height="86px"
aspect-ratio="16/9"
src="../globalimages/logo.png"
></v-img>
</div>
<div class="d-flex mb-6">
<v-sheet class="">
<h2 class="text-h6 font-weight-black">
{{ $t("message.title") }}
</h2>
<p class="text-subtitle-1" style="color: #637381;">
{{ $t("message.sublogin") }}
</p>
</v-sheet>
</div>
<v-alert
density="compact"
:text="alert.message"
:type="alert.type"
class="mt-4 mb-3 w-100"
variant="tonal"
<div style="background-image: url(./images/bg-left.jpg); height: 100vh;">
<v-container class="fill-height" fluid>
<v-col align-self="center">
<v-card
class="mx-auto px-5 py-12"
elevation="0"
rounded="lg"
width="90%"
>
</v-alert>
<v-text-field
class="mt-3"
v-model="email"
:label="$t('message.email')"
:placeholder="$t('message.placeholderEmail')"
variant="outlined"
></v-text-field>
<!-- <div
class="text-subtitle-1 text-medium-emphasis d-flex align-center justify-space-between"
>
{{ $t("message.password") }}
<a
class="text-caption text-decoration-none text-blue"
href="#"
rel="noopener noreferrer"
target="_blank"
>
{{ $t("message.forgotPassword") }}</a
>
</div> -->
<v-text-field
:label="$t('message.password')"
v-model="password"
:append-inner-icon="visible ? 'mdi-eye':'mdi-eye-off'"
:type="visible ? 'text' : 'password'"
:placeholder="$t('message.placeholderPassword')"
variant="outlined"
@click:append-inner="visible = !visible"
></v-text-field>
<div class="text-center">
<v-btn
:loading="loading"
@click="login"
class="mt-5 text-none"
color="blue"
size="large"
variant="elevated"
block
<div class="d-flex justify-center mb-6 bg-surface-variant">
<v-img
class="bg-white"
height="86px"
aspect-ratio="16/9"
src="../globalimages/logo.png"
></v-img>
</div>
<div class="d-flex mb-6">
<v-sheet class="">
<h2 class="text-h6 font-weight-black">
{{ $t("message.title") }}
</h2>
<p class="text-subtitle-1" style="color: #637381;">
{{ $t("message.sublogin") }}
</p>
</v-sheet>
</div>
<v-alert
density="compact"
:text="alert.message"
:type="alert.type"
class="mt-4 mb-3 w-100"
variant="tonal"
>
{{ $t("message.login") }}
<template v-slot:loader>
<v-progress-circular indeterminate></v-progress-circular>
</template>
</v-btn>
</div>
</v-card>
</v-col>
</v-alert>
<v-text-field
class="mt-3"
v-model="email"
:label="$t('message.email')"
:placeholder="$t('message.placeholderEmail')"
variant="outlined"
></v-text-field>
<!-- <div
class="text-subtitle-1 text-medium-emphasis d-flex align-center justify-space-between"
>
{{ $t("message.password") }}
<a
class="text-caption text-decoration-none text-blue"
href="#"
rel="noopener noreferrer"
target="_blank"
>
{{ $t("message.forgotPassword") }}</a
>
</div> -->
<v-text-field
:label="$t('message.password')"
v-model="password"
:append-inner-icon="visible ? 'mdi-eye':'mdi-eye-off'"
:type="visible ? 'text' : 'password'"
:placeholder="$t('message.placeholderPassword')"
variant="outlined"
@click:append-inner="visible = !visible"
></v-text-field>
<div class="text-center">
<v-btn
:loading="loading"
@click="login"
class="mt-5 text-none"
color="blue"
size="large"
variant="elevated"
block
>
{{ $t("message.login") }}
<template v-slot:loader>
<v-progress-circular indeterminate></v-progress-circular>
</template>
</v-btn>
<v-btn
class="my-5 text-none"
size="large"
variant="outlined"
block
>
<v-img class="mr-2" src="./images/logo_google.svg" width="20px" height="20px"></v-img>
SIGN IN WITH GOOGLE
</v-btn>
</div>
</v-card>
</v-col>
</v-container>
</div>
</template>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="48px" height="48px"><path fill="#FFC107" d="M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"/><path fill="#FF3D00" d="M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"/><path fill="#4CAF50" d="M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"/><path fill="#1976D2" d="M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"/></svg>

After

Width:  |  Height:  |  Size: 988 B

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BISKEU</title>
<title>Login</title>
<!-- Vuetify CSS -->
<link href="../css/vuetify.css" rel="stylesheet" />
<!-- Local Stylesheet for Fonts -->

View File

@@ -1,7 +1,7 @@
// const URL = "/westone-api/v1/system/auth";
const URL = "https://devcpone.aplikasi.web.id/westone-api/v1/system/auth/";
// const URL = "https://devcpone.aplikasi.web.id/westone-api/v1/system/auth";
const apiURL = "http://localhost:8080/api/v1/auth";
const store = {
namespaced: true,
@@ -63,12 +63,12 @@ const store = {
message: window.i18n.global.t('message.msgInfo')
}
let params = {
username: state.email,
email: state.email,
password: state.password
};
console.log(params);
try {
const response = await axios.post(URL + '/login', params);
const response = await axios.post(apiURL + '/login', params);
console.log(response.data)
if (response.data.status != 'OK') {
commit('setLoading', false);
@@ -81,13 +81,19 @@ const store = {
} else {
commit('setLoading', false);
commit('setData', response.data.data);
localStorage.setItem("token", response.data.data.token)
localStorage.setItem('user', JSON.stringify(response.data.data.user))
localStorage.setItem("token", response.data.token)
localStorage.setItem('user', JSON.stringify(response.data.data))
//console.log(localStorage.getItem("token"))
// if (data.user.is_courier === 'Y' && window.innerWidth < 600)
// window.location = "/one-ui/test/vuex/one-courier-mobile/";
// else
// window.location = "/" + response.data.data.user.M_UserGroupDashboard;
if (response.data.type === 'westone') {
} else {
window.location.href = "/auth-code";
}
}
commit('setAlert', alert)
@@ -97,6 +103,9 @@ const store = {
}
},
async loginGoogle() {
window.location.href = apiURL + "/google/login"
},
async loginState({ state, commit }) {
commit('setLoading', true);
const params = {
@@ -105,7 +114,7 @@ const store = {
};
try {
const response = await axios.post(URL + '/login', params);
const response = await axios.post(apiURL + '/login', params);
if (response.status != 'OK') {
commit('setLoading', false);
@@ -121,7 +130,7 @@ const store = {
},
async LoginParam({ commit }, params) {
try {
const response = await axios.post(URL + '/login', params);
const response = await axios.post(apiURL + '/login', params);
commit('setData', response.data);
} catch (error) {
commit('setError', error);