Adds a "no updates" message if checking and nothing is found.

Fixes #368
This commit is contained in:
Thomas Wilburn 2015-04-11 19:22:40 -07:00
parent 6a3ac154f1
commit 51d1946d94
2 changed files with 21 additions and 4 deletions

View file

@ -110,5 +110,12 @@
"recordingMacro": { "message": "Recording macro..." },
"setSyntax": { "message": "Set Syntax: $1" },
"setTheme": { "message": "Set Theme: $1" }
"setTheme": { "message": "Set Theme: $1" },
"notificationUpdateAvailable": { "message": "Caret: Update available" },
"notificationUpdateDetail": { "message": "An update to version $1 is available. Would you like to update and restart now?" },
"notificationNoUpdateTitle": { "message": "No updates available" },
"notificationNoUpdateDetail": { "message": "There aren't any updates for Caret at this time." },
"notificationUpdateOK": { "message": "Yes, update and restart" },
"notificationUpdateWait": { "message": "No thanks" }
}

View file

@ -70,12 +70,22 @@ require([
chrome.notifications.create(updateID, {
type: "basic",
iconUrl: "icon-128.png",
title: "Caret: Update Available",
message: "An update to Caret version " + details.version + " is available. Would you like to update and restart now?",
buttons: [ { title: "Yes, update and restart" }, { title: "No thanks" }]
title: i18n.get("notificationUpdateAvailable"),
message: i18n.get("notificationUpdateDetail", details.version),
buttons: [
{ title: i18n.get("notificationUpdateOK") },
{ title: i18n.get("notificationUpdateWait") }
]
}, function(id) { updateID = id });
});
});
} else {
if (isManual) chrome.notifications.create(updateID, {
type: "basic",
iconUrl: "icon-128.png",
title: i18n.get("notificationNoUpdateTitle"),
message: i18n.get("notificationNoUpdateDetail")
}, function(id) { updateID = id });
}
});
};