web: start: add vnc-viewer feature
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
c805169747
commit
1d0e046ff4
7 changed files with 261 additions and 8 deletions
|
|
@ -38,6 +38,17 @@ export function init(main) {
|
|||
})
|
||||
})
|
||||
|
||||
main.querySelectorAll('[data-action="console"]').forEach(btn => {
|
||||
btn.addEventListener('click', () => {
|
||||
SidePanel.open({
|
||||
title: 'afficher une consol',
|
||||
width: '700px',
|
||||
content: `<vnc-viewer vm="i-test1"></vnc-viewer>`
|
||||
})
|
||||
// form-vm gère son propre submit et dispatche vm-saved — pas besoin de querySelector
|
||||
})
|
||||
})
|
||||
|
||||
// vm-saved est attaché sur main (pas document) → nettoyé automatiquement
|
||||
// quand le router remplace le contenu de <main>
|
||||
main.addEventListener('vm-saved', e => {
|
||||
|
|
|
|||
|
|
@ -21,4 +21,9 @@
|
|||
padding:7px 14px;color:#a6e3a1;font-size:13px;cursor:pointer;">
|
||||
Edition
|
||||
</button>
|
||||
<button data-action="console"
|
||||
style="background:#313244;border:1px solid #45475a;border-radius:6px;
|
||||
padding:7px 14px;color:#a6e3a1;font-size:13px;cursor:pointer;">
|
||||
Ouvrir la console
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue