Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
laravel-test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Александр Чаплыгин
laravel-test
Commits
724a9d87
Commit
724a9d87
authored
Jun 24, 2023
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add loading-page for auth modal popup
parent
e16b70b5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
7 deletions
+18
-7
UserController.php
src/app/Http/Controllers/UserController.php
+2
-3
style.css
src/public/assets/css/style.css
+6
-2
login.js
src/public/assets/js/login.js
+0
-2
loading.blade.php
src/resources/views/loading.blade.php
+6
-0
web.php
src/routes/web.php
+4
-0
No files found.
src/app/Http/Controllers/UserController.php
View file @
724a9d87
...
@@ -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
'
);
}
}
}
}
src/public/assets/css/style.css
View file @
724a9d87
...
@@ -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
);
...
...
src/public/assets/js/login.js
View file @
724a9d87
...
@@ -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
);
...
...
src/resources/views/loading.blade.php
0 → 100644
View file @
724a9d87
@
extends
(
'layouts.layout'
)
@
section
(
'content'
)
<
div
id
=
"loading"
></
div
>
@
endsection
\ No newline at end of file
src/routes/web.php
View file @
724a9d87
...
@@ -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'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment