Skip to content

Commit 098510d

Browse files
authored
Merge pull request #33 from Josef-MrBeam/stable
SW-2058-pop-up-to-guide-the-user-to-do-hard-refresh-after-update (mrbeam#1590)
2 parents 5d65ccc + b73a251 commit 098510d

File tree

6 files changed

+81
-19
lines changed

6 files changed

+81
-19
lines changed

octoprint_mrbeam/static/css/mrbeam.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3407,6 +3407,9 @@ button#terminal-send {
34073407
#support_overlay > div.modal-body.scrollable > table {
34083408
margin: 20px auto;
34093409
}
3410+
/* Support Standalone */
3411+
3412+
/* Hard refresh overlay */
34103413

34113414
#hard_refresh_overlay {
34123415
width: 60%;
@@ -3421,4 +3424,5 @@ button#terminal-send {
34213424
}
34223425
#hard_refresh_overlay .icon-warning-sign{
34233426
color: #e25303;
3424-
}
3427+
}
3428+
/* Hard refresh overlay */

octoprint_mrbeam/static/js/hard_refresh_overlay.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ $(function () {
1111
self.loginState.currentUser?.()?.active
1212
) {
1313
let x = document.cookie.split('; ').find((row) => row.startsWith('f.u.extra='))?.split('=')[1]; // get cookie
14-
if (x !== undefined && x === 'true') {
14+
if (x && x === 'true') {
1515
$("#hard_refresh_overlay").modal("show");
1616
}
1717
}
1818

1919
};
2020
//can be used with newer octoprint version
2121
self.onEventplugin_softwareupdate_update_succeeded = function () {
22-
document.cookie = "f.u.extra=true"
22+
document.cookie = "f.u.extra=true" // add cookie
2323
}
2424
// needs to be used for oprint 1.3.6
2525
self.onDataUpdaterPluginMessage = function (plugin, data) {
@@ -30,7 +30,7 @@ $(function () {
3030
}
3131
}
3232
self.setUserHardRefreshed = function () {
33-
document.cookie = "f.u.extra= ; expires = Thu, 01 Jan 1970 00:00:00 GMT" // delete cookie
33+
document.cookie = "f.u.extra=false; max-age=0" // delete cookie
3434
}
3535
}
3636

octoprint_mrbeam/templates/hard_refresh_overlay.jinja2

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
</div>
55
<div class="modal-body">
66
<div class="row-fluid">
7-
<div class="span5 image_description">
8-
<p>{{ _("An update has been installed on this Mr Beam. To use the new functions, the user interace must be completely reloaded.") }}</p>
9-
<p> {{ _("We call this a hard refresh. To do this, press the three keys at the same time, depending on your operating system, as shown in the graphic:") }}</p>
7+
<div class="span5">
8+
<div class="image_description">
9+
<p>{{ _("An update has been installed on this Mr Beam. To use the new functions, the user interace must be completely reloaded.") }}</p>
10+
<p> {{ _("We call this a hard refresh. To do this, press the three keys at the same time, depending on your operating system, as shown in the graphic:") }}</p>
11+
</div>
1012
</div>
1113
<div class="span7">
12-
<b>{{ _("Windows | Strg + Shift + R") }}</b>
14+
<b>{{ _("Windows | Ctrl + Shift + R") }}</b>
1315
<img src="/plugin/mrbeam/static/img/windows_refresh.png">
1416
<b>{{ _("Mac | Command + Shift + R") }}</b>
1517
<img src="/plugin/mrbeam/static/img/mac_refresh.png">
966 Bytes
Binary file not shown.

octoprint_mrbeam/translations/de/LC_MESSAGES/messages.po

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Mr_Beam 0.1.61\n"
99
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10-
"POT-Creation-Date: 2022-08-30 11:31+0200\n"
11-
"PO-Revision-Date: 2022-08-30 11:32+0200\n"
10+
"POT-Creation-Date: 2022-11-11 08:54+0100\n"
11+
"PO-Revision-Date: 2022-11-11 08:58+0100\n"
1212
"Last-Translator: Andy Werner <[email protected]>\n"
1313
"Language-Team: \n"
1414
"Language: de\n"
@@ -2576,6 +2576,38 @@ msgstr "Über das Material fahren"
25762576
msgid "It's focused!"
25772577
msgstr "Fokussiert!"
25782578

2579+
#: octoprint_mrbeam/templates/hard_refresh_overlay.jinja2:3
2580+
msgid "Refresh is needed after the last Software Update"
2581+
msgstr "Nach dem letzten Software-Update ist eine Aktualisierung erforderlich"
2582+
2583+
#: octoprint_mrbeam/templates/hard_refresh_overlay.jinja2:9
2584+
msgid ""
2585+
"An update has been installed on this Mr Beam. To use the new functions, the "
2586+
"user interace must be completely reloaded."
2587+
msgstr ""
2588+
"Auf dem Mr Beam wurde ein update installiert. Um die neuen Funktionen nutzen "
2589+
"zu können muss die Benutzeroberfläche komplett neu geladen werden."
2590+
2591+
#: octoprint_mrbeam/templates/hard_refresh_overlay.jinja2:10
2592+
msgid ""
2593+
"We call this a hard refresh. To do this, press the three keys at the same "
2594+
"time, depending on your operating system, as shown in the graphic:"
2595+
msgstr ""
2596+
"Wir nennen das einen hard refresh. Drücke dafür gleichzeitig die drei "
2597+
"Tasten, passend zu deinem Betriebssystem, wie in der Grafik dargestellt."
2598+
2599+
#: octoprint_mrbeam/templates/hard_refresh_overlay.jinja2:14
2600+
msgid "Windows | Ctrl + Shift + R"
2601+
msgstr "Windows | Strg + Shift + R"
2602+
2603+
#: octoprint_mrbeam/templates/hard_refresh_overlay.jinja2:16
2604+
msgid "Mac | Command + Shift + R"
2605+
msgstr "Mac | Command + Shift + R"
2606+
2607+
#: octoprint_mrbeam/templates/hard_refresh_overlay.jinja2:23
2608+
msgid "Yes, I will reload the page"
2609+
msgstr "Ja, ich werde die Seite neu laden"
2610+
25792611
#: octoprint_mrbeam/templates/homing_overlay.jinja2:50
25802612
msgid "Make sure your Mr Beam is empty."
25812613
msgstr "Stelle sicher, dass Dein Mr Beam leer ist."
@@ -3124,11 +3156,11 @@ msgstr ""
31243156
"Support Team kontaktieren um Dein Gerät zurückzusetzen. Mehr dazu findest Du "
31253157
"in der %(tag_open)sKnowledge Base%(tag_close)s."
31263158

3127-
#: octoprint_mrbeam/templates/mrbeam_doc_translation_placeholders.jinja2:1
3159+
#: octoprint_mrbeam/templates/mrbeam_doc_translation_placeholders.jinja2:2
31283160
msgid "Quickstart Guide"
31293161
msgstr "Quickstart Guide"
31303162

3131-
#: octoprint_mrbeam/templates/mrbeam_doc_translation_placeholders.jinja2:2
3163+
#: octoprint_mrbeam/templates/mrbeam_doc_translation_placeholders.jinja2:3
31323164
msgid "User Manual"
31333165
msgstr "Betriebsanleitung"
31343166

@@ -6377,10 +6409,6 @@ msgstr "Dämon zurücksetzen"
63776409
#~ "über 'Einstellungen' > 'Software-Update' aus, bevor Du einen Laserjob "
63786410
#~ "startest."
63796411

6380-
#~ msgid "iobeam version is outdated. Please try Software update."
6381-
#~ msgstr ""
6382-
#~ "Die iobeam-Version ist veraltet. Bitte versuche ein Software-Update."
6383-
63846412
#~ msgid "beamOS is reloading..."
63856413
#~ msgstr "beamOS lädt neu..."
63866414

translations/messages.pot

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PROJECT VERSION\n"
1010
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
11-
"POT-Creation-Date: 2022-08-30 11:31+0200\n"
11+
"POT-Creation-Date: 2022-11-11 08:54+0100\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -2214,6 +2214,34 @@ msgstr ""
22142214
msgid "It's focused!"
22152215
msgstr ""
22162216

2217+
#: octoprint_mrbeam/templates/hard_refresh_overlay.jinja2:3
2218+
msgid "Refresh is needed after the last Software Update"
2219+
msgstr ""
2220+
2221+
#: octoprint_mrbeam/templates/hard_refresh_overlay.jinja2:9
2222+
msgid ""
2223+
"An update has been installed on this Mr Beam. To use the new functions, "
2224+
"the user interace must be completely reloaded."
2225+
msgstr ""
2226+
2227+
#: octoprint_mrbeam/templates/hard_refresh_overlay.jinja2:10
2228+
msgid ""
2229+
"We call this a hard refresh. To do this, press the three keys at the same"
2230+
" time, depending on your operating system, as shown in the graphic:"
2231+
msgstr ""
2232+
2233+
#: octoprint_mrbeam/templates/hard_refresh_overlay.jinja2:14
2234+
msgid "Windows | Ctrl + Shift + R"
2235+
msgstr ""
2236+
2237+
#: octoprint_mrbeam/templates/hard_refresh_overlay.jinja2:16
2238+
msgid "Mac | Command + Shift + R"
2239+
msgstr ""
2240+
2241+
#: octoprint_mrbeam/templates/hard_refresh_overlay.jinja2:23
2242+
msgid "Yes, I will reload the page"
2243+
msgstr ""
2244+
22172245
#: octoprint_mrbeam/templates/homing_overlay.jinja2:50
22182246
msgid "Make sure your Mr Beam is empty."
22192247
msgstr ""
@@ -2626,11 +2654,11 @@ msgid ""
26262654
"Base%(tag_close)s."
26272655
msgstr ""
26282656

2629-
#: octoprint_mrbeam/templates/mrbeam_doc_translation_placeholders.jinja2:1
2657+
#: octoprint_mrbeam/templates/mrbeam_doc_translation_placeholders.jinja2:2
26302658
msgid "Quickstart Guide"
26312659
msgstr ""
26322660

2633-
#: octoprint_mrbeam/templates/mrbeam_doc_translation_placeholders.jinja2:2
2661+
#: octoprint_mrbeam/templates/mrbeam_doc_translation_placeholders.jinja2:3
26342662
msgid "User Manual"
26352663
msgstr ""
26362664

0 commit comments

Comments
 (0)