Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
mapas
theme-RCV
Commits
b4e97ab4
Commit
b4e97ab4
authored
5 months ago
by
Raul Vitor Lucena Brito
Browse files
Options
Download
Email Patches
Plain Diff
Faz com que popup volte a aparecer 10 minutos após ter sido fechado pela ultima vez
parent
8ed84eaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
components/rcv-modal/script.js
components/rcv-modal/script.js
+19
-1
No files found.
components/rcv-modal/script.js
View file @
b4e97ab4
...
...
@@ -14,13 +14,31 @@ app.component('rcv-modal', {
},
data
()
{
const
lastClose
=
localStorage
.
getItem
(
'
lastClose
'
);
let
modalOpen
=
true
;
if
(
lastClose
)
{
const
lastClick
=
new
Date
(
lastClose
);
const
currentClick
=
new
Date
();
const
milliseconds
=
currentClick
-
lastClick
;
const
minutes
=
milliseconds
/
(
1000
*
60
);
if
(
minutes
>
10
)
{
modalOpen
=
true
;
}
else
{
modalOpen
=
false
;
}
}
return
{
modalOpen
:
true
,
modalOpen
,
}
},
methods
:
{
close
()
{
const
dataHoraClique
=
new
Date
();
localStorage
.
setItem
(
'
lastClose
'
,
dataHoraClique
.
toISOString
());
this
.
modalOpen
=
false
;
},
},
...
...
This diff is collapsed.
Click to expand it.
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