Release Vulpes OS 2.7-preview.24
This commit is contained in:
parent
49572b6b45
commit
97ef99f827
135 changed files with 7717 additions and 2524 deletions
|
|
@ -475,20 +475,25 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Set the .icon property before saving for
|
||||
// backwards compatibility with verticalhome
|
||||
// Set the .icon property before saving for backwards compatibility with
|
||||
// verticalhome. A missing favicon must not prevent pinning the site.
|
||||
var saveSite = function(icon) {
|
||||
siteObject.icon = icon || '';
|
||||
BookmarksDatabase.put(siteObject, siteObject.id)
|
||||
.then(() => {
|
||||
this.app.debug('pinSite: ' + siteObject.id);
|
||||
this.systemBanner.show('site-pinned-to-home-screen');
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('pinSite, Failed to pin site: ' + error);
|
||||
});
|
||||
}.bind(this);
|
||||
|
||||
IconsHelper.getIcon(siteObject.url, null,
|
||||
{icons: this.app.favicons}, siteObject).then(icon => {
|
||||
siteObject.icon = icon;
|
||||
BookmarksDatabase.put(siteObject, siteObject.id)
|
||||
.then(() => {
|
||||
this.app.debug('pinSite: ' + siteObject.id);
|
||||
this.systemBanner.show('site-pinned-to-home-screen');
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('pinSite, Failed to pin site: ' + error);
|
||||
});
|
||||
});
|
||||
{icons: this.app.favicons}, siteObject).then(saveSite, function(error) {
|
||||
this.app.debug('pinSite: using no favicon: ' + error);
|
||||
saveSite('');
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -986,12 +991,14 @@
|
|||
return;
|
||||
}
|
||||
|
||||
// Enable/disable the bookmark option
|
||||
BookmarksDatabase.get(this._currentURL).then(function resolve(result) {
|
||||
// start_url is the bookmark key for installed web apps, while _currentURL
|
||||
// may be a later page in the app. Check the canonical key first.
|
||||
var siteUrl = this.getSiteUrl();
|
||||
BookmarksDatabase.get(siteUrl).then(function resolve(result) {
|
||||
this.addToHomeButton.hidden = !!result;
|
||||
}.bind(this),
|
||||
function reject() {
|
||||
this.addToHomeButton.hidden = true;
|
||||
this.addToHomeButton.hidden = false;
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue