mirror of
https://git.j0bot.ch/admin_j0bot/ploxion-steam.git
synced 2026-11-29 07:15:07 +00:00
synchro du labo (0bf0da65) : app.blade.php, README.md
This commit is contained in:
parent
300d3e1b22
commit
2399b85f8c
22
README.md
22
README.md
@ -1,3 +1,21 @@
|
||||
# ploxion-steam
|
||||
# 🎮 Steam
|
||||
|
||||
PLOXION · Accéder à Steam depuis le xerboxion : piloter le client (steam://), lancer des jeux, ta bibliothèque — la boucle bouclée. · fournit: steam, game-launch, library
|
||||
Accéder à Steam depuis le xerboxion : piloter le client (steam://), lancer des jeux, ta bibliothèque — la boucle bouclée.
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
| id | `steam` |
|
||||
| fournit | `steam` `game-launch` `library` |
|
||||
| bions qu'il nomme | `jOSApps` `jOSBoxion` |
|
||||
| fichiers | `app.blade.php` |
|
||||
| dans le labo | `resources/views/ploxions/steam/` (dépôt `my_website2`) |
|
||||
|
||||
## Contribuer
|
||||
|
||||
- **Dans le xer** : https://labo.j0bot.ch/px/atelier?ploxion=steam — prends-le, modifie-le, vois-le tourner, « ⧗ envoyer le tsoin ».
|
||||
- **Dans VS Code** : `xb prendre steam` (ou l'extension xerboxion › ⇩ Prendre), puis ⧗ Envoyer.
|
||||
- Le chemin complet : https://labo.j0bot.ch/px/contribuer
|
||||
|
||||
Ce dépôt est un **miroir** du labo (synchronisé par `bin/ploxions-forge.mjs`, depuis le commit `0bf0da65`) : une modif se propose par un tsoin ou une branche du labo, pas directement ici.
|
||||
|
||||
© 2026 chill-tekk · ne pas nuire
|
||||
|
||||
77
app.blade.php
Normal file
77
app.blade.php
Normal file
@ -0,0 +1,77 @@
|
||||
{{-- PL0XI0N steam 🎮 — ACCÉDER À STEAM DEPUIS LE XERBOXION (RS-7 : « la boucle sera bouclée »). Le
|
||||
xerboxion tourne SUR Steam (une app) ET pilote Steam de l'intérieur : via le protocole steam://
|
||||
(ouvrir la bibliothèque, lancer un jeu, amis, big picture…) — marche si le client Steam est installé,
|
||||
sans clé API. La bibliothèque détaillée (jeux, achievements) = Steam Web API (ta clé + ton SteamID).
|
||||
Vision : le xerboxion sur Steam = une RÉPLICATION d'un boxion (tout dedans, synchronisé par replion). --}}
|
||||
<style>
|
||||
.px-st{display:flex;flex-direction:column;height:100%;background:var(--xr-bg,#0a0e18);color:var(--xr-fg,#e8ecf8);font-family:var(--xr-font-ui,ui-sans-serif,system-ui)}
|
||||
.px-st .hd{padding:12px;border-bottom:1px solid var(--xr-line,#18213f);font-weight:700;color:#66c0f4;display:flex;gap:8px;align-items:center}
|
||||
.px-st .body{flex:1;overflow:auto;padding:12px}
|
||||
.px-st h4{margin:6px 0 8px;font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:var(--xr-muted,#8aa0c8)}
|
||||
.px-st .grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px;margin-bottom:16px}
|
||||
.px-st .grid a{display:flex;flex-direction:column;align-items:center;gap:5px;padding:13px 6px;border:1px solid var(--xr-line,#1b2647);border-radius:12px;background:var(--xr-card,#132038);color:var(--xr-fg,#dbe6ff);text-decoration:none;text-align:center}
|
||||
.px-st .grid a:hover{border-color:#66c0f4}.px-st .grid a .ic{font-size:1.5rem}.px-st .grid a .nm{font-size:.76rem}
|
||||
.px-st .run{display:flex;gap:7px;margin-bottom:16px}
|
||||
.px-st .run input{flex:1;background:#0e1730;border:1px solid var(--xr-line,#223056);color:var(--xr-fg,#cfe0ff);border-radius:9px;padding:10px;font-size:.9rem}
|
||||
.px-st .run button{background:#1a9fff;border:0;color:#04121f;border-radius:9px;padding:10px 15px;font-weight:700;cursor:pointer}
|
||||
.px-st .note{border:1px solid var(--xr-line,#1b2647);border-radius:11px;padding:12px;background:var(--xr-card,#111a30);font-size:.8rem;color:var(--xr-muted,#9fb0d0);line-height:1.5}
|
||||
.px-st .note b{color:#66c0f4}
|
||||
.px-st .lib input{width:100%;box-sizing:border-box;background:#0e1730;border:1px solid var(--xr-line,#223056);color:var(--xr-fg,#cfe0ff);border-radius:9px;padding:10px;margin-bottom:7px}
|
||||
.px-st .lib button{background:#0e1730;border:1px solid var(--xr-border,#2b3a68);color:#66c0f4;border-radius:9px;padding:9px 13px;cursor:pointer;font-size:.82rem}
|
||||
</style>
|
||||
<script>
|
||||
(function () {
|
||||
'use strict';
|
||||
var ACTIONS = [
|
||||
['🎮', 'Steam', 'steam://open/main'], ['📚', 'Bibliothèque', 'steam://open/games'],
|
||||
['👥', 'Amis', 'steam://open/friends'], ['🖥️', 'Big Picture', 'steam://open/bigpicture'],
|
||||
['🛒', 'Store', 'steam://open/store'], ['⬇️', 'Téléchargements', 'steam://open/downloads'],
|
||||
['🏆', 'Succès', 'steam://open/achievements'], ['⚙️', 'Réglages', 'steam://open/settings']
|
||||
];
|
||||
function mount(container, ctx) {
|
||||
container.innerHTML =
|
||||
'<div class="px-st">' +
|
||||
'<div class="hd">🎮 Steam <span style="margin-left:auto;font-weight:400;font-size:.66rem;color:#8aa0c8">accès depuis le xerboxion</span></div>' +
|
||||
'<div class="body">' +
|
||||
'<h4>Ton compte : Steam ↔ xerboxion</h4><div class="note" data-conn style="margin-bottom:15px">…</div>' +
|
||||
'<h4>Piloter Steam</h4><div class="grid" data-grid></div>' +
|
||||
'<h4>Lancer un jeu par App ID</h4>' +
|
||||
'<div class="run"><input data-appid placeholder="ex : 730 (CS2), 570 (Dota)…" inputmode="numeric"><button data-run>▶ lancer</button></div>' +
|
||||
'<h4>Ta bibliothèque (Steam Web API)</h4>' +
|
||||
'<div class="lib"><input data-sid placeholder="ton SteamID64 (ex : 7656119…)"><button data-loadlib>charger ma bibliothèque</button><div data-libout style="margin-top:8px"></div></div>' +
|
||||
'<h4 style="margin-top:16px">La boucle bouclée</h4>' +
|
||||
'<div class="note">Le xerboxion tourne <b>SUR</b> Steam (une app) <b>ET</b> pilote Steam d\'ici. Et le xerboxion sur Steam = une <b>réplication d\'un boxion</b> : tout dedans (ploxions + état), synchronisé par <b>replion</b>. Pour l\'instant : les boutons <b>steam://</b> marchent si le client Steam est installé. La bibliothèque détaillée + la sync des achievements demandent ta <b>clé Steam Web API</b> et le <b>Steamworks SDK</b> (via le launcher natif) — on branche ça ensemble.</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
var root = container.querySelector('.px-st');
|
||||
var grid = root.querySelector('[data-grid]');
|
||||
grid.innerHTML = ACTIONS.map(function (a) { return '<a href="' + a[2] + '"><span class="ic">' + a[0] + '</span><span class="nm">' + a[1] + '</span></a>'; }).join('');
|
||||
|
||||
// liaison compte Steam ↔ SSO (OpenID) — via le bion jOSsteam, marche partout
|
||||
var connEl = root.querySelector('[data-conn]');
|
||||
function renderConn() {
|
||||
var js = window.jOSsteam;
|
||||
var inApp = js && js.available;
|
||||
if (js && js.status) {
|
||||
js.status().then(function (s) {
|
||||
if (s.linked) connEl.innerHTML = '✅ Steam lié : <b>' + (s.name || s.steamid) + '</b>' + (inApp ? ' · <b>dans l\'app Steam</b> (amis/presence dispo)' : '') + ' <button data-unlink style="margin-left:6px;background:#2a0f14;border:1px solid #6a2a2a;color:#e89;border-radius:7px;padding:4px 9px;cursor:pointer;font-size:.7rem">délier</button>';
|
||||
else connEl.innerHTML = 'Lie ton <b>compte Steam</b> à ton compte xerboxion → tes amis, tes achievements, ta sync se rejoignent. <button data-link style="margin-top:8px;background:#1a9fff;border:0;color:#04121f;border-radius:8px;padding:9px 14px;cursor:pointer;font-weight:700">🔗 Lier mon compte Steam</button>';
|
||||
var lb = connEl.querySelector('[data-link]'); if (lb) lb.onclick = function () { js.connect(); };
|
||||
var ub = connEl.querySelector('[data-unlink]'); if (ub) ub.onclick = function () { var m = document.querySelector('meta[name="csrf-token"]'); fetch('/auth/steam/unlink', { method: 'POST', headers: { 'X-CSRF-TOKEN': m ? m.content : '' }, credentials: 'same-origin' }).then(function () { renderConn(); }); };
|
||||
});
|
||||
} else connEl.innerHTML = '<b>jOSsteam</b> indispo (ouvre depuis le bureau /home).';
|
||||
}
|
||||
renderConn();
|
||||
root.querySelector('[data-run]').onclick = function () { var id = (root.querySelector('[data-appid]').value || '').replace(/\D/g, ''); if (id) location.href = 'steam://run/' + id; };
|
||||
root.querySelector('[data-loadlib]').onclick = function () {
|
||||
var sid = (root.querySelector('[data-sid]').value || '').replace(/\D/g, ''), out = root.querySelector('[data-libout]');
|
||||
if (!sid) { out.textContent = 'entre ton SteamID64.'; return; }
|
||||
out.innerHTML = '<div class="note">Pour lister tes jeux + succès, il faut une <b>clé Steam Web API</b> côté serveur (route /px/steam/library). Donne-moi ta clé (privée) et je câble la vraie bibliothèque. En attendant : <a href="steam://open/games" style="color:#66c0f4">ouvre ta bibliothèque dans Steam ▸</a></div>';
|
||||
try { if (window.jOSBoxion && window.jOSBoxion.saveSoon) window.jOSBoxion.saveSoon('steam', { sid: sid }); } catch (e) {}
|
||||
};
|
||||
return { unmount: function () { container.innerHTML = ''; } };
|
||||
}
|
||||
window.jOSApps = window.jOSApps || {};
|
||||
window.jOSApps['steam'] = { manifest: { id: 'steam', name: 'Steam', icon: '🎮' }, mount: mount };
|
||||
})();
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user