Release Vulpes OS 2.7 Preview 25 for Desktop, Android and Pixel 3a

This commit is contained in:
OverSu 2026-11-28 12:20:19 +01:00
commit 3a1fba4efe
18 changed files with 1301 additions and 196 deletions

View file

@ -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;
}

View file

@ -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);
},

View file

@ -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));
}

View file

@ -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}

View file

@ -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);
})();

View file

@ -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) {

View file

@ -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) {

View file

@ -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() {

View file

@ -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;

View file

@ -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;
}
}
});

View file

@ -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) {

View file

@ -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}));
}
}
},

View file

@ -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);

View file

@ -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;
}

View file

@ -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;

View file

@ -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 {

View file

@ -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);

View file

@ -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"
]