PD-29875: UI changes to Connect features

Connect Local: Rename on-premise to Prusa Connect (local) and (cloud) in UI texts

The service switch reads "Prusa Connect (cloud)" and "Prusa Connect (local)",
the pill under the logo says "local" or "cloud" and the cloud sign-in page
gets one too. The local sign-in heading is just "Sign in to Prusa Connect".
All other texts that said "on-premise" use "Prusa Connect (local)" as a name
and "local Prusa Connect server" inside sentences.
Preferences: "Enable Printables" is now "Printables".

Connect: Remove the spinning spool from the signed-out pages

The spool above the "Sign in" button looked like a loading indicator, so
people waited instead of signing in. It is removed from the signed-out pages
of the Connect tab (cloud and local) and from the page shown while the
sign-in is redirected to the external browser. The loading pages keep it.

ExportDestinationButton: Name the active Connect service and keep it current

The export destination button and its menu say "Prusa Connect (cloud)" or
"Prusa Connect (local)" for the active service, and plain "Prusa Connect"
while the destination cannot be chosen because nobody is signed in.
The menu labels were built once and never changed; now the button listens
to the account service switcher and the labels are also recomputed when the
menu opens. MenuItem gets set_label for that.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
David Kocik 2026-11-23 12:48:47 +01:00
parent 9b3e2ad0e1
commit 5b15917807
27 changed files with 112 additions and 321 deletions

View file

@ -3,7 +3,7 @@
<head>
<meta charset='UTF-8' />
<meta content='width=device-width, initial-scale=1.0' name='viewport' />
<title>Prusa Connect on-premise sign in</title>
<title>Prusa Connect (local) sign in</title>
<style>
:root {
--color-background: #eceef1;
@ -28,7 +28,6 @@
--color-warn-border: #f2c79a;
--color-warn-soft: #fff7ee;
--color-shadow: rgba(23, 32, 46, 0.06);
--color-spool: #231F20;
}
</style>
<link href='connect_pages.css' rel='stylesheet' />
@ -40,47 +39,20 @@
<nav aria-label='Connect service' class='modes' id='modes'>
<button data-action='SET_ACCOUNT_SERVICE_PRUSA_ACCOUNT' type='button'>
<svg aria-hidden='true' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'><path d='M7 18.5h10.5a4 4 0 0 0 .6-7.95 6 6 0 0 0-11.5-1.4A4.7 4.7 0 0 0 7 18.5z' /></svg>
<span id='mode-cloud'>Prusa Connect</span>
<span id='mode-cloud'>Prusa Connect (cloud)</span>
</button>
<button aria-current='page' data-action='SET_ACCOUNT_SERVICE_CONNECT_LOCAL' type='button'>
<svg aria-hidden='true' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'><rect height='7' rx='2' width='18' x='3' y='3.5' /><rect height='7' rx='2' width='18' x='3' y='13.5' /><path d='M7 7h.01M7 17h.01M11 7h2M11 17h2' /></svg>
<span id='mode-local'>Prusa Connect on-premise</span>
<span id='mode-local'>Prusa Connect (local)</span>
</button>
</nav>
<main class='card'>
<div class='brand'>
<svg aria-label='Prusa Connect' class='wordmark' role='img' viewBox='0 0 10584 1835' xmlns='http://www.w3.org/2000/svg'><path d='M 10485.267,532.67639 4431.78,535.92 v 1298.52 h 6058.92 l -5.433,-1301.76361 z M 0,535.92 H 4257.14 V 1834.44 H 0 Z m 427.69,409.16 h 142.58 c 65.02,0 114.07,29.65 114.07,107.22 0,74.14 -46.76,101.52 -114.07,101.52 H 427.69 Z m -212.17,644.48 h 212.17 v -271.48 h 174.52 c 179.09,0 294.3,-78.71 294.3,-280.61 0,-192.77 -142.59,-262.36 -294.3,-262.36 H 215.52 Z m 957.61,-644.48 h 168.82 c 59.32,0 107.22,27.37 107.22,87.83 0,62.74 -34.22,95.82 -98.09,95.82 h -177.95 z m -212.17,644.48 h 212.17 v -296.58 h 160.84 c 100.38,0 112.92,84.41 118.63,166.54 3.42,23.96 5.7,101.52 23.95,130.04 h 209.89 c -28.52,-31.94 -30.8,-148.29 -34.22,-183.65 -5.71,-77.57 -33.08,-173.38 -118.64,-195.06 v -2.28 c 86.7,-33.08 127.76,-116.35 127.76,-204.18 0,-164.26 -142.58,-229.28 -285.17,-229.28 H 960.96 Z M 2452.4,775.11 h -212.16 v 490.5 c 0,104.94 -37.65,158.55 -142.59,158.55 -104.94,0 -142.58,-53.61 -142.58,-158.55 V 775.11 H 1742.9 v 477.95 c 0,236.12 108.36,353.61 354.75,353.61 246.39,0 354.75,-117.49 354.75,-353.61 z m 58.75,540.69 c 0,208.74 167.68,290.87 353.61,290.87 179.08,0 354.75,-66.16 354.75,-272.62 0,-147.15 -118.63,-201.9 -236.12,-234.98 -118.63,-33.08 -236.12,-43.35 -236.12,-107.23 0,-53.61 57.03,-69.58 102.66,-69.58 63.88,0 134.6,25.1 131.18,98.1 h 212.16 c 0,-182.51 -165.4,-262.36 -326.23,-262.36 -152.85,0 -331.94,69.59 -331.94,247.53 0,150.57 123.19,201.9 238.4,234.98 117.49,33.08 233.84,45.63 233.84,118.63 0,60.46 -66.16,83.27 -130.04,83.27 -91.25,0 -149.43,-30.8 -153.99,-126.61 z m 688.39,273.76 h 217.87 l 51.33,-146.01 h 284.03 l 50.19,146.01 h 221.3 L 3719.69,775.11 h -215.58 z m 410.65,-588.59 h 2.28 l 90.11,285.17 h -184.79 z m 1840.23,65.02 C 5444.72,869.79 5255.37,758 5078.56,758 c -247.53,0 -406.08,188.22 -406.08,424.34 0,236.12 158.55,424.33 406.08,424.33 206.46,0 359.31,-122.05 371.86,-333.08 h -212.16 c -7.99,94.68 -63.88,150.57 -164.26,150.57 -136.88,0 -189.35,-119.77 -189.35,-241.82 0,-122.06 52.47,-241.83 189.35,-241.83 90.11,0 151.71,43.35 164.26,125.48 z m 258.37,116.35 c 0,-122.06 52.47,-241.83 189.35,-241.83 136.89,0 189.36,119.77 189.36,241.83 0,122.05 -52.47,241.82 -189.36,241.82 -136.88,0 -189.35,-119.77 -189.35,-241.82 z m -212.16,0 c 0,236.12 146,424.33 401.51,424.33 255.52,0 401.52,-188.21 401.52,-424.33 0,-236.12 -146,-424.34 -401.52,-424.34 -255.51,0 -401.51,188.22 -401.51,424.34 z m 880.03,407.22 h 199.62 v -507.6 h 2.28 l 282.89,507.6 h 217.87 V 775.11 H 6879.7 v 501.9 h -2.28 l -282.89,-501.9 h -217.87 z m 809.31,0 h 199.62 v -507.6 h 2.28 l 282.89,507.6 h 217.87 V 775.11 h -199.62 v 501.9 h -2.28 l -282.89,-501.9 h -217.87 z m 811.59,0 h 660.46 v -182.51 h -448.29 v -155.13 h 399.24 V 1087.66 H 8209.73 V 945.08 h 436.88 V 775.11 H 7997.56 Z M 9495.85,1065.99 C 9490.15,869.79 9300.8,758 9123.99,758 c -247.53,0 -406.08,188.22 -406.08,424.34 0,236.12 158.55,424.33 406.08,424.33 206.46,0 359.31,-122.05 371.86,-333.08 h -212.16 c -7.99,94.68 -63.88,150.57 -164.26,150.57 -136.88,0 -189.35,-119.77 -189.35,-241.82 0,-122.06 52.47,-241.83 189.35,-241.83 90.11,0 151.71,43.35 164.26,125.48 z m 722.65,-290.88 h -698.12 v 182.51 h 242.97 v 631.94 h 212.16 V 957.62 h 242.99 z' /></svg>
<span class='tag' id='mode-tag'>on-premise</span>
<span class='tag' id='mode-tag'>local</span>
</div>
<svg aria-hidden='true' class='spool-art' viewBox='-250 -250 500 500' xmlns='http://www.w3.org/2000/svg'>
<defs>
<pattern class='spool' height='100' id='hexagon' patternTransform='scale(0.875)' patternUnits='userSpaceOnUse'
viewBox='-0.866025 -1.5 1.73205 3' width='57.735'>
<polygon fill='none' points='0,1 0.866025,0.5 0.866025,-0.5 0,-1 -0.866025,-0.5 -0.866025,0.5' stroke-width='0.34' />
<line stroke-width='0.34' x1='0' x2='0' y1='1' y2='1.5'></line>
<line stroke-width='0.34' x1='0' x2='0' y1='-1' y2='-1.5'></line>
</pattern>
</defs>
<g class='filament'>
<circle fill='none' r='145' stroke-width='130'>
<animate attributeName='r' dur='6s' repeatCount='indefinite' values='145;80;145' />
<animate attributeName='stroke-width' dur='6s' repeatCount='indefinite' values='130;0;130' />
</circle>
<line stroke-width='12' x1='204' x2='204' y1='0' y2='245'>
<animate attributeName='x1' dur='6s' repeatCount='indefinite' values='204;74;204' />
<animate attributeName='x2' dur='6s' repeatCount='indefinite' values='204;74;204' />
</line>
</g>
<g class='spool'>
<circle fill='none' r='157' stroke='url(#hexagon)' stroke-width='171' />
<circle r='244' stroke-width='12' />
<circle r='71' stroke-width='18' />
<animateTransform attributeName='transform' begin='0s' dur='6s' fill='freeze' repeatCount='indefinite'
type='rotate' values='0;540;0' />
</g>
</svg>
<h1 id='title'>Sign in to Prusa Connect on-premise</h1>
<h1 id='title'>Sign in to Prusa Connect</h1>
<p class='lead' id='intro'>PrusaSlicer will open the sign-in page of your server in a PrusaSlicer window.</p>
<div class='cta'>
<button class='btn btn-primary' id='login' type='button'>Sign in</button>

