@livedesk/client 0.1.53 → 0.1.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/livedesk-client.js +30 -22
- package/package.json +1 -1
package/bin/livedesk-client.js
CHANGED
|
@@ -621,7 +621,7 @@ function renderConnectionChoicePage({ error = '', pin = '', slot = '', startup =
|
|
|
621
621
|
border-radius: 9px;
|
|
622
622
|
background: linear-gradient(135deg, #2dd4bf, #2563eb);
|
|
623
623
|
color: #ffffff;
|
|
624
|
-
font-weight:
|
|
624
|
+
font-weight: 750;
|
|
625
625
|
box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
|
|
626
626
|
}
|
|
627
627
|
.brand-copy {
|
|
@@ -630,21 +630,22 @@ function renderConnectionChoicePage({ error = '', pin = '', slot = '', startup =
|
|
|
630
630
|
line-height: 1;
|
|
631
631
|
}
|
|
632
632
|
.brand-copy strong {
|
|
633
|
-
font-size:
|
|
633
|
+
font-size: 14px;
|
|
634
|
+
font-weight: 650;
|
|
634
635
|
letter-spacing: 0;
|
|
635
636
|
}
|
|
636
637
|
.brand-copy span {
|
|
637
638
|
color: #64748b;
|
|
638
639
|
font-size: 12px;
|
|
639
|
-
font-weight:
|
|
640
|
+
font-weight: 500;
|
|
640
641
|
}
|
|
641
642
|
.headline {
|
|
642
643
|
display: grid;
|
|
643
644
|
gap: 9px;
|
|
644
645
|
padding-top: 16px;
|
|
645
646
|
}
|
|
646
|
-
h1 { margin: 0; font-size:
|
|
647
|
-
p { margin: 0; color: #
|
|
647
|
+
h1 { margin: 0; font-size: 28px; line-height: 1.14; letter-spacing: 0; font-weight: 650; }
|
|
648
|
+
p { margin: 0; color: #667085; font-size: 13px; line-height: 1.6; font-weight: 450; }
|
|
648
649
|
.panel {
|
|
649
650
|
display: grid;
|
|
650
651
|
gap: 14px;
|
|
@@ -663,12 +664,12 @@ function renderConnectionChoicePage({ error = '', pin = '', slot = '', startup =
|
|
|
663
664
|
.placement span {
|
|
664
665
|
color: #64748b;
|
|
665
666
|
font-size: 12px;
|
|
666
|
-
font-weight:
|
|
667
|
+
font-weight: 550;
|
|
667
668
|
}
|
|
668
669
|
.placement strong {
|
|
669
670
|
color: #111827;
|
|
670
671
|
font-size: 13px;
|
|
671
|
-
font-weight:
|
|
672
|
+
font-weight: 650;
|
|
672
673
|
}
|
|
673
674
|
.startup-option {
|
|
674
675
|
display: grid;
|
|
@@ -695,42 +696,42 @@ function renderConnectionChoicePage({ error = '', pin = '', slot = '', startup =
|
|
|
695
696
|
}
|
|
696
697
|
.startup-option strong {
|
|
697
698
|
font-size: 13px;
|
|
698
|
-
font-weight:
|
|
699
|
+
font-weight: 600;
|
|
699
700
|
}
|
|
700
701
|
.startup-option small {
|
|
701
702
|
color: #64748b;
|
|
702
703
|
text-align: left;
|
|
703
704
|
font-size: 12px;
|
|
704
|
-
font-weight:
|
|
705
|
+
font-weight: 450;
|
|
705
706
|
}
|
|
706
707
|
form {
|
|
707
708
|
display: grid;
|
|
708
709
|
gap: 12px;
|
|
709
710
|
margin: 0;
|
|
710
711
|
}
|
|
711
|
-
label {
|
|
712
|
+
.field-label {
|
|
712
713
|
display: grid;
|
|
713
714
|
gap: 8px;
|
|
714
715
|
color: #475569;
|
|
715
716
|
font-size: 12px;
|
|
716
|
-
font-weight:
|
|
717
|
+
font-weight: 600;
|
|
717
718
|
text-transform: uppercase;
|
|
718
719
|
letter-spacing: 0.04em;
|
|
719
720
|
}
|
|
720
|
-
input {
|
|
721
|
+
.pin-input {
|
|
721
722
|
height: 42px;
|
|
722
723
|
border: 1px solid #cfd6e1;
|
|
723
724
|
border-radius: 8px;
|
|
724
725
|
padding: 0 12px;
|
|
725
726
|
background: rgba(17, 24, 39, 0.026);
|
|
726
727
|
color: #111827;
|
|
727
|
-
font-size:
|
|
728
|
-
font-weight:
|
|
728
|
+
font-size: 20px;
|
|
729
|
+
font-weight: 650;
|
|
729
730
|
letter-spacing: 0.18em;
|
|
730
731
|
text-align: center;
|
|
731
732
|
outline: 0;
|
|
732
733
|
}
|
|
733
|
-
input:focus {
|
|
734
|
+
.pin-input:focus {
|
|
734
735
|
border-color: #111827;
|
|
735
736
|
box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
|
|
736
737
|
}
|
|
@@ -744,7 +745,7 @@ function renderConnectionChoicePage({ error = '', pin = '', slot = '', startup =
|
|
|
744
745
|
background: #111827;
|
|
745
746
|
color: #ffffff;
|
|
746
747
|
font-size: 14px;
|
|
747
|
-
font-weight:
|
|
748
|
+
font-weight: 650;
|
|
748
749
|
text-decoration: none;
|
|
749
750
|
cursor: pointer;
|
|
750
751
|
transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
|
|
@@ -772,7 +773,7 @@ function renderConnectionChoicePage({ error = '', pin = '', slot = '', startup =
|
|
|
772
773
|
align-items: center;
|
|
773
774
|
color: #94a3b8;
|
|
774
775
|
font-size: 11px;
|
|
775
|
-
font-weight:
|
|
776
|
+
font-weight: 550;
|
|
776
777
|
text-transform: uppercase;
|
|
777
778
|
letter-spacing: 0.08em;
|
|
778
779
|
}
|
|
@@ -788,13 +789,13 @@ function renderConnectionChoicePage({ error = '', pin = '', slot = '', startup =
|
|
|
788
789
|
background: rgba(254, 226, 226, 0.75);
|
|
789
790
|
color: #991b1b;
|
|
790
791
|
font-size: 13px;
|
|
791
|
-
font-weight:
|
|
792
|
+
font-weight: 550;
|
|
792
793
|
}
|
|
793
794
|
small {
|
|
794
795
|
color: #94a3b8;
|
|
795
796
|
text-align: center;
|
|
796
797
|
font-size: 12px;
|
|
797
|
-
font-weight:
|
|
798
|
+
font-weight: 500;
|
|
798
799
|
}
|
|
799
800
|
aside {
|
|
800
801
|
display: grid;
|
|
@@ -894,9 +895,9 @@ function renderConnectionChoicePage({ error = '', pin = '', slot = '', startup =
|
|
|
894
895
|
<div class="divider">or</div>
|
|
895
896
|
<form id="pin-form" method="post" action="/pin">
|
|
896
897
|
<input id="pin-startup" type="hidden" name="startup" value="${startup ? '1' : '0'}">
|
|
897
|
-
<label>
|
|
898
|
+
<label class="field-label">
|
|
898
899
|
Hub PIN
|
|
899
|
-
<input name="pin" value="${escapeHtml(pin)}" inputmode="numeric" autocomplete="one-time-code" pattern="[0-9]{6}" maxlength="6" placeholder="000000" autofocus>
|
|
900
|
+
<input class="pin-input" name="pin" value="${escapeHtml(pin)}" inputmode="numeric" autocomplete="one-time-code" pattern="[0-9]{6}" maxlength="6" placeholder="000000" autofocus>
|
|
900
901
|
</label>
|
|
901
902
|
<button type="submit">Connect with PIN</button>
|
|
902
903
|
</form>
|
|
@@ -1345,7 +1346,14 @@ async function prepareLoginConnection(parsed) {
|
|
|
1345
1346
|
if (shouldLogin) {
|
|
1346
1347
|
const supabase = await createSupabaseClient();
|
|
1347
1348
|
const startupArgs = buildStartupClientArgs(parsed);
|
|
1348
|
-
|
|
1349
|
+
let savedSession = null;
|
|
1350
|
+
if (parsed.startupRun) {
|
|
1351
|
+
try {
|
|
1352
|
+
savedSession = await refreshSessionIfNeeded(supabase);
|
|
1353
|
+
} catch (err) {
|
|
1354
|
+
console.warn(`LiveDesk saved sign-in could not be refreshed: ${err?.message || err}`);
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1349
1357
|
const choice = savedSession?.access_token
|
|
1350
1358
|
? { type: 'google', session: savedSession }
|
|
1351
1359
|
: await chooseClientConnection(supabase, {
|