From 6c49b91f05262e4ce4ce992e0ab8d5275c0ef0bd Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sat, 2 Aug 2014 10:27:11 +0200 Subject: prettify error message when not logged in --- github.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'github.js') diff --git a/github.js b/github.js index 84c8630..9534d64 100644 --- a/github.js +++ b/github.js @@ -222,7 +222,8 @@ GitHubBackend.prototype.getProjectList = function (callBack, errorCall) { var user = myself.gh.getUser(); if (user === null) { - errorCall.call(myself, localize('Please login'), 'GitHub'); + myself.message('You are not logged in'); + return; } user.getRepos().then( @@ -270,10 +271,17 @@ GitHubBackend.prototype.getProjectList = function (callBack, errorCall) { } ); } else { - errorCall.call(myself, localize('Please login'), 'GitHub'); + myself.message('You are not logged in'); + return; } }; GitHubBackend.prototype.logout = function (callBack) { this.clear(); }; + +// GitHub: user messages (to be overridden) + +GitHubBackend.prototype.message = function (string) { + alert(string); +}; -- cgit v1.3.1