30 lines
2.4 KiB
PHP
30 lines
2.4 KiB
PHP
{{-- PL0XION download 📥 — ALIAS de l'Installer (fusion 19.09.2026, plan docs/plans/installer-unique-v0.md). /px/download reste
|
|
valide (favoris, deep-links). V1 : délègue à jOSApps['installer'] (section catalogue) ; sinon à jOSApps['dl'] (le marketplace
|
|
de repli) ; sinon, en page seule (/px/download), redirige vers /px/installer?section=catalogue. --}}
|
|
<script>
|
|
(function () {
|
|
'use strict';
|
|
var ID = 'download';
|
|
function qs(k) { try { return new URLSearchParams(location.search).get(k); } catch (e) { return null; } }
|
|
function app(id) { var a = window.jOSApps && window.jOSApps[id]; return (a && typeof a.mount === 'function' && a !== window.jOSApps[ID]) ? a : null; }
|
|
function describe() {
|
|
var m = app('installer') || app('dl'); try { if (m && m.describe) { var x = m.describe(); if (x) return x; } } catch (e) {}
|
|
return { v: 1, id: ID, title: 'Installer', icon: '📥', items: [{ p: 1, kind: 'text', label: 'alias', value: 'installer' }] };
|
|
}
|
|
function mount(container, ctx) {
|
|
var m = app('installer');
|
|
var c = Object.assign({}, ctx || {}); c.section = c.section || (c.params && c.params.section) || qs('section') || 'catalogue';
|
|
if (m) return m.mount(container, c);
|
|
// à la demande (P1 22.09) : l'Installer pas encore chargé mais chargeable → jOSApps.monter (⏳ puis montage, même retour {unmount})
|
|
var L = window.jOSApps; if (L && L.monter && L.peut && L.peut('installer')) return L.monter('installer', container, c);
|
|
m = app('dl'); if (m) return m.mount(container, ctx);
|
|
if (ctx && ctx.standalone) { try { location.replace('/px/installer?section=catalogue'); } catch (e0) {} }
|
|
container.innerHTML = '<div style="display:flex;align-items:center;justify-content:center;height:100%;min-height:120px;gap:6px;padding:16px;text-align:center;color:#8aa0c0;font:.85rem ui-sans-serif,system-ui">📥 Les téléchargements vivent dans <b style="color:#3fe0d0">Installer</b> — <a href="/px/installer?section=catalogue" style="color:#8fe6d8">ouvrir</a></div>';
|
|
var t = setTimeout(function () { try { if (window.jOS && window.jOS.openPloxion) window.jOS.openPloxion('installer'); } catch (e1) {} }, 350);
|
|
return { unmount: function () { clearTimeout(t); container.innerHTML = ''; } };
|
|
}
|
|
window.jOSApps = window.jOSApps || {};
|
|
window.jOSApps[ID] = { manifest: { id: ID, name: 'Installer', icon: '📥', alias: 'installer' }, mount: mount, describe: describe };
|
|
})();
|
|
</script>
|