isometrik-plugin-chat-sdk 1.0.1 → 1.0.2
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/dist/cjs/{MessageSearch-f5b72462.js → MessageSearch-a73ca677.js} +82 -11
- package/dist/cjs/MessageSearch-a73ca677.js.map +1 -0
- package/dist/cjs/{WebChat-2329244b.js → WebChat-11c06cb9.js} +428 -37
- package/dist/cjs/WebChat-11c06cb9.js.map +1 -0
- package/dist/cjs/audio-bubble_8.cjs.entry.js +1 -1
- package/dist/cjs/chat-app.cjs.entry.js +2 -2
- package/dist/cjs/theme-provider_2.cjs.entry.js +2 -2
- package/dist/collection/api/social-accounts.js +77 -9
- package/dist/collection/components/my-component/web-chat/WebChat.js +19 -14
- package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -1
- package/dist/collection/stories/Components/InstagramAccounts/InstagramAccountsPanel.js +412 -22
- package/dist/esm/{MessageSearch-4010486c.js → MessageSearch-69b3a0f3.js} +79 -11
- package/dist/esm/MessageSearch-69b3a0f3.js.map +1 -0
- package/dist/esm/{WebChat-95518d72.js → WebChat-372df148.js} +428 -37
- package/dist/esm/WebChat-372df148.js.map +1 -0
- package/dist/esm/audio-bubble_8.entry.js +2 -2
- package/dist/esm/chat-app.entry.js +2 -2
- package/dist/esm/theme-provider_2.entry.js +2 -2
- package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
- package/dist/isometrik-webchat/{p-d7e335cb.entry.js → p-56fbdbc3.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-35f143c9.entry.js → p-8456ee94.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-55355714.js → p-9058d82c.js} +17 -17
- package/dist/isometrik-webchat/p-9058d82c.js.map +1 -0
- package/dist/isometrik-webchat/p-9588b7ec.js +780 -0
- package/dist/isometrik-webchat/p-9588b7ec.js.map +1 -0
- package/dist/isometrik-webchat/{p-675c105e.entry.js → p-e66e5e61.entry.js} +2 -2
- package/package.json +1 -1
- package/readme.md +5 -5
- package/dist/cjs/MessageSearch-f5b72462.js.map +0 -1
- package/dist/cjs/WebChat-2329244b.js.map +0 -1
- package/dist/esm/MessageSearch-4010486c.js.map +0 -1
- package/dist/esm/WebChat-95518d72.js.map +0 -1
- package/dist/isometrik-webchat/p-55355714.js.map +0 -1
- package/dist/isometrik-webchat/p-e954c29f.js +0 -591
- package/dist/isometrik-webchat/p-e954c29f.js.map +0 -1
- /package/dist/isometrik-webchat/{p-d7e335cb.entry.js.map → p-56fbdbc3.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-35f143c9.entry.js.map → p-8456ee94.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-675c105e.entry.js.map → p-e66e5e61.entry.js.map} +0 -0
|
@@ -3,11 +3,15 @@ import {
|
|
|
3
3
|
connectSocialAccount,
|
|
4
4
|
connectSocialAccountCallback,
|
|
5
5
|
deleteSocialAccount,
|
|
6
|
-
|
|
6
|
+
getConnectedSocialAccounts,
|
|
7
|
+
getSocialAccountIdFromConnect,
|
|
7
8
|
getSocialAccounts,
|
|
8
9
|
getSocialRedirectUrl,
|
|
10
|
+
isSocialCheckpointRequired,
|
|
9
11
|
openSocialAuthPopup,
|
|
12
|
+
submitSocialConnectCheckpoint,
|
|
10
13
|
} from '../../../api/social-accounts';
|
|
14
|
+
import { CHAT_CREDS } from '../../../constants/chat-creds';
|
|
11
15
|
import { drawerDialogService } from '../Dialog-Drawer/dialog-drawer';
|
|
12
16
|
import { showToast } from '../Toaster/toast-helper';
|
|
13
17
|
|
|
@@ -22,7 +26,13 @@ export class InstagramAccountsPanel extends LitElement {
|
|
|
22
26
|
/** When true, hide the X close (e.g. Instagram gate — no chat to return to). */
|
|
23
27
|
hideClose: { type: Boolean },
|
|
24
28
|
socialAccounts: { type: Array },
|
|
29
|
+
linkedInAccounts: { type: Array },
|
|
25
30
|
isSocialLoading: { type: Boolean },
|
|
31
|
+
isLinkedInLoading: { type: Boolean },
|
|
32
|
+
linkedInUsername: { type: String },
|
|
33
|
+
linkedInPassword: { type: String },
|
|
34
|
+
linkedInCode: { type: String },
|
|
35
|
+
linkedInCheckpointAccountId: { type: String },
|
|
26
36
|
};
|
|
27
37
|
|
|
28
38
|
constructor() {
|
|
@@ -34,16 +44,31 @@ export class InstagramAccountsPanel extends LitElement {
|
|
|
34
44
|
this.accountsChange = null;
|
|
35
45
|
this.hideClose = false;
|
|
36
46
|
this.socialAccounts = [];
|
|
47
|
+
this.linkedInAccounts = [];
|
|
37
48
|
this.isSocialLoading = false;
|
|
49
|
+
this.isLinkedInLoading = false;
|
|
50
|
+
this.linkedInUsername = '';
|
|
51
|
+
this.linkedInPassword = '';
|
|
52
|
+
this.linkedInCode = '';
|
|
53
|
+
this.linkedInCheckpointAccountId = '';
|
|
38
54
|
}
|
|
39
55
|
|
|
40
56
|
get connectedAccounts() {
|
|
41
|
-
return
|
|
57
|
+
return getConnectedSocialAccounts(this.socialAccounts);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
get connectedLinkedInAccounts() {
|
|
61
|
+
return getConnectedSocialAccounts(this.linkedInAccounts);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
get resolvedAgentUserId() {
|
|
65
|
+
return this.agentUserId || CHAT_CREDS.isometrikUserId || '';
|
|
42
66
|
}
|
|
43
67
|
|
|
44
68
|
connectedCallback() {
|
|
45
69
|
super.connectedCallback();
|
|
46
70
|
this.loadSocialAccounts();
|
|
71
|
+
this.loadLinkedInAccounts();
|
|
47
72
|
}
|
|
48
73
|
|
|
49
74
|
notifyAccountsChange(accounts = this.socialAccounts) {
|
|
@@ -76,6 +101,21 @@ export class InstagramAccountsPanel extends LitElement {
|
|
|
76
101
|
}
|
|
77
102
|
}
|
|
78
103
|
|
|
104
|
+
async loadLinkedInAccounts({ notify = false } = {}) {
|
|
105
|
+
this.isLinkedInLoading = true;
|
|
106
|
+
try {
|
|
107
|
+
const data = await getSocialAccounts({ platform: 'linkedin' });
|
|
108
|
+
this.linkedInAccounts = data?.accounts || [];
|
|
109
|
+
if (notify) this.notifyAccountsChange();
|
|
110
|
+
} catch (error) {
|
|
111
|
+
console.error('Failed to load LinkedIn accounts:', error);
|
|
112
|
+
this.linkedInAccounts = [];
|
|
113
|
+
if (notify) this.notifyAccountsChange();
|
|
114
|
+
} finally {
|
|
115
|
+
this.isLinkedInLoading = false;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
79
119
|
formatSocialDate(ts) {
|
|
80
120
|
if (!ts) return '-';
|
|
81
121
|
try {
|
|
@@ -142,7 +182,6 @@ export class InstagramAccountsPanel extends LitElement {
|
|
|
142
182
|
this.isSocialLoading = true;
|
|
143
183
|
try {
|
|
144
184
|
await deleteSocialAccount({ accountId });
|
|
145
|
-
// API soft-disconnects (status=disconnected) — reload truth from server
|
|
146
185
|
await this.loadSocialAccounts();
|
|
147
186
|
showToast({
|
|
148
187
|
message: 'Instagram disconnected',
|
|
@@ -163,11 +202,144 @@ export class InstagramAccountsPanel extends LitElement {
|
|
|
163
202
|
});
|
|
164
203
|
}
|
|
165
204
|
|
|
205
|
+
resetLinkedInForm() {
|
|
206
|
+
this.linkedInUsername = '';
|
|
207
|
+
this.linkedInPassword = '';
|
|
208
|
+
this.linkedInCode = '';
|
|
209
|
+
this.linkedInCheckpointAccountId = '';
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
async handleConnectLinkedIn(e) {
|
|
213
|
+
e?.preventDefault?.();
|
|
214
|
+
const username = (this.linkedInUsername || '').trim();
|
|
215
|
+
const password = this.linkedInPassword || '';
|
|
216
|
+
if (!username || !password) {
|
|
217
|
+
showToast({
|
|
218
|
+
message: 'Enter LinkedIn email and password',
|
|
219
|
+
type: 'error',
|
|
220
|
+
position: 'bottom-right',
|
|
221
|
+
});
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
this.isLinkedInLoading = true;
|
|
226
|
+
try {
|
|
227
|
+
const data = await connectSocialAccount({
|
|
228
|
+
platform: 'linkedin',
|
|
229
|
+
username,
|
|
230
|
+
password,
|
|
231
|
+
agentUserId: this.resolvedAgentUserId,
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
const accountId = getSocialAccountIdFromConnect(data);
|
|
235
|
+
const needsCheckpoint =
|
|
236
|
+
isSocialCheckpointRequired(data) ||
|
|
237
|
+
(Boolean(accountId) && String(data?.status || '').toLowerCase() !== 'connected');
|
|
238
|
+
if (needsCheckpoint) {
|
|
239
|
+
if (!accountId) throw new Error('No accountId returned for LinkedIn checkpoint');
|
|
240
|
+
this.linkedInCheckpointAccountId = accountId;
|
|
241
|
+
this.linkedInPassword = '';
|
|
242
|
+
showToast({
|
|
243
|
+
message: 'Enter the verification code from LinkedIn',
|
|
244
|
+
type: 'success',
|
|
245
|
+
position: 'bottom-right',
|
|
246
|
+
});
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
this.resetLinkedInForm();
|
|
251
|
+
await this.loadLinkedInAccounts({ notify: true });
|
|
252
|
+
showToast({
|
|
253
|
+
message: 'LinkedIn connected',
|
|
254
|
+
type: 'success',
|
|
255
|
+
position: 'bottom-right',
|
|
256
|
+
});
|
|
257
|
+
} catch (error) {
|
|
258
|
+
console.error('Failed to connect LinkedIn:', error);
|
|
259
|
+
showToast({
|
|
260
|
+
message: error?.message || 'Failed to connect LinkedIn',
|
|
261
|
+
type: 'error',
|
|
262
|
+
position: 'bottom-right',
|
|
263
|
+
});
|
|
264
|
+
} finally {
|
|
265
|
+
this.isLinkedInLoading = false;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
async handleLinkedInCheckpoint(e) {
|
|
270
|
+
e?.preventDefault?.();
|
|
271
|
+
const code = (this.linkedInCode || '').trim();
|
|
272
|
+
if (!this.linkedInCheckpointAccountId || !code) {
|
|
273
|
+
showToast({
|
|
274
|
+
message: 'Enter the LinkedIn verification code',
|
|
275
|
+
type: 'error',
|
|
276
|
+
position: 'bottom-right',
|
|
277
|
+
});
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
this.isLinkedInLoading = true;
|
|
282
|
+
try {
|
|
283
|
+
await submitSocialConnectCheckpoint({
|
|
284
|
+
platform: 'linkedin',
|
|
285
|
+
accountId: this.linkedInCheckpointAccountId,
|
|
286
|
+
code,
|
|
287
|
+
agentUserId: this.resolvedAgentUserId,
|
|
288
|
+
});
|
|
289
|
+
this.resetLinkedInForm();
|
|
290
|
+
await this.loadLinkedInAccounts({ notify: true });
|
|
291
|
+
showToast({
|
|
292
|
+
message: 'LinkedIn connected',
|
|
293
|
+
type: 'success',
|
|
294
|
+
position: 'bottom-right',
|
|
295
|
+
});
|
|
296
|
+
} catch (error) {
|
|
297
|
+
console.error('Failed LinkedIn checkpoint:', error);
|
|
298
|
+
showToast({
|
|
299
|
+
message: error?.message || 'Failed to verify LinkedIn code',
|
|
300
|
+
type: 'error',
|
|
301
|
+
position: 'bottom-right',
|
|
302
|
+
});
|
|
303
|
+
} finally {
|
|
304
|
+
this.isLinkedInLoading = false;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
handleDisconnectLinkedIn(accountId, username) {
|
|
309
|
+
drawerDialogService.openDialog('confirm-dialog', {
|
|
310
|
+
title: 'Disconnect LinkedIn',
|
|
311
|
+
description: `Disconnect ${username || 'this LinkedIn account'}?`,
|
|
312
|
+
handleConfirm: async () => {
|
|
313
|
+
drawerDialogService.closeDialog('confirm-dialog');
|
|
314
|
+
this.isLinkedInLoading = true;
|
|
315
|
+
try {
|
|
316
|
+
await deleteSocialAccount({ accountId });
|
|
317
|
+
await this.loadLinkedInAccounts({ notify: true });
|
|
318
|
+
showToast({
|
|
319
|
+
message: 'LinkedIn disconnected',
|
|
320
|
+
type: 'success',
|
|
321
|
+
position: 'bottom-right',
|
|
322
|
+
});
|
|
323
|
+
} catch (error) {
|
|
324
|
+
console.error('Failed to disconnect LinkedIn:', error);
|
|
325
|
+
showToast({
|
|
326
|
+
message: error?.message || 'Failed to disconnect LinkedIn',
|
|
327
|
+
type: 'error',
|
|
328
|
+
position: 'bottom-right',
|
|
329
|
+
});
|
|
330
|
+
} finally {
|
|
331
|
+
this.isLinkedInLoading = false;
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
|
|
166
337
|
renderSocialAccount(account) {
|
|
167
338
|
const name = account.displayName || account.username || 'Instagram';
|
|
168
339
|
const handle = account.username ? `@${account.username}` : '';
|
|
169
340
|
const isConnected = account.status === 'connected';
|
|
170
|
-
const gradId = `igGrad-${account.zernioAccountId || account.username || 'acc'}`;
|
|
341
|
+
const gradId = `igGrad-${account.zernioAccountId || account.accountId || account.username || 'acc'}`;
|
|
342
|
+
const accountId = account.zernioAccountId || account.accountId;
|
|
171
343
|
|
|
172
344
|
return html`
|
|
173
345
|
<article class="ig-card">
|
|
@@ -204,7 +376,48 @@ export class InstagramAccountsPanel extends LitElement {
|
|
|
204
376
|
<button
|
|
205
377
|
type="button"
|
|
206
378
|
class="ig-disconnect"
|
|
207
|
-
@click=${() => this.handleDisconnectInstagram(
|
|
379
|
+
@click=${() => this.handleDisconnectInstagram(accountId, account.username)}
|
|
380
|
+
>
|
|
381
|
+
Disconnect
|
|
382
|
+
</button>
|
|
383
|
+
</div>
|
|
384
|
+
</article>
|
|
385
|
+
`;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
renderLinkedInAccount(account) {
|
|
389
|
+
const name = account.displayName || account.username || 'LinkedIn';
|
|
390
|
+
const handle = account.handle || (account.username ? account.username : '');
|
|
391
|
+
const isConnected = account.status === 'connected';
|
|
392
|
+
const accountId = account.accountId || account.unipileAccountId || account.zernioAccountId;
|
|
393
|
+
|
|
394
|
+
return html`
|
|
395
|
+
<article class="ig-card li-card">
|
|
396
|
+
<div class="ig-card-top">
|
|
397
|
+
<div class="li-mark" aria-hidden="true">
|
|
398
|
+
<svg viewBox="0 0 24 24" width="22" height="22" fill="#0a66c2">
|
|
399
|
+
<path d="M20.45 20.45h-3.55v-5.57c0-1.33-.02-3.04-1.85-3.04-1.85 0-2.14 1.45-2.14 2.94v5.67H9.36V9h3.41v1.56h.05c.47-.9 1.64-1.85 3.37-1.85 3.6 0 4.27 2.37 4.27 5.46v6.28zM5.34 7.43a2.06 2.06 0 1 1 0-4.12 2.06 2.06 0 0 1 0 4.12zM7.12 20.45H3.56V9h3.56v11.45zM22.23 0H1.77C.79 0 0 .77 0 1.73v20.54C0 23.23.79 24 1.77 24h20.46c.98 0 1.77-.77 1.77-1.73V1.73C24 .77 23.21 0 22.23 0z" />
|
|
400
|
+
</svg>
|
|
401
|
+
</div>
|
|
402
|
+
<div class="ig-identity">
|
|
403
|
+
<div class="ig-name-row">
|
|
404
|
+
<h3 class="ig-name">${name}</h3>
|
|
405
|
+
${isConnected
|
|
406
|
+
? html`<span class="ig-badge">Connected</span>`
|
|
407
|
+
: html`<span class="ig-badge is-muted">${account.status || 'Unknown'}</span>`}
|
|
408
|
+
</div>
|
|
409
|
+
${handle ? html`<p class="ig-handle">${handle}</p>` : null}
|
|
410
|
+
<p class="ig-connected-on">Connected ${this.formatSocialDate(account.connectedAt)}</p>
|
|
411
|
+
</div>
|
|
412
|
+
</div>
|
|
413
|
+
<div class="ig-actions">
|
|
414
|
+
${account.profileUrl
|
|
415
|
+
? html`<a class="ig-link" href=${account.profileUrl} target="_blank" rel="noopener noreferrer">View profile</a>`
|
|
416
|
+
: html`<span></span>`}
|
|
417
|
+
<button
|
|
418
|
+
type="button"
|
|
419
|
+
class="ig-disconnect"
|
|
420
|
+
@click=${() => this.handleDisconnectLinkedIn(accountId, account.username || account.handle)}
|
|
208
421
|
>
|
|
209
422
|
Disconnect
|
|
210
423
|
</button>
|
|
@@ -216,9 +429,9 @@ export class InstagramAccountsPanel extends LitElement {
|
|
|
216
429
|
renderConnectInstagram() {
|
|
217
430
|
return html`
|
|
218
431
|
<div class="ig-empty">
|
|
219
|
-
<p class="ig-empty-title">Connect
|
|
432
|
+
<p class="ig-empty-title">Connect a social account to see chats</p>
|
|
220
433
|
<p class="ig-empty-copy">
|
|
221
|
-
Link
|
|
434
|
+
Link Instagram or LinkedIn. Chats stay hidden until at least one account is connected.
|
|
222
435
|
</p>
|
|
223
436
|
<button type="button" class="ig-connect" @click=${() => this.handleConnectInstagram()} ?disabled=${this.isSocialLoading}>
|
|
224
437
|
<span class="ig-mark" aria-hidden="true">
|
|
@@ -244,6 +457,79 @@ export class InstagramAccountsPanel extends LitElement {
|
|
|
244
457
|
`;
|
|
245
458
|
}
|
|
246
459
|
|
|
460
|
+
renderLinkedInForm() {
|
|
461
|
+
if (this.linkedInCheckpointAccountId) {
|
|
462
|
+
return html`
|
|
463
|
+
<form class="li-form" @submit=${(e) => this.handleLinkedInCheckpoint(e)}>
|
|
464
|
+
<p class="ig-empty-copy">Enter the verification code LinkedIn sent you.</p>
|
|
465
|
+
<label class="li-label">
|
|
466
|
+
<span>Verification code</span>
|
|
467
|
+
<input
|
|
468
|
+
class="li-input"
|
|
469
|
+
type="text"
|
|
470
|
+
inputmode="numeric"
|
|
471
|
+
autocomplete="one-time-code"
|
|
472
|
+
.value=${this.linkedInCode}
|
|
473
|
+
@input=${(e) => { this.linkedInCode = e.target.value; }}
|
|
474
|
+
placeholder="6-digit code"
|
|
475
|
+
?disabled=${this.isLinkedInLoading}
|
|
476
|
+
/>
|
|
477
|
+
</label>
|
|
478
|
+
<div class="li-form-actions">
|
|
479
|
+
<button type="button" class="li-secondary" @click=${() => this.resetLinkedInForm()} ?disabled=${this.isLinkedInLoading}>
|
|
480
|
+
Back
|
|
481
|
+
</button>
|
|
482
|
+
<button type="submit" class="li-primary" ?disabled=${this.isLinkedInLoading}>
|
|
483
|
+
${this.isLinkedInLoading ? 'Verifying…' : 'Verify & connect'}
|
|
484
|
+
</button>
|
|
485
|
+
</div>
|
|
486
|
+
</form>
|
|
487
|
+
`;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
return html`
|
|
491
|
+
<form class="li-form" @submit=${(e) => this.handleConnectLinkedIn(e)}>
|
|
492
|
+
<label class="li-label">
|
|
493
|
+
<span>Email or username</span>
|
|
494
|
+
<input
|
|
495
|
+
class="li-input"
|
|
496
|
+
type="text"
|
|
497
|
+
autocomplete="username"
|
|
498
|
+
.value=${this.linkedInUsername}
|
|
499
|
+
@input=${(e) => { this.linkedInUsername = e.target.value; }}
|
|
500
|
+
placeholder="you@example.com"
|
|
501
|
+
?disabled=${this.isLinkedInLoading}
|
|
502
|
+
/>
|
|
503
|
+
</label>
|
|
504
|
+
<label class="li-label">
|
|
505
|
+
<span>Password</span>
|
|
506
|
+
<input
|
|
507
|
+
class="li-input"
|
|
508
|
+
type="password"
|
|
509
|
+
autocomplete="current-password"
|
|
510
|
+
.value=${this.linkedInPassword}
|
|
511
|
+
@input=${(e) => { this.linkedInPassword = e.target.value; }}
|
|
512
|
+
placeholder="LinkedIn password"
|
|
513
|
+
?disabled=${this.isLinkedInLoading}
|
|
514
|
+
/>
|
|
515
|
+
</label>
|
|
516
|
+
<button type="submit" class="li-primary li-primary-full" ?disabled=${this.isLinkedInLoading}>
|
|
517
|
+
${this.isLinkedInLoading ? 'Connecting…' : 'Connect LinkedIn'}
|
|
518
|
+
</button>
|
|
519
|
+
</form>
|
|
520
|
+
`;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
renderSkeleton() {
|
|
524
|
+
return html`<div class="ig-skeleton" aria-hidden="true">
|
|
525
|
+
<div class="ig-skeleton-mark"></div>
|
|
526
|
+
<div class="ig-skeleton-lines">
|
|
527
|
+
<div class="ig-skeleton-line wide"></div>
|
|
528
|
+
<div class="ig-skeleton-line"></div>
|
|
529
|
+
</div>
|
|
530
|
+
</div>`;
|
|
531
|
+
}
|
|
532
|
+
|
|
247
533
|
render() {
|
|
248
534
|
return html`
|
|
249
535
|
<div class="panel">
|
|
@@ -255,21 +541,27 @@ export class InstagramAccountsPanel extends LitElement {
|
|
|
255
541
|
<path d="m249-207-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231-231 231Z" />
|
|
256
542
|
</svg>
|
|
257
543
|
</div>`}
|
|
258
|
-
<h1 class="title">
|
|
544
|
+
<h1 class="title">Connected accounts</h1>
|
|
259
545
|
</div>
|
|
260
546
|
|
|
261
547
|
<div class="body">
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
548
|
+
<section class="platform-section">
|
|
549
|
+
<h2 class="section-title">Instagram</h2>
|
|
550
|
+
${this.isSocialLoading
|
|
551
|
+
? this.renderSkeleton()
|
|
552
|
+
: this.connectedAccounts.length
|
|
553
|
+
? this.connectedAccounts.map(account => this.renderSocialAccount(account))
|
|
554
|
+
: this.renderConnectInstagram()}
|
|
555
|
+
</section>
|
|
556
|
+
|
|
557
|
+
<section class="platform-section">
|
|
558
|
+
<h2 class="section-title">LinkedIn</h2>
|
|
559
|
+
${this.isLinkedInLoading && !this.linkedInCheckpointAccountId && !this.linkedInUsername
|
|
560
|
+
? this.renderSkeleton()
|
|
561
|
+
: this.connectedLinkedInAccounts.length
|
|
562
|
+
? this.connectedLinkedInAccounts.map(account => this.renderLinkedInAccount(account))
|
|
563
|
+
: this.renderLinkedInForm()}
|
|
564
|
+
</section>
|
|
273
565
|
</div>
|
|
274
566
|
|
|
275
567
|
<div class="bottom-actions">
|
|
@@ -329,6 +621,24 @@ export class InstagramAccountsPanel extends LitElement {
|
|
|
329
621
|
.body {
|
|
330
622
|
flex: 1;
|
|
331
623
|
min-height: 0;
|
|
624
|
+
display: flex;
|
|
625
|
+
flex-direction: column;
|
|
626
|
+
gap: 28px;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
.platform-section {
|
|
630
|
+
display: flex;
|
|
631
|
+
flex-direction: column;
|
|
632
|
+
gap: 12px;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
.section-title {
|
|
636
|
+
margin: 0;
|
|
637
|
+
font-size: 0.8125rem;
|
|
638
|
+
font-weight: 600;
|
|
639
|
+
letter-spacing: 0.04em;
|
|
640
|
+
text-transform: uppercase;
|
|
641
|
+
color: var(--text-secondary-color);
|
|
332
642
|
}
|
|
333
643
|
|
|
334
644
|
.ig-card {
|
|
@@ -339,7 +649,7 @@ export class InstagramAccountsPanel extends LitElement {
|
|
|
339
649
|
border-radius: 12px;
|
|
340
650
|
border: 1px solid var(--border-subtle, color-mix(in srgb, var(--text-primary-color) 10%, transparent));
|
|
341
651
|
background: color-mix(in srgb, var(--bg-secondary-color, #f5f5f5) 70%, transparent);
|
|
342
|
-
margin-bottom:
|
|
652
|
+
margin-bottom: 0;
|
|
343
653
|
animation: ig-in 280ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
344
654
|
}
|
|
345
655
|
|
|
@@ -366,16 +676,24 @@ export class InstagramAccountsPanel extends LitElement {
|
|
|
366
676
|
gap: 12px;
|
|
367
677
|
}
|
|
368
678
|
|
|
369
|
-
.ig-mark
|
|
679
|
+
.ig-mark,
|
|
680
|
+
.li-mark {
|
|
370
681
|
width: 40px;
|
|
371
682
|
height: 40px;
|
|
372
683
|
border-radius: 12px;
|
|
373
684
|
display: grid;
|
|
374
685
|
place-items: center;
|
|
375
686
|
flex-shrink: 0;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.ig-mark {
|
|
376
690
|
background: color-mix(in srgb, #dd2a7b 8%, var(--bg-primary-color, #fff));
|
|
377
691
|
}
|
|
378
692
|
|
|
693
|
+
.li-mark {
|
|
694
|
+
background: color-mix(in srgb, #0a66c2 10%, var(--bg-primary-color, #fff));
|
|
695
|
+
}
|
|
696
|
+
|
|
379
697
|
.ig-identity {
|
|
380
698
|
min-width: 0;
|
|
381
699
|
flex: 1;
|
|
@@ -481,7 +799,7 @@ export class InstagramAccountsPanel extends LitElement {
|
|
|
481
799
|
display: flex;
|
|
482
800
|
flex-direction: column;
|
|
483
801
|
gap: 12px;
|
|
484
|
-
padding:
|
|
802
|
+
padding: 0;
|
|
485
803
|
}
|
|
486
804
|
|
|
487
805
|
.ig-empty-title {
|
|
@@ -527,6 +845,78 @@ export class InstagramAccountsPanel extends LitElement {
|
|
|
527
845
|
line-height: 1.35;
|
|
528
846
|
}
|
|
529
847
|
|
|
848
|
+
.li-form {
|
|
849
|
+
display: flex;
|
|
850
|
+
flex-direction: column;
|
|
851
|
+
gap: 12px;
|
|
852
|
+
padding: 14px;
|
|
853
|
+
border-radius: 12px;
|
|
854
|
+
border: 1px solid var(--border-subtle, color-mix(in srgb, var(--text-primary-color) 10%, transparent));
|
|
855
|
+
background: color-mix(in srgb, var(--bg-secondary-color, #f5f5f5) 70%, transparent);
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
.li-label {
|
|
859
|
+
display: flex;
|
|
860
|
+
flex-direction: column;
|
|
861
|
+
gap: 6px;
|
|
862
|
+
font-size: 0.75rem;
|
|
863
|
+
font-weight: 500;
|
|
864
|
+
color: var(--text-secondary-color);
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
.li-input {
|
|
868
|
+
width: 100%;
|
|
869
|
+
box-sizing: border-box;
|
|
870
|
+
padding: 10px 12px;
|
|
871
|
+
border-radius: 8px;
|
|
872
|
+
border: 1px solid var(--border-subtle, color-mix(in srgb, var(--text-primary-color) 14%, transparent));
|
|
873
|
+
background: var(--bg-primary-color, #fff);
|
|
874
|
+
color: var(--text-primary-color);
|
|
875
|
+
font-size: 0.875rem;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
.li-input:focus {
|
|
879
|
+
outline: 2px solid color-mix(in srgb, #0a66c2 35%, transparent);
|
|
880
|
+
outline-offset: 1px;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
.li-form-actions {
|
|
884
|
+
display: flex;
|
|
885
|
+
gap: 8px;
|
|
886
|
+
justify-content: flex-end;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
.li-primary,
|
|
890
|
+
.li-secondary {
|
|
891
|
+
border: none;
|
|
892
|
+
border-radius: 8px;
|
|
893
|
+
padding: 10px 14px;
|
|
894
|
+
font-size: 0.8125rem;
|
|
895
|
+
font-weight: 600;
|
|
896
|
+
cursor: pointer;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
.li-primary {
|
|
900
|
+
background: #0a66c2;
|
|
901
|
+
color: #fff;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
.li-primary-full {
|
|
905
|
+
width: 100%;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.li-primary:disabled,
|
|
909
|
+
.li-secondary:disabled {
|
|
910
|
+
opacity: 0.6;
|
|
911
|
+
cursor: not-allowed;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
.li-secondary {
|
|
915
|
+
background: transparent;
|
|
916
|
+
color: var(--text-secondary-color);
|
|
917
|
+
border: 1px solid var(--border-subtle, color-mix(in srgb, var(--text-primary-color) 14%, transparent));
|
|
918
|
+
}
|
|
919
|
+
|
|
530
920
|
.ig-skeleton {
|
|
531
921
|
display: flex;
|
|
532
922
|
align-items: center;
|