Store username in lychee_username
This commit is contained in:
parent
326238d46a
commit
dceb348d42
@ -121,7 +121,7 @@ var lychee = {
|
|||||||
params = "login&user=" + user + "&password=" + password;
|
params = "login&user=" + user + "&password=" + password;
|
||||||
lychee.api(params, function(data) {
|
lychee.api(params, function(data) {
|
||||||
if (data===true) {
|
if (data===true) {
|
||||||
localStorage.setItem("username", user);
|
localStorage.setItem("lychee_username", user);
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
} else {
|
} else {
|
||||||
$("#password").val("").addClass("error").focus();
|
$("#password").val("").addClass("error").focus();
|
||||||
@ -138,7 +138,7 @@ var lychee = {
|
|||||||
$("body").append(build.signInModal());
|
$("body").append(build.signInModal());
|
||||||
$("#username").focus();
|
$("#username").focus();
|
||||||
if (localStorage) {
|
if (localStorage) {
|
||||||
local_username = localStorage.getItem("username");
|
local_username = localStorage.getItem("lychee_username");
|
||||||
if (local_username!==null) {
|
if (local_username!==null) {
|
||||||
if (local_username.length>0) $("#username").val(local_username);
|
if (local_username.length>0) $("#username").val(local_username);
|
||||||
$("#password").focus();
|
$("#password").focus();
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user