Release Vulpes OS 2.7 Preview 25 for Desktop, Android and Pixel 3a
This commit is contained in:
parent
6a44daeaaa
commit
3a1fba4efe
33 changed files with 1301 additions and 196 deletions
|
|
@ -411,14 +411,11 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* mode-video & :active,
|
||||
* mode-video & recording,
|
||||
* mode-video & capture-active
|
||||
* The stop glyph follows the recorder state. Gecko can keep :active
|
||||
* on the last control tapped after the touch has ended.
|
||||
*/
|
||||
|
||||
.controls.mode-video .capture-button:active .center:before,
|
||||
.controls.mode-video.recording .capture-button .center:before,
|
||||
.controls.mode-video.capture-active .capture-button .center:before {
|
||||
.controls.mode-video.recording .capture-button .center:before {
|
||||
border-radius: 3px;
|
||||
background-color: white;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,6 +81,11 @@ FormButton.prototype = {
|
|||
*/
|
||||
focus: function(event) {
|
||||
event.preventDefault();
|
||||
// Embedded Gecko has no native Gaia value-selector on select focus.
|
||||
// Notify the shared compatibility layer before focusing the real input.
|
||||
this.input.dispatchEvent(new CustomEvent('vulpes-select-open', {
|
||||
bubbles: true
|
||||
}));
|
||||
setTimeout(this.input.focus.bind(this.input), 10);
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -412,6 +412,9 @@ var MmiManager = {
|
|||
* upon successful completion or rejects upon failure.
|
||||
*/
|
||||
_getImeiForCard: function mm_getImeiForCard(cardIndex) {
|
||||
if (window.VulpesPlatform === 'tundra' && window.VulpesNativeTelephony) {
|
||||
return window.VulpesCompat.call('platform.imei', {});
|
||||
}
|
||||
return navigator.mozTelephony.dial('*#06#', cardIndex).then(
|
||||
function(mmiCall) {
|
||||
return mmiCall.result.then(function(result) {
|
||||
|
|
@ -456,7 +459,11 @@ var MmiManager = {
|
|||
self.init().then(function() {
|
||||
var promises = [];
|
||||
|
||||
for (var i = 0; i < navigator.mozMobileConnections.length; i++) {
|
||||
// Sargo exposes one modem to the dialer. The full connection manager
|
||||
// lives in System and Settings on this adapter.
|
||||
var count = window.VulpesPlatform === 'tundra' && window.VulpesNativeTelephony
|
||||
? 1 : navigator.mozMobileConnections.length;
|
||||
for (var i = 0; i < count; i++) {
|
||||
promises.push(self._getImeiForCard(i));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
/* Gaia dialog styles use a 10px rem at the default text size. */
|
||||
html { font-size: 62.5%; }
|
||||
html,body{width:100%;height:100%;margin:0;background:#f4f4f4;font-family:Fira Sans,sans-serif}#catalogue{position:absolute;inset:0;width:100%;height:100%;border:0}#message{padding:3rem 2rem;text-align:center;font-size:1.8rem}#message button{display:block;width:100%;padding:1rem;margin:1rem 0;font:inherit}#open[hidden],[hidden]{display:none!important}#confirm{z-index:10}#confirm section{overflow:auto}#permissions{font-size:1.5rem}
|
||||
|
|
|
|||
|
|
@ -4,23 +4,37 @@
|
|||
const fr=()=>/^fr(?:-|$)/i.test(language);
|
||||
const text=(f,e)=>fr()?f:e;
|
||||
function labels(){document.getElementById('browse').textContent=text('Ouvrir le catalogue','Open catalogue');document.getElementById('open').textContent=text('Ouvrir','Open');document.getElementById('install').textContent=text('Installer','Install');document.getElementById('cancel').textContent=text('Annuler','Cancel');}
|
||||
function loadFailed(){status(text('Catalogue inaccessible. Vérifiez la connexion Internet, puis réessayez.','Catalogue unavailable. Check your Internet connection, then try again.'));document.getElementById('open').hidden=true;}
|
||||
const browseButton=document.getElementById('browse');
|
||||
let connectionMessage=false;
|
||||
function showConnectionMessage(){
|
||||
connectionMessage=true;
|
||||
browseButton.hidden=navigator.onLine===false;
|
||||
browseButton.textContent=text('Réessayer','Retry');
|
||||
status(browseButton.hidden ? text('Hors connexion. Reconnectez-vous pour accéder au catalogue.','Offline. Reconnect to access the catalogue.') :
|
||||
text('Catalogue inaccessible. Vérifiez la connexion Internet, puis réessayez.','Catalogue unavailable. Check your Internet connection, then try again.'));
|
||||
document.getElementById('open').hidden=true;
|
||||
}
|
||||
function loadFailed(){if(busy || installed)return;catalogueUrl='';showConnectionMessage();}
|
||||
frame.addEventListener('mozbrowsererror',loadFailed);
|
||||
frame.addEventListener('mozbrowserclose',()=>{
|
||||
if(busy)return;
|
||||
if(busy || installed)return;
|
||||
catalogueUrl='';
|
||||
if(navigator.onLine===false){showConnectionMessage();return;}
|
||||
status(text('Le catalogue est fermé. Vous pouvez le rouvrir ci-dessous.',
|
||||
'The catalogue is closed. You can reopen it below.'));
|
||||
document.getElementById('open').hidden=true;
|
||||
});
|
||||
let catalogueUrl='';
|
||||
function browse(reload=false){labels();message.hidden=true;dialog.hidden=true;frame.style.visibility='visible';const next='https://vulpes-os.org/marketplace/?mode=app&lang='+(fr()?'fr':'en');if(reload||!catalogueUrl){catalogueUrl=next;frame.src=next;}}
|
||||
function browse(reload=false){labels();installed=null;dialog.hidden=true;
|
||||
if(navigator.onLine===false){showConnectionMessage();return;}
|
||||
connectionMessage=false;browseButton.hidden=false;message.hidden=true;dialog.hidden=true;frame.style.visibility='visible';const next='https://vulpes-os.org/marketplace/?mode=app&lang='+(fr()?'fr':'en');if(reload||catalogueUrl!==next){catalogueUrl=next;frame.src=next;}}
|
||||
function status(value){frame.style.visibility='hidden';message.hidden=false;document.getElementById('status').textContent=value;}
|
||||
async function prepare(url){
|
||||
if(busy)return;const current=++attempt;busy=true;prepared=null;installed=null;document.getElementById('open').hidden=true;
|
||||
status(text('Vérification de l’application…','Checking application…'));
|
||||
try {const value=await VulpesCompat.call('marketplace.prepare',{url});if(current!==attempt)return;prepared=value;
|
||||
document.getElementById('title').textContent=prepared.name;
|
||||
document.getElementById('question').textContent=text('Installer cette application archivée ?','Install this archived application?')+' ('+(prepared.bytes/1048576).toFixed(1)+' Mio)';
|
||||
document.getElementById('question').textContent=text('Installer cette application archivée ?','Install this archived application?')+' ('+(prepared.bytes/1048576).toFixed(1)+text(' Mio)',' MiB)');
|
||||
document.getElementById('permissions').textContent=text('Elle sera exécutée comme une application web, sans accès aux fonctions système. Certains anciens services peuvent ne plus fonctionner.','It will run as a web application without system access. Some old services may no longer work.');
|
||||
message.hidden=true;dialog.hidden=false;
|
||||
}catch(error){if(current!==attempt)return;status(error.message==='PRIVILEGED_APP_UNSUPPORTED'?
|
||||
|
|
@ -37,6 +51,14 @@
|
|||
document.getElementById('browse').onclick=cancel;
|
||||
document.getElementById('open').onclick=()=>installed && VulpesCompat.call('apps.launch',{manifestURL:installed.manifestURL});
|
||||
addEventListener('languagechange',()=>{language=navigator.language;if(!busy)browse(true);});
|
||||
function connectionChanged(){
|
||||
browseButton.hidden=navigator.onLine===false;
|
||||
if(busy || installed)return;
|
||||
if(browseButton.hidden){catalogueUrl='';showConnectionMessage();}
|
||||
else if(connectionMessage)browse(true);
|
||||
}
|
||||
addEventListener('offline',connectionChanged);
|
||||
addEventListener('online',connectionChanged);
|
||||
browse();
|
||||
setInterval(async()=>{if(busy)return;try{const url=await VulpesCompat.call('marketplace.poll');if(url)await prepare(url);}catch(error){console.error(error);}},750);
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ navigator.mozSetMessageHandler('activity', function(activity) {
|
|||
// Conclude the activity if the user taps "back".
|
||||
document.getElementById('header').addEventListener('action', function() {
|
||||
tonePlayer.stop();
|
||||
window.close();
|
||||
activity.postResult(null);
|
||||
});
|
||||
|
||||
function addNewTone(customRingtonesList) {
|
||||
|
|
|
|||
|
|
@ -110,7 +110,9 @@ define(function(require) {
|
|||
// Set wifi.enabled so that it mirrors the state of the hardware.
|
||||
// wifi.enabled is not an ordinary user setting because the system
|
||||
// turns it on and off when wifi goes up and down.
|
||||
settings.createLock().set({'wifi.enabled': wifiManager.enabled});
|
||||
if (!window.VulpesNativeWifi) {
|
||||
settings.createLock().set({'wifi.enabled': wifiManager.enabled});
|
||||
}
|
||||
|
||||
this._bindEvents();
|
||||
|
||||
|
|
@ -372,6 +374,12 @@ define(function(require) {
|
|||
* @param {Function} callback
|
||||
*/
|
||||
_syncWifiEnabled: function(enabled, callback) {
|
||||
// Tundra System owns the radio switch. A delayed Settings poll must
|
||||
// not undo a more recent request from the switch or notification shade.
|
||||
if (window.VulpesNativeWifi) {
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
SettingsCache.getSettings(function(results) {
|
||||
var wifiEnabled = results['wifi.enabled'];
|
||||
if (wifiEnabled !== enabled) {
|
||||
|
|
|
|||
|
|
@ -544,15 +544,12 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (!this.isMaximized() && this.app.isBrowser()) {
|
||||
if (this.pinned) {
|
||||
this.app.element.classList.add('collapsible');
|
||||
this.scrollable.scrollTop = 0;
|
||||
}
|
||||
this.maximize();
|
||||
} else {
|
||||
window.dispatchEvent(new CustomEvent('global-search-request'));
|
||||
if (!this.isMaximized() && this.app.isBrowser() && this.pinned) {
|
||||
this.app.element.classList.add('collapsible');
|
||||
this.scrollable.scrollTop = 0;
|
||||
}
|
||||
// Rocketbar expands a collapsed toolbar before focusing the address field.
|
||||
window.dispatchEvent(new CustomEvent('global-search-request'));
|
||||
};
|
||||
|
||||
AppChrome.prototype.onClickSiteIcon = function onClickSiteIcon() {
|
||||
|
|
|
|||
|
|
@ -696,6 +696,14 @@
|
|||
icc: null
|
||||
};
|
||||
|
||||
// Desktop and Android builds do not expose the legacy Gaia SIM manager.
|
||||
// Usage metrics must still be able to close their dialog on those hosts.
|
||||
if (typeof SIMSlotManager === 'undefined' ||
|
||||
!SIMSlotManager.noSIMCardConnectedToNetwork ||
|
||||
!SIMSlotManager.getSlots) {
|
||||
return simInfo;
|
||||
}
|
||||
|
||||
if (SIMSlotManager.noSIMCardConnectedToNetwork()) {
|
||||
// No connected SIMs
|
||||
return simInfo;
|
||||
|
|
|
|||
|
|
@ -136,10 +136,13 @@
|
|||
},
|
||||
|
||||
hide: function bm_hide() {
|
||||
if (this._toasterTimeout) {
|
||||
clearTimeout(this._toasterTimeout);
|
||||
this._toasterTimeout = null;
|
||||
}
|
||||
var overlayCss = this.overlay.classList;
|
||||
if (overlayCss.contains('battery')) {
|
||||
this.overlay.classList.remove('battery');
|
||||
this._toasterTimeout = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -164,9 +164,30 @@
|
|||
this.publish('-deactivated');
|
||||
this.service.request('unregisterHierarchy', this);
|
||||
|
||||
var timeout;
|
||||
function transOsLogo(event) {
|
||||
if (!self.osLogo || (event && (event.target !== self.osLogo ||
|
||||
event.propertyName !== 'opacity'))) return;
|
||||
clearTimeout(timeout);
|
||||
self.osLogo.removeEventListener('transitionend', transOsLogo);
|
||||
self.osLogo.parentNode.removeChild(self.osLogo);
|
||||
delete self.osLogo; // Don't entrain the DOM nodes.
|
||||
window.performance.mark('osLogoEnd');
|
||||
window.dispatchEvent(new CustomEvent('logohidden'));
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
function hideOsLogo() {
|
||||
self.osLogo.addEventListener('transitionend', transOsLogo);
|
||||
self.osLogo.classList.add('hide');
|
||||
// A suspended compositor can leave the opacity transition at time zero.
|
||||
timeout = setTimeout(transOsLogo, 3500);
|
||||
}
|
||||
|
||||
// No carrier logo - Just animate OS logo.
|
||||
if (!this.poweronLogoLoader.found) {
|
||||
this.osLogo.classList.add('hide');
|
||||
hideOsLogo();
|
||||
|
||||
// Has carrier logo - Animate carrier logo, then OS logo.
|
||||
} else {
|
||||
|
|
@ -201,21 +222,12 @@
|
|||
self.carrierLogo.parentNode.removeChild(self.carrierLogo);
|
||||
delete self.carrierLogo; // Don't entrain the DOM nodes.
|
||||
|
||||
self.osLogo.classList.add('hide');
|
||||
hideOsLogo();
|
||||
self.carrierPowerOnElement = null;
|
||||
});
|
||||
}
|
||||
|
||||
self.osLogo.addEventListener('transitionend', function transOsLogo() {
|
||||
self.osLogo.removeEventListener('transitionend', transOsLogo);
|
||||
self.osLogo.parentNode.removeChild(self.osLogo);
|
||||
delete self.osLogo; // Don't entrain the DOM nodes.
|
||||
window.performance.mark('osLogoEnd');
|
||||
window.dispatchEvent(new CustomEvent('logohidden'));
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
poweroff: function(reboot) {
|
||||
|
|
|
|||
|
|
@ -447,6 +447,12 @@
|
|||
this.input.blur();
|
||||
}
|
||||
this.input.focus();
|
||||
// On Wayland a web view can retain window focus even though Gaia
|
||||
// selected the address field. No focusin is delivered in that case.
|
||||
if (window.VulpesNativeInput && !document.hasFocus() &&
|
||||
document.activeElement === this.input) {
|
||||
this.input.dispatchEvent(new Event('vulpes-address-focus', {bubbles:true}));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@
|
|||
|
||||
// when wifi is really disabled, emit event to notify QuickSettings
|
||||
wifiManager.ondisabled = function onWifiDisabled() {
|
||||
this._enabled = false;
|
||||
self._enabled = false;
|
||||
var evt = document.createEvent('CustomEvent');
|
||||
evt.initCustomEvent('wifi-disabled',
|
||||
/* canBubble */ true, /* cancelable */ false, null);
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@
|
|||
line-height: 0.9;
|
||||
margin: -1.4rem 0 0;
|
||||
margin-inline-start: -0.4rem;
|
||||
font-weight: 200;
|
||||
font-weight: 300;
|
||||
font-size: 8.5rem;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#battery {
|
||||
display: none;
|
||||
background-image: url('images/header_bg.png');
|
||||
background: #404040 url('images/header_bg.png') center / 100% 100% no-repeat;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
|
|
|||
|
|
@ -83,11 +83,10 @@ to be available for moz-elements */
|
|||
background-color: black;
|
||||
}
|
||||
|
||||
/* AppChrome would normally provide the theme color for the statusbar.
|
||||
However, when in native full-screen mode, AppChrome isn't visible; just
|
||||
use black for now, as we do with #screen.attention. */
|
||||
/* In full-screen Gaia apps the content is painted beneath the statusbar.
|
||||
Let its header colour show through instead of forcing an unrelated black. */
|
||||
#screen:-moz-full-screen-ancestor #statusbar {
|
||||
background-color: black;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#screen.utility-tray #statusbar {
|
||||
|
|
|
|||
|
|
@ -179,6 +179,23 @@ suite('battery manager >', function() {
|
|||
assertDisplayed();
|
||||
});
|
||||
|
||||
test('a previous timeout does not hide a new notification', function(done) {
|
||||
subject.hide();
|
||||
subject.TOASTER_TIMEOUT = 50;
|
||||
subject._wasEmptyBatteryNotificationDisplayed = false;
|
||||
MockNavigatorBattery.level = 0.05;
|
||||
sendChargingChange(false);
|
||||
setTimeout(function() {
|
||||
sendChargingChange(true);
|
||||
sendChargingChange(false);
|
||||
setTimeout(function() {
|
||||
assertDisplayed();
|
||||
subject.hide();
|
||||
done();
|
||||
}, 25);
|
||||
}, 30);
|
||||
});
|
||||
|
||||
suite('goes up >', function() {
|
||||
setup(function() {
|
||||
sendLevelChange(0.2);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
[
|
||||
"Vulpes_Blue.png",
|
||||
"Illus_Flow2_Blue.jpg",
|
||||
"Illus_Flow2_Orange@2.25x.jpg",
|
||||
"FX_Bolt.jpg",
|
||||
|
|
@ -43,5 +42,6 @@
|
|||
"PH_Tree.jpg",
|
||||
"PH_TreeForest.jpg",
|
||||
"PH_Wheat.jpg",
|
||||
"PH_WhiteFlower.jpg"
|
||||
"PH_WhiteFlower.jpg",
|
||||
"Vulpes_Blue.png"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
unicode-range: U+0628,U+0631,U+0639,U+064A;
|
||||
unicode-range: U+0627,U+0628,U+0629,U+0631,U+0633,U+0639,U+0641,U+0644,U+064A,U+06CC;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
unicode-range: U+0982,U+09A6,U+09AC,U+09B2,U+09B6,U+09BE,U+09C7;
|
||||
unicode-range: U+0982,U+0985,U+09A4,U+09A6,U+09AA,U+09AC,U+09AD,U+09B0,U+09B2,U+09B6,U+09BE,U+09C7,U+09CD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
unicode-range: U+0928,U+092A,U+0932,U+093E,U+0940,U+0947;
|
||||
unicode-range: U+0926,U+0928,U+092A,U+0932,U+0939,U+093E,U+093F,U+0940,U+0947,U+094D;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
|
|
@ -109,11 +109,74 @@
|
|||
unicode-range: U+1781,U+1798,U+179A,U+17C2,U+17D2;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: FiraSans;
|
||||
src: url("languages/VulpesLanguageHebrew-Regular.woff2") format("woff2");
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
unicode-range: U+05B0,U+05B4,U+05D1,U+05D9,U+05E2,U+05E8,U+05EA;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: FiraSans;
|
||||
src: url("languages/VulpesLanguageMyanmar-Regular.woff2") format("woff2");
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
unicode-range: U+1014,U+1019,U+102C,U+103A,U+103C;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: FiraSans;
|
||||
src: url("languages/VulpesLanguageTamil-Regular.woff2") format("woff2");
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
unicode-range: U+0BA4,U+0BAE,U+0BB4,U+0BBF,U+0BCD;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: FiraSans;
|
||||
src: url("languages/VulpesLanguageTelugu-Regular.woff2") format("woff2");
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
unicode-range: U+0C17,U+0C24,U+0C32,U+0C41,U+0C46;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: FiraSans;
|
||||
src: url("languages/VulpesLanguageThai-Regular.woff2") format("woff2");
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
unicode-range: U+0E17,U+0E22,U+0E44;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: FiraSans;
|
||||
src: url("languages/VulpesLanguage-Regular.woff2") format("woff2");
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
unicode-range: U+1EBF,U+1EC7,U+1EE5;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: FiraSans;
|
||||
src: url("languages/VulpesLanguageTibetan-Regular.woff2") format("woff2");
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
unicode-range: U+0F0B,U+0F41,U+0F44,U+0F62,U+0F7C,U+0FAB;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: FiraSans;
|
||||
src: url("languages/VulpesLanguageCJK-Regular.woff2") format("woff2");
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
unicode-range: U+4E2D,U+4F53,U+6587,U+65E5,U+672C,U+6B63,U+7B80,U+7E41,U+8A9E,U+9AD4,U+AD6D,U+C5B4,U+D55C;
|
||||
unicode-range: U+4E2D,U+4F53,U+62FC,U+6587,U+65E5,U+672C,U+6B63,U+7B80,U+7E41,U+8A9E,U+97F3,U+9AD4,U+AD6D,U+C5B4,U+D55C;
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue