summaryrefslogtreecommitdiff
path: root/github.js
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2014-08-02 10:27:11 +0200
committerGubolin <gubolin@fantasymail.de>2014-08-02 10:27:11 +0200
commit6c49b91f05262e4ce4ce992e0ab8d5275c0ef0bd (patch)
tree09e27ae91506ad195c2c86dddd44b1c5b5a6f848 /github.js
parenta3d195b69ecc1b2a35699606eed0ed42b0c8a729 (diff)
downloadsnap-6c49b91f05262e4ce4ce992e0ab8d5275c0ef0bd.tar.gz
snap-6c49b91f05262e4ce4ce992e0ab8d5275c0ef0bd.zip
prettify error message when not logged in
Diffstat (limited to 'github.js')
-rw-r--r--github.js12
1 files changed, 10 insertions, 2 deletions
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);
+};