View file

@ -3,7 +3,7 @@
<head>
<meta charset='UTF-8' />
<meta content='width=device-width, initial-scale=1.0' name='viewport' />
<title>Prusa Connect on-premise sign in (Dark Mode)</title>
<title>Prusa Connect (local) sign in (Dark Mode)</title>
<style>
:root {
--color-background: #141619;
@ -28,7 +28,6 @@
--color-warn-border: rgba(240, 162, 74, 0.4);
--color-warn-soft: rgba(240, 162, 74, 0.08);
--color-shadow: rgba(0, 0, 0, 0.35);
--color-spool: #d3d3d3;
}
</style>
<link href='connect_pages.css' rel='stylesheet' />
@ -40,47 +39,20 @@
<nav aria-label='Connect service' class='modes' id='modes'>
<button data-action='SET_ACCOUNT_SERVICE_PRUSA_ACCOUNT' type='button'>
<svg aria-hidden='true' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'><path d='M7 18.5h10.5a4 4 0 0 0 .6-7.95 6 6 0 0 0-11.5-1.4A4.7 4.7 0 0 0 7 18.5z' /></svg>
<span id='mode-cloud'>Prusa Connect</span>
<span id='mode-cloud'>Prusa Connect (cloud)</span>
</button>
<button aria-current='page' data-action='SET_ACCOUNT_SERVICE_CONNECT_LOCAL' type='button'>
<svg aria-hidden='true' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'><rect height='7' rx='2' width='18' x='3' y='3.5' /><rect height='7' rx='2' width='18' x='3' y='13.5' /><path d='M7 7h.01M7 17h.01M11 7h2M11 17h2' /></svg>
<span id='mode-local'>Prusa Connect on-premise</span>
<span id='mode-local'>Prusa Connect (local)</span>
</button>
</nav>
<main class='card'>
<div class='brand'>
<svg aria-label='Prusa Connect' class='wordmark' role='img' viewBox='0 0 10584 1835' xmlns='http://www.w3.org/2000/svg'><path d='M 10485.267,532.67639 4431.78,535.92 v 1298.52 h 6058.92 l -5.433,-1301.76361 z M 0,535.92 H 4257.14 V 1834.44 H 0 Z m 427.69,409.16 h 142.58 c 65.02,0 114.07,29.65 114.07,107.22 0,74.14 -46.76,101.52 -114.07,101.52 H 427.69 Z m -212.17,644.48 h 212.17 v -271.48 h 174.52 c 179.09,0 294.3,-78.71 294.3,-280.61 0,-192.77 -142.59,-262.36 -294.3,-262.36 H 215.52 Z m 957.61,-644.48 h 168.82 c 59.32,0 107.22,27.37 107.22,87.83 0,62.74 -34.22,95.82 -98.09,95.82 h -177.95 z m -212.17,644.48 h 212.17 v -296.58 h 160.84 c 100.38,0 112.92,84.41 118.63,166.54 3.42,23.96 5.7,101.52 23.95,130.04 h 209.89 c -28.52,-31.94 -30.8,-148.29 -34.22,-183.65 -5.71,-77.57 -33.08,-173.38 -118.64,-195.06 v -2.28 c 86.7,-33.08 127.76,-116.35 127.76,-204.18 0,-164.26 -142.58,-229.28 -285.17,-229.28 H 960.96 Z M 2452.4,775.11 h -212.16 v 490.5 c 0,104.94 -37.65,158.55 -142.59,158.55 -104.94,0 -142.58,-53.61 -142.58,-158.55 V 775.11 H 1742.9 v 477.95 c 0,236.12 108.36,353.61 354.75,353.61 246.39,0 354.75,-117.49 354.75,-353.61 z m 58.75,540.69 c 0,208.74 167.68,290.87 353.61,290.87 179.08,0 354.75,-66.16 354.75,-272.62 0,-147.15 -118.63,-201.9 -236.12,-234.98 -118.63,-33.08 -236.12,-43.35 -236.12,-107.23 0,-53.61 57.03,-69.58 102.66,-69.58 63.88,0 134.6,25.1 131.18,98.1 h 212.16 c 0,-182.51 -165.4,-262.36 -326.23,-262.36 -152.85,0 -331.94,69.59 -331.94,247.53 0,150.57 123.19,201.9 238.4,234.98 117.49,33.08 233.84,45.63 233.84,118.63 0,60.46 -66.16,83.27 -130.04,83.27 -91.25,0 -149.43,-30.8 -153.99,-126.61 z m 688.39,273.76 h 217.87 l 51.33,-146.01 h 284.03 l 50.19,146.01 h 221.3 L 3719.69,775.11 h -215.58 z m 410.65,-588.59 h 2.28 l 90.11,285.17 h -184.79 z m 1840.23,65.02 C 5444.72,869.79 5255.37,758 5078.56,758 c -247.53,0 -406.08,188.22 -406.08,424.34 0,236.12 158.55,424.33 406.08,424.33 206.46,0 359.31,-122.05 371.86,-333.08 h -212.16 c -7.99,94.68 -63.88,150.57 -164.26,150.57 -136.88,0 -189.35,-119.77 -189.35,-241.82 0,-122.06 52.47,-241.83 189.35,-241.83 90.11,0 151.71,43.35 164.26,125.48 z m 258.37,116.35 c 0,-122.06 52.47,-241.83 189.35,-241.83 136.89,0 189.36,119.77 189.36,241.83 0,122.05 -52.47,241.82 -189.36,241.82 -136.88,0 -189.35,-119.77 -189.35,-241.82 z m -212.16,0 c 0,236.12 146,424.33 401.51,424.33 255.52,0 401.52,-188.21 401.52,-424.33 0,-236.12 -146,-424.34 -401.52,-424.34 -255.51,0 -401.51,188.22 -401.51,424.34 z m 880.03,407.22 h 199.62 v -507.6 h 2.28 l 282.89,507.6 h 217.87 V 775.11 H 6879.7 v 501.9 h -2.28 l -282.89,-501.9 h -217.87 z m 809.31,0 h 199.62 v -507.6 h 2.28 l 282.89,507.6 h 217.87 V 775.11 h -199.62 v 501.9 h -2.28 l -282.89,-501.9 h -217.87 z m 811.59,0 h 660.46 v -182.51 h -448.29 v -155.13 h 399.24 V 1087.66 H 8209.73 V 945.08 h 436.88 V 775.11 H 7997.56 Z M 9495.85,1065.99 C 9490.15,869.79 9300.8,758 9123.99,758 c -247.53,0 -406.08,188.22 -406.08,424.34 0,236.12 158.55,424.33 406.08,424.33 206.46,0 359.31,-122.05 371.86,-333.08 h -212.16 c -7.99,94.68 -63.88,150.57 -164.26,150.57 -136.88,0 -189.35,-119.77 -189.35,-241.82 0,-122.06 52.47,-241.83 189.35,-241.83 90.11,0 151.71,43.35 164.26,125.48 z m 722.65,-290.88 h -698.12 v 182.51 h 242.97 v 631.94 h 212.16 V 957.62 h 242.99 z' /></svg>
<span class='tag' id='mode-tag'>on-premise</span>
<span class='tag' id='mode-tag'>local</span>
</div>
<svg aria-hidden='true' class='spool-art' viewBox='-250 -250 500 500' xmlns='http://www.w3.org/2000/svg'>
<defs>
<pattern class='spool' height='100' id='hexagon' patternTransform='scale(0.875)' patternUnits='userSpaceOnUse'
viewBox='-0.866025 -1.5 1.73205 3' width='57.735'>
<polygon fill='none' points='0,1 0.866025,0.5 0.866025,-0.5 0,-1 -0.866025,-0.5 -0.866025,0.5' stroke-width='0.34' />
<line stroke-width='0.34' x1='0' x2='0' y1='1' y2='1.5'></line>
<line stroke-width='0.34' x1='0' x2='0' y1='-1' y2='-1.5'></line>
</pattern>
</defs>
<g class='filament'>
<circle fill='none' r='145' stroke-width='130'>
<animate attributeName='r' dur='6s' repeatCount='indefinite' values='145;80;145' />
<animate attributeName='stroke-width' dur='6s' repeatCount='indefinite' values='130;0;130' />
</circle>
<line stroke-width='12' x1='204' x2='204' y1='0' y2='245'>
<animate attributeName='x1' dur='6s' repeatCount='indefinite' values='204;74;204' />
<animate attributeName='x2' dur='6s' repeatCount='indefinite' values='204;74;204' />
</line>
</g>
<g class='spool'>
<circle fill='none' r='157' stroke='url(#hexagon)' stroke-width='171' />
<circle r='244' stroke-width='12' />
<circle r='71' stroke-width='18' />
<animateTransform attributeName='transform' begin='0s' dur='6s' fill='freeze' repeatCount='indefinite'
type='rotate' values='0;540;0' />
</g>
</svg>
<h1 id='title'>Sign in to Prusa Connect on-premise</h1>
<h1 id='title'>Sign in to Prusa Connect</h1>
<p class='lead' id='intro'>PrusaSlicer will open the sign-in page of your server in a PrusaSlicer window.</p>
<div class='cta'>
<button class='btn btn-primary' id='login' type='button'>Sign in</button>

View file

