1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

implementation of options tab, polished statusbar

This commit is contained in:
cTn 2014-04-22 00:30:22 +02:00
parent 3a5741d9ed
commit 8c4a4277f8
8 changed files with 131 additions and 22 deletions

View file

@ -44,18 +44,22 @@ chrome.app.runtime.onLaunched.addListener(function() {
chrome.runtime.onInstalled.addListener(function(details) {
if (details.reason == 'update') {
var manifest = chrome.runtime.getManifest();
var options = {
priority: 0,
type: 'basic',
title: manifest.name,
message: chrome.i18n.getMessage('notifications_app_just_updated_to_version', [manifest.version]),
iconUrl: '/images/icon_128.png',
buttons: [{'title': chrome.i18n.getMessage('notifications_click_here_to_start_app')}]
};
chrome.storage.local.get('update_notify', function(result) {
if (typeof result.update_notify === 'undefined' || result.update_notify) {
var manifest = chrome.runtime.getManifest();
var options = {
priority: 0,
type: 'basic',
title: manifest.name,
message: chrome.i18n.getMessage('notifications_app_just_updated_to_version', [manifest.version]),
iconUrl: '/images/icon_128.png',
buttons: [{'title': chrome.i18n.getMessage('notifications_click_here_to_start_app')}]
};
chrome.notifications.create('baseflight_update', options, function(notificationId) {
// empty
chrome.notifications.create('baseflight_update', options, function(notificationId) {
// empty
});
}
});
}
});