mirror of
https://github.com/simple-login/app.git
synced 2024-11-10 17:35:27 +08:00
use store instead of localStorage to detect whether the intro has been shown
This commit is contained in:
parent
b40278f4dc
commit
6fe689dc17
2 changed files with 4 additions and 3 deletions
|
@ -273,12 +273,12 @@
|
|||
<script>
|
||||
var clipboard = new ClipboardJS('.clipboard');
|
||||
|
||||
var introShown = localStorage.getItem("introShown");
|
||||
var introShown = store.get("introShown");
|
||||
if ("yes" !== introShown) {
|
||||
// only show intro when screen is big enough to show "developer" tab
|
||||
if (window.innerWidth >= 1024) {
|
||||
introJs().start();
|
||||
localStorage.setItem("introShown", "yes")
|
||||
store.set("introShown", "yes")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -170,11 +170,12 @@
|
|||
|
||||
</script>
|
||||
|
||||
<script src="/static/local-storage-polyfill.js"></script>
|
||||
|
||||
<!-- For additional script -->
|
||||
{% block script %}
|
||||
{% endblock %}
|
||||
|
||||
<script src="/static/local-storage-polyfill.js"></script>
|
||||
<script>
|
||||
(function () {
|
||||
// only enable on prod
|
||||
|
|
Loading…
Reference in a new issue