@ -3,7 +3,7 @@
<head>
<meta charset='UTF-8' />
<meta content='width=device-width, initial-scale=1.0' name='viewport' />
<title>Prusa Connect on-premise sign in</title>
<title>Prusa Connect (local) sign in</title>
<style>
:root {
--color-background: #f6f6f6;
@ -24,10 +24,10 @@
<div class='content'>
<div id='opening'>
<div class='spinner'></div>
<p id='opening-text'>Connecting to your Prusa Connect on-premise server…</p>
<p id='opening-text'>Connecting to your local Prusa Connect server…</p>
</div>
<div class='hidden' id='waiting'>
<h1 id='waiting-title'>Approve PrusaSlicer on your Prusa Connect on-premise server</h1>
<h1 id='waiting-title'>Approve PrusaSlicer on your local Prusa Connect server</h1>
<p class='muted' id='waiting-hint'>Sign in on the server and approve this code:</p>
<div class='code' id='user-code'></div>
<p class='muted' id='waiting-note'></p>

View file

@ -3,7 +3,7 @@
<head>
<meta charset='UTF-8' />
<meta content='width=device-width, initial-scale=1.0' name='viewport' />
<title>Prusa Connect on-premise sign in (Dark Mode)</title>
<title>Prusa Connect (local) sign in (Dark Mode)</title>
<style>
:root {
--color-background: #121212;
@ -24,10 +24,10 @@
<div class='content'>
<div id='opening'>
<div class='spinner'></div>
<p id='opening-text'>Connecting to your Prusa Connect on-premise server…</p>
<p id='opening-text'>Connecting to your local Prusa Connect server…</p>
</div>
<div class='hidden' id='waiting'>
<h1 id='waiting-title'>Approve PrusaSlicer on your Prusa Connect on-premise server</h1>
<h1 id='waiting-title'>Approve PrusaSlicer on your local Prusa Connect server</h1>
<p class='muted' id='waiting-hint'>Sign in on the server and approve this code:</p>
<div class='code' id='user-code'></div>
<p class='muted' id='waiting-note'></p>

View file

@ -3,7 +3,7 @@
<head>
<meta charset='UTF-8' />
<meta content='width=device-width, initial-scale=1.0' name='viewport' />
<title>Prusa Connect on-premise server</title>
<title>Prusa Connect (local) server</title>
<style>
:root {
--color-background: #eceef1;
@ -28,7 +28,6 @@
--color-warn-border: #f2c79a;
--color-warn-soft: #fff7ee;
--color-shadow: rgba(23, 32, 46, 0.06);
--color-spool: #231F20;
}
</style>
<link href='connect_pages.css' rel='stylesheet' />
@ -41,21 +40,21 @@
<nav aria-label='Connect service' class='modes' id='modes'>
<button data-action='SET_ACCOUNT_SERVICE_PRUSA_ACCOUNT' type='button'>
<svg aria-hidden='true' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'><path d='M7 18.5h10.5a4 4 0 0 0 .6-7.95 6 6 0 0 0-11.5-1.4A4.7 4.7 0 0 0 7 18.5z' /></svg>
<span id='mode-cloud'>Prusa Connect</span>
<span id='mode-cloud'>Prusa Connect (cloud)</span>
</button>
<button aria-current='page' data-action='SET_ACCOUNT_SERVICE_CONNECT_LOCAL' type='button'>
<svg aria-hidden='true' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'><rect height='7' rx='2' width='18' x='3' y='3.5' /><rect height='7' rx='2' width='18' x='3' y='13.5' /><path d='M7 7h.01M7 17h.01M11 7h2M11 17h2' /></svg>
<span id='mode-local'>Prusa Connect on-premise</span>
<span id='mode-local'>Prusa Connect (local)</span>
</button>
</nav>
<main class='card'>
<div class='brand'>
<svg aria-label='Prusa Connect' class='wordmark' role='img' viewBox='0 0 10584 1835' xmlns='http://www.w3.org/2000/svg'><path d='M 10485.267,532.67639 4431.78,535.92 v 1298.52 h 6058.92 l -5.433,-1301.76361 z M 0,535.92 H 4257.14 V 1834.44 H 0 Z m 427.69,409.16 h 142.58 c 65.02,0 114.07,29.65 114.07,107.22 0,74.14 -46.76,101.52 -114.07,101.52 H 427.69 Z m -212.17,644.48 h 212.17 v -271.48 h 174.52 c 179.09,0 294.3,-78.71 294.3,-280.61 0,-192.77 -142.59,-262.36 -294.3,-262.36 H 215.52 Z m 957.61,-644.48 h 168.82 c 59.32,0 107.22,27.37 107.22,87.83 0,62.74 -34.22,95.82 -98.09,95.82 h -177.95 z m -212.17,644.48 h 212.17 v -296.58 h 160.84 c 100.38,0 112.92,84.41 118.63,166.54 3.42,23.96 5.7,101.52 23.95,130.04 h 209.89 c -28.52,-31.94 -30.8,-148.29 -34.22,-183.65 -5.71,-77.57 -33.08,-173.38 -118.64,-195.06 v -2.28 c 86.7,-33.08 127.76,-116.35 127.76,-204.18 0,-164.26 -142.58,-229.28 -285.17,-229.28 H 960.96 Z M 2452.4,775.11 h -212.16 v 490.5 c 0,104.94 -37.65,158.55 -142.59,158.55 -104.94,0 -142.58,-53.61 -142.58,-158.55 V 775.11 H 1742.9 v 477.95 c 0,236.12 108.36,353.61 354.75,353.61 246.39,0 354.75,-117.49 354.75,-353.61 z m 58.75,540.69 c 0,208.74 167.68,290.87 353.61,290.87 179.08,0 354.75,-66.16 354.75,-272.62 0,-147.15 -118.63,-201.9 -236.12,-234.98 -118.63,-33.08 -236.12,-43.35 -236.12,-107.23 0,-53.61 57.03,-69.58 102.66,-69.58 63.88,0 134.6,25.1 131.18,98.1 h 212.16 c 0,-182.51 -165.4,-262.36 -326.23,-262.36 -152.85,0 -331.94,69.59 -331.94,247.53 0,150.57 123.19,201.9 238.4,234.98 117.49,33.08 233.84,45.63 233.84,118.63 0,60.46 -66.16,83.27 -130.04,83.27 -91.25,0 -149.43,-30.8 -153.99,-126.61 z m 688.39,273.76 h 217.87 l 51.33,-146.01 h 284.03 l 50.19,146.01 h 221.3 L 3719.69,775.11 h -215.58 z m 410.65,-588.59 h 2.28 l 90.11,285.17 h -184.79 z m 1840.23,65.02 C 5444.72,869.79 5255.37,758 5078.56,758 c -247.53,0 -406.08,188.22 -406.08,424.34 0,236.12 158.55,424.33 406.08,424.33 206.46,0 359.31,-122.05 371.86,-333.08 h -212.16 c -7.99,94.68 -63.88,150.57 -164.26,150.57 -136.88,0 -189.35,-119.77 -189.35,-241.82 0,-122.06 52.47,-241.83 189.35,-241.83 90.11,0 151.71,43.35 164.26,125.48 z m 258.37,116.35 c 0,-122.06 52.47,-241.83 189.35,-241.83 136.89,0 189.36,119.77 189.36,241.83 0,122.05 -52.47,241.82 -189.36,241.82 -136.88,0 -189.35,-119.77 -189.35,-241.82 z m -212.16,0 c 0,236.12 146,424.33 401.51,424.33 255.52,0 401.52,-188.21 401.52,-424.33 0,-236.12 -146,-424.34 -401.52,-424.34 -255.51,0 -401.51,188.22 -401.51,424.34 z m 880.03,407.22 h 199.62 v -507.6 h 2.28 l 282.89,507.6 h 217.87 V 775.11 H 6879.7 v 501.9 h -2.28 l -282.89,-501.9 h -217.87 z m 809.31,0 h 199.62 v -507.6 h 2.28 l 282.89,507.6 h 217.87 V 775.11 h -199.62 v 501.9 h -2.28 l -282.89,-501.9 h -217.87 z m 811.59,0 h 660.46 v -182.51 h -448.29 v -155.13 h 399.24 V 1087.66 H 8209.73 V 945.08 h 436.88 V 775.11 H 7997.56 Z M 9495.85,1065.99 C 9490.15,869.79 9300.8,758 9123.99,758 c -247.53,0 -406.08,188.22 -406.08,424.34 0,236.12 158.55,424.33 406.08,424.33 206.46,0 359.31,-122.05 371.86,-333.08 h -212.16 c -7.99,94.68 -63.88,150.57 -164.26,150.57 -136.88,0 -189.35,-119.77 -189.35,-241.82 0,-122.06 52.47,-241.83 189.35,-241.83 90.11,0 151.71,43.35 164.26,125.48 z m 722.65,-290.88 h -698.12 v 182.51 h 242.97 v 631.94 h 212.16 V 957.62 h 242.99 z' /></svg>
<span class='tag' id='mode-tag'>on-premise</span>
<span class='tag' id='mode-tag'>local</span>
</div>
<h1 id='title'>Prusa Connect on-premise server</h1>
<p class='lead' id='intro'>Enter the address of the Prusa Connect on-premise server that manages your printers.</p>
<h1 id='title'>Prusa Connect server</h1>
<p class='lead' id='intro'>Enter the address of the local Prusa Connect server that manages your printers.</p>
<form class='address' id='form'>
<label for='url' id='url-label'>Server address</label>
@ -80,7 +79,7 @@
</div>
</div>
<div aria-live='polite' class='error' id='cert-error' role='alert'></div>
<p class='cert-intro' id='cert-intro'>This system does not trust the certificate of the server, which is common for a server with a self-signed certificate. Compare the fingerprint with the one of your Prusa Connect on-premise server before you trust it, or load the certificate of the authority that issued it.</p>
<p class='cert-intro' id='cert-intro'>This system does not trust the certificate of the server, which is common for a server with a self-signed certificate. Compare the fingerprint with the one of your local Prusa Connect server before you trust it, or load the certificate of the authority that issued it.</p>
<dl>
<dt id='cert-fingerprint-label'>SHA-256 fingerprint</dt><dd class='fingerprint' id='cert-fingerprint'></dd>
<dt id='cert-subject-label'>Issued to</dt><dd id='cert-subject'></dd>
@ -104,7 +103,7 @@
<h2 id='discovery-title'>Find a server on the network</h2>
<button class='btn btn-secondary btn-small hidden' id='toggle' type='button'>Stop</button>
</div>
<p class='lead' id='discovery-intro'>PrusaSlicer can look for Prusa Connect on-premise servers running on your local network.</p>
<p class='lead' id='discovery-intro'>PrusaSlicer can look for local Prusa Connect servers running on your network.</p>
<div aria-live='polite' class='progress hidden' id='discovery-status'>
<div class='spinner' id='spinner'></div>
<span id='status'>Searching the network…</span>

View file

@ -3,7 +3,7 @@
<head>
<meta charset='UTF-8' />
<meta content='width=device-width, initial-scale=1.0' name='viewport' />
<title>Prusa Connect on-premise server (Dark Mode)</title>
<title>Prusa Connect (local) server (Dark Mode)</title>
<style>
:root {
--color-background: #141619;
@ -28,7 +28,6 @@
--color-warn-border: rgba(240, 162, 74, 0.4);
--color-warn-soft: rgba(240, 162, 74, 0.08);
--color-shadow: rgba(0, 0, 0, 0.35);
--color-spool: #d3d3d3;
}
</style>
<link href='connect_pages.css' rel='stylesheet' />
@ -41,21 +40,21 @@
<nav aria-label='Connect service' class='modes' id='modes'>
<button data-action='SET_ACCOUNT_SERVICE_PRUSA_ACCOUNT' type='button'>
<svg aria-hidden='true' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'><path d='M7 18.5h10.5a4 4 0 0 0 .6-7.95 6 6 0 0 0-11.5-1.4A4.7 4.7 0 0 0 7 18.5z' /></svg>
<span id='mode-cloud'>Prusa Connect</span>
<span id='mode-cloud'>Prusa Connect (cloud)</span>
</button>
<button aria-current='page' data-action='SET_ACCOUNT_SERVICE_CONNECT_LOCAL' type='button'>
<svg aria-hidden='true' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'><rect height='7' rx='2' width='18' x='3' y='3.5' /><rect height='7' rx='2' width='18' x='3' y='13.5' /><path d='M7 7h.01M7 17h.01M11 7h2M11 17h2' /></svg>
<span id='mode-local'>Prusa Connect on-premise</span>
<span id='mode-local'>Prusa Connect (local)</span>
</button>
</nav>
<main class='card'>
<div class='brand'>
<svg aria-label='Prusa Connect' class='wordmark' role='img' viewBox='0 0 10584 1835' xmlns='http://www.w3.org/2000/svg'><path d='M 10485.267,532.67639 4431.78,535.92 v 1298.52 h 6058.92 l -5.433,-1301.76361 z M 0,535.92 H 4257.14 V 1834.44 H 0 Z m 427.69,409.16 h 142.58 c 65.02,0 114.07,29.65 114.07,107.22 0,74.14 -46.76,101.52 -114.07,101.52 H 427.69 Z m -212.17,644.48 h 212.17 v -271.48 h 174.52 c 179.09,0 294.3,-78.71 294.3,-280.61 0,-192.77 -142.59,-262.36 -294.3,-262.36 H 215.52 Z m 957.61,-644.48 h 168.82 c 59.32,0 107.22,27.37 107.22,87.83 0,62.74 -34.22,95.82 -98.09,95.82 h -177.95 z m -212.17,644.48 h 212.17 v -296.58 h 160.84 c 100.38,0 112.92,84.41 118.63,166.54 3.42,23.96 5.7,101.52 23.95,130.04 h 209.89 c -28.52,-31.94 -30.8,-148.29 -34.22,-183.65 -5.71,-77.57 -33.08,-173.38 -118.64,-195.06 v -2.28 c 86.7,-33.08 127.76,-116.35 127.76,-204.18 0,-164.26 -142.58,-229.28 -285.17,-229.28 H 960.96 Z M 2452.4,775.11 h -212.16 v 490.5 c 0,104.94 -37.65,158.55 -142.59,158.55 -104.94,0 -142.58,-53.61 -142.58,-158.55 V 775.11 H 1742.9 v 477.95 c 0,236.12 108.36,353.61 354.75,353.61 246.39,0 354.75,-117.49 354.75,-353.61 z m 58.75,540.69 c 0,208.74 167.68,290.87 353.61,290.87 179.08,0 354.75,-66.16 354.75,-272.62 0,-147.15 -118.63,-201.9 -236.12,-234.98 -118.63,-33.08 -236.12,-43.35 -236.12,-107.23 0,-53.61 57.03,-69.58 102.66,-69.58 63.88,0 134.6,25.1 131.18,98.1 h 212.16 c 0,-182.51 -165.4,-262.36 -326.23,-262.36 -152.85,0 -331.94,69.59 -331.94,247.53 0,150.57 123.19,201.9 238.4,234.98 117.49,33.08 233.84,45.63 233.84,118.63 0,60.46 -66.16,83.27 -130.04,83.27 -91.25,0 -149.43,-30.8 -153.99,-126.61 z m 688.39,273.76 h 217.87 l 51.33,-146.01 h 284.03 l 50.19,146.01 h 221.3 L 3719.69,775.11 h -215.58 z m 410.65,-588.59 h 2.28 l 90.11,285.17 h -184.79 z m 1840.23,65.02 C 5444.72,869.79 5255.37,758 5078.56,758 c -247.53,0 -406.08,188.22 -406.08,424.34 0,236.12 158.55,424.33 406.08,424.33 206.46,0 359.31,-122.05 371.86,-333.08 h -212.16 c -7.99,94.68 -63.88,150.57 -164.26,150.57 -136.88,0 -189.35,-119.77 -189.35,-241.82 0,-122.06 52.47,-241.83 189.35,-241.83 90.11,0 151.71,43.35 164.26,125.48 z m 258.37,116.35 c 0,-122.06 52.47,-241.83 189.35,-241.83 136.89,0 189.36,119.77 189.36,241.83 0,122.05 -52.47,241.82 -189.36,241.82 -136.88,0 -189.35,-119.77 -189.35,-241.82 z m -212.16,0 c 0,236.12 146,424.33 401.51,424.33 255.52,0 401.52,-188.21 401.52,-424.33 0,-236.12 -146,-424.34 -401.52,-424.34 -255.51,0 -401.51,188.22 -401.51,424.34 z m 880.03,407.22 h 199.62 v -507.6 h 2.28 l 282.89,507.6 h 217.87 V 775.11 H 6879.7 v 501.9 h -2.28 l -282.89,-501.9 h -217.87 z m 809.31,0 h 199.62 v -507.6 h 2.28 l 282.89,507.6 h 217.87 V 775.11 h -199.62 v 501.9 h -2.28 l -282.89,-501.9 h -217.87 z m 811.59,0 h 660.46 v -182.51 h -448.29 v -155.13 h 399.24 V 1087.66 H 8209.73 V 945.08 h 436.88 V 775.11 H 7997.56 Z M 9495.85,1065.99 C 9490.15,869.79 9300.8,758 9123.99,758 c -247.53,0 -406.08,188.22 -406.08,424.34 0,236.12 158.55,424.33 406.08,424.33 206.46,0 359.31,-122.05 371.86,-333.08 h -212.16 c -7.99,94.68 -63.88,150.57 -164.26,150.57 -136.88,0 -189.35,-119.77 -189.35,-241.82 0,-122.06 52.47,-241.83 189.35,-241.83 90.11,0 151.71,43.35 164.26,125.48 z m 722.65,-290.88 h -698.12 v 182.51 h 242.97 v 631.94 h 212.16 V 957.62 h 242.99 z' /></svg>
<span class='tag' id='mode-tag'>on-premise</span>
<span class='tag' id='mode-tag'>local</span>
</div>
<h1 id='title'>Prusa Connect on-premise server</h1>
<p class='lead' id='intro'>Enter the address of the Prusa Connect on-premise server that manages your printers.</p>
<h1 id='title'>Prusa Connect server</h1>
<p class='lead' id='intro'>Enter the address of the local Prusa Connect server that manages your printers.</p>
<form class='address' id='form'>
<label for='url' id='url-label'>Server address</label>
@ -80,7 +79,7 @@
</div>
</div>
<div aria-live='polite' class='error' id='cert-error' role='alert'></div>
<p class='cert-intro' id='cert-intro'>This system does not trust the certificate of the server, which is common for a server with a self-signed certificate. Compare the fingerprint with the one of your Prusa Connect on-premise server before you trust it, or load the certificate of the authority that issued it.</p>
<p class='cert-intro' id='cert-intro'>This system does not trust the certificate of the server, which is common for a server with a self-signed certificate. Compare the fingerprint with the one of your local Prusa Connect server before you trust it, or load the certificate of the authority that issued it.</p>
<dl>
<dt id='cert-fingerprint-label'>SHA-256 fingerprint</dt><dd class='fingerprint' id='cert-fingerprint'></dd>
<dt id='cert-subject-label'>Issued to</dt><dd id='cert-subject'></dd>
@ -104,7 +103,7 @@
<h2 id='discovery-title'>Find a server on the network</h2>
<button class='btn btn-secondary btn-small hidden' id='toggle' type='button'>Stop</button>
</div>
<p class='lead' id='discovery-intro'>PrusaSlicer can look for Prusa Connect on-premise servers running on your local network.</p>
<p class='lead' id='discovery-intro'>PrusaSlicer can look for local Prusa Connect servers running on your network.</p>
<div aria-live='polite' class='progress hidden' id='discovery-status'>
<div class='spinner' id='spinner'></div>
<span id='status'>Searching the network…</span>

View file

@ -28,7 +28,6 @@
--color-warn-border: #f2c79a;
--color-warn-soft: #fff7ee;
--color-shadow: rgba(23, 32, 46, 0.06);
--color-spool: #231F20;
}
</style>
<link href='connect_pages.css' rel='stylesheet' />
@ -41,45 +40,19 @@
<nav aria-label='Connect service' class='modes' id='modes'>
<button aria-current='page' data-action='SET_ACCOUNT_SERVICE_PRUSA_ACCOUNT' type='button'>
<svg aria-hidden='true' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'><path d='M7 18.5h10.5a4 4 0 0 0 .6-7.95 6 6 0 0 0-11.5-1.4A4.7 4.7 0 0 0 7 18.5z' /></svg>
<span id='mode-cloud'>Prusa Connect</span>
<span id='mode-cloud'>Prusa Connect (cloud)</span>
</button>
<button data-action='SET_ACCOUNT_SERVICE_CONNECT_LOCAL' type='button'>
<svg aria-hidden='true' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'><rect height='7' rx='2' width='18' x='3' y='3.5' /><rect height='7' rx='2' width='18' x='3' y='13.5' /><path d='M7 7h.01M7 17h.01M11 7h2M11 17h2' /></svg>
<span id='mode-local'>Prusa Connect on-premise</span>
<span id='mode-local'>Prusa Connect (local)</span>
</button>
</nav>
<main class='card'>
<div class='brand'>
<svg aria-label='Prusa Connect' class='wordmark' role='img' viewBox='0 0 10584 1835' xmlns='http://www.w3.org/2000/svg'><path d='M 10485.267,532.67639 4431.78,535.92 v 1298.52 h 6058.92 l -5.433,-1301.76361 z M 0,535.92 H 4257.14 V 1834.44 H 0 Z m 427.69,409.16 h 142.58 c 65.02,0 114.07,29.65 114.07,107.22 0,74.14 -46.76,101.52 -114.07,101.52 H 427.69 Z m -212.17,644.48 h 212.17 v -271.48 h 174.52 c 179.09,0 294.3,-78.71 294.3,-280.61 0,-192.77 -142.59,-262.36 -294.3,-262.36 H 215.52 Z m 957.61,-644.48 h 168.82 c 59.32,0 107.22,27.37 107.22,87.83 0,62.74 -34.22,95.82 -98.09,95.82 h -177.95 z m -212.17,644.48 h 212.17 v -296.58 h 160.84 c 100.38,0 112.92,84.41 118.63,166.54 3.42,23.96 5.7,101.52 23.95,130.04 h 209.89 c -28.52,-31.94 -30.8,-148.29 -34.22,-183.65 -5.71,-77.57 -33.08,-173.38 -118.64,-195.06 v -2.28 c 86.7,-33.08 127.76,-116.35 127.76,-204.18 0,-164.26 -142.58,-229.28 -285.17,-229.28 H 960.96 Z M 2452.4,775.11 h -212.16 v 490.5 c 0,104.94 -37.65,158.55 -142.59,158.55 -104.94,0 -142.58,-53.61 -142.58,-158.55 V 775.11 H 1742.9 v 477.95 c 0,236.12 108.36,353.61 354.75,353.61 246.39,0 354.75,-117.49 354.75,-353.61 z m 58.75,540.69 c 0,208.74 167.68,290.87 353.61,290.87 179.08,0 354.75,-66.16 354.75,-272.62 0,-147.15 -118.63,-201.9 -236.12,-234.98 -118.63,-33.08 -236.12,-43.35 -236.12,-107.23 0,-53.61 57.03,-69.58 102.66,-69.58 63.88,0 134.6,25.1 131.18,98.1 h 212.16 c 0,-182.51 -165.4,-262.36 -326.23,-262.36 -152.85,0 -331.94,69.59 -331.94,247.53 0,150.57 123.19,201.9 238.4,234.98 117.49,33.08 233.84,45.63 233.84,118.63 0,60.46 -66.16,83.27 -130.04,83.27 -91.25,0 -149.43,-30.8 -153.99,-126.61 z m 688.39,273.76 h 217.87 l 51.33,-146.01 h 284.03 l 50.19,146.01 h 221.3 L 3719.69,775.11 h -215.58 z m 410.65,-588.59 h 2.28 l 90.11,285.17 h -184.79 z m 1840.23,65.02 C 5444.72,869.79 5255.37,758 5078.56,758 c -247.53,0 -406.08,188.22 -406.08,424.34 0,236.12 158.55,424.33 406.08,424.33 206.46,0 359.31,-122.05 371.86,-333.08 h -212.16 c -7.99,94.68 -63.88,150.57 -164.26,150.57 -136.88,0 -189.35,-119.77 -189.35,-241.82 0,-122.06 52.47,-241.83 189.35,-241.83 90.11,0 151.71,43.35 164.26,125.48 z m 258.37,116.35 c 0,-122.06 52.47,-241.83 189.35,-241.83 136.89,0 189.36,119.77 189.36,241.83 0,122.05 -52.47,241.82 -189.36,241.82 -136.88,0 -189.35,-119.77 -189.35,-241.82 z m -212.16,0 c 0,236.12 146,424.33 401.51,424.33 255.52,0 401.52,-188.21 401.52,-424.33 0,-236.12 -146,-424.34 -401.52,-424.34 -255.51,0 -401.51,188.22 -401.51,424.34 z m 880.03,407.22 h 199.62 v -507.6 h 2.28 l 282.89,507.6 h 217.87 V 775.11 H 6879.7 v 501.9 h -2.28 l -282.89,-501.9 h -217.87 z m 809.31,0 h 199.62 v -507.6 h 2.28 l 282.89,507.6 h 217.87 V 775.11 h -199.62 v 501.9 h -2.28 l -282.89,-501.9 h -217.87 z m 811.59,0 h 660.46 v -182.51 h -448.29 v -155.13 h 399.24 V 1087.66 H 8209.73 V 945.08 h 436.88 V 775.11 H 7997.56 Z M 9495.85,1065.99 C 9490.15,869.79 9300.8,758 9123.99,758 c -247.53,0 -406.08,188.22 -406.08,424.34 0,236.12 158.55,424.33 406.08,424.33 206.46,0 359.31,-122.05 371.86,-333.08 h -212.16 c -7.99,94.68 -63.88,150.57 -164.26,150.57 -136.88,0 -189.35,-119.77 -189.35,-241.82 0,-122.06 52.47,-241.83 189.35,-241.83 90.11,0 151.71,43.35 164.26,125.48 z m 722.65,-290.88 h -698.12 v 182.51 h 242.97 v 631.94 h 212.16 V 957.62 h 242.99 z' /></svg>
<span class='tag' id='mode-tag'>cloud</span>
</div>
<svg aria-hidden='true' class='spool-art' viewBox='-250 -250 500 500' xmlns='http://www.w3.org/2000/svg'>
<defs>
<pattern class='spool' height='100' id='hexagon' patternTransform='scale(0.875)' patternUnits='userSpaceOnUse'
viewBox='-0.866025 -1.5 1.73205 3' width='57.735'>
<polygon fill='none' points='0,1 0.866025,0.5 0.866025,-0.5 0,-1 -0.866025,-0.5 -0.866025,0.5' stroke-width='0.34' />
<line stroke-width='0.34' x1='0' x2='0' y1='1' y2='1.5'></line>
<line stroke-width='0.34' x1='0' x2='0' y1='-1' y2='-1.5'></line>
</pattern>
</defs>
<g class='filament'>
<circle fill='none' r='145' stroke-width='130'>
<animate attributeName='r' dur='6s' repeatCount='indefinite' values='145;80;145' />
<animate attributeName='stroke-width' dur='6s' repeatCount='indefinite' values='130;0;130' />
</circle>
<line stroke-width='12' x1='204' x2='204' y1='0' y2='245'>
<animate attributeName='x1' dur='6s' repeatCount='indefinite' values='204;74;204' />
<animate attributeName='x2' dur='6s' repeatCount='indefinite' values='204;74;204' />
</line>
</g>
<g class='spool'>
<circle fill='none' r='157' stroke='url(#hexagon)' stroke-width='171' />
<circle r='244' stroke-width='12' />
<circle r='71' stroke-width='18' />
<animateTransform attributeName='transform' begin='0s' dur='6s' fill='freeze' repeatCount='indefinite'
type='rotate' values='0;540;0' />
</g>
</svg>
<h1 id='title'>Sign in to Prusa Connect</h1>
<p class='lead' id='intro'>Sign in with your Prusa Account to send prints to your printers and see their status here.</p>
<div class='cta'>

View file

@ -28,7 +28,6 @@
--color-warn-border: rgba(240, 162, 74, 0.4);
--color-warn-soft: rgba(240, 162, 74, 0.08);
--color-shadow: rgba(0, 0, 0, 0.35);
--color-spool: #d3d3d3;
}
</style>
<link href='connect_pages.css' rel='stylesheet' />
@ -41,45 +40,19 @@
<nav aria-label='Connect service' class='modes' id='modes'>
<button aria-current='page' data-action='SET_ACCOUNT_SERVICE_PRUSA_ACCOUNT' type='button'>
<svg aria-hidden='true' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'><path d='M7 18.5h10.5a4 4 0 0 0 .6-7.95 6 6 0 0 0-11.5-1.4A4.7 4.7 0 0 0 7 18.5z' /></svg>
<span id='mode-cloud'>Prusa Connect</span>
<span id='mode-cloud'>Prusa Connect (cloud)</span>
</button>
<button data-action='SET_ACCOUNT_SERVICE_CONNECT_LOCAL' type='button'>
<svg aria-hidden='true' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' viewBox='0 0 24 24'><rect height='7' rx='2' width='18' x='3' y='3.5' /><rect height='7' rx='2' width='18' x='3' y='13.5' /><path d='M7 7h.01M7 17h.01M11 7h2M11 17h2' /></svg>
<span id='mode-local'>Prusa Connect on-premise</span>
<span id='mode-local'>Prusa Connect (local)</span>
</button>
</nav>
<main class='card'>
<div class='brand'>
<svg aria-label='Prusa Connect' class='wordmark' role='img' viewBox='0 0 10584 1835' xmlns='http://www.w3.org/2000/svg'><path d='M 10485.267,532.67639 4431.78,535.92 v 1298.52 h 6058.92 l -5.433,-1301.76361 z M 0,535.92 H 4257.14 V 1834.44 H 0 Z m 427.69,409.16 h 142.58 c 65.02,0 114.07,29.65 114.07,107.22 0,74.14 -46.76,101.52 -114.07,101.52 H 427.69 Z m -212.17,644.48 h 212.17 v -271.48 h 174.52 c 179.09,0 294.3,-78.71 294.3,-280.61 0,-192.77 -142.59,-262.36 -294.3,-262.36 H 215.52 Z m 957.61,-644.48 h 168.82 c 59.32,0 107.22,27.37 107.22,87.83 0,62.74 -34.22,95.82 -98.09,95.82 h -177.95 z m -212.17,644.48 h 212.17 v -296.58 h 160.84 c 100.38,0 112.92,84.41 118.63,166.54 3.42,23.96 5.7,101.52 23.95,130.04 h 209.89 c -28.52,-31.94 -30.8,-148.29 -34.22,-183.65 -5.71,-77.57 -33.08,-173.38 -118.64,-195.06 v -2.28 c 86.7,-33.08 127.76,-116.35 127.76,-204.18 0,-164.26 -142.58,-229.28 -285.17,-229.28 H 960.96 Z M 2452.4,775.11 h -212.16 v 490.5 c 0,104.94 -37.65,158.55 -142.59,158.55 -104.94,0 -142.58,-53.61 -142.58,-158.55 V 775.11 H 1742.9 v 477.95 c 0,236.12 108.36,353.61 354.75,353.61 246.39,0 354.75,-117.49 354.75,-353.61 z m 58.75,540.69 c 0,208.74 167.68,290.87 353.61,290.87 179.08,0 354.75,-66.16 354.75,-272.62 0,-147.15 -118.63,-201.9 -236.12,-234.98 -118.63,-33.08 -236.12,-43.35 -236.12,-107.23 0,-53.61 57.03,-69.58 102.66,-69.58 63.88,0 134.6,25.1 131.18,98.1 h 212.16 c 0,-182.51 -165.4,-262.36 -326.23,-262.36 -152.85,0 -331.94,69.59 -331.94,247.53 0,150.57 123.19,201.9 238.4,234.98 117.49,33.08 233.84,45.63 233.84,118.63 0,60.46 -66.16,83.27 -130.04,83.27 -91.25,0 -149.43,-30.8 -153.99,-126.61 z m 688.39,273.76 h 217.87 l 51.33,-146.01 h 284.03 l 50.19,146.01 h 221.3 L 3719.69,775.11 h -215.58 z m 410.65,-588.59 h 2.28 l 90.11,285.17 h -184.79 z m 1840.23,65.02 C 5444.72,869.79 5255.37,758 5078.56,758 c -247.53,0 -406.08,188.22 -406.08,424.34 0,236.12 158.55,424.33 406.08,424.33 206.46,0 359.31,-122.05 371.86,-333.08 h -212.16 c -7.99,94.68 -63.88,150.57 -164.26,150.57 -136.88,0 -189.35,-119.77 -189.35,-241.82 0,-122.06 52.47,-241.83 189.35,-241.83 90.11,0 151.71,43.35 164.26,125.48 z m 258.37,116.35 c 0,-122.06 52.47,-241.83 189.35,-241.83 136.89,0 189.36,119.77 189.36,241.83 0,122.05 -52.47,241.82 -189.36,241.82 -136.88,0 -189.35,-119.77 -189.35,-241.82 z m -212.16,0 c 0,236.12 146,424.33 401.51,424.33 255.52,0 401.52,-188.21 401.52,-424.33 0,-236.12 -146,-424.34 -401.52,-424.34 -255.51,0 -401.51,188.22 -401.51,424.34 z m 880.03,407.22 h 199.62 v -507.6 h 2.28 l 282.89,507.6 h 217.87 V 775.11 H 6879.7 v 501.9 h -2.28 l -282.89,-501.9 h -217.87 z m 809.31,0 h 199.62 v -507.6 h 2.28 l 282.89,507.6 h 217.87 V 775.11 h -199.62 v 501.9 h -2.28 l -282.89,-501.9 h -217.87 z m 811.59,0 h 660.46 v -182.51 h -448.29 v -155.13 h 399.24 V 1087.66 H 8209.73 V 945.08 h 436.88 V 775.11 H 7997.56 Z M 9495.85,1065.99 C 9490.15,869.79 9300.8,758 9123.99,758 c -247.53,0 -406.08,188.22 -406.08,424.34 0,236.12 158.55,424.33 406.08,424.33 206.46,0 359.31,-122.05 371.86,-333.08 h -212.16 c -7.99,94.68 -63.88,150.57 -164.26,150.57 -136.88,0 -189.35,-119.77 -189.35,-241.82 0,-122.06 52.47,-241.83 189.35,-241.83 90.11,0 151.71,43.35 164.26,125.48 z m 722.65,-290.88 h -698.12 v 182.51 h 242.97 v 631.94 h 212.16 V 957.62 h 242.99 z' /></svg>
<span class='tag' id='mode-tag'>cloud</span>
</div>
<svg aria-hidden='true' class='spool-art' viewBox='-250 -250 500 500' xmlns='http://www.w3.org/2000/svg'>
<defs>
<pattern class='spool' height='100' id='hexagon' patternTransform='scale(0.875)' patternUnits='userSpaceOnUse'
viewBox='-0.866025 -1.5 1.73205 3' width='57.735'>
<polygon fill='none' points='0,1 0.866025,0.5 0.866025,-0.5 0,-1 -0.866025,-0.5 -0.866025,0.5' stroke-width='0.34' />
<line stroke-width='0.34' x1='0' x2='0' y1='1' y2='1.5'></line>
<line stroke-width='0.34' x1='0' x2='0' y1='-1' y2='-1.5'></line>
</pattern>
</defs>
<g class='filament'>
<circle fill='none' r='145' stroke-width='130'>
<animate attributeName='r' dur='6s' repeatCount='indefinite' values='145;80;145' />
<animate attributeName='stroke-width' dur='6s' repeatCount='indefinite' values='130;0;130' />
</circle>
<line stroke-width='12' x1='204' x2='204' y1='0' y2='245'>
<animate attributeName='x1' dur='6s' repeatCount='indefinite' values='204;74;204' />
<animate attributeName='x2' dur='6s' repeatCount='indefinite' values='204;74;204' />
</line>
</g>
<g class='spool'>
<circle fill='none' r='157' stroke='url(#hexagon)' stroke-width='171' />
<circle r='244' stroke-width='12' />
<circle r='71' stroke-width='18' />
<animateTransform attributeName='transform' begin='0s' dur='6s' fill='freeze' repeatCount='indefinite'
type='rotate' values='0;540;0' />
</g>
</svg>
<h1 id='title'>Sign in to Prusa Connect</h1>
<p class='lead' id='intro'>Sign in with your Prusa Account to send prints to your printers and see their status here.</p>
<div class='cta'>

