Release Vulpes OS 2.7 Preview 25 for Desktop, Android and Pixel 3a
This commit is contained in:
parent
6a44daeaaa
commit
3a1fba4efe
1 changed files with 1301 additions and 196 deletions
|
|
@ -2,7 +2,7 @@
|
|||
(() => {
|
||||
const { call, request, handlers } = window.VulpesCompat;
|
||||
document.documentElement.dataset.vulpesApp = location.hostname.split('.')[0];
|
||||
if(window.VulpesPlatform==='tundra' && location.hostname==='system.localhost') {
|
||||
if(window.VulpesPlatform==='tundra' && ['system.localhost','keyboard.localhost'].includes(location.hostname)) {
|
||||
Object.defineProperty(navigator,'vibrate',{value:pattern=>{
|
||||
pattern=Array.isArray(pattern)?pattern:[pattern];
|
||||
if(pattern.length>32 || pattern.some(n=>!Number.isInteger(n) || n<0 || n>10000) || pattern.reduce((a,b)=>a+b,0)>10000) return false;
|
||||
|
|
@ -323,12 +323,15 @@
|
|||
});
|
||||
Object.defineProperty(navigator, 'mozMobileMessage', { value: messages });
|
||||
}
|
||||
const appName = location.hostname.split('.')[0];
|
||||
if (
|
||||
['settings', 'gallery', 'music', 'video', 'camera', 'ringtones'].includes(location.hostname.split('.')[0])
|
||||
['settings', 'gallery', 'music', 'video', 'camera', 'ringtones', 'system'].includes(appName)
|
||||
) {
|
||||
const stores = new Map();
|
||||
function storage(type) {
|
||||
if (!['pictures', 'music', 'videos', ...(location.hostname==='settings.localhost'?['apps','sdcard']:[])].includes(type)) return null;
|
||||
const allowedTypes = appName === 'system' ? ['pictures', 'apps'] :
|
||||
['pictures', 'music', 'videos', ...(appName === 'settings' ? ['apps', 'sdcard'] : [])];
|
||||
if (!allowedTypes.includes(type)) return null;
|
||||
if (stores.has(type)) return stores.get(type);
|
||||
const s = new EventTarget();
|
||||
s.storageName = 'sdcard';
|
||||
|
|
|
|||
Loading…
Reference in a new issue