From 5d0f658075f1d3cda5ddc017b0c0e2e37d31a95a Mon Sep 17 00:00:00 2001 From: catborise Date: Wed, 25 Nov 2026 12:12:55 +0300 Subject: [PATCH] feat(instances): the VM's screen keeps its shape and says what it is The screen beside the VM summary was a 4:3 black box: wide screens got bars, nothing said it was live or that a click opens the console, and on phones it took the card's width. The picture now keeps its own shape on the theme's background, a caption under it says "Live" (or "Suspended": the picture of a suspended VM stays) and, when it is a button, "Open console"; on phones it is a small picture beside its caption. --- instances/templates/instance.html | 15 +++++---- instances/tests/test_pending_edits.py | 4 +++ locale/tr/LC_MESSAGES/django.mo | Bin 274075 -> 274110 bytes locale/tr/LC_MESSAGES/django.po | 5 +++ locale/uk/LC_MESSAGES/django.mo | Bin 350217 -> 350258 bytes locale/uk/LC_MESSAGES/django.po | 5 +++ locale/zh/LC_MESSAGES/django.mo | Bin 255707 -> 255742 bytes locale/zh/LC_MESSAGES/django.po | 5 +++ static/css/webvirtcloud.css | 44 ++++++++++++++++++++------ 9 files changed, 62 insertions(+), 16 deletions(-) diff --git a/instances/templates/instance.html b/instances/templates/instance.html index 322174ad..31261a7a 100644 --- a/instances/templates/instance.html +++ b/instances/templates/instance.html @@ -92,17 +92,20 @@ {% if show_screen %} {# the VM's screen, read by instance_page.js every few seconds and shown once one has come; opens the console where it can #} + {# its caption: whether the picture follows the VM (a suspended one's stays), and that a click opens the console #} {% if screen_opens_console %} + data-window="console-{{ instance.uuid }}" data-screen-url="{% url 'instances:screen' instance.id %}"> {% else %} {% endif %} + {% blocktrans with name=instance.name %}Screen of {{ name }}{% endblocktrans %} + + {% if instance.status == 3 %}{% bs_icon 'pause-fill' %} {% trans "Suspended" %} + {% else %} {% trans "Live" context "screen" %}{% endif %} + {% if screen_opens_console %}{% trans "Open console" %}{% endif %} + + {% if screen_opens_console %}{% else %}{% endif %} {% endif %}