View file

@ -23,7 +23,7 @@ body {
/* Must win over the display of any component class below. */
.hidden { display: none !important; }
/* ---- Prusa Connect | Prusa Connect on-premise ---- */
/* ---- Prusa Connect (cloud) | Prusa Connect (local) ---- */
.modes {
display: flex;
gap: 4px;
@ -75,8 +75,7 @@ body {
.card { padding: 24px 20px; }
}
/* The PRUSA CONNECT wordmark and the filament spool of the slicer's other Connect pages
(connect_loading, connect_error). */
/* The PRUSA CONNECT wordmark. */
.brand {
display: flex;
flex-direction: column;
@ -100,15 +99,6 @@ body {
font-size: 12px;
line-height: 18px;
}
.spool-art {
display: block;
width: 80px;
height: 80px;
margin: 0 auto 24px auto;
}
.spool { stroke: var(--color-spool); fill: none; }
.filament { stroke: var(--color-accent); }
.filament line { stroke-linecap: round; }
h1 {
font-size: 22px;

View file

@ -56,59 +56,6 @@
<!-- This page is not served anywhere, only to be copy 'n' pasted into Slicer as a fallback loading screen. -->
<div id='loading-screen' style='width: 100%; height: 100%'>
<div style='position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center'>
<p>
<svg style='width: 80px'
viewBox='-250 -250 500 500' xmlns='http://www.w3.org/2000/svg'>
<style type='text/css'>
.filament {
stroke: #FA6831;
}
.spool {
stroke: #231F20;
fill: none;
}
.filament line {
stroke-linecap: round;
}
</style>
<defs>
<pattern class='spool' height='100' id='hexagon' patternTransform='scale(0.875)' patternUnits='userSpaceOnUse'
viewBox='-0.866025 -1.5 1.73205 3'
width='57.735'
>
<polygon fill='none' points='0,1 0.866025,0.5 0.866025,-0.5 0,-1 -0.866025,-0.5 -0.866025,0.5'
stroke-width='0.34' />
<line stroke-width='0.34' x1='0' x2='0' y1='1' y2='1.5'></line>
<line stroke-width='0.34' x1='0' x2='0' y1='-1' y2='-1.5'></line>
</pattern>
</defs>
<g class='filament'>
<circle fill='none' r='145' stroke-width='130'>
<animate attributeName='r' dur='6s' repeatCount='indefinite' values='145;80;145' />
<animate attributeName='stroke-width' dur='6s' repeatCount='indefinite' values='130;0;130' />
</circle>
<line stroke-width='12' x1='204' x2='204' y1='0' y2='245'>
<animate attributeName='x1' dur='6s' repeatCount='indefinite' values='204;74;204' />
<animate attributeName='x2' dur='6s' repeatCount='indefinite' values='204;74;204' />
</line>
</g>
<g class='spool'>
<circle fill='none' r='157' stroke='url(#hexagon)' stroke-width='171' />
<circle r='244' stroke-width='12' />
<circle r='71' stroke-width='18' />
<animateTransform
attributeName='transform' begin='0s'
dur='6s'
fill='freeze'
repeatCount='indefinite'
type='rotate'
values='0;540;0'
/>
</g>
</svg>
</p>
<p style="font-size: 24px;">Redirecting to external browser.</p>
</div>
</div>

View file

@ -56,60 +56,6 @@
<!-- This page is not served anywhere, only to be copy 'n' pasted into Slicer as a fallback loading screen. -->
<div id='loading-screen' style='width: 100%; height: 100%'>
<div style='position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center'>
<p>
<svg style='width: 80px'
viewBox='-250 -250 500 500' xmlns='http://www.w3.org/2000/svg'>
<style type='text/css'>
.filament {
stroke: #FA6831;
}
.spool {
stroke: #231F20;
fill: none;
}
.filament line {
stroke-linecap: round;
}
</style>
<defs>
<pattern class='spool' height='100' id='hexagon' patternTransform='scale(0.875)' patternUnits='userSpaceOnUse'
viewBox='-0.866025 -1.5 1.73205 3'
width='57.735'
>
<polygon fill='none' points='0,1 0.866025,0.5 0.866025,-0.5 0,-1 -0.866025,-0.5 -0.866025,0.5'
stroke-width='0.34' />
<line stroke-width='0.34' x1='0' x2='0' y1='1' y2='1.5'></line>
<line stroke-width='0.34' x1='0' x2='0' y1='-1' y2='-1.5'></line>
</pattern>
</defs>
<g class='filament'>
<circle fill='none' r='145' stroke-width='130'>
<animate attributeName='r' dur='6s' repeatCount='indefinite' values='145;80;145' />
<animate attributeName='stroke-width' dur='6s' repeatCount='indefinite' values='130;0;130' />
</circle>
<line stroke-width='12' x1='204' x2='204' y1='0' y2='245'>
<animate attributeName='x1' dur='6s' repeatCount='indefinite' values='204;74;204' />
<animate attributeName='x2' dur='6s' repeatCount='indefinite' values='204;74;204' />
</line>
</g>
<g class='spool'>
<circle fill='none' r='157' stroke='url(#hexagon)' stroke-width='171' />
<circle r='244' stroke-width='12' />
<circle r='71' stroke-width='18' />
<animateTransform
attributeName='transform' begin='0s'
dur='6s'
fill='freeze'
repeatCount='indefinite'
type='rotate'
values='0;540;0'
/>
</g>
</svg>
</p>
<p style="font-size: 24px;">Redirecting to external browser.</p>
</div>
</div>

View file

@ -60,7 +60,7 @@ void LeftBarCtrl::UpdateAccountButton(bool avatar/* = false*/)
TabsBarMenus::UserAccountInfo user_account = m_menus->get_user_account_info();
const wxString user_name = user_account.is_logged ? from_u8(user_account.user_name) :
user_account.connect_local && !user_account.server_set ?
_L("Prusa Connect on-premise: no server set") :
_L("Prusa Connect (local): no server set") :
_L("Sign in");
m_account_btn->SetToolTip(user_name);
if (avatar) {

View file

@ -48,7 +48,7 @@ void TabsBarMenus::CreateAccountMenu()
choose(AccountState::SignedOut), nullptr);
m_prusa_account_item = append_menu_radio_item(&account_states, wxID_ANY, _L("Prusa Account"), {},
choose(AccountState::PrusaAccount), nullptr);
m_connect_local_item = append_menu_radio_item(&account_states, wxID_ANY, _L("Prusa Connect on-premise"), {},
m_connect_local_item = append_menu_radio_item(&account_states, wxID_ANY, _L("Prusa Connect (local)"), {},
choose(AccountState::ConnectLocal), nullptr);
}

View file

@ -16,7 +16,7 @@ enum class AccountService;
namespace Slic3r::App::Browser {
/**
* @brief The switch between Prusa Connect and Prusa Connect on-premise at the top of the app's
* @brief The switch between Prusa Connect (cloud) and Prusa Connect (local) at the top of the app's
* own signed-out Connect tab pages (resources/web/connect_pages.js), shown while both services
* are enabled. It makes the chosen service the active one; the Connect tab is then created
* again for it. Only the app's own pages may switch, a page of a server cannot.
@ -27,7 +27,7 @@ public:
using Actions =
std::map<std::string, std::function<std::vector<BrowserLogicCommand>(const std::string&)>>;
static void add_texts(nlohmann::json& texts);
static void add_texts(nlohmann::json& texts, AccountService service);
/** @brief Whether the pages show the switch: both services are enabled. */
static bool shown();

View file

@ -6,13 +6,13 @@ namespace Slic3r::App {
/**
* @brief The translated name of the Connect service the app uses: "Prusa Connect" or, with a
* Connect Local server, "Prusa Connect on-premise". For texts naming the service.
* Connect Local server, "Prusa Connect (local)". For texts naming the service.
*/
std::string connect_service_name();
/**
* @brief The translated name of the account the app signs in to: "Prusa Account" or, with a
* Connect Local server, "Prusa Connect on-premise".
* Connect Local server, "Prusa Connect (local)".
*/
std::string account_service_name();

View file

@ -6,12 +6,8 @@
#include "Slic3r/Biz/ExportDestination/IExportDestinationChangedListener.hpp"
#include "Slic3r/Biz/Platform/ListenerScope.hpp"
#include <utility>
#include <vector>
namespace Slic3r::App::Yoga {
class Menu;
class MenuItem;
} // namespace Slic3r::App::Yoga
namespace Slic3r::App {
@ -37,7 +33,6 @@ private:
Biz::ExportDestination::ExportDestinationInteractor& m_interactor;
Yoga::Menu* m_menu{nullptr};
std::vector<std::pair<Biz::ExportDestination::ExportDestination, Yoga::MenuItem*>> m_menu_items;
};
} // namespace Slic3r::App

View file

@ -375,9 +375,9 @@ void appconfig_config_init_fn(Domain::ConfigDefinitions& defs)
def = defs.add("enable_connect_local", typeid(bool));
def->location = Domain::AppConfigLocation{};
def->gui_type = GUIType::checkbox;
def->label = L("Prusa Connect on-premise");
def->label = L("Prusa Connect (local)");
def->tooltip = L(
"Enables signing in to your own Prusa Connect on-premise server, the Connect tab with its printers and uploading files to it. The server is set up in the Connect tab."
"Enables signing into your own local Prusa Connect server, the Connect tab with its printers and uploading files to it. The server is set up in the Connect tab."
);
def->category = Domain::ConfigItemDef::Category::AppConfig_Services;
def->option_group = Domain::ConfigItemDef::OptionGroup::AppConfig_Services_ServicesSetup;
@ -460,7 +460,7 @@ void appconfig_config_init_fn(Domain::ConfigDefinitions& defs)
def = defs.add("enable_printables", typeid(bool));
def->location = Domain::AppConfigLocation{};
def->gui_type = GUIType::checkbox;
def->label = L("Enable Printables");
def->label = L("Printables");
def->tooltip = L("Enable Printables tab.");
def->category = Domain::ConfigItemDef::Category::AppConfig_Services;
def->option_group = Domain::ConfigItemDef::OptionGroup::AppConfig_Services_ServicesSetup;

View file

@ -99,8 +99,8 @@ void BrowserLogicConnectLocalLogIn::PairingEvents::on_user_account_pairing_appro
std::vector<BrowserLogicCommand> BrowserLogicConnectLocalLogIn::page_init_commands() const
{
const nlohmann::json texts = {
{"opening", Biz::_u8L("Connecting to your Prusa Connect on-premise server…")},
{"waitingTitle", Biz::_u8L("Approve PrusaSlicer on your Prusa Connect on-premise server")},
{"opening", Biz::_u8L("Connecting to your local Prusa Connect server…")},
{"waitingTitle", Biz::_u8L("Approve PrusaSlicer on your local Prusa Connect server")},
{"waitingHint", Biz::_u8L("Sign in on the server and approve this code:")},
{"waitingStatus", Biz::_u8L("Waiting for approval…")},
{"openInBrowser", Biz::_u8L("Open in browser")},
@ -267,7 +267,7 @@ void BrowserLogicConnectLocalLogIn::start_sign_in()
m_state = State::Starting;
const std::string server = Biz::Network::ServiceConfig::instance().connect_local_server_url();
if (server.empty()) {
push_commands(show_error(Biz::_u8L("No Prusa Connect on-premise server is set."), false));
push_commands(show_error(Biz::_u8L("No local Prusa Connect server is set."), false));
return;
}
if (!server.starts_with("https://")) {

View file

@ -177,9 +177,9 @@ std::vector<BrowserLogicCommand> BrowserLogicConnectLocalPage::signed_out_comman
std::string BrowserLogicConnectLocalPage::unsupported_page_script() const
{
const nlohmann::json texts = {
Biz::_u8L("Prusa Connect on-premise can't be displayed here."),
Biz::_u8L("Prusa Connect (local) can't be displayed here."),
Biz::_u8L(
"Your system's built-in web browser is too old to run Prusa Connect on-premise. Please install the latest updates for your operating system, then restart PrusaSlicer."
"Your system's built-in web browser is too old to run Prusa Connect (local). Please install the latest updates for your operating system, then restart PrusaSlicer."
),
};
return std::string(R"(

View file

@ -1,5 +1,6 @@
#include "Slic3r/App/Browser/BrowserLogicConnectPage.hpp"
#include "Slic3r/App/AppConfig.hpp"
#include "Slic3r/Biz/I18N/I18N.hpp"
#include "Slic3r/Biz/JsonForScript.hpp"
#include "Slic3r/Biz/Network/ServiceConfig.hpp"
@ -89,7 +90,7 @@ std::string BrowserLogicConnectPage::logged_out_page_init_script() const
)},
{"login", Biz::_u8L("Sign in")},
};
ConnectServiceSwitch::add_texts(texts);
ConnectServiceSwitch::add_texts(texts, AccountService::PrusaAccount);
const nlohmann::json init = {{"texts", texts}, {"showSwitch", ConnectServiceSwitch::shown()}};
return "window.connectLoggedOut && window.connectLoggedOut.init("
+ Biz::json_for_script(init)

View file

@ -249,11 +249,11 @@ std::vector<BrowserLogicCommand> BrowserLogicPrintables::on_printables_event_pri
DEBUG_ASSERT(!download_url.empty() && !model_url.empty(), "Faulty printables message.");
if (Biz::Network::ServiceConfig::instance().connect_printables_print_url().empty()) {
SPDLOG_WARN("Printing from Printables to Connect is not available with Prusa Connect on-premise.");
SPDLOG_WARN("Printing from Printables to Connect is not available with Prusa Connect (local).");
AppServices::instance().dialog_manager().show_info_dialog(
// TRN Shown when printing a Printables model while PrusaSlicer uses the self-hosted
Biz::_u8L(
"Printing from Printables to Prusa Connect is not available with Prusa Connect on-premise. Download the model and slice it instead."
"Printing from Printables to Prusa Connect is not available with Prusa Connect (local). Download the model and slice it instead."
),
Biz::_u8L("Print to Prusa Connect")
);

View file

@ -198,18 +198,18 @@ std::string ConnectLocalSetupLogic::setup_page_init_script() const
url = AppServices::instance().app_config().connect_local_url();
}
nlohmann::json texts = {
{"title", Biz::_u8L("Prusa Connect on-premise server")},
{"title", Biz::_u8L("Prusa Connect server")},
{"intro",
Biz::_u8L(
"Enter the address of the Prusa Connect on-premise server that manages your printers."
"Enter the address of the local Prusa Connect server that manages your printers."
)},
{"address", Biz::_u8L("Server address")},
{"discoveryTitle", Biz::_u8L("Find a server on the network")},
{"discoveryIntro",
Biz::_u8L(
"PrusaSlicer can look for Prusa Connect on-premise servers running on your local network."
"PrusaSlicer can look for local Prusa Connect servers running on your network."
)},
// TRN Button that starts the search for Prusa Connect on-premise servers.
// TRN Button that starts the search for local Prusa Connect servers.
{"discoveryStart", Biz::_u8L("Find servers on the network")},
{"searching", Biz::_u8L("Searching the network…")},
{"nothing", Biz::_u8L("No server found yet. Still searching…")},
@ -225,7 +225,7 @@ std::string ConnectLocalSetupLogic::setup_page_init_script() const
{"certTitle", Biz::_u8L("The server certificate is not trusted")},
{"certIntro",
Biz::_u8L(
"This system does not trust the certificate of the server, which is common for a server with a self-signed certificate. Compare the fingerprint with the one of your Prusa Connect on-premise server before you trust it, or load the certificate of the authority that issued it."
"This system does not trust the certificate of the server, which is common for a server with a self-signed certificate. Compare the fingerprint with the one of your local Prusa Connect server before you trust it, or load the certificate of the authority that issued it."
)},
{"fingerprint", Biz::_u8L("SHA-256 fingerprint")},
{"subject", Biz::_u8L("Issued to")},
@ -238,7 +238,7 @@ std::string ConnectLocalSetupLogic::setup_page_init_script() const
{"trust", Biz::_u8L("Trust this certificate")},
{"load", Biz::_u8L("Load certificate…")},
};
ConnectServiceSwitch::add_texts(texts);
ConnectServiceSwitch::add_texts(texts, AccountService::ConnectLocal);
const nlohmann::json init = {
{"texts", texts},
{"url", url},
@ -251,7 +251,7 @@ std::string ConnectLocalSetupLogic::setup_page_init_script() const
std::string ConnectLocalSetupLogic::logged_out_page_init_script() const
{
nlohmann::json texts = {
{"title", Biz::_u8L("Sign in to Prusa Connect on-premise")},
{"title", Biz::_u8L("Sign in to Prusa Connect")},
{"intro",
Biz::_u8L(
"PrusaSlicer will open the sign-in page of your server in a PrusaSlicer window."
@ -260,7 +260,7 @@ std::string ConnectLocalSetupLogic::logged_out_page_init_script() const
{"change", Biz::_u8L("Change server")},
{"forget", Biz::_u8L("Forget certificate")},
};
ConnectServiceSwitch::add_texts(texts);
ConnectServiceSwitch::add_texts(texts, AccountService::ConnectLocal);
const std::string server = Biz::Network::ServiceConfig::instance().connect_local_server_url();
const Biz::Network::ServerTrust trust = ConnectLocalTrust::stored_trust_for(server);
const nlohmann::json init = {

View file

@ -10,13 +10,16 @@
namespace Slic3r::App::Browser {
void ConnectServiceSwitch::add_texts(nlohmann::json& texts)
void ConnectServiceSwitch::add_texts(nlohmann::json& texts, AccountService service)
{
texts["modeCloud"] = Biz::_u8L("Prusa Connect");
texts["modeLocal"] = Biz::_u8L("Prusa Connect on-premise");
// TRN Small label under the PRUSA CONNECT logo on the Prusa Connect on-premise pages.
texts["modeTag"] = Biz::_u8L("on-premise");
// TRN Accessible name of the switch between Prusa Connect and Prusa Connect on-premise.
texts["modeCloud"] = Biz::_u8L("Prusa Connect (cloud)");
texts["modeLocal"] = Biz::_u8L("Prusa Connect (local)");
texts["modeTag"] = service == AccountService::ConnectLocal ?
// TRN Small label under the PRUSA CONNECT logo on the Prusa Connect (local) pages.
Biz::_u8L("local") :
// TRN Small label under the PRUSA CONNECT logo on the Prusa Connect (cloud) page.
Biz::_u8L("cloud");
// TRN Accessible name of the switch between Prusa Connect (cloud) and Prusa Connect (local).
texts["modeSwitch"] = Biz::_u8L("Connect service");
}

View file

@ -9,7 +9,7 @@ std::string connect_service_name()
{
if (Biz::Network::ServiceConfig::instance().is_connect_local()) {
// TRN The self-hosted Prusa Connect Local server, wherever the Connect service is named.
return Biz::_u8L("Prusa Connect on-premise");
return Biz::_u8L("Prusa Connect (local)");
}
return Biz::_u8L("Prusa Connect");
}

View file

@ -4,6 +4,7 @@
#include "Slic3r/App/Yoga/MenuItem.hpp"
#include "Slic3r/App/ConnectServiceName.hpp"
#include "Slic3r/Biz/I18N/I18N.hpp"
#include "Slic3r/Biz/Network/ServiceConfig.hpp"
namespace Slic3r::App {
@ -11,14 +12,30 @@ using Biz::ExportDestination::ExportDestination;
namespace {
std::string destination_label(ExportDestination destination)
std::string connect_label(bool selectable)
{
if (!selectable) {
// TRN Export destination: upload G-code to Prusa Connect, shown disabled while nobody is signed in.
return Biz::_u8L("Prusa Connect");
}
if (Biz::Network::ServiceConfig::instance().is_connect_local()) {
return connect_service_name();
}
// TRN Export destination: upload G-code to the Prusa Connect cloud service.
return Biz::_u8L("Prusa Connect (cloud)");
}
std::string destination_label(
const Biz::ExportDestination::ExportDestinationInteractor& interactor,
ExportDestination destination
)
{
switch (destination) {
// TRN Export destination: save G-code to a folder on this computer.
case ExportDestination::LocalDrive: return Biz::_u8L("Local drive");
// TRN Export destination: save G-code to a USB drive or SD card.
case ExportDestination::RemovableDrive: return Biz::_u8L("Removable drive");
case ExportDestination::Connect: return connect_service_name();
case ExportDestination::Connect: return connect_label(interactor.can_select(destination));
// TRN Export destination: upload G-code directly to the selected printer.
case ExportDestination::PrintHost: return Biz::_u8L("Printer host");
}
@ -39,17 +56,15 @@ Render::Icon destination_icon(ExportDestination destination)
} // namespace
ExportDestinationButton::ExportDestinationButton(Biz::ExportDestination::ExportDestinationInteractor& interactor) :
Yoga::LayoutButton(destination_label(interactor.selected()), destination_icon(interactor.selected())),
Yoga::LayoutButton(
destination_label(interactor, interactor.selected()),
destination_icon(interactor.selected())
),
m_listener_scope(interactor, *this),
m_interactor(interactor)
{
set_object_name("ExportDestinationButton");
m_menu = emplace_back<Yoga::Menu>("export_destination_menu", Yoga::Position::Left);
for (ExportDestination destination : Biz::ExportDestination::ALL_EXPORT_DESTINATIONS) {
Yoga::MenuItem* item = m_menu->append_item(destination_label(destination), destination_icon(destination));
item->callbacks().action = [this, destination]() { m_interactor.select(destination); };
m_menu_items.emplace_back(destination, item);
}
callbacks().action = [this]() { open_menu(); };
}
@ -61,13 +76,19 @@ void ExportDestinationButton::on_export_destination_changed()
void ExportDestinationButton::refresh()
{
set_label(destination_label(m_interactor.selected()));
set_label(destination_label(m_interactor, m_interactor.selected()));
set_icon(destination_icon(m_interactor.selected()));
}
void ExportDestinationButton::open_menu()
{
for (const auto& [destination, item] : m_menu_items) {
m_menu->clear();
for (ExportDestination destination : Biz::ExportDestination::ALL_EXPORT_DESTINATIONS) {
Yoga::MenuItem* item = m_menu->append_item(
destination_label(m_interactor, destination),
destination_icon(destination)
);
item->callbacks().action = [this, destination]() { m_interactor.select(destination); };
item->set_enabled(m_interactor.can_select(destination));
}
m_menu->open();

View file

@ -1250,12 +1250,12 @@ void PopNotificationCenter::on_user_account_credential_expires_soon(std::time_t
const long long days_left = (seconds_left + 24 * 60 * 60 - 1) / (24 * 60 * 60);
const std::string text = days_left <= 1 ?
// TRN Connect Local notification: the sign-in of the app ends within a day and cannot be renewed.
_u8L("Your sign-in to Prusa Connect on-premise ends within a day. Sign in again after that.") :
_u8L("Your sign-in to Prusa Connect (local) ends within a day. Sign in again after that.") :
fmt::format(
fmt::runtime(_L_PLURAL_u8(
// TRN Connect Local notification: the sign-in of the app ends soon and cannot be renewed. {} is a number of days.
"Your sign-in to Prusa Connect on-premise ends in {} day. Sign in again after that.",
"Your sign-in to Prusa Connect on-premise ends in {} days. Sign in again after that.",
"Your sign-in to Prusa Connect (local) ends in {} day. Sign in again after that.",
"Your sign-in to Prusa Connect (local) ends in {} days. Sign in again after that.",
static_cast<int>(days_left)
)),
days_left
@ -1266,7 +1266,7 @@ void PopNotificationCenter::on_user_account_credential_expires_soon(std::time_t
PopNotificationLevel::Warning,
0s,
// TRN Header of the Connect Local sign-in expiration notification.
PopNotificationLayoutHeaderText{_u8L("Prusa Connect on-premise"), text}
PopNotificationLayoutHeaderText{_u8L("Prusa Connect (local)"), text}
},
always_equal_matcher
);

View file

@ -439,7 +439,7 @@ ItemPtr create_offline_button_content()
connect_local_row->set_gap(gap);
connect_local_row->set_align_items(YGAlignCenter);
emplace_dot(connect_local_row, green);
connect_local_row->emplace_back<Text>(Biz::_u8L("Prusa Connect on-premise enabled"));
connect_local_row->emplace_back<Text>(Biz::_u8L("Prusa Connect (local) enabled"));
return result;
}