Skip to content

Commit

Permalink
[UI, FIX] adjusts hide and disables save warning popup in slides (#4556)
Browse files Browse the repository at this point in the history
Fixes #4513. Also disables the save pop up which is quite annoying in slides mode.

As per #4363 I should not touch the front-end without supervision, so it is probably a good idea if @jpelay checks if this indeed works, and maybe to add a test for the slides and/or for raw? :D
  • Loading branch information
Felienne authored Sep 27, 2023
1 parent 6c10744 commit 15beb17
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/incl/editor-and-output.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
</div>
</div>
</div>
<div class="w-full flex flex-col order-3 relative" id="code_output" style="height: 22rem;">
<div class="w-full flex flex-col order-3 relative" id="code_output" {% if raw %} style="height: 14rem;" {% else %} style="height: 22rem;" {% endif %}>
<div class="inline-block ltr:right-0 rtl:left-0 absolute z-10 mx-2 mt-2 text-white" id="variables_container">
<button id="variable_button" class="inline-flex items-center text-xl px-2 bg-blue-600 rounded-lg" onclick="hedyApp.showVariableView()">
🏷<svg class="float-right w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
Expand Down Expand Up @@ -163,9 +163,11 @@
</div>
<!-- Col 2: run button (move below editor in single-column layout), level buttons -->
<div class="order-2 md:order-4" id="code_related_buttons">
{% if not raw %}
<div id="not-logged-in-warning" class="hidden bg-yellow-200 text-sm px-4 py-1 border-2 border-yellow-400 mb-4">
{{ _('not_logged_in_cantsave') }}. <a href="/login" class="text-black">{{_('login_to_save_your_work')}}</a>
</div>
{% endif %}
<div class="flex justify-between gap-2 items-start h-12 overflow-visible">
<div id="runButtonContainer">
<button id="runit" class="green-btn" onclick='hedyApp.runit({{ level }}, "{{ g.lang }}", {{_('already_program_running')|default(None)|tojson}})'>{{_('run_code_button')}} </button>
Expand Down

0 comments on commit 15beb17

Please sign in to comment.