mirror of
https://github.com/unraid/webgui.git
synced 2026-01-16 06:30:19 -06:00
Add "Logout" button.
This commit is contained in:
1
logout.htm
Normal file
1
logout.htm
Normal file
@@ -0,0 +1 @@
|
||||
Logged out
|
||||
30
plugins/dynamix/LogoutButton.page
Normal file
30
plugins/dynamix/LogoutButton.page
Normal file
@@ -0,0 +1,30 @@
|
||||
Cond="file_exists('/etc/nginx/htpasswd')"
|
||||
Menu="Buttons:1"
|
||||
Title="Logout"
|
||||
Icon="sign-out"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2017, Lime Technology
|
||||
* Copyright 2012-2017, Bergware International.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<script>
|
||||
function LogoutButton() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "/logout.htm",
|
||||
username: "logout",
|
||||
password: "",
|
||||
success: function (data){
|
||||
$('body').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user