add loading-page for auth modal popup

parent e16b70b5
...@@ -130,8 +130,7 @@ class UserController extends Controller ...@@ -130,8 +130,7 @@ class UserController extends Controller
} }
Auth::login($user); Auth::login($user);
return redirect()->route('home'); return redirect()->route('loading');
//return redirect()->back();
} }
public function loginApple() { public function loginApple() {
...@@ -147,7 +146,7 @@ class UserController extends Controller ...@@ -147,7 +146,7 @@ class UserController extends Controller
} }
Auth::login($user); Auth::login($user);
return redirect()->route('home'); return redirect()->route('loading');
} }
} }
...@@ -69,7 +69,9 @@ h6 { ...@@ -69,7 +69,9 @@ h6 {
/*-------------------------------------------------------------- /*--------------------------------------------------------------
# Preloader # Preloader
--------------------------------------------------------------*/ --------------------------------------------------------------*/
#preloader { #preloader,
#loading
{
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
...@@ -80,7 +82,9 @@ h6 { ...@@ -80,7 +82,9 @@ h6 {
background: #fff; background: #fff;
} }
#preloader:before { #preloader:before,
#loading:before
{
content: ""; content: "";
position: fixed; position: fixed;
top: calc(50% - 30px); top: calc(50% - 30px);
......
...@@ -102,7 +102,6 @@ ...@@ -102,7 +102,6 @@
clearInterval(waitLoginInterval); clearInterval(waitLoginInterval);
waitLoginInterval = setInterval(function(){ waitLoginInterval = setInterval(function(){
console.log('AAA 111');
try { try {
if (googleWin.location.href && googleWin.location.href != 'about:blank') { if (googleWin.location.href && googleWin.location.href != 'about:blank') {
clearInterval(waitLoginInterval); clearInterval(waitLoginInterval);
...@@ -116,7 +115,6 @@ ...@@ -116,7 +115,6 @@
clearInterval(showModalInterval); clearInterval(showModalInterval);
showModalInterval = setInterval(function(){ showModalInterval = setInterval(function(){
console.log('AAA 222');
if (!googleWin.window) { if (!googleWin.window) {
clearInterval(waitLoginInterval); clearInterval(waitLoginInterval);
clearInterval(showModalInterval); clearInterval(showModalInterval);
......
@extends('layouts.layout')
@section('content')
<div id="loading"></div>
@endsection
\ No newline at end of file
...@@ -26,6 +26,10 @@ Route::get('/', function () { ...@@ -26,6 +26,10 @@ Route::get('/', function () {
return view('home'); return view('home');
}) -> name('home'); }) -> name('home');
Route::get('/loading', function () {
return view('loading');
}) -> name('loading');
Route::group(['middleware' => 'guest'], function(){ Route::group(['middleware' => 'guest'], function(){
Route::get('/register', [UserController::class, 'create']) -> name('register.create'); Route::get('/register', [UserController::class, 'create']) -> name('register.create');
......
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