refined login errors

This commit is contained in:
jeena 2013-08-25 18:29:39 +02:00
parent 38c2fae8ac
commit 19a3b7468b
2 changed files with 8 additions and 1 deletions

BIN
feedmonkey.zip Normal file

Binary file not shown.

View file

@ -47,7 +47,14 @@ Login.prototype.authenticate = function(e) {
var _this = this;
TinyTinyRSS.login(server_url, user, password, function(data) {
if(data.error) {
alert(data.error);
if(data.error == "API_DISABLED") {
alert("You need to enable API access in your TTRSS preferences.\n\nTo do so go to your server log in and then in Preferences -> General -> Enable API access. Check the box and save. Then try again to log in.")
} else if(data.error == "LOGIN_ERROR") {
alert("Login error\n\nIt seems you provided a wrong username or password.")
} else {
alert(data.error);
}
} else {
localStorage.server_url = server_url;
localStorage.session_id = data.session_id;