Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 813489c67e | |||
| 9103a812b5 | |||
| 7dc8503861 | |||
| a819bcca1f | |||
| 161bac928b | |||
| 40834b9c38 | |||
| 7a823fcf74 | |||
| faa4fdf8a6 | |||
| a33d405c8c | |||
| 56570fbd33 | |||
| 2d657165bd | |||
| 7daf939239 | |||
| 8355b291c9 | |||
| 7a5becdaed |
@@ -2,7 +2,7 @@ PUBLIC_URL=http://localhost:3000/
|
|||||||
PORT=3000
|
PORT=3000
|
||||||
PRIMARY_APP_API_URL=https://preview.keenthemes.com/metronic8/laravel/api
|
PRIMARY_APP_API_URL=https://preview.keenthemes.com/metronic8/laravel/api
|
||||||
REACT_APP_BASE_LAYOUT_CONFIG_KEY='metronic-react-demo1-8150'
|
REACT_APP_BASE_LAYOUT_CONFIG_KEY='metronic-react-demo1-8150'
|
||||||
REACT_APP_API_URL=https://preview.keenthemes.com/metronic8/laravel/api
|
REACT_APP_API_URL=https://float-gat.dev.chiefsoft.net/en/userweb/api/v1
|
||||||
REACT_APP_VERSION=v8.1.5
|
REACT_APP_VERSION=v8.1.5
|
||||||
REACT_APP_THEME_NAME=WrenchBoard
|
REACT_APP_THEME_NAME=WrenchBoard
|
||||||
REACT_APP_THEME_DEMO=dashboard
|
REACT_APP_THEME_DEMO=dashboard
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<div id="splash-screen" class="splash-screen">
|
<div id="splash-screen" class="splash-screen">
|
||||||
<img src="%PUBLIC_URL%/media/logos/default-small.svg" alt="WrenchBoard" />
|
<img src="%PUBLIC_URL%/media/logos/favicon.ico" alt="Float Users" />
|
||||||
<span>Loading ...</span>
|
<span>Loading ...</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="root-modals"></div>
|
<div id="root-modals"></div>
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
.auth-gray {
|
||||||
|
background-color: $gray-200;
|
||||||
|
}
|
||||||
@@ -12,4 +12,5 @@
|
|||||||
@import "header/header-sidebar-light";
|
@import "header/header-sidebar-light";
|
||||||
@import "content";
|
@import "content";
|
||||||
@import "toolbar";
|
@import "toolbar";
|
||||||
@import "page-title";
|
@import "page-title";
|
||||||
|
@import "auth";
|
||||||
@@ -1,10 +1,47 @@
|
|||||||
/* eslint-disable jsx-a11y/anchor-is-valid */
|
/* eslint-disable jsx-a11y/anchor-is-valid */
|
||||||
import {useEffect} from 'react'
|
import {useEffect, useState} from 'react'
|
||||||
import {Outlet, Link} from 'react-router-dom'
|
import {Outlet, Link} from 'react-router-dom'
|
||||||
import {toAbsoluteUrl} from '../../../_res/helpers'
|
import {toAbsoluteUrl} from '../../../_res/helpers'
|
||||||
|
|
||||||
const AuthLayout = () => {
|
const AuthLayout = () => {
|
||||||
|
//initial background color
|
||||||
|
let [bgColor, setBgColor] = useState({
|
||||||
|
backgroundImage: 'linear-gradient(70deg, #E6E7F9, #b4caed)'
|
||||||
|
})
|
||||||
|
|
||||||
|
// function to determine background color
|
||||||
|
let changeBgColor = () => {
|
||||||
|
// let randomNum = Math.round(Math.random() * 3)
|
||||||
|
let randomNum = Number(localStorage.getItem('bg-num'))
|
||||||
|
if(randomNum){
|
||||||
|
if(randomNum <= 1){
|
||||||
|
setBgColor({
|
||||||
|
backgroundImage: 'linear-gradient(70deg, #E6E7F9, #b4caed)'
|
||||||
|
})
|
||||||
|
localStorage.setItem('bg-num', '2')
|
||||||
|
}else if(randomNum <= 2){
|
||||||
|
setBgColor({
|
||||||
|
backgroundImage: 'linear-gradient(70deg, #eee, #fff)'
|
||||||
|
})
|
||||||
|
localStorage.setItem('bg-num', '3')
|
||||||
|
}else{
|
||||||
|
setBgColor({
|
||||||
|
backgroundImage: 'linear-gradient(70deg, #d5e1f5, #75a5f0)'
|
||||||
|
})
|
||||||
|
localStorage.setItem('bg-num', '1')
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
setBgColor({
|
||||||
|
backgroundImage: 'linear-gradient(70deg, #E6E7F9, #b4caed)'
|
||||||
|
})
|
||||||
|
localStorage.setItem('bg-num', '1')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
|
changeBgColor() // calls the change color function after page loads
|
||||||
|
|
||||||
const root = document.getElementById('root')
|
const root = document.getElementById('root')
|
||||||
if (root) {
|
if (root) {
|
||||||
root.style.height = '100%'
|
root.style.height = '100%'
|
||||||
@@ -17,13 +54,17 @@ const AuthLayout = () => {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='d-flex flex-column flex-lg-row flex-column-fluid h-100'>
|
<div className='d-flex flex-column flex-lg-row flex-column-fluid overflow-auto' style={{backgroundImage: `${bgColor.backgroundImage}`}}>
|
||||||
{/* begin::Body */}
|
{/* begin::Body */}
|
||||||
<div className='d-flex flex-column flex-lg-row-fluid w-lg-50 p-10 order-2 order-lg-1'>
|
<div className='d-flex flex-column flex-lg-row-fluid w-lg-50 p-10 order-2 order-lg-1 vh-100'>
|
||||||
{/* begin::Form */}
|
{/* begin::Form */}
|
||||||
<div className='d-flex flex-center flex-column flex-lg-row-fluid'>
|
<div className='d-flex flex-center flex-column flex-lg-row-fluid'>
|
||||||
|
<div className='text-center mb-11'>
|
||||||
|
{/* <h1 className='text-dark fw-bolder mb-3'>Sign In</h1> */}
|
||||||
|
<img alt='Float Mobility' src={toAbsoluteUrl('/media/logos/logo.png')} className='h-35px' />
|
||||||
|
</div>
|
||||||
{/* begin::Wrapper */}
|
{/* begin::Wrapper */}
|
||||||
<div className='w-lg-500px p-10'>
|
<div className='auth-gray w-lg-500px p-10 shadow-lg rounded-sm'>
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</div>
|
</div>
|
||||||
{/* end::Wrapper */}
|
{/* end::Wrapper */}
|
||||||
@@ -60,32 +101,30 @@ const AuthLayout = () => {
|
|||||||
|
|
||||||
{/* begin::Aside */}
|
{/* begin::Aside */}
|
||||||
<div
|
<div
|
||||||
className='position-relative d-flex flex-lg-row-fluid w-lg-50 order-1 order-lg-2'
|
className='position-relative d-flex flex-lg-row-fluid w-lg-50 p-10 order-1 order-lg-2'
|
||||||
// style={{backgroundImage: `url(${toAbsoluteUrl('/media/misc/auth-bg.png')})`}}
|
|
||||||
style={{backgroundColor: '#E6E7F9'}}
|
|
||||||
>
|
>
|
||||||
{/* overlay div section */}
|
|
||||||
{/* <div className='position-absolute w-100 h-100 top-0 left-0' style={{backgroundColor: 'rgba(0, 0, 0, .4)', zIndex: '1'}}></div> */}
|
|
||||||
{/* begin::Content */}
|
{/* begin::Content */}
|
||||||
<div className='position-relative d-flex flex-column flex-center py-15 px-5 px-md-15 w-100'>
|
<div className='position-relative d-flex flex-column flex-center px-5 px-md-15 w-100'>
|
||||||
{/* begin::Logo */}
|
{/* begin::Logo */}
|
||||||
<Link to='/' className='mb-12'>
|
{/* <Link to='/' className='mb-12'>
|
||||||
<img alt='Float Mobility' src={toAbsoluteUrl('/media/logos/logo.png')} className='h-35px' />
|
<img alt='Float Mobility' src={toAbsoluteUrl('/media/logos/logo.png')} className='h-35px' />
|
||||||
</Link>
|
</Link> */}
|
||||||
{/* end::Logo */}
|
{/* end::Logo */}
|
||||||
|
|
||||||
{/* begin::Image */}
|
|
||||||
{/* <img
|
{/* <img
|
||||||
className='mx-auto w-275px w-md-50 w-xl-500px mb-10 mb-lg-20'
|
|
||||||
src={toAbsoluteUrl('/media/misc/auth-screens.png')}
|
|
||||||
alt=''
|
|
||||||
/> */}
|
|
||||||
<img
|
|
||||||
className='mx-auto w-350px w-md-50 w-xl-500px mb-10 mb-lg-20 rounded'
|
className='mx-auto w-350px w-md-50 w-xl-500px mb-10 mb-lg-20 rounded'
|
||||||
src={toAbsoluteUrl('/media/misc/auth-bg-new.png')}
|
src={toAbsoluteUrl('/media/misc/auth-bg-new.png')}
|
||||||
alt=''
|
alt=''
|
||||||
style={{boxShadow: '0px 0px 10px white'}}
|
style={{boxShadow: '0px 0px 10px white'}}
|
||||||
/>
|
/> */}
|
||||||
|
<div className='mx-auto w-75 w-xl-500px mb-10 mb-lg-20 rounded'>
|
||||||
|
<img
|
||||||
|
className='img-fluid rounded'
|
||||||
|
src={toAbsoluteUrl('/media/misc/auth-bg-new.png')}
|
||||||
|
alt=''
|
||||||
|
// style={{boxShadow: '0px 0px 10px white'}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
{/* end::Image */}
|
{/* end::Image */}
|
||||||
<div className='w-100 w-md-75'>
|
<div className='w-100 w-md-75'>
|
||||||
{/* begin::Title */}
|
{/* begin::Title */}
|
||||||
@@ -95,21 +134,17 @@ const AuthLayout = () => {
|
|||||||
{/* end::Title */}
|
{/* end::Title */}
|
||||||
|
|
||||||
{/* begin::Text */}
|
{/* begin::Text */}
|
||||||
<div className='text-dark fs-base text-center'>
|
{/* <div className='text-dark fs-base text-center'>
|
||||||
In this kind of post,{' '}
|
In this kind of post,{' '}
|
||||||
<a href='#' className='opacity-75-hover text-warning fw-bold me-1'>
|
<a href='#' className='opacity-75-hover text-warning fw-bold me-1'>
|
||||||
the blogger
|
the blogger
|
||||||
</a>
|
</a>
|
||||||
introduces a person they’ve interviewed <br /> and provides some background information
|
introduces a person they’ve interviewed <br /> and provides some background information
|
||||||
about
|
about {' '}
|
||||||
<a href='#' className='opacity-75-hover text-warning fw-bold me-1'>
|
<a href='#' className='opacity-75-hover text-warning fw-bold me-1'>
|
||||||
the interviewee
|
the interviewee
|
||||||
</a>
|
</a>
|
||||||
and their <br /> work following this is a transcript of the interview.
|
and their <br /> work following this is a transcript of the interview.
|
||||||
</div>
|
|
||||||
{/* <div className='text-dark fs-base text-center py-3'>
|
|
||||||
<p>Improve quality of life for the world's population by <a href='#' className='opacity-75-hover text-warning fw-bold me-1'>building</a> the future global transportation platform.</p>
|
|
||||||
<p>Increasing accessibility and personal choices, <a href='#' className='opacity-75-hover text-warning fw-bold me-1'>while reducing</a> travel time traffic congestion, pollution, and loss to local GDP</p>
|
|
||||||
</div> */}
|
</div> */}
|
||||||
{/* end::Text */}
|
{/* end::Text */}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -51,11 +51,6 @@ export function ForgotPassword() {
|
|||||||
onSubmit={formik.handleSubmit}
|
onSubmit={formik.handleSubmit}
|
||||||
>
|
>
|
||||||
<div className='text-center mb-10'>
|
<div className='text-center mb-10'>
|
||||||
{/* begin::Title */}
|
|
||||||
{/* <h1 className='text-dark fw-bolder mb-3'>Forgot Password ?</h1> */}
|
|
||||||
<img alt='Float Mobility' src={toAbsoluteUrl('/media/logos/logo.png')} className='h-35px' />
|
|
||||||
{/* end::Title */}
|
|
||||||
|
|
||||||
{/* begin::Link */}
|
{/* begin::Link */}
|
||||||
<div className='text-gray-500 fw-semibold fs-6'>
|
<div className='text-gray-500 fw-semibold fs-6'>
|
||||||
Enter your email to reset your password.
|
Enter your email to reset your password.
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ const loginSchema = Yup.object().shape({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const initialValues = {
|
const initialValues = {
|
||||||
email: 'admin@demo.com',
|
email: 'demo@float.sg',
|
||||||
password: 'demo',
|
password: '****',
|
||||||
}
|
}
|
||||||
|
//email: 'admin@demo.com',
|
||||||
/*
|
/*
|
||||||
Formik+YUP+Typescript:
|
Formik+YUP+Typescript:
|
||||||
https://jaredpalmer.com/formik/docs/tutorial#getfieldprops
|
https://jaredpalmer.com/formik/docs/tutorial#getfieldprops
|
||||||
@@ -63,11 +63,6 @@ export function Login() {
|
|||||||
id='kt_login_signin_form'
|
id='kt_login_signin_form'
|
||||||
>
|
>
|
||||||
{/* begin::Heading */}
|
{/* begin::Heading */}
|
||||||
<div className='text-center mb-11'>
|
|
||||||
{/* <h1 className='text-dark fw-bolder mb-3'>Sign In</h1> */}
|
|
||||||
<img alt='Float Mobility' src={toAbsoluteUrl('/media/logos/logo.png')} className='h-35px' />
|
|
||||||
</div>
|
|
||||||
{/* begin::Heading */}
|
|
||||||
|
|
||||||
{/* begin::Login options */}
|
{/* begin::Login options */}
|
||||||
<div className='row g-3 mb-9'>
|
<div className='row g-3 mb-9'>
|
||||||
@@ -125,11 +120,6 @@ export function Login() {
|
|||||||
<div className='alert-text font-weight-bold'>{formik.status}</div>
|
<div className='alert-text font-weight-bold'>{formik.status}</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
// <div className='mb-10 bg-light-info p-8 rounded'>
|
|
||||||
// <div className='text-info'>
|
|
||||||
// Any text before login box - please configure
|
|
||||||
// </div>
|
|
||||||
// </div>
|
|
||||||
null
|
null
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -86,16 +86,6 @@ export function Registration() {
|
|||||||
id='kt_login_signup_form'
|
id='kt_login_signup_form'
|
||||||
onSubmit={formik.handleSubmit}
|
onSubmit={formik.handleSubmit}
|
||||||
>
|
>
|
||||||
{/* begin::Heading */}
|
|
||||||
<div className='text-center mb-11'>
|
|
||||||
{/* begin::Title */}
|
|
||||||
{/* <h1 className='text-dark fw-bolder mb-3'>Sign Up</h1> */}
|
|
||||||
<img alt='Float Mobility' src={toAbsoluteUrl('/media/logos/logo.png')} className='h-35px' />
|
|
||||||
{/* end::Title */}
|
|
||||||
|
|
||||||
{/* <div className='text-gray-500 fw-semibold fs-6'>Your Social Campaigns</div> */}
|
|
||||||
</div>
|
|
||||||
{/* end::Heading */}
|
|
||||||
|
|
||||||
{/* begin::Login options */}
|
{/* begin::Login options */}
|
||||||
<div className='row g-3 mb-9'>
|
<div className='row g-3 mb-9'>
|
||||||
@@ -319,7 +309,7 @@ export function Registration() {
|
|||||||
<span>
|
<span>
|
||||||
I Accept the{' '}
|
I Accept the{' '}
|
||||||
<a
|
<a
|
||||||
href='https://keenthemes.com/metronic/?page=faq'
|
href='#'
|
||||||
target='_blank'
|
target='_blank'
|
||||||
className='ms-1 link-primary'
|
className='ms-1 link-primary'
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import {AuthModel, UserModel} from './_models'
|
import {AuthModel, UserModel} from './_models'
|
||||||
|
|
||||||
const API_URL = process.env.REACT_APP_API_URL
|
const API_URL = process?.env.REACT_APP_API_URL
|
||||||
|
|
||||||
export const GET_USER_BY_ACCESSTOKEN_URL = `${API_URL}/verify_token`
|
export const GET_USER_BY_ACCESSTOKEN_URL = `${API_URL}/verify_token`
|
||||||
export const LOGIN_URL = `${API_URL}/login`
|
export const LOGIN_URL = `${API_URL}/login`
|
||||||
|
|||||||
Reference in New Issue
Block a user