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));
|
||||
};
|
||||
|
||||
|
|
@ -1282,7 +1289,13 @@
|
|||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.siteIcon.style.backgroundImage = '';
|
||||
// Installed apps have a manifest icon even when the Places cache has
|
||||
// no favicon. Keep the original chrome slot and select a crisp source.
|
||||
const icons = this.app.manifest && this.app.manifest.icons;
|
||||
const sizes = Object.keys(icons || {}).map(Number).filter(Number.isFinite).sort((a,b)=>a-b);
|
||||
const size = sizes.find(n => n >= ICON_SIZE * devicePixelRatio) || sizes[sizes.length-1];
|
||||
const icon = size && icons[size];
|
||||
this.siteIcon.style.backgroundImage = icon ? 'url(' + JSON.stringify(new URL(icon, this.app.manifestURL).href) + ')' : '';
|
||||
this.app.debug('setSiteIcon, error from getSiteIcon: %s', err);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -346,13 +346,26 @@
|
|||
|
||||
case this.fullApp:
|
||||
// XXX: This should be replaced probably by Web Activities
|
||||
var host = document.location.host;
|
||||
var domain = host.replace(/(^[\w\d]+\.)?([\w\d]+\.[a-z]+)/, '$2');
|
||||
var protocol = document.location.protocol + '//';
|
||||
applications.getByManifestURL(protocol + 'settings.' +
|
||||
domain + '/manifest.webapp').launch();
|
||||
|
||||
UtilityTray.hide();
|
||||
var settingsURL = new URL(document.location.href);
|
||||
if (settingsURL.hostname.indexOf('system.') !== 0) {
|
||||
console.error('Quick settings: cannot resolve Settings app host');
|
||||
return;
|
||||
}
|
||||
settingsURL.hostname = 'settings.' +
|
||||
settingsURL.hostname.slice('system.'.length);
|
||||
settingsURL.pathname = '/manifest.webapp';
|
||||
settingsURL.search = '';
|
||||
settingsURL.hash = '';
|
||||
applications.waitForReady().then(function() {
|
||||
var settingsApp = applications.getByManifestURL(
|
||||
settingsURL.href);
|
||||
if (!settingsApp) {
|
||||
console.error('Quick settings: Settings app is not installed');
|
||||
return;
|
||||
}
|
||||
settingsApp.launch();
|
||||
UtilityTray.hide();
|
||||
});
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -57,5 +57,5 @@
|
|||
#os-logo { background: #071d35 url('/shared/resources/branding/vulpes-wallpaper.png') center / cover; display:flex; flex-direction:column; align-items:center; justify-content:center; }
|
||||
#os-logo::before { content:""; width:190px; height:190px; flex:none; background:url('/shared/resources/branding/vulpes-symbol.png') center / contain no-repeat; }
|
||||
#os-logo::after { content:"Vulpes 2.7\A A community continuation of Firefox OS"; white-space:pre-line; padding:12px 22px; color:#f5f8fa; text-shadow:0 2px 8px #071d35; font:500 20px/1.8 sans-serif; text-align:center; }
|
||||
#poweroff-splash { background:#071d35 url('/shared/resources/branding/vulpes-symbol.png') center / 190px 190px no-repeat; }
|
||||
#poweroff-splash { background:#071d35; }
|
||||
/* VULPES BRAND END */
|
||||
|
|
|
|||
|
|
@ -88,17 +88,17 @@ textarea,
|
|||
|
||||
#poweroff-ring-1 {
|
||||
top: 25%;
|
||||
background-color: #e66600;
|
||||
background-color: #36a9e8;
|
||||
}
|
||||
|
||||
#poweroff-ring-2 {
|
||||
top: 50%;
|
||||
background-color: #dc4e00;
|
||||
background-color: #218bd1;
|
||||
}
|
||||
|
||||
#poweroff-ring-3 {
|
||||
top: 75%;
|
||||
background-color: #d24500;
|
||||
background-color: #1473b8;
|
||||
}
|
||||
|
||||
.poweroff-ring > span {
|
||||
|
|
|
|||
Loading…
Reference in a new issue