Release Vulpes OS 2.7 Preview 25 for Desktop, Android and Pixel 3a
This commit is contained in:
parent
6a44daeaaa
commit
3a1fba4efe
8 changed files with 1301 additions and 196 deletions
File diff suppressed because one or more lines are too long
|
|
@ -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);
|
||||
})();
|
||||
|
|
|
|||
73
overrides/shared/elements/gaia-site-icon/style.css
Executable file
73
overrides/shared/elements/gaia-site-icon/style.css
Executable file
|
|
@ -0,0 +1,73 @@
|
|||
gaia-app-icon {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
#image-container {
|
||||
position: relative;
|
||||
transition: visibility 0.2s, opacity 0.2s;
|
||||
}
|
||||
|
||||
#image-container.initial-load {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#image-container > #spinner {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#image-container.downloading > #spinner {
|
||||
display: block;
|
||||
background: no-repeat center center url('images/app_install_spinner.svg');
|
||||
background-size: contain;
|
||||
animation: rotate 2s infinite linear;
|
||||
}
|
||||
|
||||
#image-container,
|
||||
#image-container > * {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#subtitle {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
text-align: center;
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
|
||||
#title-container {
|
||||
transition: opacity 0.2s, visibility 0.2s;
|
||||
}
|
||||
|
||||
#title-container.hidden {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/* Compact layouts can widen labels independently of the image. */
|
||||
#subtitle {
|
||||
width: var(--vulpes-label-width, auto);
|
||||
margin-inline-start: var(--vulpes-label-offset, 0px);
|
||||
}
|
||||
#image-container > img {
|
||||
display: var(--vulpes-icon-display, inline);
|
||||
}
|
||||
|
||||
:host([data-identifier*="marketplace"]) #image-container > img {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
#title-container {
|
||||
/* Visually hide compact labels without removing their accessible names. */
|
||||
position: var(--vulpes-icon-title-position, static);
|
||||
clip-path: var(--vulpes-icon-title-clip, none);
|
||||
}
|
||||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue