@adecore/agents-react 0.55.3 → 0.56.1
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/chat/ui/WorkflowAgentLine.js +35 -44
- package/dist/host-hooks.d.ts +1 -0
- package/dist/host-hooks.js +4 -0
- package/dist/host.d.ts +1 -0
- package/dist/locales/en/agent-providers.d.ts +5 -0
- package/dist/locales/en/agent-providers.js +6 -1
- package/dist/locales/nl/agent-providers.d.ts +5 -0
- package/dist/locales/nl/agent-providers.js +6 -1
- package/dist/providers/AccountDetail.js +429 -378
- package/dist/providers/account-actions.d.ts +1 -0
- package/dist/providers/account-actions.js +18 -0
- package/package.json +9 -9
- package/src/chat/ui/WorkflowAgentLine.tsx +3 -3
- package/src/host-hooks.ts +6 -0
- package/src/host.ts +6 -0
- package/src/locales/en/agent-providers.ts +6 -1
- package/src/locales/nl/agent-providers.ts +6 -1
- package/src/providers/AccountDetail.tsx +27 -1
- package/src/providers/account-actions.ts +13 -0
|
@@ -7,8 +7,10 @@ import { Trans, useTranslation } from 'react-i18next';
|
|
|
7
7
|
import { AccountDot } from '../agents/AccountDot.js';
|
|
8
8
|
import { accountName, FOLDER_VARIABLES } from '../agents/accounts.js';
|
|
9
9
|
import { useChatHost } from '../host.js';
|
|
10
|
+
import { useHostCanShareAccountConfig } from '../host-hooks.js';
|
|
10
11
|
import { useChatScope } from '../scope.js';
|
|
11
|
-
import {
|
|
12
|
+
import { useProviderAccounts } from '../state/provider-accounts.js';
|
|
13
|
+
import { removeAccount, saveAccount, shareAccountConfig } from './account-actions.js';
|
|
12
14
|
import { AccountColors } from './AccountColors.js';
|
|
13
15
|
import { AccountVariables } from './AccountVariables.js';
|
|
14
16
|
import { CliMark } from './parts.js';
|
|
@@ -76,7 +78,7 @@ function _temp(event_0) {
|
|
|
76
78
|
}
|
|
77
79
|
}
|
|
78
80
|
export function AccountDetail(t0) {
|
|
79
|
-
const $ = _c(
|
|
81
|
+
const $ = _c(177);
|
|
80
82
|
const {
|
|
81
83
|
provider,
|
|
82
84
|
entry,
|
|
@@ -111,9 +113,24 @@ export function AccountDetail(t0) {
|
|
|
111
113
|
const folder = status?.home ?? "";
|
|
112
114
|
const variable = FOLDER_VARIABLES[provider.kind];
|
|
113
115
|
const signedIn = status?.state === "ready";
|
|
116
|
+
const sharedConfigKinds = useProviderAccounts(_temp2);
|
|
117
|
+
const canShareConfig = useHostCanShareAccountConfig(scope.id);
|
|
118
|
+
const sharesConfig = account.shareConfig === true;
|
|
114
119
|
let t2;
|
|
115
|
-
if ($[3] !==
|
|
116
|
-
t2 = ()
|
|
120
|
+
if ($[3] !== canShareConfig || $[4] !== isDefault || $[5] !== provider.kind || $[6] !== sharedConfigKinds) {
|
|
121
|
+
t2 = canShareConfig && !isDefault && sharedConfigKinds?.includes(provider.kind) === true;
|
|
122
|
+
$[3] = canShareConfig;
|
|
123
|
+
$[4] = isDefault;
|
|
124
|
+
$[5] = provider.kind;
|
|
125
|
+
$[6] = sharedConfigKinds;
|
|
126
|
+
$[7] = t2;
|
|
127
|
+
} else {
|
|
128
|
+
t2 = $[7];
|
|
129
|
+
}
|
|
130
|
+
const showShareConfig = t2;
|
|
131
|
+
let t3;
|
|
132
|
+
if ($[8] !== folder || $[9] !== host || $[10] !== t) {
|
|
133
|
+
t3 = () => {
|
|
117
134
|
copyText(folder);
|
|
118
135
|
host.notify({
|
|
119
136
|
kind: "success",
|
|
@@ -121,18 +138,18 @@ export function AccountDetail(t0) {
|
|
|
121
138
|
description: folder
|
|
122
139
|
});
|
|
123
140
|
};
|
|
124
|
-
$[
|
|
125
|
-
$[
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
141
|
+
$[8] = folder;
|
|
142
|
+
$[9] = host;
|
|
143
|
+
$[10] = t;
|
|
144
|
+
$[11] = t3;
|
|
128
145
|
} else {
|
|
129
|
-
|
|
146
|
+
t3 = $[11];
|
|
130
147
|
}
|
|
131
|
-
const showFolder =
|
|
148
|
+
const showFolder = t3;
|
|
132
149
|
const trouble = status !== null && TROUBLE.has(status.state) && status.message ? status.message : null;
|
|
133
|
-
let
|
|
134
|
-
if ($[
|
|
135
|
-
|
|
150
|
+
let t4;
|
|
151
|
+
if ($[12] !== signedIn || $[13] !== status || $[14] !== t || $[15] !== trouble) {
|
|
152
|
+
t4 = () => {
|
|
136
153
|
if (trouble !== null) {
|
|
137
154
|
return trouble;
|
|
138
155
|
}
|
|
@@ -143,169 +160,169 @@ export function AccountDetail(t0) {
|
|
|
143
160
|
plan: status.plan
|
|
144
161
|
}) : t("account.login.detail");
|
|
145
162
|
};
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
$[
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
163
|
+
$[12] = signedIn;
|
|
164
|
+
$[13] = status;
|
|
165
|
+
$[14] = t;
|
|
166
|
+
$[15] = trouble;
|
|
167
|
+
$[16] = t4;
|
|
151
168
|
} else {
|
|
152
|
-
|
|
169
|
+
t4 = $[16];
|
|
153
170
|
}
|
|
154
|
-
const loginDetail =
|
|
155
|
-
const
|
|
156
|
-
let
|
|
157
|
-
if ($[
|
|
158
|
-
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
171
|
+
const loginDetail = t4;
|
|
172
|
+
const t5 = loginBlocked !== null;
|
|
173
|
+
let t6;
|
|
174
|
+
if ($[17] !== host || $[18] !== id || $[19] !== name || $[20] !== provider.kind || $[21] !== scope.id) {
|
|
175
|
+
t6 = () => void host.openLogin?.(scope.id, provider.kind, id, name);
|
|
176
|
+
$[17] = host;
|
|
177
|
+
$[18] = id;
|
|
178
|
+
$[19] = name;
|
|
179
|
+
$[20] = provider.kind;
|
|
180
|
+
$[21] = scope.id;
|
|
181
|
+
$[22] = t6;
|
|
165
182
|
} else {
|
|
166
|
-
|
|
183
|
+
t6 = $[22];
|
|
167
184
|
}
|
|
168
|
-
let
|
|
169
|
-
if ($[
|
|
170
|
-
|
|
185
|
+
let t7;
|
|
186
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
187
|
+
t7 = /*#__PURE__*/_jsx(Icon, {
|
|
171
188
|
icon: LogIn,
|
|
172
189
|
size: 14
|
|
173
190
|
});
|
|
174
|
-
$[
|
|
191
|
+
$[23] = t7;
|
|
175
192
|
} else {
|
|
176
|
-
|
|
193
|
+
t7 = $[23];
|
|
177
194
|
}
|
|
178
|
-
let
|
|
179
|
-
if ($[
|
|
180
|
-
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
195
|
+
let t8;
|
|
196
|
+
if ($[24] !== signedIn || $[25] !== t) {
|
|
197
|
+
t8 = signedIn ? t("account.login.logInAgain") : t("account.login.logIn");
|
|
198
|
+
$[24] = signedIn;
|
|
199
|
+
$[25] = t;
|
|
200
|
+
$[26] = t8;
|
|
184
201
|
} else {
|
|
185
|
-
|
|
202
|
+
t8 = $[26];
|
|
186
203
|
}
|
|
187
|
-
let
|
|
188
|
-
if ($[
|
|
189
|
-
|
|
204
|
+
let t9;
|
|
205
|
+
if ($[27] !== t5 || $[28] !== t6 || $[29] !== t8) {
|
|
206
|
+
t9 = /*#__PURE__*/_jsxs(Button, {
|
|
190
207
|
variant: "secondary",
|
|
191
|
-
disabled:
|
|
192
|
-
onClick:
|
|
193
|
-
children: [
|
|
208
|
+
disabled: t5,
|
|
209
|
+
onClick: t6,
|
|
210
|
+
children: [t7, t8]
|
|
194
211
|
});
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
212
|
+
$[27] = t5;
|
|
213
|
+
$[28] = t6;
|
|
214
|
+
$[29] = t8;
|
|
215
|
+
$[30] = t9;
|
|
199
216
|
} else {
|
|
200
|
-
|
|
217
|
+
t9 = $[30];
|
|
201
218
|
}
|
|
202
|
-
const loginButton =
|
|
203
|
-
let
|
|
204
|
-
if ($[
|
|
205
|
-
|
|
219
|
+
const loginButton = t9;
|
|
220
|
+
let t10;
|
|
221
|
+
if ($[31] !== account.color) {
|
|
222
|
+
t10 = /*#__PURE__*/_jsx("span", {
|
|
206
223
|
className: "grid h-6 shrink-0 place-items-center",
|
|
207
224
|
children: /*#__PURE__*/_jsx(AccountDot, {
|
|
208
225
|
color: account.color,
|
|
209
226
|
className: "size-3"
|
|
210
227
|
})
|
|
211
228
|
});
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
229
|
+
$[31] = account.color;
|
|
230
|
+
$[32] = t10;
|
|
214
231
|
} else {
|
|
215
|
-
|
|
232
|
+
t10 = $[32];
|
|
216
233
|
}
|
|
217
|
-
let
|
|
218
|
-
if ($[
|
|
219
|
-
|
|
234
|
+
let t11;
|
|
235
|
+
if ($[33] !== provider.kind) {
|
|
236
|
+
t11 = /*#__PURE__*/_jsx(CliMark, {
|
|
220
237
|
kind: provider.kind,
|
|
221
238
|
size: 12,
|
|
222
239
|
className: "text-text-muted"
|
|
223
240
|
});
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
241
|
+
$[33] = provider.kind;
|
|
242
|
+
$[34] = t11;
|
|
226
243
|
} else {
|
|
227
|
-
|
|
244
|
+
t11 = $[34];
|
|
228
245
|
}
|
|
229
|
-
let
|
|
230
|
-
if ($[
|
|
231
|
-
|
|
246
|
+
let t12;
|
|
247
|
+
if ($[35] !== provider.name || $[36] !== t) {
|
|
248
|
+
t12 = t("account.kind", {
|
|
232
249
|
provider: provider.name
|
|
233
250
|
});
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
251
|
+
$[35] = provider.name;
|
|
252
|
+
$[36] = t;
|
|
253
|
+
$[37] = t12;
|
|
237
254
|
} else {
|
|
238
|
-
|
|
255
|
+
t12 = $[37];
|
|
239
256
|
}
|
|
240
|
-
let
|
|
241
|
-
if ($[
|
|
242
|
-
|
|
243
|
-
children: [
|
|
257
|
+
let t13;
|
|
258
|
+
if ($[38] !== t11 || $[39] !== t12) {
|
|
259
|
+
t13 = /*#__PURE__*/_jsxs(_Fragment, {
|
|
260
|
+
children: [t11, t12]
|
|
244
261
|
});
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
262
|
+
$[38] = t11;
|
|
263
|
+
$[39] = t12;
|
|
264
|
+
$[40] = t13;
|
|
248
265
|
} else {
|
|
249
|
-
|
|
266
|
+
t13 = $[40];
|
|
250
267
|
}
|
|
251
|
-
let
|
|
252
|
-
if ($[
|
|
253
|
-
|
|
268
|
+
let t14;
|
|
269
|
+
if ($[41] !== folder || $[42] !== showFolder || $[43] !== t) {
|
|
270
|
+
t14 = folder !== "" && /*#__PURE__*/_jsx(Button, {
|
|
254
271
|
variant: "secondary",
|
|
255
272
|
onClick: showFolder,
|
|
256
273
|
children: t("account.showFolder")
|
|
257
274
|
});
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[39] = t13;
|
|
262
|
-
} else {
|
|
263
|
-
t13 = $[39];
|
|
264
|
-
}
|
|
265
|
-
let t14;
|
|
266
|
-
if ($[40] !== name || $[41] !== t12 || $[42] !== t13 || $[43] !== t9) {
|
|
267
|
-
t14 = /*#__PURE__*/_jsx(DetailHeader, {
|
|
268
|
-
mark: t9,
|
|
269
|
-
title: name,
|
|
270
|
-
subtitle: t12,
|
|
271
|
-
actions: t13
|
|
272
|
-
});
|
|
273
|
-
$[40] = name;
|
|
274
|
-
$[41] = t12;
|
|
275
|
-
$[42] = t13;
|
|
276
|
-
$[43] = t9;
|
|
275
|
+
$[41] = folder;
|
|
276
|
+
$[42] = showFolder;
|
|
277
|
+
$[43] = t;
|
|
277
278
|
$[44] = t14;
|
|
278
279
|
} else {
|
|
279
280
|
t14 = $[44];
|
|
280
281
|
}
|
|
281
282
|
let t15;
|
|
282
|
-
if ($[45] !==
|
|
283
|
-
t15 =
|
|
284
|
-
|
|
285
|
-
|
|
283
|
+
if ($[45] !== name || $[46] !== t10 || $[47] !== t13 || $[48] !== t14) {
|
|
284
|
+
t15 = /*#__PURE__*/_jsx(DetailHeader, {
|
|
285
|
+
mark: t10,
|
|
286
|
+
title: name,
|
|
287
|
+
subtitle: t13,
|
|
288
|
+
actions: t14
|
|
289
|
+
});
|
|
290
|
+
$[45] = name;
|
|
291
|
+
$[46] = t10;
|
|
292
|
+
$[47] = t13;
|
|
293
|
+
$[48] = t14;
|
|
294
|
+
$[49] = t15;
|
|
286
295
|
} else {
|
|
287
|
-
t15 = $[
|
|
296
|
+
t15 = $[49];
|
|
288
297
|
}
|
|
289
298
|
let t16;
|
|
290
|
-
if ($[
|
|
291
|
-
t16 = t("account.enabled.
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
299
|
+
if ($[50] !== t) {
|
|
300
|
+
t16 = t("account.enabled.label");
|
|
301
|
+
$[50] = t;
|
|
302
|
+
$[51] = t16;
|
|
294
303
|
} else {
|
|
295
|
-
t16 = $[
|
|
304
|
+
t16 = $[51];
|
|
296
305
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
$[
|
|
302
|
-
$[50] = t18;
|
|
306
|
+
let t17;
|
|
307
|
+
if ($[52] !== t) {
|
|
308
|
+
t17 = t("account.enabled.description");
|
|
309
|
+
$[52] = t;
|
|
310
|
+
$[53] = t17;
|
|
303
311
|
} else {
|
|
304
|
-
|
|
312
|
+
t17 = $[53];
|
|
305
313
|
}
|
|
314
|
+
const t18 = account.enabled !== false;
|
|
306
315
|
let t19;
|
|
307
|
-
if ($[
|
|
308
|
-
t19 =
|
|
316
|
+
if ($[54] !== t) {
|
|
317
|
+
t19 = t("account.enabled.label");
|
|
318
|
+
$[54] = t;
|
|
319
|
+
$[55] = t19;
|
|
320
|
+
} else {
|
|
321
|
+
t19 = $[55];
|
|
322
|
+
}
|
|
323
|
+
let t20;
|
|
324
|
+
if ($[56] !== account || $[57] !== host || $[58] !== id || $[59] !== scope) {
|
|
325
|
+
t20 = checked => {
|
|
309
326
|
const {
|
|
310
327
|
enabled: _enabled,
|
|
311
328
|
...rest
|
|
@@ -315,170 +332,200 @@ export function AccountDetail(t0) {
|
|
|
315
332
|
enabled: false
|
|
316
333
|
});
|
|
317
334
|
};
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
} else {
|
|
324
|
-
t19 = $[55];
|
|
325
|
-
}
|
|
326
|
-
let t20;
|
|
327
|
-
if ($[56] !== t17 || $[57] !== t18 || $[58] !== t19) {
|
|
328
|
-
t20 = /*#__PURE__*/_jsx(Switch, {
|
|
329
|
-
checked: t17,
|
|
330
|
-
label: t18,
|
|
331
|
-
onCheckedChange: t19
|
|
332
|
-
});
|
|
333
|
-
$[56] = t17;
|
|
334
|
-
$[57] = t18;
|
|
335
|
-
$[58] = t19;
|
|
336
|
-
$[59] = t20;
|
|
335
|
+
$[56] = account;
|
|
336
|
+
$[57] = host;
|
|
337
|
+
$[58] = id;
|
|
338
|
+
$[59] = scope;
|
|
339
|
+
$[60] = t20;
|
|
337
340
|
} else {
|
|
338
|
-
t20 = $[
|
|
341
|
+
t20 = $[60];
|
|
339
342
|
}
|
|
340
343
|
let t21;
|
|
341
|
-
if ($[
|
|
342
|
-
t21 = /*#__PURE__*/_jsx(
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
344
|
+
if ($[61] !== t18 || $[62] !== t19 || $[63] !== t20) {
|
|
345
|
+
t21 = /*#__PURE__*/_jsx(Switch, {
|
|
346
|
+
checked: t18,
|
|
347
|
+
label: t19,
|
|
348
|
+
onCheckedChange: t20
|
|
346
349
|
});
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
350
|
+
$[61] = t18;
|
|
351
|
+
$[62] = t19;
|
|
352
|
+
$[63] = t20;
|
|
353
|
+
$[64] = t21;
|
|
351
354
|
} else {
|
|
352
|
-
t21 = $[
|
|
355
|
+
t21 = $[64];
|
|
353
356
|
}
|
|
354
357
|
let t22;
|
|
355
|
-
if ($[
|
|
356
|
-
t22 =
|
|
357
|
-
|
|
358
|
-
|
|
358
|
+
if ($[65] !== t16 || $[66] !== t17 || $[67] !== t21) {
|
|
359
|
+
t22 = /*#__PURE__*/_jsx(SettingsRow, {
|
|
360
|
+
label: t16,
|
|
361
|
+
description: t17,
|
|
362
|
+
control: t21
|
|
363
|
+
});
|
|
364
|
+
$[65] = t16;
|
|
365
|
+
$[66] = t17;
|
|
366
|
+
$[67] = t21;
|
|
367
|
+
$[68] = t22;
|
|
359
368
|
} else {
|
|
360
|
-
t22 = $[
|
|
369
|
+
t22 = $[68];
|
|
361
370
|
}
|
|
362
371
|
let t23;
|
|
363
|
-
if ($[
|
|
372
|
+
if ($[69] !== t) {
|
|
364
373
|
t23 = t("account.name");
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
374
|
+
$[69] = t;
|
|
375
|
+
$[70] = t23;
|
|
367
376
|
} else {
|
|
368
|
-
t23 = $[
|
|
377
|
+
t23 = $[70];
|
|
369
378
|
}
|
|
370
379
|
let t24;
|
|
371
|
-
if ($[
|
|
372
|
-
t24 =
|
|
373
|
-
|
|
374
|
-
label
|
|
375
|
-
});
|
|
376
|
-
$[68] = account;
|
|
377
|
-
$[69] = host;
|
|
378
|
-
$[70] = id;
|
|
379
|
-
$[71] = scope;
|
|
380
|
+
if ($[71] !== t) {
|
|
381
|
+
t24 = t("account.name");
|
|
382
|
+
$[71] = t;
|
|
380
383
|
$[72] = t24;
|
|
381
384
|
} else {
|
|
382
385
|
t24 = $[72];
|
|
383
386
|
}
|
|
384
387
|
let t25;
|
|
385
|
-
if ($[73] !==
|
|
386
|
-
t25 =
|
|
387
|
-
|
|
388
|
-
label
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
388
|
+
if ($[73] !== account || $[74] !== host || $[75] !== id || $[76] !== scope) {
|
|
389
|
+
t25 = label => void saveAccount(scope, host, id, {
|
|
390
|
+
...account,
|
|
391
|
+
label
|
|
392
|
+
});
|
|
393
|
+
$[73] = account;
|
|
394
|
+
$[74] = host;
|
|
395
|
+
$[75] = id;
|
|
396
|
+
$[76] = scope;
|
|
397
|
+
$[77] = t25;
|
|
395
398
|
} else {
|
|
396
|
-
t25 = $[
|
|
399
|
+
t25 = $[77];
|
|
397
400
|
}
|
|
398
401
|
let t26;
|
|
399
|
-
if ($[
|
|
400
|
-
t26 = /*#__PURE__*/_jsx(
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
$[78] =
|
|
406
|
-
$[79] =
|
|
402
|
+
if ($[78] !== name || $[79] !== t24 || $[80] !== t25) {
|
|
403
|
+
t26 = /*#__PURE__*/_jsx(NameField, {
|
|
404
|
+
value: name,
|
|
405
|
+
label: t24,
|
|
406
|
+
onSave: t25
|
|
407
|
+
}, name);
|
|
408
|
+
$[78] = name;
|
|
409
|
+
$[79] = t24;
|
|
410
|
+
$[80] = t25;
|
|
411
|
+
$[81] = t26;
|
|
407
412
|
} else {
|
|
408
|
-
t26 = $[
|
|
413
|
+
t26 = $[81];
|
|
409
414
|
}
|
|
410
415
|
let t27;
|
|
411
|
-
if ($[
|
|
412
|
-
t27 =
|
|
413
|
-
|
|
414
|
-
|
|
416
|
+
if ($[82] !== t23 || $[83] !== t26) {
|
|
417
|
+
t27 = /*#__PURE__*/_jsx(SettingsRow, {
|
|
418
|
+
label: t23,
|
|
419
|
+
control: t26
|
|
420
|
+
});
|
|
421
|
+
$[82] = t23;
|
|
422
|
+
$[83] = t26;
|
|
423
|
+
$[84] = t27;
|
|
415
424
|
} else {
|
|
416
|
-
t27 = $[
|
|
425
|
+
t27 = $[84];
|
|
417
426
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
$[
|
|
423
|
-
$[83] = t29;
|
|
427
|
+
let t28;
|
|
428
|
+
if ($[85] !== t) {
|
|
429
|
+
t28 = t("account.color");
|
|
430
|
+
$[85] = t;
|
|
431
|
+
$[86] = t28;
|
|
424
432
|
} else {
|
|
425
|
-
|
|
433
|
+
t28 = $[86];
|
|
426
434
|
}
|
|
435
|
+
const t29 = account.color;
|
|
427
436
|
let t30;
|
|
428
|
-
if ($[
|
|
429
|
-
t30 = color
|
|
430
|
-
|
|
431
|
-
color
|
|
432
|
-
});
|
|
433
|
-
$[84] = account;
|
|
434
|
-
$[85] = host;
|
|
435
|
-
$[86] = id;
|
|
436
|
-
$[87] = scope;
|
|
437
|
+
if ($[87] !== t) {
|
|
438
|
+
t30 = t("account.color");
|
|
439
|
+
$[87] = t;
|
|
437
440
|
$[88] = t30;
|
|
438
441
|
} else {
|
|
439
442
|
t30 = $[88];
|
|
440
443
|
}
|
|
441
444
|
let t31;
|
|
442
|
-
if ($[89] !== account
|
|
443
|
-
t31 =
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
onChange: t30
|
|
445
|
+
if ($[89] !== account || $[90] !== host || $[91] !== id || $[92] !== scope) {
|
|
446
|
+
t31 = color => void saveAccount(scope, host, id, {
|
|
447
|
+
...account,
|
|
448
|
+
color
|
|
447
449
|
});
|
|
448
|
-
$[89] = account
|
|
449
|
-
$[90] =
|
|
450
|
-
$[91] =
|
|
451
|
-
$[92] =
|
|
450
|
+
$[89] = account;
|
|
451
|
+
$[90] = host;
|
|
452
|
+
$[91] = id;
|
|
453
|
+
$[92] = scope;
|
|
454
|
+
$[93] = t31;
|
|
452
455
|
} else {
|
|
453
|
-
t31 = $[
|
|
456
|
+
t31 = $[93];
|
|
454
457
|
}
|
|
455
458
|
let t32;
|
|
456
|
-
if ($[
|
|
457
|
-
t32 = /*#__PURE__*/_jsx(
|
|
458
|
-
|
|
459
|
-
|
|
459
|
+
if ($[94] !== account.color || $[95] !== t30 || $[96] !== t31) {
|
|
460
|
+
t32 = /*#__PURE__*/_jsx(AccountColors, {
|
|
461
|
+
value: t29,
|
|
462
|
+
label: t30,
|
|
463
|
+
onChange: t31
|
|
460
464
|
});
|
|
461
|
-
$[
|
|
462
|
-
$[
|
|
463
|
-
$[
|
|
465
|
+
$[94] = account.color;
|
|
466
|
+
$[95] = t30;
|
|
467
|
+
$[96] = t31;
|
|
468
|
+
$[97] = t32;
|
|
464
469
|
} else {
|
|
465
|
-
t32 = $[
|
|
470
|
+
t32 = $[97];
|
|
466
471
|
}
|
|
467
472
|
let t33;
|
|
468
|
-
if ($[
|
|
469
|
-
t33 = /*#__PURE__*/
|
|
470
|
-
|
|
473
|
+
if ($[98] !== t28 || $[99] !== t32) {
|
|
474
|
+
t33 = /*#__PURE__*/_jsx(SettingsRow, {
|
|
475
|
+
label: t28,
|
|
476
|
+
control: t32
|
|
471
477
|
});
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
$[99] = t33;
|
|
478
|
+
$[98] = t28;
|
|
479
|
+
$[99] = t32;
|
|
480
|
+
$[100] = t33;
|
|
476
481
|
} else {
|
|
477
|
-
t33 = $[
|
|
482
|
+
t33 = $[100];
|
|
478
483
|
}
|
|
479
484
|
let t34;
|
|
480
|
-
if ($[
|
|
481
|
-
t34 =
|
|
485
|
+
if ($[101] !== t22 || $[102] !== t27 || $[103] !== t33) {
|
|
486
|
+
t34 = /*#__PURE__*/_jsxs(SettingsSection, {
|
|
487
|
+
children: [t22, t27, t33]
|
|
488
|
+
});
|
|
489
|
+
$[101] = t22;
|
|
490
|
+
$[102] = t27;
|
|
491
|
+
$[103] = t33;
|
|
492
|
+
$[104] = t34;
|
|
493
|
+
} else {
|
|
494
|
+
t34 = $[104];
|
|
495
|
+
}
|
|
496
|
+
let t35;
|
|
497
|
+
if ($[105] !== host || $[106] !== id || $[107] !== provider.name || $[108] !== scope || $[109] !== sharesConfig || $[110] !== showShareConfig || $[111] !== status || $[112] !== t || $[113] !== trouble) {
|
|
498
|
+
t35 = showShareConfig && /*#__PURE__*/_jsx(SettingsSection, {
|
|
499
|
+
children: /*#__PURE__*/_jsx(SettingsRow, {
|
|
500
|
+
label: t("account.shareConfig.label"),
|
|
501
|
+
description: sharesConfig && !trouble && status?.message ? `${t("account.shareConfig.description", {
|
|
502
|
+
provider: provider.name
|
|
503
|
+
})} ${status.message}` : t("account.shareConfig.description", {
|
|
504
|
+
provider: provider.name
|
|
505
|
+
}),
|
|
506
|
+
control: /*#__PURE__*/_jsx(Switch, {
|
|
507
|
+
checked: sharesConfig,
|
|
508
|
+
label: t("account.shareConfig.label"),
|
|
509
|
+
onCheckedChange: checked_0 => void shareAccountConfig(scope, host, id, checked_0)
|
|
510
|
+
})
|
|
511
|
+
})
|
|
512
|
+
});
|
|
513
|
+
$[105] = host;
|
|
514
|
+
$[106] = id;
|
|
515
|
+
$[107] = provider.name;
|
|
516
|
+
$[108] = scope;
|
|
517
|
+
$[109] = sharesConfig;
|
|
518
|
+
$[110] = showShareConfig;
|
|
519
|
+
$[111] = status;
|
|
520
|
+
$[112] = t;
|
|
521
|
+
$[113] = trouble;
|
|
522
|
+
$[114] = t35;
|
|
523
|
+
} else {
|
|
524
|
+
t35 = $[114];
|
|
525
|
+
}
|
|
526
|
+
let t36;
|
|
527
|
+
if ($[115] !== canOpenLogin || $[116] !== folder || $[117] !== login || $[118] !== loginBlocked || $[119] !== loginButton || $[120] !== loginDetail || $[121] !== signedIn || $[122] !== status || $[123] !== t || $[124] !== trouble || $[125] !== variable) {
|
|
528
|
+
t36 = (login === "chat" || login === "terminal" && canOpenLogin) && /*#__PURE__*/_jsxs(SettingsSection, {
|
|
482
529
|
title: t("account.login.title"),
|
|
483
530
|
children: [login === "chat" ? /*#__PURE__*/_jsx(SettingsRow, {
|
|
484
531
|
label: t("account.login.inChat"),
|
|
@@ -520,185 +567,189 @@ export function AccountDetail(t0) {
|
|
|
520
567
|
})]
|
|
521
568
|
})]
|
|
522
569
|
});
|
|
523
|
-
$[
|
|
524
|
-
$[
|
|
525
|
-
$[
|
|
526
|
-
$[
|
|
527
|
-
$[
|
|
528
|
-
$[
|
|
529
|
-
$[
|
|
530
|
-
$[
|
|
531
|
-
$[
|
|
532
|
-
$[
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
535
|
-
} else {
|
|
536
|
-
|
|
570
|
+
$[115] = canOpenLogin;
|
|
571
|
+
$[116] = folder;
|
|
572
|
+
$[117] = login;
|
|
573
|
+
$[118] = loginBlocked;
|
|
574
|
+
$[119] = loginButton;
|
|
575
|
+
$[120] = loginDetail;
|
|
576
|
+
$[121] = signedIn;
|
|
577
|
+
$[122] = status;
|
|
578
|
+
$[123] = t;
|
|
579
|
+
$[124] = trouble;
|
|
580
|
+
$[125] = variable;
|
|
581
|
+
$[126] = t36;
|
|
582
|
+
} else {
|
|
583
|
+
t36 = $[126];
|
|
537
584
|
}
|
|
538
|
-
let
|
|
539
|
-
if ($[
|
|
540
|
-
|
|
541
|
-
$[
|
|
542
|
-
$[
|
|
585
|
+
let t37;
|
|
586
|
+
if ($[127] !== account.env) {
|
|
587
|
+
t37 = JSON.stringify(account.env ?? []);
|
|
588
|
+
$[127] = account.env;
|
|
589
|
+
$[128] = t37;
|
|
543
590
|
} else {
|
|
544
|
-
|
|
591
|
+
t37 = $[128];
|
|
545
592
|
}
|
|
546
|
-
const
|
|
547
|
-
let
|
|
548
|
-
if ($[
|
|
549
|
-
|
|
593
|
+
const t38 = `${id}:${t37}`;
|
|
594
|
+
let t39;
|
|
595
|
+
if ($[129] !== account || $[130] !== id || $[131] !== secretsAvailable || $[132] !== t38) {
|
|
596
|
+
t39 = /*#__PURE__*/_jsx(AccountVariables, {
|
|
550
597
|
id: id,
|
|
551
598
|
account: account,
|
|
552
599
|
secretsAvailable: secretsAvailable
|
|
553
|
-
},
|
|
554
|
-
$[
|
|
555
|
-
$[
|
|
556
|
-
$[
|
|
557
|
-
$[
|
|
558
|
-
$[
|
|
600
|
+
}, t38);
|
|
601
|
+
$[129] = account;
|
|
602
|
+
$[130] = id;
|
|
603
|
+
$[131] = secretsAvailable;
|
|
604
|
+
$[132] = t38;
|
|
605
|
+
$[133] = t39;
|
|
559
606
|
} else {
|
|
560
|
-
|
|
607
|
+
t39 = $[133];
|
|
561
608
|
}
|
|
562
|
-
let
|
|
563
|
-
if ($[
|
|
564
|
-
|
|
565
|
-
$[
|
|
566
|
-
$[
|
|
609
|
+
let t40;
|
|
610
|
+
if ($[134] !== t) {
|
|
611
|
+
t40 = t("account.remove.label");
|
|
612
|
+
$[134] = t;
|
|
613
|
+
$[135] = t40;
|
|
567
614
|
} else {
|
|
568
|
-
|
|
615
|
+
t40 = $[135];
|
|
569
616
|
}
|
|
570
|
-
let
|
|
571
|
-
if ($[
|
|
572
|
-
|
|
573
|
-
$[
|
|
574
|
-
$[
|
|
575
|
-
$[
|
|
617
|
+
let t41;
|
|
618
|
+
if ($[136] !== isDefault || $[137] !== t) {
|
|
619
|
+
t41 = isDefault ? t("account.remove.defaultNote") : t("account.remove.description");
|
|
620
|
+
$[136] = isDefault;
|
|
621
|
+
$[137] = t;
|
|
622
|
+
$[138] = t41;
|
|
576
623
|
} else {
|
|
577
|
-
|
|
624
|
+
t41 = $[138];
|
|
578
625
|
}
|
|
579
|
-
let
|
|
580
|
-
if ($[
|
|
581
|
-
|
|
582
|
-
$[
|
|
626
|
+
let t42;
|
|
627
|
+
if ($[139] === Symbol.for("react.memo_cache_sentinel")) {
|
|
628
|
+
t42 = () => setConfirming(true);
|
|
629
|
+
$[139] = t42;
|
|
583
630
|
} else {
|
|
584
|
-
|
|
631
|
+
t42 = $[139];
|
|
585
632
|
}
|
|
586
|
-
let
|
|
587
|
-
if ($[
|
|
588
|
-
|
|
589
|
-
$[
|
|
590
|
-
$[
|
|
633
|
+
let t43;
|
|
634
|
+
if ($[140] !== t) {
|
|
635
|
+
t43 = t("account.remove.button");
|
|
636
|
+
$[140] = t;
|
|
637
|
+
$[141] = t43;
|
|
591
638
|
} else {
|
|
592
|
-
|
|
639
|
+
t43 = $[141];
|
|
593
640
|
}
|
|
594
|
-
let
|
|
595
|
-
if ($[
|
|
596
|
-
|
|
641
|
+
let t44;
|
|
642
|
+
if ($[142] !== isDefault || $[143] !== t43) {
|
|
643
|
+
t44 = /*#__PURE__*/_jsx(Button, {
|
|
597
644
|
variant: "danger-outline",
|
|
598
645
|
disabled: isDefault,
|
|
599
|
-
onClick:
|
|
600
|
-
children:
|
|
646
|
+
onClick: t42,
|
|
647
|
+
children: t43
|
|
601
648
|
});
|
|
602
|
-
$[
|
|
603
|
-
$[
|
|
604
|
-
$[
|
|
649
|
+
$[142] = isDefault;
|
|
650
|
+
$[143] = t43;
|
|
651
|
+
$[144] = t44;
|
|
605
652
|
} else {
|
|
606
|
-
|
|
653
|
+
t44 = $[144];
|
|
607
654
|
}
|
|
608
|
-
let
|
|
609
|
-
if ($[
|
|
610
|
-
|
|
655
|
+
let t45;
|
|
656
|
+
if ($[145] !== t40 || $[146] !== t41 || $[147] !== t44) {
|
|
657
|
+
t45 = /*#__PURE__*/_jsx(SettingsSection, {
|
|
611
658
|
children: /*#__PURE__*/_jsx(SettingsRow, {
|
|
612
|
-
label:
|
|
613
|
-
description:
|
|
614
|
-
control:
|
|
659
|
+
label: t40,
|
|
660
|
+
description: t41,
|
|
661
|
+
control: t44
|
|
615
662
|
})
|
|
616
663
|
});
|
|
617
|
-
$[
|
|
618
|
-
$[
|
|
619
|
-
$[
|
|
620
|
-
$[
|
|
664
|
+
$[145] = t40;
|
|
665
|
+
$[146] = t41;
|
|
666
|
+
$[147] = t44;
|
|
667
|
+
$[148] = t45;
|
|
621
668
|
} else {
|
|
622
|
-
|
|
669
|
+
t45 = $[148];
|
|
623
670
|
}
|
|
624
|
-
let
|
|
625
|
-
if ($[
|
|
626
|
-
|
|
671
|
+
let t46;
|
|
672
|
+
if ($[149] !== name || $[150] !== t) {
|
|
673
|
+
t46 = t("account.remove.confirmTitle", {
|
|
627
674
|
account: name
|
|
628
675
|
});
|
|
629
|
-
$[
|
|
630
|
-
$[
|
|
631
|
-
$[
|
|
676
|
+
$[149] = name;
|
|
677
|
+
$[150] = t;
|
|
678
|
+
$[151] = t46;
|
|
632
679
|
} else {
|
|
633
|
-
|
|
680
|
+
t46 = $[151];
|
|
634
681
|
}
|
|
635
|
-
let
|
|
636
|
-
if ($[
|
|
637
|
-
|
|
682
|
+
let t47;
|
|
683
|
+
if ($[152] !== folder || $[153] !== t) {
|
|
684
|
+
t47 = t("account.remove.confirmDescription", {
|
|
638
685
|
folder
|
|
639
686
|
});
|
|
640
|
-
$[
|
|
641
|
-
$[
|
|
642
|
-
$[
|
|
687
|
+
$[152] = folder;
|
|
688
|
+
$[153] = t;
|
|
689
|
+
$[154] = t47;
|
|
643
690
|
} else {
|
|
644
|
-
|
|
691
|
+
t47 = $[154];
|
|
645
692
|
}
|
|
646
|
-
let
|
|
647
|
-
if ($[
|
|
648
|
-
|
|
649
|
-
$[
|
|
650
|
-
$[
|
|
693
|
+
let t48;
|
|
694
|
+
if ($[155] !== t) {
|
|
695
|
+
t48 = t("account.remove.confirm");
|
|
696
|
+
$[155] = t;
|
|
697
|
+
$[156] = t48;
|
|
651
698
|
} else {
|
|
652
|
-
|
|
699
|
+
t48 = $[156];
|
|
653
700
|
}
|
|
654
|
-
let
|
|
655
|
-
if ($[
|
|
656
|
-
|
|
701
|
+
let t49;
|
|
702
|
+
if ($[157] !== host || $[158] !== id || $[159] !== onRemoved || $[160] !== provider.kind || $[161] !== scope) {
|
|
703
|
+
t49 = async () => {
|
|
657
704
|
await removeAccount(scope, host, id, provider.kind);
|
|
658
705
|
onRemoved();
|
|
659
706
|
};
|
|
660
|
-
$[
|
|
661
|
-
$[
|
|
662
|
-
$[
|
|
663
|
-
$[
|
|
664
|
-
$[
|
|
665
|
-
$[
|
|
666
|
-
} else {
|
|
667
|
-
|
|
668
|
-
}
|
|
669
|
-
let
|
|
670
|
-
if ($[
|
|
671
|
-
|
|
707
|
+
$[157] = host;
|
|
708
|
+
$[158] = id;
|
|
709
|
+
$[159] = onRemoved;
|
|
710
|
+
$[160] = provider.kind;
|
|
711
|
+
$[161] = scope;
|
|
712
|
+
$[162] = t49;
|
|
713
|
+
} else {
|
|
714
|
+
t49 = $[162];
|
|
715
|
+
}
|
|
716
|
+
let t50;
|
|
717
|
+
if ($[163] !== confirming || $[164] !== t46 || $[165] !== t47 || $[166] !== t48 || $[167] !== t49) {
|
|
718
|
+
t50 = /*#__PURE__*/_jsx(ConfirmDialog, {
|
|
672
719
|
open: confirming,
|
|
673
720
|
onOpenChange: setConfirming,
|
|
674
|
-
title:
|
|
675
|
-
description:
|
|
676
|
-
confirmLabel:
|
|
677
|
-
onConfirm:
|
|
721
|
+
title: t46,
|
|
722
|
+
description: t47,
|
|
723
|
+
confirmLabel: t48,
|
|
724
|
+
onConfirm: t49
|
|
678
725
|
});
|
|
679
|
-
$[
|
|
680
|
-
$[
|
|
681
|
-
$[
|
|
682
|
-
$[
|
|
683
|
-
$[
|
|
684
|
-
$[
|
|
685
|
-
} else {
|
|
686
|
-
|
|
687
|
-
}
|
|
688
|
-
let
|
|
689
|
-
if ($[
|
|
690
|
-
|
|
691
|
-
children: [
|
|
726
|
+
$[163] = confirming;
|
|
727
|
+
$[164] = t46;
|
|
728
|
+
$[165] = t47;
|
|
729
|
+
$[166] = t48;
|
|
730
|
+
$[167] = t49;
|
|
731
|
+
$[168] = t50;
|
|
732
|
+
} else {
|
|
733
|
+
t50 = $[168];
|
|
734
|
+
}
|
|
735
|
+
let t51;
|
|
736
|
+
if ($[169] !== t15 || $[170] !== t34 || $[171] !== t35 || $[172] !== t36 || $[173] !== t39 || $[174] !== t45 || $[175] !== t50) {
|
|
737
|
+
t51 = /*#__PURE__*/_jsxs(_Fragment, {
|
|
738
|
+
children: [t15, t34, t35, t36, t39, t45, t50]
|
|
692
739
|
});
|
|
693
|
-
$[
|
|
694
|
-
$[
|
|
695
|
-
$[
|
|
696
|
-
$[
|
|
697
|
-
$[
|
|
698
|
-
$[
|
|
699
|
-
$[
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
740
|
+
$[169] = t15;
|
|
741
|
+
$[170] = t34;
|
|
742
|
+
$[171] = t35;
|
|
743
|
+
$[172] = t36;
|
|
744
|
+
$[173] = t39;
|
|
745
|
+
$[174] = t45;
|
|
746
|
+
$[175] = t50;
|
|
747
|
+
$[176] = t51;
|
|
748
|
+
} else {
|
|
749
|
+
t51 = $[176];
|
|
750
|
+
}
|
|
751
|
+
return t51;
|
|
752
|
+
}
|
|
753
|
+
function _temp2(row) {
|
|
754
|
+
return row.accounts?.sharedConfigKinds;
|
|
704
755
|
}
|