Merge branch 'tweak/pretzel-logout' into 'dev'

Fix session handling/logout

See merge request crafty-controller/crafty-4!424
This commit is contained in:
Iain Powrie 2022-08-14 16:45:56 +00:00
commit 4c4ccd8eba
2 changed files with 9 additions and 5 deletions

View File

@ -6,6 +6,7 @@ TBD
- Fix reaction tasks not firing ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/423))
- QOL task delay offset not following over on task edit ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/423))
### Tweaks
- Session Handling | Logout on browser close ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/424))
### Lang
TBD
<br><br>

View File

@ -15,7 +15,7 @@
<link rel="stylesheet" href="/static/assets/vendors/typicons/typicons.css">
<link rel="stylesheet" href="/static/assets/vendors/fontawesome5/css/all.css">
<link rel="stylesheet" type="text/css"
href="https://cdn.datatables.net/v/bs4/dt-1.10.22/fh-3.1.7/r-2.2.6/sc-2.0.3/sp-1.2.2/datatables.min.css" />
href="https://cdn.datatables.net/v/bs4/dt-1.10.22/fh-3.1.7/r-2.2.6/sc-2.0.3/sp-1.2.2/datatables.min.css" />
<link rel="stylesheet" href="/static/assets/vendors/css/vendor.bundle.base.css">
<link rel="stylesheet" href="/static/assets/css/crafty.css">
@ -72,7 +72,7 @@
{% include notify.html %}
<button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button"
data-toggle="offcanvas">
data-toggle="offcanvas">
<span class="mdi mdi-menu"></span>
</button>
</div>
@ -163,7 +163,7 @@
<script src="/static/assets/js/shared/hoverable-collapse.js"></script>
<script src="/static/assets/js/shared/misc.js"></script>
<script type="text/javascript"
src="https://cdn.datatables.net/v/bs4/dt-1.10.22/fh-3.1.7/r-2.2.6/sc-2.0.3/sp-1.2.2/datatables.min.js"></script>
src="https://cdn.datatables.net/v/bs4/dt-1.10.22/fh-3.1.7/r-2.2.6/sc-2.0.3/sp-1.2.2/datatables.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootbox.js/5.4.0/bootbox.min.js"></script>
<script type="text/javascript" src="/static/assets/js/motd.js"></script>
@ -191,7 +191,7 @@
$.extend($.fn.dataTable.defaults, {
// {{ '\nlanguage:' }} {% raw translate('datatables', 'i18n', data['lang']) %}
})
})
//used to get cookies from browser - this is part of tornados xsrf protection - it's for extra security
function getCookie(name) {
@ -516,6 +516,9 @@
});
});
$(window).unload(function () {
jQuery.get("/public/logout")
});
</script>
{% block js %}
@ -525,4 +528,4 @@
</body>
</html>
</html>