@houser/edus-plugin 1.0.2 → 1.0.4
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/lib/client.js +688 -223
- package/lib/index.js +138 -20
- package/lib/typert.host.js +157 -107
- package/lib/typert.remote-client.js +157 -107
- package/lib/types/client/EdusLoginPanel.d.ts +34 -0
- package/lib/types/client/HtmlWorkbench.d.ts +5 -19
- package/lib/types/webpage-instruction.d.ts +1 -1
- package/package.json +40 -40
package/lib/client.js
CHANGED
|
@@ -5280,16 +5280,26 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5280
5280
|
}
|
|
5281
5281
|
//#endregion
|
|
5282
5282
|
//#region lib/typert.remote-client.js
|
|
5283
|
-
|
|
5284
|
-
const
|
|
5285
|
-
|
|
5286
|
-
const
|
|
5287
|
-
|
|
5288
|
-
const
|
|
5289
|
-
|
|
5290
|
-
const
|
|
5291
|
-
|
|
5292
|
-
const
|
|
5283
|
+
let _houser_edus_plugin_edus_applyVersion_parameter_0$schema$value;
|
|
5284
|
+
const _houser_edus_plugin_edus_applyVersion_parameter_0$schema = () => _houser_edus_plugin_edus_applyVersion_parameter_0$schema$value ??= string();
|
|
5285
|
+
let _houser_edus_plugin_edus_applyVersion_parameter_1$schema$value;
|
|
5286
|
+
const _houser_edus_plugin_edus_applyVersion_parameter_1$schema = () => _houser_edus_plugin_edus_applyVersion_parameter_1$schema$value ??= string();
|
|
5287
|
+
let _houser_edus_plugin_edus_applyVersion_parameter_2$schema$value;
|
|
5288
|
+
const _houser_edus_plugin_edus_applyVersion_parameter_2$schema = () => _houser_edus_plugin_edus_applyVersion_parameter_2$schema$value ??= string();
|
|
5289
|
+
let _houser_edus_plugin_edus_applyVersion_parameter_3$schema$value;
|
|
5290
|
+
const _houser_edus_plugin_edus_applyVersion_parameter_3$schema = () => _houser_edus_plugin_edus_applyVersion_parameter_3$schema$value ??= string();
|
|
5291
|
+
let _houser_edus_plugin_edus_applyVersion_result$schema$value;
|
|
5292
|
+
const _houser_edus_plugin_edus_applyVersion_result$schema = () => _houser_edus_plugin_edus_applyVersion_result$schema$value ??= string();
|
|
5293
|
+
let _houser_edus_plugin_edus_htmlList_parameter_0$schema$value;
|
|
5294
|
+
const _houser_edus_plugin_edus_htmlList_parameter_0$schema = () => _houser_edus_plugin_edus_htmlList_parameter_0$schema$value ??= string();
|
|
5295
|
+
let _houser_edus_plugin_edus_htmlList_parameter_1$schema$value;
|
|
5296
|
+
const _houser_edus_plugin_edus_htmlList_parameter_1$schema = () => _houser_edus_plugin_edus_htmlList_parameter_1$schema$value ??= number();
|
|
5297
|
+
let _houser_edus_plugin_edus_htmlList_parameter_2$schema$value;
|
|
5298
|
+
const _houser_edus_plugin_edus_htmlList_parameter_2$schema = () => _houser_edus_plugin_edus_htmlList_parameter_2$schema$value ??= number();
|
|
5299
|
+
let _houser_edus_plugin_edus_htmlList_parameter_3$schema$value;
|
|
5300
|
+
const _houser_edus_plugin_edus_htmlList_parameter_3$schema = () => _houser_edus_plugin_edus_htmlList_parameter_3$schema$value ??= union([_undefined(), string()]);
|
|
5301
|
+
let _houser_edus_plugin_edus_htmlList_result$schema$value;
|
|
5302
|
+
const _houser_edus_plugin_edus_htmlList_result$schema = () => _houser_edus_plugin_edus_htmlList_result$schema$value ??= object({
|
|
5293
5303
|
"list": array(object({
|
|
5294
5304
|
"id": string().readonly(),
|
|
5295
5305
|
"title": string().readonly(),
|
|
@@ -5306,24 +5316,38 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5306
5316
|
"page": number().readonly(),
|
|
5307
5317
|
"size": number().readonly()
|
|
5308
5318
|
});
|
|
5309
|
-
|
|
5310
|
-
const
|
|
5311
|
-
|
|
5312
|
-
const
|
|
5313
|
-
|
|
5314
|
-
const
|
|
5315
|
-
|
|
5316
|
-
const
|
|
5317
|
-
|
|
5318
|
-
const
|
|
5319
|
-
|
|
5320
|
-
const
|
|
5319
|
+
let _houser_edus_plugin_edus_htmlShare_parameter_0$schema$value;
|
|
5320
|
+
const _houser_edus_plugin_edus_htmlShare_parameter_0$schema = () => _houser_edus_plugin_edus_htmlShare_parameter_0$schema$value ??= string();
|
|
5321
|
+
let _houser_edus_plugin_edus_htmlShare_parameter_1$schema$value;
|
|
5322
|
+
const _houser_edus_plugin_edus_htmlShare_parameter_1$schema = () => _houser_edus_plugin_edus_htmlShare_parameter_1$schema$value ??= string();
|
|
5323
|
+
let _houser_edus_plugin_edus_htmlShare_result$schema$value;
|
|
5324
|
+
const _houser_edus_plugin_edus_htmlShare_result$schema = () => _houser_edus_plugin_edus_htmlShare_result$schema$value ??= string();
|
|
5325
|
+
let _houser_edus_plugin_edus_htmlVersionDelete_parameter_0$schema$value;
|
|
5326
|
+
const _houser_edus_plugin_edus_htmlVersionDelete_parameter_0$schema = () => _houser_edus_plugin_edus_htmlVersionDelete_parameter_0$schema$value ??= string();
|
|
5327
|
+
let _houser_edus_plugin_edus_htmlVersionDelete_parameter_1$schema$value;
|
|
5328
|
+
const _houser_edus_plugin_edus_htmlVersionDelete_parameter_1$schema = () => _houser_edus_plugin_edus_htmlVersionDelete_parameter_1$schema$value ??= string();
|
|
5329
|
+
let _houser_edus_plugin_edus_htmlVersionDelete_result$schema$value;
|
|
5330
|
+
const _houser_edus_plugin_edus_htmlVersionDelete_result$schema = () => _houser_edus_plugin_edus_htmlVersionDelete_result$schema$value ??= _void();
|
|
5331
|
+
let _houser_edus_plugin_edus_htmlVersionDetail_parameter_0$schema$value;
|
|
5332
|
+
const _houser_edus_plugin_edus_htmlVersionDetail_parameter_0$schema = () => _houser_edus_plugin_edus_htmlVersionDetail_parameter_0$schema$value ??= string();
|
|
5333
|
+
let _houser_edus_plugin_edus_htmlVersionDetail_parameter_1$schema$value;
|
|
5334
|
+
const _houser_edus_plugin_edus_htmlVersionDetail_parameter_1$schema = () => _houser_edus_plugin_edus_htmlVersionDetail_parameter_1$schema$value ??= string();
|
|
5335
|
+
let _houser_edus_plugin_edus_htmlVersionDetail_result$schema$value;
|
|
5336
|
+
const _houser_edus_plugin_edus_htmlVersionDetail_result$schema = () => _houser_edus_plugin_edus_htmlVersionDetail_result$schema$value ??= string();
|
|
5337
|
+
let _houser_edus_plugin_edus_htmlVersions_parameter_0$schema$value;
|
|
5338
|
+
const _houser_edus_plugin_edus_htmlVersions_parameter_0$schema = () => _houser_edus_plugin_edus_htmlVersions_parameter_0$schema$value ??= string();
|
|
5339
|
+
let _houser_edus_plugin_edus_htmlVersions_parameter_1$schema$value;
|
|
5340
|
+
const _houser_edus_plugin_edus_htmlVersions_parameter_1$schema = () => _houser_edus_plugin_edus_htmlVersions_parameter_1$schema$value ??= string();
|
|
5341
|
+
let _houser_edus_plugin_edus_htmlVersions_result$schema$value;
|
|
5342
|
+
const _houser_edus_plugin_edus_htmlVersions_result$schema = () => _houser_edus_plugin_edus_htmlVersions_result$schema$value ??= array(object({
|
|
5321
5343
|
"id": string().readonly(),
|
|
5322
5344
|
"status": number().readonly(),
|
|
5323
5345
|
"createdAt": string().readonly()
|
|
5324
5346
|
}));
|
|
5325
|
-
|
|
5326
|
-
const
|
|
5347
|
+
let _houser_edus_plugin_edus_listHtmlFiles_parameter_0$schema$value;
|
|
5348
|
+
const _houser_edus_plugin_edus_listHtmlFiles_parameter_0$schema = () => _houser_edus_plugin_edus_listHtmlFiles_parameter_0$schema$value ??= string();
|
|
5349
|
+
let _houser_edus_plugin_edus_listHtmlFiles_result$schema$value;
|
|
5350
|
+
const _houser_edus_plugin_edus_listHtmlFiles_result$schema = () => _houser_edus_plugin_edus_listHtmlFiles_result$schema$value ??= object({
|
|
5327
5351
|
"files": array(object({
|
|
5328
5352
|
"path": string().readonly(),
|
|
5329
5353
|
"name": string().readonly(),
|
|
@@ -5332,9 +5356,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5332
5356
|
})).readonly(),
|
|
5333
5357
|
"truncated": boolean().readonly()
|
|
5334
5358
|
});
|
|
5335
|
-
|
|
5336
|
-
const
|
|
5337
|
-
|
|
5359
|
+
let _houser_edus_plugin_edus_login_parameter_0$schema$value;
|
|
5360
|
+
const _houser_edus_plugin_edus_login_parameter_0$schema = () => _houser_edus_plugin_edus_login_parameter_0$schema$value ??= string();
|
|
5361
|
+
let _houser_edus_plugin_edus_login_parameter_1$schema$value;
|
|
5362
|
+
const _houser_edus_plugin_edus_login_parameter_1$schema = () => _houser_edus_plugin_edus_login_parameter_1$schema$value ??= string();
|
|
5363
|
+
let _houser_edus_plugin_edus_login_result$schema$value;
|
|
5364
|
+
const _houser_edus_plugin_edus_login_result$schema = () => _houser_edus_plugin_edus_login_result$schema$value ??= object({
|
|
5338
5365
|
"id": string().readonly(),
|
|
5339
5366
|
"phone": string().readonly(),
|
|
5340
5367
|
"token": string().readonly(),
|
|
@@ -5343,9 +5370,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5343
5370
|
"title": string().readonly(),
|
|
5344
5371
|
"vipLevel": number().readonly()
|
|
5345
5372
|
});
|
|
5346
|
-
|
|
5347
|
-
const
|
|
5348
|
-
|
|
5373
|
+
let _houser_edus_plugin_edus_loginByPhone_parameter_0$schema$value;
|
|
5374
|
+
const _houser_edus_plugin_edus_loginByPhone_parameter_0$schema = () => _houser_edus_plugin_edus_loginByPhone_parameter_0$schema$value ??= string();
|
|
5375
|
+
let _houser_edus_plugin_edus_loginByPhone_parameter_1$schema$value;
|
|
5376
|
+
const _houser_edus_plugin_edus_loginByPhone_parameter_1$schema = () => _houser_edus_plugin_edus_loginByPhone_parameter_1$schema$value ??= string();
|
|
5377
|
+
let _houser_edus_plugin_edus_loginByPhone_result$schema$value;
|
|
5378
|
+
const _houser_edus_plugin_edus_loginByPhone_result$schema = () => _houser_edus_plugin_edus_loginByPhone_result$schema$value ??= object({
|
|
5349
5379
|
"id": string().readonly(),
|
|
5350
5380
|
"phone": string().readonly(),
|
|
5351
5381
|
"token": string().readonly(),
|
|
@@ -5354,8 +5384,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5354
5384
|
"title": string().readonly(),
|
|
5355
5385
|
"vipLevel": number().readonly()
|
|
5356
5386
|
});
|
|
5357
|
-
|
|
5358
|
-
const
|
|
5387
|
+
let _houser_edus_plugin_edus_loginInfo_parameter_0$schema$value;
|
|
5388
|
+
const _houser_edus_plugin_edus_loginInfo_parameter_0$schema = () => _houser_edus_plugin_edus_loginInfo_parameter_0$schema$value ??= string();
|
|
5389
|
+
let _houser_edus_plugin_edus_loginInfo_result$schema$value;
|
|
5390
|
+
const _houser_edus_plugin_edus_loginInfo_result$schema = () => _houser_edus_plugin_edus_loginInfo_result$schema$value ??= object({
|
|
5359
5391
|
"id": string().readonly(),
|
|
5360
5392
|
"phone": string().readonly(),
|
|
5361
5393
|
"token": string().readonly(),
|
|
@@ -5364,34 +5396,52 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5364
5396
|
"title": string().readonly(),
|
|
5365
5397
|
"vipLevel": number().readonly()
|
|
5366
5398
|
});
|
|
5367
|
-
|
|
5368
|
-
const
|
|
5369
|
-
|
|
5370
|
-
const
|
|
5371
|
-
|
|
5372
|
-
const
|
|
5399
|
+
let _houser_edus_plugin_edus_publishFile_parameter_0$schema$value;
|
|
5400
|
+
const _houser_edus_plugin_edus_publishFile_parameter_0$schema = () => _houser_edus_plugin_edus_publishFile_parameter_0$schema$value ??= string();
|
|
5401
|
+
let _houser_edus_plugin_edus_publishFile_parameter_1$schema$value;
|
|
5402
|
+
const _houser_edus_plugin_edus_publishFile_parameter_1$schema = () => _houser_edus_plugin_edus_publishFile_parameter_1$schema$value ??= string();
|
|
5403
|
+
let _houser_edus_plugin_edus_publishFile_parameter_2$schema$value;
|
|
5404
|
+
const _houser_edus_plugin_edus_publishFile_parameter_2$schema = () => _houser_edus_plugin_edus_publishFile_parameter_2$schema$value ??= string();
|
|
5405
|
+
let _houser_edus_plugin_edus_publishFile_parameter_3$schema$value;
|
|
5406
|
+
const _houser_edus_plugin_edus_publishFile_parameter_3$schema = () => _houser_edus_plugin_edus_publishFile_parameter_3$schema$value ??= string();
|
|
5407
|
+
let _houser_edus_plugin_edus_publishFile_parameter_4$schema$value;
|
|
5408
|
+
const _houser_edus_plugin_edus_publishFile_parameter_4$schema = () => _houser_edus_plugin_edus_publishFile_parameter_4$schema$value ??= union([_undefined(), string()]);
|
|
5409
|
+
let _houser_edus_plugin_edus_publishFile_parameter_5$schema$value;
|
|
5410
|
+
const _houser_edus_plugin_edus_publishFile_parameter_5$schema = () => _houser_edus_plugin_edus_publishFile_parameter_5$schema$value ??= union([
|
|
5373
5411
|
_undefined(),
|
|
5374
5412
|
literal(false),
|
|
5375
5413
|
literal(true)
|
|
5376
5414
|
]);
|
|
5377
|
-
|
|
5415
|
+
let _houser_edus_plugin_edus_publishFile_result$schema$value;
|
|
5416
|
+
const _houser_edus_plugin_edus_publishFile_result$schema = () => _houser_edus_plugin_edus_publishFile_result$schema$value ??= object({
|
|
5378
5417
|
"id": string().readonly(),
|
|
5379
5418
|
"content": union([literal(null), string()]).readonly(),
|
|
5380
5419
|
"unchanged": boolean().readonly(),
|
|
5381
5420
|
"reassigned": boolean().readonly(),
|
|
5382
5421
|
"shareUrl": union([literal(null), string()]).readonly()
|
|
5383
5422
|
});
|
|
5384
|
-
|
|
5385
|
-
const
|
|
5386
|
-
|
|
5387
|
-
const
|
|
5388
|
-
|
|
5389
|
-
const
|
|
5390
|
-
|
|
5391
|
-
const
|
|
5392
|
-
|
|
5393
|
-
const
|
|
5394
|
-
|
|
5423
|
+
let _houser_edus_plugin_edus_readHtmlFile_parameter_0$schema$value;
|
|
5424
|
+
const _houser_edus_plugin_edus_readHtmlFile_parameter_0$schema = () => _houser_edus_plugin_edus_readHtmlFile_parameter_0$schema$value ??= string();
|
|
5425
|
+
let _houser_edus_plugin_edus_readHtmlFile_parameter_1$schema$value;
|
|
5426
|
+
const _houser_edus_plugin_edus_readHtmlFile_parameter_1$schema = () => _houser_edus_plugin_edus_readHtmlFile_parameter_1$schema$value ??= string();
|
|
5427
|
+
let _houser_edus_plugin_edus_readHtmlFile_result$schema$value;
|
|
5428
|
+
const _houser_edus_plugin_edus_readHtmlFile_result$schema = () => _houser_edus_plugin_edus_readHtmlFile_result$schema$value ??= string();
|
|
5429
|
+
let _houser_edus_plugin_edus_sendPhoneCode_parameter_0$schema$value;
|
|
5430
|
+
const _houser_edus_plugin_edus_sendPhoneCode_parameter_0$schema = () => _houser_edus_plugin_edus_sendPhoneCode_parameter_0$schema$value ??= string();
|
|
5431
|
+
let _houser_edus_plugin_edus_sendPhoneCode_parameter_1$schema$value;
|
|
5432
|
+
const _houser_edus_plugin_edus_sendPhoneCode_parameter_1$schema = () => _houser_edus_plugin_edus_sendPhoneCode_parameter_1$schema$value ??= string();
|
|
5433
|
+
let _houser_edus_plugin_edus_sendPhoneCode_result$schema$value;
|
|
5434
|
+
const _houser_edus_plugin_edus_sendPhoneCode_result$schema = () => _houser_edus_plugin_edus_sendPhoneCode_result$schema$value ??= _void();
|
|
5435
|
+
let _houser_edus_plugin_edus_shareOrigin_result$schema$value;
|
|
5436
|
+
const _houser_edus_plugin_edus_shareOrigin_result$schema = () => _houser_edus_plugin_edus_shareOrigin_result$schema$value ??= string();
|
|
5437
|
+
let _houser_edus_plugin_edus_writeHtmlFile_parameter_0$schema$value;
|
|
5438
|
+
const _houser_edus_plugin_edus_writeHtmlFile_parameter_0$schema = () => _houser_edus_plugin_edus_writeHtmlFile_parameter_0$schema$value ??= string();
|
|
5439
|
+
let _houser_edus_plugin_edus_writeHtmlFile_parameter_1$schema$value;
|
|
5440
|
+
const _houser_edus_plugin_edus_writeHtmlFile_parameter_1$schema = () => _houser_edus_plugin_edus_writeHtmlFile_parameter_1$schema$value ??= string();
|
|
5441
|
+
let _houser_edus_plugin_edus_writeHtmlFile_parameter_2$schema$value;
|
|
5442
|
+
const _houser_edus_plugin_edus_writeHtmlFile_parameter_2$schema = () => _houser_edus_plugin_edus_writeHtmlFile_parameter_2$schema$value ??= string();
|
|
5443
|
+
let _houser_edus_plugin_edus_writeHtmlFile_result$schema$value;
|
|
5444
|
+
const _houser_edus_plugin_edus_writeHtmlFile_result$schema = () => _houser_edus_plugin_edus_writeHtmlFile_result$schema$value ??= _void();
|
|
5395
5445
|
const TYPERT_REMOTE = {
|
|
5396
5446
|
package: "@houser/edus-plugin",
|
|
5397
5447
|
descriptors: [
|
|
@@ -5409,7 +5459,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5409
5459
|
codec: {
|
|
5410
5460
|
mode: "strict",
|
|
5411
5461
|
typeSymbol: "@houser/edus-plugin#edus/applyVersion:token",
|
|
5412
|
-
|
|
5462
|
+
create: _houser_edus_plugin_edus_applyVersion_parameter_0$schema
|
|
5413
5463
|
}
|
|
5414
5464
|
},
|
|
5415
5465
|
{
|
|
@@ -5419,7 +5469,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5419
5469
|
codec: {
|
|
5420
5470
|
mode: "strict",
|
|
5421
5471
|
typeSymbol: "@houser/edus-plugin#edus/applyVersion:sessionId",
|
|
5422
|
-
|
|
5472
|
+
create: _houser_edus_plugin_edus_applyVersion_parameter_1$schema
|
|
5423
5473
|
}
|
|
5424
5474
|
},
|
|
5425
5475
|
{
|
|
@@ -5429,7 +5479,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5429
5479
|
codec: {
|
|
5430
5480
|
mode: "strict",
|
|
5431
5481
|
typeSymbol: "@houser/edus-plugin#edus/applyVersion:path",
|
|
5432
|
-
|
|
5482
|
+
create: _houser_edus_plugin_edus_applyVersion_parameter_2$schema
|
|
5433
5483
|
}
|
|
5434
5484
|
},
|
|
5435
5485
|
{
|
|
@@ -5439,14 +5489,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5439
5489
|
codec: {
|
|
5440
5490
|
mode: "strict",
|
|
5441
5491
|
typeSymbol: "@houser/edus-plugin#edus/applyVersion:id",
|
|
5442
|
-
|
|
5492
|
+
create: _houser_edus_plugin_edus_applyVersion_parameter_3$schema
|
|
5443
5493
|
}
|
|
5444
5494
|
}
|
|
5445
5495
|
],
|
|
5446
5496
|
result: {
|
|
5447
5497
|
mode: "strict",
|
|
5448
5498
|
typeSymbol: "@houser/edus-plugin#edus/applyVersion:result",
|
|
5449
|
-
|
|
5499
|
+
create: _houser_edus_plugin_edus_applyVersion_result$schema
|
|
5450
5500
|
},
|
|
5451
5501
|
sourceLocation: {
|
|
5452
5502
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -5468,7 +5518,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5468
5518
|
codec: {
|
|
5469
5519
|
mode: "strict",
|
|
5470
5520
|
typeSymbol: "@houser/edus-plugin#edus/htmlList:token",
|
|
5471
|
-
|
|
5521
|
+
create: _houser_edus_plugin_edus_htmlList_parameter_0$schema
|
|
5472
5522
|
}
|
|
5473
5523
|
},
|
|
5474
5524
|
{
|
|
@@ -5478,7 +5528,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5478
5528
|
codec: {
|
|
5479
5529
|
mode: "strict",
|
|
5480
5530
|
typeSymbol: "@houser/edus-plugin#edus/htmlList:page",
|
|
5481
|
-
|
|
5531
|
+
create: _houser_edus_plugin_edus_htmlList_parameter_1$schema
|
|
5482
5532
|
}
|
|
5483
5533
|
},
|
|
5484
5534
|
{
|
|
@@ -5488,7 +5538,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5488
5538
|
codec: {
|
|
5489
5539
|
mode: "strict",
|
|
5490
5540
|
typeSymbol: "@houser/edus-plugin#edus/htmlList:size",
|
|
5491
|
-
|
|
5541
|
+
create: _houser_edus_plugin_edus_htmlList_parameter_2$schema
|
|
5492
5542
|
}
|
|
5493
5543
|
},
|
|
5494
5544
|
{
|
|
@@ -5499,14 +5549,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5499
5549
|
codec: {
|
|
5500
5550
|
mode: "strict",
|
|
5501
5551
|
typeSymbol: "@houser/edus-plugin#edus/htmlList:search",
|
|
5502
|
-
|
|
5552
|
+
create: _houser_edus_plugin_edus_htmlList_parameter_3$schema
|
|
5503
5553
|
}
|
|
5504
5554
|
}
|
|
5505
5555
|
],
|
|
5506
5556
|
result: {
|
|
5507
5557
|
mode: "strict",
|
|
5508
5558
|
typeSymbol: "@houser/edus-plugin/types#EdusWorkListResult",
|
|
5509
|
-
|
|
5559
|
+
create: _houser_edus_plugin_edus_htmlList_result$schema
|
|
5510
5560
|
},
|
|
5511
5561
|
sourceLocation: {
|
|
5512
5562
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -5527,7 +5577,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5527
5577
|
codec: {
|
|
5528
5578
|
mode: "strict",
|
|
5529
5579
|
typeSymbol: "@houser/edus-plugin#edus/htmlShare:token",
|
|
5530
|
-
|
|
5580
|
+
create: _houser_edus_plugin_edus_htmlShare_parameter_0$schema
|
|
5531
5581
|
}
|
|
5532
5582
|
}, {
|
|
5533
5583
|
name: "id",
|
|
@@ -5536,13 +5586,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5536
5586
|
codec: {
|
|
5537
5587
|
mode: "strict",
|
|
5538
5588
|
typeSymbol: "@houser/edus-plugin#edus/htmlShare:id",
|
|
5539
|
-
|
|
5589
|
+
create: _houser_edus_plugin_edus_htmlShare_parameter_1$schema
|
|
5540
5590
|
}
|
|
5541
5591
|
}],
|
|
5542
5592
|
result: {
|
|
5543
5593
|
mode: "strict",
|
|
5544
5594
|
typeSymbol: "@houser/edus-plugin#edus/htmlShare:result",
|
|
5545
|
-
|
|
5595
|
+
create: _houser_edus_plugin_edus_htmlShare_result$schema
|
|
5546
5596
|
},
|
|
5547
5597
|
sourceLocation: {
|
|
5548
5598
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -5563,7 +5613,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5563
5613
|
codec: {
|
|
5564
5614
|
mode: "strict",
|
|
5565
5615
|
typeSymbol: "@houser/edus-plugin#edus/htmlVersionDelete:token",
|
|
5566
|
-
|
|
5616
|
+
create: _houser_edus_plugin_edus_htmlVersionDelete_parameter_0$schema
|
|
5567
5617
|
}
|
|
5568
5618
|
}, {
|
|
5569
5619
|
name: "id",
|
|
@@ -5572,13 +5622,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5572
5622
|
codec: {
|
|
5573
5623
|
mode: "strict",
|
|
5574
5624
|
typeSymbol: "@houser/edus-plugin#edus/htmlVersionDelete:id",
|
|
5575
|
-
|
|
5625
|
+
create: _houser_edus_plugin_edus_htmlVersionDelete_parameter_1$schema
|
|
5576
5626
|
}
|
|
5577
5627
|
}],
|
|
5578
5628
|
result: {
|
|
5579
5629
|
mode: "strict",
|
|
5580
5630
|
typeSymbol: "@houser/edus-plugin#edus/htmlVersionDelete:result",
|
|
5581
|
-
|
|
5631
|
+
create: _houser_edus_plugin_edus_htmlVersionDelete_result$schema
|
|
5582
5632
|
},
|
|
5583
5633
|
sourceLocation: {
|
|
5584
5634
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -5599,7 +5649,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5599
5649
|
codec: {
|
|
5600
5650
|
mode: "strict",
|
|
5601
5651
|
typeSymbol: "@houser/edus-plugin#edus/htmlVersionDetail:token",
|
|
5602
|
-
|
|
5652
|
+
create: _houser_edus_plugin_edus_htmlVersionDetail_parameter_0$schema
|
|
5603
5653
|
}
|
|
5604
5654
|
}, {
|
|
5605
5655
|
name: "id",
|
|
@@ -5608,13 +5658,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5608
5658
|
codec: {
|
|
5609
5659
|
mode: "strict",
|
|
5610
5660
|
typeSymbol: "@houser/edus-plugin#edus/htmlVersionDetail:id",
|
|
5611
|
-
|
|
5661
|
+
create: _houser_edus_plugin_edus_htmlVersionDetail_parameter_1$schema
|
|
5612
5662
|
}
|
|
5613
5663
|
}],
|
|
5614
5664
|
result: {
|
|
5615
5665
|
mode: "strict",
|
|
5616
5666
|
typeSymbol: "@houser/edus-plugin#edus/htmlVersionDetail:result",
|
|
5617
|
-
|
|
5667
|
+
create: _houser_edus_plugin_edus_htmlVersionDetail_result$schema
|
|
5618
5668
|
},
|
|
5619
5669
|
sourceLocation: {
|
|
5620
5670
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -5635,7 +5685,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5635
5685
|
codec: {
|
|
5636
5686
|
mode: "strict",
|
|
5637
5687
|
typeSymbol: "@houser/edus-plugin#edus/htmlVersions:token",
|
|
5638
|
-
|
|
5688
|
+
create: _houser_edus_plugin_edus_htmlVersions_parameter_0$schema
|
|
5639
5689
|
}
|
|
5640
5690
|
}, {
|
|
5641
5691
|
name: "htmlId",
|
|
@@ -5644,13 +5694,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5644
5694
|
codec: {
|
|
5645
5695
|
mode: "strict",
|
|
5646
5696
|
typeSymbol: "@houser/edus-plugin#edus/htmlVersions:htmlId",
|
|
5647
|
-
|
|
5697
|
+
create: _houser_edus_plugin_edus_htmlVersions_parameter_1$schema
|
|
5648
5698
|
}
|
|
5649
5699
|
}],
|
|
5650
5700
|
result: {
|
|
5651
5701
|
mode: "strict",
|
|
5652
5702
|
typeSymbol: "@houser/edus-plugin#edus/htmlVersions:result",
|
|
5653
|
-
|
|
5703
|
+
create: _houser_edus_plugin_edus_htmlVersions_result$schema
|
|
5654
5704
|
},
|
|
5655
5705
|
sourceLocation: {
|
|
5656
5706
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -5671,13 +5721,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5671
5721
|
codec: {
|
|
5672
5722
|
mode: "strict",
|
|
5673
5723
|
typeSymbol: "@houser/edus-plugin#edus/listHtmlFiles:sessionId",
|
|
5674
|
-
|
|
5724
|
+
create: _houser_edus_plugin_edus_listHtmlFiles_parameter_0$schema
|
|
5675
5725
|
}
|
|
5676
5726
|
}],
|
|
5677
5727
|
result: {
|
|
5678
5728
|
mode: "strict",
|
|
5679
5729
|
typeSymbol: "@houser/edus-plugin/types#EdusHtmlFileListResult",
|
|
5680
|
-
|
|
5730
|
+
create: _houser_edus_plugin_edus_listHtmlFiles_result$schema
|
|
5681
5731
|
},
|
|
5682
5732
|
sourceLocation: {
|
|
5683
5733
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -5698,7 +5748,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5698
5748
|
codec: {
|
|
5699
5749
|
mode: "strict",
|
|
5700
5750
|
typeSymbol: "@houser/edus-plugin#edus/login:phone",
|
|
5701
|
-
|
|
5751
|
+
create: _houser_edus_plugin_edus_login_parameter_0$schema
|
|
5702
5752
|
}
|
|
5703
5753
|
}, {
|
|
5704
5754
|
name: "password",
|
|
@@ -5707,13 +5757,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5707
5757
|
codec: {
|
|
5708
5758
|
mode: "strict",
|
|
5709
5759
|
typeSymbol: "@houser/edus-plugin#edus/login:password",
|
|
5710
|
-
|
|
5760
|
+
create: _houser_edus_plugin_edus_login_parameter_1$schema
|
|
5711
5761
|
}
|
|
5712
5762
|
}],
|
|
5713
5763
|
result: {
|
|
5714
5764
|
mode: "strict",
|
|
5715
5765
|
typeSymbol: "@houser/edus-plugin/types#EdusLoginResult",
|
|
5716
|
-
|
|
5766
|
+
create: _houser_edus_plugin_edus_login_result$schema
|
|
5717
5767
|
},
|
|
5718
5768
|
sourceLocation: {
|
|
5719
5769
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -5734,7 +5784,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5734
5784
|
codec: {
|
|
5735
5785
|
mode: "strict",
|
|
5736
5786
|
typeSymbol: "@houser/edus-plugin#edus/loginByPhone:phone",
|
|
5737
|
-
|
|
5787
|
+
create: _houser_edus_plugin_edus_loginByPhone_parameter_0$schema
|
|
5738
5788
|
}
|
|
5739
5789
|
}, {
|
|
5740
5790
|
name: "code",
|
|
@@ -5743,13 +5793,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5743
5793
|
codec: {
|
|
5744
5794
|
mode: "strict",
|
|
5745
5795
|
typeSymbol: "@houser/edus-plugin#edus/loginByPhone:code",
|
|
5746
|
-
|
|
5796
|
+
create: _houser_edus_plugin_edus_loginByPhone_parameter_1$schema
|
|
5747
5797
|
}
|
|
5748
5798
|
}],
|
|
5749
5799
|
result: {
|
|
5750
5800
|
mode: "strict",
|
|
5751
5801
|
typeSymbol: "@houser/edus-plugin/types#EdusLoginResult",
|
|
5752
|
-
|
|
5802
|
+
create: _houser_edus_plugin_edus_loginByPhone_result$schema
|
|
5753
5803
|
},
|
|
5754
5804
|
sourceLocation: {
|
|
5755
5805
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -5770,13 +5820,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5770
5820
|
codec: {
|
|
5771
5821
|
mode: "strict",
|
|
5772
5822
|
typeSymbol: "@houser/edus-plugin#edus/loginInfo:token",
|
|
5773
|
-
|
|
5823
|
+
create: _houser_edus_plugin_edus_loginInfo_parameter_0$schema
|
|
5774
5824
|
}
|
|
5775
5825
|
}],
|
|
5776
5826
|
result: {
|
|
5777
5827
|
mode: "strict",
|
|
5778
5828
|
typeSymbol: "@houser/edus-plugin/types#EdusLoginResult",
|
|
5779
|
-
|
|
5829
|
+
create: _houser_edus_plugin_edus_loginInfo_result$schema
|
|
5780
5830
|
},
|
|
5781
5831
|
sourceLocation: {
|
|
5782
5832
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -5798,7 +5848,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5798
5848
|
codec: {
|
|
5799
5849
|
mode: "strict",
|
|
5800
5850
|
typeSymbol: "@houser/edus-plugin#edus/publishFile:token",
|
|
5801
|
-
|
|
5851
|
+
create: _houser_edus_plugin_edus_publishFile_parameter_0$schema
|
|
5802
5852
|
}
|
|
5803
5853
|
},
|
|
5804
5854
|
{
|
|
@@ -5808,7 +5858,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5808
5858
|
codec: {
|
|
5809
5859
|
mode: "strict",
|
|
5810
5860
|
typeSymbol: "@houser/edus-plugin#edus/publishFile:sessionId",
|
|
5811
|
-
|
|
5861
|
+
create: _houser_edus_plugin_edus_publishFile_parameter_1$schema
|
|
5812
5862
|
}
|
|
5813
5863
|
},
|
|
5814
5864
|
{
|
|
@@ -5818,7 +5868,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5818
5868
|
codec: {
|
|
5819
5869
|
mode: "strict",
|
|
5820
5870
|
typeSymbol: "@houser/edus-plugin#edus/publishFile:path",
|
|
5821
|
-
|
|
5871
|
+
create: _houser_edus_plugin_edus_publishFile_parameter_2$schema
|
|
5822
5872
|
}
|
|
5823
5873
|
},
|
|
5824
5874
|
{
|
|
@@ -5828,7 +5878,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5828
5878
|
codec: {
|
|
5829
5879
|
mode: "strict",
|
|
5830
5880
|
typeSymbol: "@houser/edus-plugin#edus/publishFile:account",
|
|
5831
|
-
|
|
5881
|
+
create: _houser_edus_plugin_edus_publishFile_parameter_3$schema
|
|
5832
5882
|
}
|
|
5833
5883
|
},
|
|
5834
5884
|
{
|
|
@@ -5839,7 +5889,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5839
5889
|
codec: {
|
|
5840
5890
|
mode: "strict",
|
|
5841
5891
|
typeSymbol: "@houser/edus-plugin#edus/publishFile:title",
|
|
5842
|
-
|
|
5892
|
+
create: _houser_edus_plugin_edus_publishFile_parameter_4$schema
|
|
5843
5893
|
}
|
|
5844
5894
|
},
|
|
5845
5895
|
{
|
|
@@ -5850,14 +5900,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5850
5900
|
codec: {
|
|
5851
5901
|
mode: "strict",
|
|
5852
5902
|
typeSymbol: "@houser/edus-plugin#edus/publishFile:createNew",
|
|
5853
|
-
|
|
5903
|
+
create: _houser_edus_plugin_edus_publishFile_parameter_5$schema
|
|
5854
5904
|
}
|
|
5855
5905
|
}
|
|
5856
5906
|
],
|
|
5857
5907
|
result: {
|
|
5858
5908
|
mode: "strict",
|
|
5859
5909
|
typeSymbol: "@houser/edus-plugin/types#EdusPublishResult",
|
|
5860
|
-
|
|
5910
|
+
create: _houser_edus_plugin_edus_publishFile_result$schema
|
|
5861
5911
|
},
|
|
5862
5912
|
sourceLocation: {
|
|
5863
5913
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -5878,7 +5928,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5878
5928
|
codec: {
|
|
5879
5929
|
mode: "strict",
|
|
5880
5930
|
typeSymbol: "@houser/edus-plugin#edus/readHtmlFile:sessionId",
|
|
5881
|
-
|
|
5931
|
+
create: _houser_edus_plugin_edus_readHtmlFile_parameter_0$schema
|
|
5882
5932
|
}
|
|
5883
5933
|
}, {
|
|
5884
5934
|
name: "path",
|
|
@@ -5887,13 +5937,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5887
5937
|
codec: {
|
|
5888
5938
|
mode: "strict",
|
|
5889
5939
|
typeSymbol: "@houser/edus-plugin#edus/readHtmlFile:path",
|
|
5890
|
-
|
|
5940
|
+
create: _houser_edus_plugin_edus_readHtmlFile_parameter_1$schema
|
|
5891
5941
|
}
|
|
5892
5942
|
}],
|
|
5893
5943
|
result: {
|
|
5894
5944
|
mode: "strict",
|
|
5895
5945
|
typeSymbol: "@houser/edus-plugin#edus/readHtmlFile:result",
|
|
5896
|
-
|
|
5946
|
+
create: _houser_edus_plugin_edus_readHtmlFile_result$schema
|
|
5897
5947
|
},
|
|
5898
5948
|
sourceLocation: {
|
|
5899
5949
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -5914,7 +5964,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5914
5964
|
codec: {
|
|
5915
5965
|
mode: "strict",
|
|
5916
5966
|
typeSymbol: "@houser/edus-plugin#edus/sendPhoneCode:phone",
|
|
5917
|
-
|
|
5967
|
+
create: _houser_edus_plugin_edus_sendPhoneCode_parameter_0$schema
|
|
5918
5968
|
}
|
|
5919
5969
|
}, {
|
|
5920
5970
|
name: "captcha",
|
|
@@ -5923,13 +5973,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5923
5973
|
codec: {
|
|
5924
5974
|
mode: "strict",
|
|
5925
5975
|
typeSymbol: "@houser/edus-plugin#edus/sendPhoneCode:captcha",
|
|
5926
|
-
|
|
5976
|
+
create: _houser_edus_plugin_edus_sendPhoneCode_parameter_1$schema
|
|
5927
5977
|
}
|
|
5928
5978
|
}],
|
|
5929
5979
|
result: {
|
|
5930
5980
|
mode: "strict",
|
|
5931
5981
|
typeSymbol: "@houser/edus-plugin#edus/sendPhoneCode:result",
|
|
5932
|
-
|
|
5982
|
+
create: _houser_edus_plugin_edus_sendPhoneCode_result$schema
|
|
5933
5983
|
},
|
|
5934
5984
|
sourceLocation: {
|
|
5935
5985
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -5947,7 +5997,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5947
5997
|
result: {
|
|
5948
5998
|
mode: "strict",
|
|
5949
5999
|
typeSymbol: "@houser/edus-plugin#edus/shareOrigin:result",
|
|
5950
|
-
|
|
6000
|
+
create: _houser_edus_plugin_edus_shareOrigin_result$schema
|
|
5951
6001
|
},
|
|
5952
6002
|
sourceLocation: {
|
|
5953
6003
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -5969,7 +6019,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5969
6019
|
codec: {
|
|
5970
6020
|
mode: "strict",
|
|
5971
6021
|
typeSymbol: "@houser/edus-plugin#edus/writeHtmlFile:sessionId",
|
|
5972
|
-
|
|
6022
|
+
create: _houser_edus_plugin_edus_writeHtmlFile_parameter_0$schema
|
|
5973
6023
|
}
|
|
5974
6024
|
},
|
|
5975
6025
|
{
|
|
@@ -5979,7 +6029,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5979
6029
|
codec: {
|
|
5980
6030
|
mode: "strict",
|
|
5981
6031
|
typeSymbol: "@houser/edus-plugin#edus/writeHtmlFile:path",
|
|
5982
|
-
|
|
6032
|
+
create: _houser_edus_plugin_edus_writeHtmlFile_parameter_1$schema
|
|
5983
6033
|
}
|
|
5984
6034
|
},
|
|
5985
6035
|
{
|
|
@@ -5989,14 +6039,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5989
6039
|
codec: {
|
|
5990
6040
|
mode: "strict",
|
|
5991
6041
|
typeSymbol: "@houser/edus-plugin#edus/writeHtmlFile:content",
|
|
5992
|
-
|
|
6042
|
+
create: _houser_edus_plugin_edus_writeHtmlFile_parameter_2$schema
|
|
5993
6043
|
}
|
|
5994
6044
|
}
|
|
5995
6045
|
],
|
|
5996
6046
|
result: {
|
|
5997
6047
|
mode: "strict",
|
|
5998
6048
|
typeSymbol: "@houser/edus-plugin#edus/writeHtmlFile:result",
|
|
5999
|
-
|
|
6049
|
+
create: _houser_edus_plugin_edus_writeHtmlFile_result$schema
|
|
6000
6050
|
},
|
|
6001
6051
|
sourceLocation: {
|
|
6002
6052
|
"file": "packages/@houser/edus-plugin/src/auth.ts",
|
|
@@ -6070,6 +6120,364 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6070
6120
|
return (0, react.useSyncExternalStore)(EdusAuthStore.subscribe, EdusAuthStore.getSnapshot, () => null);
|
|
6071
6121
|
}
|
|
6072
6122
|
//#endregion
|
|
6123
|
+
//#region lib/types/client/EdusLoginPanel.js
|
|
6124
|
+
/**
|
|
6125
|
+
* 阿里云滑动验证码承载页。`clientType=iframe` 时它会把结果
|
|
6126
|
+
* `{ type: 'success' | 'close', data }` postMessage 给父窗口,
|
|
6127
|
+
* 与课成 web 端 `send-sms-code.tsx` 使用的是同一个页面。
|
|
6128
|
+
*/
|
|
6129
|
+
const CAPTCHA_ORIGIN = "https://h5.daanjiexi.com";
|
|
6130
|
+
const CAPTCHA_URL = `${CAPTCHA_ORIGIN}/aliyun_captcha_view.html?clientType=iframe`;
|
|
6131
|
+
const PHONE_PATTERN = /^1[3-9]\d{9}$/;
|
|
6132
|
+
const RESEND_SECONDS = 60;
|
|
6133
|
+
const base = {
|
|
6134
|
+
form: {
|
|
6135
|
+
display: "grid",
|
|
6136
|
+
gap: 10
|
|
6137
|
+
},
|
|
6138
|
+
field: {
|
|
6139
|
+
boxSizing: "border-box",
|
|
6140
|
+
width: "100%",
|
|
6141
|
+
border: "1px solid var(--dsw-alias-border-l2)",
|
|
6142
|
+
borderRadius: 8,
|
|
6143
|
+
padding: "10px 11px",
|
|
6144
|
+
color: "var(--dsw-alias-label-primary)",
|
|
6145
|
+
background: "var(--dsw-alias-bg-base)",
|
|
6146
|
+
font: "inherit",
|
|
6147
|
+
fontSize: 13
|
|
6148
|
+
},
|
|
6149
|
+
button: {
|
|
6150
|
+
border: "1px solid var(--dsw-alias-border-l2)",
|
|
6151
|
+
borderRadius: 6,
|
|
6152
|
+
padding: "4px 8px",
|
|
6153
|
+
background: "transparent",
|
|
6154
|
+
color: "var(--dsw-alias-label-primary)",
|
|
6155
|
+
font: "inherit",
|
|
6156
|
+
fontSize: 12,
|
|
6157
|
+
cursor: "pointer"
|
|
6158
|
+
},
|
|
6159
|
+
primary: {
|
|
6160
|
+
border: "none",
|
|
6161
|
+
borderRadius: 7,
|
|
6162
|
+
padding: "6px 11px",
|
|
6163
|
+
background: "var(--dsw-alias-button-primary-fill)",
|
|
6164
|
+
color: "var(--dsw-alias-label-primary-inverted)",
|
|
6165
|
+
font: "inherit",
|
|
6166
|
+
fontSize: 12,
|
|
6167
|
+
fontWeight: 650,
|
|
6168
|
+
cursor: "pointer"
|
|
6169
|
+
},
|
|
6170
|
+
error: {
|
|
6171
|
+
margin: 0,
|
|
6172
|
+
color: "var(--dsw-alias-state-error-primary)",
|
|
6173
|
+
fontSize: 12,
|
|
6174
|
+
lineHeight: 1.45
|
|
6175
|
+
},
|
|
6176
|
+
codeRow: {
|
|
6177
|
+
display: "flex",
|
|
6178
|
+
alignItems: "stretch",
|
|
6179
|
+
gap: 8
|
|
6180
|
+
},
|
|
6181
|
+
sendButton: {
|
|
6182
|
+
flex: "none",
|
|
6183
|
+
whiteSpace: "nowrap",
|
|
6184
|
+
border: "1px solid var(--dsw-alias-border-l2)",
|
|
6185
|
+
borderRadius: 8,
|
|
6186
|
+
padding: "0 12px",
|
|
6187
|
+
background: "transparent",
|
|
6188
|
+
color: "var(--dsw-alias-brand-primary)",
|
|
6189
|
+
font: "inherit",
|
|
6190
|
+
fontSize: 12,
|
|
6191
|
+
cursor: "pointer"
|
|
6192
|
+
},
|
|
6193
|
+
hint: {
|
|
6194
|
+
margin: 0,
|
|
6195
|
+
color: "var(--dsw-alias-label-tertiary)",
|
|
6196
|
+
fontSize: 12,
|
|
6197
|
+
lineHeight: 1.5
|
|
6198
|
+
},
|
|
6199
|
+
actions: {
|
|
6200
|
+
display: "flex",
|
|
6201
|
+
justifyContent: "flex-end",
|
|
6202
|
+
gap: 8,
|
|
6203
|
+
marginTop: 10
|
|
6204
|
+
},
|
|
6205
|
+
switchRow: {
|
|
6206
|
+
marginTop: 10,
|
|
6207
|
+
textAlign: "center"
|
|
6208
|
+
},
|
|
6209
|
+
switchLink: {
|
|
6210
|
+
border: 0,
|
|
6211
|
+
padding: 0,
|
|
6212
|
+
background: "transparent",
|
|
6213
|
+
color: "var(--dsw-alias-brand-primary)",
|
|
6214
|
+
font: "inherit",
|
|
6215
|
+
fontSize: 12,
|
|
6216
|
+
cursor: "pointer"
|
|
6217
|
+
},
|
|
6218
|
+
captchaOverlay: {
|
|
6219
|
+
position: "fixed",
|
|
6220
|
+
inset: 0,
|
|
6221
|
+
zIndex: 1300,
|
|
6222
|
+
display: "grid",
|
|
6223
|
+
placeItems: "center",
|
|
6224
|
+
background: "rgb(9 19 16 / 56%)",
|
|
6225
|
+
backdropFilter: "blur(4px)"
|
|
6226
|
+
},
|
|
6227
|
+
captchaFrame: {
|
|
6228
|
+
width: 330,
|
|
6229
|
+
height: 330,
|
|
6230
|
+
border: "1px solid var(--dsw-alias-border-l2)",
|
|
6231
|
+
borderRadius: 10,
|
|
6232
|
+
background: "#f5f5f5",
|
|
6233
|
+
boxShadow: "0 20px 60px rgb(0 0 0 / 35%)"
|
|
6234
|
+
}
|
|
6235
|
+
};
|
|
6236
|
+
function reason(error) {
|
|
6237
|
+
return error instanceof Error ? error.message : String(error);
|
|
6238
|
+
}
|
|
6239
|
+
/** 发送短信验证码:先过阿里云图形验证码,再请求后端下发短信。 */
|
|
6240
|
+
function SendSmsCode({ phone, remote, onError, onSent, style }) {
|
|
6241
|
+
const [seconds, setSeconds] = (0, react.useState)(0);
|
|
6242
|
+
const [captchaOpen, setCaptchaOpen] = (0, react.useState)(false);
|
|
6243
|
+
const [sending, setSending] = (0, react.useState)(false);
|
|
6244
|
+
const latest = (0, react.useRef)({
|
|
6245
|
+
phone,
|
|
6246
|
+
remote,
|
|
6247
|
+
onError,
|
|
6248
|
+
onSent
|
|
6249
|
+
});
|
|
6250
|
+
latest.current = {
|
|
6251
|
+
phone,
|
|
6252
|
+
remote,
|
|
6253
|
+
onError,
|
|
6254
|
+
onSent
|
|
6255
|
+
};
|
|
6256
|
+
(0, react.useEffect)(() => {
|
|
6257
|
+
if (seconds <= 0) return;
|
|
6258
|
+
const timer = setTimeout(() => setSeconds((value) => value - 1), 1e3);
|
|
6259
|
+
return () => clearTimeout(timer);
|
|
6260
|
+
}, [seconds]);
|
|
6261
|
+
(0, react.useEffect)(() => {
|
|
6262
|
+
if (!captchaOpen) return;
|
|
6263
|
+
const onMessage = (event) => {
|
|
6264
|
+
if (event.origin !== CAPTCHA_ORIGIN) return;
|
|
6265
|
+
const payload = event.data;
|
|
6266
|
+
if (payload === null || typeof payload !== "object") return;
|
|
6267
|
+
if (payload.type === "close") {
|
|
6268
|
+
setCaptchaOpen(false);
|
|
6269
|
+
return;
|
|
6270
|
+
}
|
|
6271
|
+
if (payload.type !== "success" || typeof payload.data !== "string") return;
|
|
6272
|
+
const captcha = payload.data;
|
|
6273
|
+
setCaptchaOpen(false);
|
|
6274
|
+
setSending(true);
|
|
6275
|
+
(async () => {
|
|
6276
|
+
try {
|
|
6277
|
+
await latest.current.remote.sendPhoneCode(latest.current.phone, captcha);
|
|
6278
|
+
latest.current.onSent();
|
|
6279
|
+
setSeconds(RESEND_SECONDS);
|
|
6280
|
+
} catch (error) {
|
|
6281
|
+
latest.current.onError(reason(error));
|
|
6282
|
+
} finally {
|
|
6283
|
+
setSending(false);
|
|
6284
|
+
}
|
|
6285
|
+
})();
|
|
6286
|
+
};
|
|
6287
|
+
window.addEventListener("message", onMessage);
|
|
6288
|
+
return () => window.removeEventListener("message", onMessage);
|
|
6289
|
+
}, [captchaOpen]);
|
|
6290
|
+
const open = (0, react.useCallback)(() => {
|
|
6291
|
+
if (seconds > 0 || sending) return;
|
|
6292
|
+
if (!PHONE_PATTERN.test(phone)) {
|
|
6293
|
+
onError("请输入正确的手机号");
|
|
6294
|
+
return;
|
|
6295
|
+
}
|
|
6296
|
+
onError("");
|
|
6297
|
+
setCaptchaOpen(true);
|
|
6298
|
+
}, [
|
|
6299
|
+
onError,
|
|
6300
|
+
phone,
|
|
6301
|
+
seconds,
|
|
6302
|
+
sending
|
|
6303
|
+
]);
|
|
6304
|
+
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("button", {
|
|
6305
|
+
type: "button",
|
|
6306
|
+
style: {
|
|
6307
|
+
...style,
|
|
6308
|
+
cursor: seconds > 0 || sending ? "default" : "pointer"
|
|
6309
|
+
},
|
|
6310
|
+
disabled: seconds > 0 || sending,
|
|
6311
|
+
onClick: open,
|
|
6312
|
+
children: sending ? "发送中…" : seconds > 0 ? `${seconds} 秒后重发` : "发送验证码"
|
|
6313
|
+
}), captchaOpen && (0, react_jsx_runtime.jsx)("div", {
|
|
6314
|
+
style: base.captchaOverlay,
|
|
6315
|
+
role: "presentation",
|
|
6316
|
+
onMouseDown: (event) => {
|
|
6317
|
+
event.stopPropagation();
|
|
6318
|
+
setCaptchaOpen(false);
|
|
6319
|
+
},
|
|
6320
|
+
children: (0, react_jsx_runtime.jsx)("iframe", {
|
|
6321
|
+
title: "图形验证码",
|
|
6322
|
+
src: CAPTCHA_URL,
|
|
6323
|
+
scrolling: "no",
|
|
6324
|
+
style: base.captchaFrame,
|
|
6325
|
+
onMouseDown: (event) => event.stopPropagation()
|
|
6326
|
+
})
|
|
6327
|
+
})] });
|
|
6328
|
+
}
|
|
6329
|
+
/** 手机号密码 / 手机号验证码两种方式共用的登录表单。 */
|
|
6330
|
+
function EdusLoginPanel({ remote, onSuccess, onCancel, onBusyChange, submitLabel = "登录", cancelLabel = "取消", intro, notice = "", defaultMode = "code", theme = {} }) {
|
|
6331
|
+
const [mode, setMode] = (0, react.useState)(defaultMode);
|
|
6332
|
+
const [phone, setPhone] = (0, react.useState)("");
|
|
6333
|
+
const [password, setPassword] = (0, react.useState)("");
|
|
6334
|
+
const [code, setCode] = (0, react.useState)("");
|
|
6335
|
+
const [busy, setBusy] = (0, react.useState)(false);
|
|
6336
|
+
const [error, setError] = (0, react.useState)("");
|
|
6337
|
+
const [tip, setTip] = (0, react.useState)("");
|
|
6338
|
+
const field = {
|
|
6339
|
+
...base.field,
|
|
6340
|
+
...theme.field
|
|
6341
|
+
};
|
|
6342
|
+
const button = {
|
|
6343
|
+
...base.button,
|
|
6344
|
+
...theme.button
|
|
6345
|
+
};
|
|
6346
|
+
const primary = {
|
|
6347
|
+
...base.primary,
|
|
6348
|
+
...theme.primary
|
|
6349
|
+
};
|
|
6350
|
+
const errorStyle = {
|
|
6351
|
+
...base.error,
|
|
6352
|
+
...theme.error
|
|
6353
|
+
};
|
|
6354
|
+
(0, react.useEffect)(() => {
|
|
6355
|
+
onBusyChange?.(busy);
|
|
6356
|
+
}, [busy, onBusyChange]);
|
|
6357
|
+
const switchMode = (next) => {
|
|
6358
|
+
setMode(next);
|
|
6359
|
+
setError("");
|
|
6360
|
+
setTip("");
|
|
6361
|
+
};
|
|
6362
|
+
const notifyError = (0, react.useCallback)((message) => {
|
|
6363
|
+
setError(message);
|
|
6364
|
+
if (message !== "") setTip("");
|
|
6365
|
+
}, []);
|
|
6366
|
+
const notifySent = (0, react.useCallback)(() => {
|
|
6367
|
+
setError("");
|
|
6368
|
+
setTip("验证码已发送,请注意查收短信。");
|
|
6369
|
+
}, []);
|
|
6370
|
+
const submit = async (event) => {
|
|
6371
|
+
event.preventDefault();
|
|
6372
|
+
if (!PHONE_PATTERN.test(phone)) {
|
|
6373
|
+
setError("请输入正确的手机号");
|
|
6374
|
+
return;
|
|
6375
|
+
}
|
|
6376
|
+
if (mode === "password" && password === "") {
|
|
6377
|
+
setError("请输入密码");
|
|
6378
|
+
return;
|
|
6379
|
+
}
|
|
6380
|
+
if (mode === "code" && code.trim() === "") {
|
|
6381
|
+
setError("请输入短信验证码");
|
|
6382
|
+
return;
|
|
6383
|
+
}
|
|
6384
|
+
setBusy(true);
|
|
6385
|
+
setError("");
|
|
6386
|
+
setTip("");
|
|
6387
|
+
try {
|
|
6388
|
+
await onSuccess(mode === "password" ? await remote.login(phone, password) : await remote.loginByPhone(phone, code.trim()));
|
|
6389
|
+
} catch (failure) {
|
|
6390
|
+
setError(reason(failure));
|
|
6391
|
+
} finally {
|
|
6392
|
+
setBusy(false);
|
|
6393
|
+
}
|
|
6394
|
+
};
|
|
6395
|
+
const message = error !== "" ? error : notice;
|
|
6396
|
+
return (0, react_jsx_runtime.jsxs)("form", {
|
|
6397
|
+
style: base.form,
|
|
6398
|
+
onSubmit: (event) => void submit(event),
|
|
6399
|
+
children: [
|
|
6400
|
+
intro,
|
|
6401
|
+
(0, react_jsx_runtime.jsx)("input", {
|
|
6402
|
+
style: field,
|
|
6403
|
+
autoComplete: "tel",
|
|
6404
|
+
inputMode: "numeric",
|
|
6405
|
+
maxLength: 11,
|
|
6406
|
+
placeholder: "手机号",
|
|
6407
|
+
value: phone,
|
|
6408
|
+
onChange: (event) => setPhone(event.target.value.replace(/\D/g, ""))
|
|
6409
|
+
}),
|
|
6410
|
+
mode === "password" ? (0, react_jsx_runtime.jsx)("input", {
|
|
6411
|
+
style: field,
|
|
6412
|
+
autoComplete: "current-password",
|
|
6413
|
+
type: "password",
|
|
6414
|
+
placeholder: "密码",
|
|
6415
|
+
value: password,
|
|
6416
|
+
onChange: (event) => setPassword(event.target.value)
|
|
6417
|
+
}) : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
6418
|
+
style: base.codeRow,
|
|
6419
|
+
children: [(0, react_jsx_runtime.jsx)("input", {
|
|
6420
|
+
style: {
|
|
6421
|
+
...field,
|
|
6422
|
+
flex: 1,
|
|
6423
|
+
minWidth: 0
|
|
6424
|
+
},
|
|
6425
|
+
autoComplete: "one-time-code",
|
|
6426
|
+
inputMode: "numeric",
|
|
6427
|
+
placeholder: "短信验证码",
|
|
6428
|
+
value: code,
|
|
6429
|
+
onChange: (event) => setCode(event.target.value)
|
|
6430
|
+
}), (0, react_jsx_runtime.jsx)(SendSmsCode, {
|
|
6431
|
+
phone,
|
|
6432
|
+
remote,
|
|
6433
|
+
onError: notifyError,
|
|
6434
|
+
onSent: notifySent,
|
|
6435
|
+
style: base.sendButton
|
|
6436
|
+
})]
|
|
6437
|
+
}), (0, react_jsx_runtime.jsx)("p", {
|
|
6438
|
+
style: base.hint,
|
|
6439
|
+
children: "首次登录将自动注册课成账号。"
|
|
6440
|
+
})] }),
|
|
6441
|
+
tip !== "" && (0, react_jsx_runtime.jsx)("p", {
|
|
6442
|
+
style: {
|
|
6443
|
+
...base.hint,
|
|
6444
|
+
color: "var(--dsw-alias-brand-primary)"
|
|
6445
|
+
},
|
|
6446
|
+
role: "status",
|
|
6447
|
+
children: tip
|
|
6448
|
+
}),
|
|
6449
|
+
message !== "" && (0, react_jsx_runtime.jsx)("p", {
|
|
6450
|
+
style: errorStyle,
|
|
6451
|
+
children: message
|
|
6452
|
+
}),
|
|
6453
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
6454
|
+
style: base.actions,
|
|
6455
|
+
children: [onCancel !== void 0 && (0, react_jsx_runtime.jsx)("button", {
|
|
6456
|
+
type: "button",
|
|
6457
|
+
style: button,
|
|
6458
|
+
disabled: busy,
|
|
6459
|
+
onClick: onCancel,
|
|
6460
|
+
children: cancelLabel
|
|
6461
|
+
}), (0, react_jsx_runtime.jsx)("button", {
|
|
6462
|
+
type: "submit",
|
|
6463
|
+
style: primary,
|
|
6464
|
+
disabled: busy,
|
|
6465
|
+
children: busy ? "登录中…" : submitLabel
|
|
6466
|
+
})]
|
|
6467
|
+
}),
|
|
6468
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
6469
|
+
style: base.switchRow,
|
|
6470
|
+
children: (0, react_jsx_runtime.jsx)("button", {
|
|
6471
|
+
type: "button",
|
|
6472
|
+
style: base.switchLink,
|
|
6473
|
+
onClick: () => switchMode(mode === "password" ? "code" : "password"),
|
|
6474
|
+
children: mode === "password" ? "使用短信验证码登录" : "使用密码登录"
|
|
6475
|
+
})
|
|
6476
|
+
})
|
|
6477
|
+
]
|
|
6478
|
+
});
|
|
6479
|
+
}
|
|
6480
|
+
//#endregion
|
|
6073
6481
|
//#region lib/types/client/HtmlPublishPreview.js
|
|
6074
6482
|
function fileRef(address) {
|
|
6075
6483
|
if (!address.startsWith("dsh-resource://file/session/")) return null;
|
|
@@ -6193,10 +6601,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6193
6601
|
font: "inherit",
|
|
6194
6602
|
fontSize: 13
|
|
6195
6603
|
},
|
|
6196
|
-
form: {
|
|
6197
|
-
display: "grid",
|
|
6198
|
-
gap: 10
|
|
6199
|
-
},
|
|
6200
6604
|
option: {
|
|
6201
6605
|
display: "flex",
|
|
6202
6606
|
alignItems: "flex-start",
|
|
@@ -6281,8 +6685,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6281
6685
|
const [stage, setStage] = (0, react.useState)("closed");
|
|
6282
6686
|
const [destination, setDestination] = (0, react.useState)("new");
|
|
6283
6687
|
const [title, setTitle] = (0, react.useState)("");
|
|
6284
|
-
const [phone, setPhone] = (0, react.useState)("");
|
|
6285
|
-
const [password, setPassword] = (0, react.useState)("");
|
|
6286
6688
|
const [busy, setBusy] = (0, react.useState)(false);
|
|
6287
6689
|
const [error, setError] = (0, react.useState)("");
|
|
6288
6690
|
const [shareUrl, setShareUrl] = (0, react.useState)(null);
|
|
@@ -6322,21 +6724,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6322
6724
|
const close = () => {
|
|
6323
6725
|
if (!busy) setStage("closed");
|
|
6324
6726
|
};
|
|
6325
|
-
const
|
|
6326
|
-
|
|
6327
|
-
setBusy(true);
|
|
6727
|
+
const afterLogin = (0, react.useCallback)((result) => {
|
|
6728
|
+
EdusAuthStore.set(result);
|
|
6328
6729
|
setError("");
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
setDestination(marker !== null && marker.owner === result.phone ? "current" : "new");
|
|
6333
|
-
setStage("destination");
|
|
6334
|
-
} catch (reason) {
|
|
6335
|
-
setError(reason instanceof Error ? reason.message : String(reason));
|
|
6336
|
-
} finally {
|
|
6337
|
-
setBusy(false);
|
|
6338
|
-
}
|
|
6339
|
-
};
|
|
6730
|
+
setDestination(marker !== null && marker.owner === result.phone ? "current" : "new");
|
|
6731
|
+
setStage("destination");
|
|
6732
|
+
}, [marker]);
|
|
6340
6733
|
const submitPublish = (0, react.useCallback)(async () => {
|
|
6341
6734
|
if (ref === null || account === null) return;
|
|
6342
6735
|
const newWork = destination === "new";
|
|
@@ -6422,50 +6815,23 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6422
6815
|
style: styles$1.copy,
|
|
6423
6816
|
children: "正在通过课成账号服务确认当前登录状态…"
|
|
6424
6817
|
}),
|
|
6425
|
-
stage === "login" && (0, react_jsx_runtime.
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
style: styles$1.field,
|
|
6443
|
-
required: true,
|
|
6444
|
-
autoComplete: "current-password",
|
|
6445
|
-
type: "password",
|
|
6446
|
-
placeholder: "密码",
|
|
6447
|
-
value: password,
|
|
6448
|
-
onChange: (event) => setPassword(event.target.value)
|
|
6449
|
-
}),
|
|
6450
|
-
error !== "" && (0, react_jsx_runtime.jsx)("p", {
|
|
6451
|
-
style: styles$1.error,
|
|
6452
|
-
children: error
|
|
6453
|
-
}),
|
|
6454
|
-
(0, react_jsx_runtime.jsxs)("div", {
|
|
6455
|
-
style: styles$1.actions,
|
|
6456
|
-
children: [(0, react_jsx_runtime.jsx)("button", {
|
|
6457
|
-
style: styles$1.button,
|
|
6458
|
-
type: "button",
|
|
6459
|
-
onClick: close,
|
|
6460
|
-
children: "取消"
|
|
6461
|
-
}), (0, react_jsx_runtime.jsx)("button", {
|
|
6462
|
-
style: styles$1.primary,
|
|
6463
|
-
disabled: busy,
|
|
6464
|
-
type: "submit",
|
|
6465
|
-
children: busy ? "登录中…" : "继续"
|
|
6466
|
-
})]
|
|
6467
|
-
})
|
|
6468
|
-
]
|
|
6818
|
+
stage === "login" && (0, react_jsx_runtime.jsx)(EdusLoginPanel, {
|
|
6819
|
+
remote,
|
|
6820
|
+
intro: (0, react_jsx_runtime.jsx)("p", {
|
|
6821
|
+
style: styles$1.copy,
|
|
6822
|
+
children: "登录后即可选择更新已关联作品,或创建一个新的作品发布。"
|
|
6823
|
+
}),
|
|
6824
|
+
notice: error,
|
|
6825
|
+
submitLabel: "继续",
|
|
6826
|
+
onCancel: close,
|
|
6827
|
+
onBusyChange: setBusy,
|
|
6828
|
+
onSuccess: afterLogin,
|
|
6829
|
+
theme: {
|
|
6830
|
+
field: styles$1.field,
|
|
6831
|
+
button: styles$1.button,
|
|
6832
|
+
primary: styles$1.primary,
|
|
6833
|
+
error: styles$1.error
|
|
6834
|
+
}
|
|
6469
6835
|
}),
|
|
6470
6836
|
stage === "destination" && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
6471
6837
|
account !== null && (0, react_jsx_runtime.jsxs)("p", {
|
|
@@ -6659,6 +7025,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6659
7025
|
rx: "1.5"
|
|
6660
7026
|
}), (0, react_jsx_runtime.jsx)("path", { d: "M10.5 5.5v-2a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2" })] }),
|
|
6661
7027
|
folder: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("path", { d: "M1.8 4.5h4l1.3 1.7h7.1v6.3a1.4 1.4 0 0 1-1.4 1.4H3.2a1.4 1.4 0 0 1-1.4-1.4z" }), (0, react_jsx_runtime.jsx)("path", { d: "M1.8 4.5V3.8a1.3 1.3 0 0 1 1.3-1.3h3l1.4 2h5.3a1.4 1.4 0 0 1 1.4 1.4v.3" })] }),
|
|
7028
|
+
logout: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
7029
|
+
(0, react_jsx_runtime.jsx)("path", { d: "M6 2.5H3.7a1.2 1.2 0 0 0-1.2 1.2v8.6a1.2 1.2 0 0 0 1.2 1.2H6" }),
|
|
7030
|
+
(0, react_jsx_runtime.jsx)("path", { d: "M10.3 11.2L13.5 8l-3.2-3.2" }),
|
|
7031
|
+
(0, react_jsx_runtime.jsx)("path", { d: "M13.5 8H6" })
|
|
7032
|
+
] }),
|
|
6662
7033
|
open: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("path", { d: "M9.5 2.5h4v4M13.2 2.8L7.5 8.5" }), (0, react_jsx_runtime.jsx)("path", { d: "M7 4H3.5a1 1 0 0 0-1 1v7.5a1 1 0 0 0 1 1H11a1 1 0 0 0 1-1V9" })] }),
|
|
6663
7034
|
refresh: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("path", { d: "M13.2 5.4A5.8 5.8 0 1 0 13 11" }), (0, react_jsx_runtime.jsx)("path", { d: "M13.2 2.6v2.9h-2.9" })] }),
|
|
6664
7035
|
search: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("circle", {
|
|
@@ -6764,10 +7135,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6764
7135
|
fontSize: 13,
|
|
6765
7136
|
lineHeight: 1.5
|
|
6766
7137
|
},
|
|
7138
|
+
subtitleRow: {
|
|
7139
|
+
display: "flex",
|
|
7140
|
+
alignItems: "center",
|
|
7141
|
+
gap: 12
|
|
7142
|
+
},
|
|
6767
7143
|
close: {
|
|
6768
7144
|
width: 32,
|
|
6769
7145
|
height: 32,
|
|
6770
|
-
marginLeft: "auto",
|
|
6771
7146
|
display: "grid",
|
|
6772
7147
|
placeItems: "center",
|
|
6773
7148
|
flex: "none",
|
|
@@ -6952,6 +7327,38 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6952
7327
|
marginLeft: "auto",
|
|
6953
7328
|
color: "var(--dsw-alias-brand-primary)",
|
|
6954
7329
|
fontSize: 12
|
|
7330
|
+
},
|
|
7331
|
+
quiet: {
|
|
7332
|
+
display: "inline-flex",
|
|
7333
|
+
alignItems: "center",
|
|
7334
|
+
gap: 4,
|
|
7335
|
+
flex: "none",
|
|
7336
|
+
border: 0,
|
|
7337
|
+
padding: 0,
|
|
7338
|
+
background: "transparent",
|
|
7339
|
+
color: "var(--dsw-alias-label-tertiary)",
|
|
7340
|
+
font: "inherit",
|
|
7341
|
+
fontSize: 12,
|
|
7342
|
+
lineHeight: 1,
|
|
7343
|
+
cursor: "pointer"
|
|
7344
|
+
},
|
|
7345
|
+
confirmRow: {
|
|
7346
|
+
display: "inline-flex",
|
|
7347
|
+
alignItems: "center",
|
|
7348
|
+
gap: 6,
|
|
7349
|
+
flex: "none",
|
|
7350
|
+
color: "#ff9800",
|
|
7351
|
+
fontSize: 12
|
|
7352
|
+
},
|
|
7353
|
+
danger: {
|
|
7354
|
+
border: 0,
|
|
7355
|
+
padding: "0 4px",
|
|
7356
|
+
background: "transparent",
|
|
7357
|
+
color: "var(--dsw-alias-state-error-primary)",
|
|
7358
|
+
font: "inherit",
|
|
7359
|
+
fontSize: 12,
|
|
7360
|
+
fontWeight: 650,
|
|
7361
|
+
cursor: "pointer"
|
|
6955
7362
|
}
|
|
6956
7363
|
};
|
|
6957
7364
|
function formatDate(value) {
|
|
@@ -7006,12 +7413,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7006
7413
|
const [total, setTotal] = (0, react.useState)(0);
|
|
7007
7414
|
const [searchInput, setSearchInput] = (0, react.useState)("");
|
|
7008
7415
|
const [search, setSearch] = (0, react.useState)("");
|
|
7009
|
-
const [phone, setPhone] = (0, react.useState)("");
|
|
7010
|
-
const [password, setPassword] = (0, react.useState)("");
|
|
7011
7416
|
const [loading, setLoading] = (0, react.useState)(false);
|
|
7012
7417
|
const [sharing, setSharing] = (0, react.useState)(null);
|
|
7013
7418
|
const [error, setError] = (0, react.useState)("");
|
|
7014
7419
|
const [notice, setNotice] = (0, react.useState)("");
|
|
7420
|
+
const [confirmLogout, setConfirmLogout] = (0, react.useState)(false);
|
|
7015
7421
|
const pages = Math.max(1, Math.ceil(total / PAGE_SIZE));
|
|
7016
7422
|
const load = (0, react.useCallback)(async (token, nextPage, nextSearch) => {
|
|
7017
7423
|
setLoading(true);
|
|
@@ -7029,20 +7435,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7029
7435
|
setLoading(false);
|
|
7030
7436
|
}
|
|
7031
7437
|
}, [remote]);
|
|
7032
|
-
const
|
|
7033
|
-
|
|
7034
|
-
setLoading(true);
|
|
7438
|
+
const afterLogin = (0, react.useCallback)(async (result) => {
|
|
7439
|
+
EdusAuthStore.set(result);
|
|
7035
7440
|
setError("");
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7441
|
+
await load(result.token, 1, "");
|
|
7442
|
+
}, [load]);
|
|
7443
|
+
/** 退出后弹窗停留在登录面板,因此顺手把上一个账号的列表状态清干净。 */
|
|
7444
|
+
const logout = (0, react.useCallback)(() => {
|
|
7445
|
+
setConfirmLogout(false);
|
|
7446
|
+
EdusAuthStore.logout();
|
|
7447
|
+
setList([]);
|
|
7448
|
+
setTotal(0);
|
|
7449
|
+
setPage(1);
|
|
7450
|
+
setSearch("");
|
|
7451
|
+
setSearchInput("");
|
|
7452
|
+
setError("");
|
|
7453
|
+
setNotice("");
|
|
7454
|
+
setLoading(false);
|
|
7455
|
+
}, []);
|
|
7046
7456
|
const share = async (work, action) => {
|
|
7047
7457
|
if (account === null) return;
|
|
7048
7458
|
const popup = action === "open" ? window.open("about:blank", "_blank") : null;
|
|
@@ -7070,6 +7480,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7070
7480
|
if (!open) return;
|
|
7071
7481
|
setError("");
|
|
7072
7482
|
setNotice("");
|
|
7483
|
+
setConfirmLogout(false);
|
|
7073
7484
|
const stored = EdusAuthStore.getSnapshot();
|
|
7074
7485
|
if (stored === null) setLoading(false);
|
|
7075
7486
|
if (stored !== null) {
|
|
@@ -7107,14 +7518,57 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7107
7518
|
children: [
|
|
7108
7519
|
(0, react_jsx_runtime.jsxs)("header", {
|
|
7109
7520
|
style: styles.header,
|
|
7110
|
-
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7521
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
7522
|
+
style: {
|
|
7523
|
+
minWidth: 0,
|
|
7524
|
+
flex: 1
|
|
7525
|
+
},
|
|
7526
|
+
children: [(0, react_jsx_runtime.jsx)("h2", {
|
|
7527
|
+
id: "edus-my-works-title",
|
|
7528
|
+
style: styles.title,
|
|
7529
|
+
children: "我的作品"
|
|
7530
|
+
}), (0, react_jsx_runtime.jsxs)("p", {
|
|
7531
|
+
style: {
|
|
7532
|
+
...styles.subtitle,
|
|
7533
|
+
...styles.subtitleRow
|
|
7534
|
+
},
|
|
7535
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
7536
|
+
style: {
|
|
7537
|
+
minWidth: 0,
|
|
7538
|
+
overflow: "hidden",
|
|
7539
|
+
textOverflow: "ellipsis",
|
|
7540
|
+
whiteSpace: "nowrap"
|
|
7541
|
+
},
|
|
7542
|
+
children: account === null ? "登录课成账号,查看你发布过的网页作品。" : `${account.title || account.phone} · 共 ${total} 个作品`
|
|
7543
|
+
}), account !== null && (confirmLogout ? (0, react_jsx_runtime.jsxs)("span", {
|
|
7544
|
+
style: styles.confirmRow,
|
|
7545
|
+
children: [
|
|
7546
|
+
(0, react_jsx_runtime.jsx)("span", { children: "确定退出登录?" }),
|
|
7547
|
+
(0, react_jsx_runtime.jsx)("button", {
|
|
7548
|
+
type: "button",
|
|
7549
|
+
style: styles.danger,
|
|
7550
|
+
onClick: logout,
|
|
7551
|
+
children: "退出"
|
|
7552
|
+
}),
|
|
7553
|
+
(0, react_jsx_runtime.jsx)("button", {
|
|
7554
|
+
type: "button",
|
|
7555
|
+
style: styles.quiet,
|
|
7556
|
+
onClick: () => setConfirmLogout(false),
|
|
7557
|
+
children: "取消"
|
|
7558
|
+
})
|
|
7559
|
+
]
|
|
7560
|
+
}) : (0, react_jsx_runtime.jsxs)("button", {
|
|
7561
|
+
type: "button",
|
|
7562
|
+
title: "退出登录",
|
|
7563
|
+
style: { ...styles.quiet },
|
|
7564
|
+
onClick: () => setConfirmLogout(true),
|
|
7565
|
+
children: [(0, react_jsx_runtime.jsx)(Icon, {
|
|
7566
|
+
name: "logout",
|
|
7567
|
+
size: 13
|
|
7568
|
+
}), "退出登录"]
|
|
7569
|
+
}))]
|
|
7570
|
+
})]
|
|
7571
|
+
}), (0, react_jsx_runtime.jsx)("button", {
|
|
7118
7572
|
type: "button",
|
|
7119
7573
|
"aria-label": "关闭我的作品",
|
|
7120
7574
|
style: styles.close,
|
|
@@ -7162,47 +7616,31 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7162
7616
|
}),
|
|
7163
7617
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
7164
7618
|
style: styles.body,
|
|
7165
|
-
children: [account === null ? (0, react_jsx_runtime.
|
|
7619
|
+
children: [account === null ? (0, react_jsx_runtime.jsx)("div", {
|
|
7166
7620
|
style: styles.login,
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
(0, react_jsx_runtime.jsx)("strong", { children: "登录课成账号" }),
|
|
7170
|
-
(0, react_jsx_runtime.jsx)("span", {
|
|
7171
|
-
style: styles.subtitle,
|
|
7172
|
-
children: "作品列表仅展示当前账号创建的内容。"
|
|
7173
|
-
}),
|
|
7174
|
-
(0, react_jsx_runtime.jsx)("input", {
|
|
7175
|
-
style: styles.field,
|
|
7176
|
-
required: true,
|
|
7177
|
-
autoComplete: "tel",
|
|
7178
|
-
placeholder: "手机号",
|
|
7179
|
-
value: phone,
|
|
7180
|
-
onChange: (event) => setPhone(event.target.value)
|
|
7181
|
-
}),
|
|
7182
|
-
(0, react_jsx_runtime.jsx)("input", {
|
|
7183
|
-
style: styles.field,
|
|
7184
|
-
required: true,
|
|
7185
|
-
autoComplete: "current-password",
|
|
7186
|
-
type: "password",
|
|
7187
|
-
placeholder: "密码",
|
|
7188
|
-
value: password,
|
|
7189
|
-
onChange: (event) => setPassword(event.target.value)
|
|
7190
|
-
}),
|
|
7191
|
-
error !== "" && (0, react_jsx_runtime.jsx)("p", {
|
|
7192
|
-
style: styles.error,
|
|
7193
|
-
children: error
|
|
7194
|
-
}),
|
|
7195
|
-
(0, react_jsx_runtime.jsx)("button", {
|
|
7196
|
-
type: "submit",
|
|
7621
|
+
children: (0, react_jsx_runtime.jsx)(EdusLoginPanel, {
|
|
7622
|
+
remote,
|
|
7623
|
+
intro: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("strong", { children: "登录课成账号" }), (0, react_jsx_runtime.jsx)("p", {
|
|
7197
7624
|
style: {
|
|
7625
|
+
...styles.subtitle,
|
|
7626
|
+
margin: "5px 0 0"
|
|
7627
|
+
},
|
|
7628
|
+
children: "作品列表仅展示当前账号创建的内容。"
|
|
7629
|
+
})] }),
|
|
7630
|
+
notice: error,
|
|
7631
|
+
submitLabel: "登录并查看作品",
|
|
7632
|
+
onSuccess: afterLogin,
|
|
7633
|
+
theme: {
|
|
7634
|
+
field: styles.field,
|
|
7635
|
+
button: styles.button,
|
|
7636
|
+
primary: {
|
|
7198
7637
|
...styles.button,
|
|
7199
7638
|
...styles.primary,
|
|
7200
7639
|
height: 40
|
|
7201
7640
|
},
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
]
|
|
7641
|
+
error: styles.error
|
|
7642
|
+
}
|
|
7643
|
+
})
|
|
7206
7644
|
}) : loading ? (0, react_jsx_runtime.jsx)("div", {
|
|
7207
7645
|
style: styles.center,
|
|
7208
7646
|
children: "正在读取作品列表…"
|
|
@@ -7336,8 +7774,31 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7336
7774
|
*/
|
|
7337
7775
|
async function apply(ctx) {
|
|
7338
7776
|
await ctx.remote.$mount(TYPERT_REMOTE);
|
|
7777
|
+
applyHideChangedFiles(ctx);
|
|
7339
7778
|
applyEdusRemoteFeatures(ctx);
|
|
7340
7779
|
}
|
|
7780
|
+
/**
|
|
7781
|
+
* Hide the automatic changed-files card; the teaching audience reads a diff as noise.
|
|
7782
|
+
*
|
|
7783
|
+
* 不能改为禁用 host 的 workspace-changes 插件:ui-deliverables 的 host 入口
|
|
7784
|
+
* inject 了 workspaceChanges,服务缺失会让它整个不激活,连带 present 交付卡片
|
|
7785
|
+
* 依赖的 /api/present.host、/api/present.open 路由一起消失,界面上会出现
|
|
7786
|
+
* 「无法读取主机桌面信息」。所以保留 host 记录,只在客户端隐藏这张卡片。
|
|
7787
|
+
*
|
|
7788
|
+
* `data-changed-files` 是卡片根元素上的稳定标记;同包的 CSS module 类名带哈希,
|
|
7789
|
+
* 不能作为选择器。
|
|
7790
|
+
*/
|
|
7791
|
+
function applyHideChangedFiles(ctx) {
|
|
7792
|
+
ctx.effect(() => {
|
|
7793
|
+
const style = document.createElement("style");
|
|
7794
|
+
style.dataset["edus"] = "hide-changed-files";
|
|
7795
|
+
style.textContent = "[data-changed-files]{display:none!important}";
|
|
7796
|
+
document.head.append(style);
|
|
7797
|
+
return () => {
|
|
7798
|
+
style.remove();
|
|
7799
|
+
};
|
|
7800
|
+
}, "edus changed-files card suppression");
|
|
7801
|
+
}
|
|
7341
7802
|
function applyEdusRemoteFeatures(ctx) {
|
|
7342
7803
|
const bridge = ctx.get("remote.edus");
|
|
7343
7804
|
if (bridge === void 0) throw new Error("edus Remote namespace was not mounted");
|
|
@@ -7348,6 +7809,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7348
7809
|
unwrap(await bridge.writeHtmlFile(sessionId, path, content));
|
|
7349
7810
|
},
|
|
7350
7811
|
login: async (phone, password) => unwrap(await bridge.login(phone, password)),
|
|
7812
|
+
loginByPhone: async (phone, code) => unwrap(await bridge.loginByPhone(phone, code)),
|
|
7813
|
+
sendPhoneCode: async (phone, captcha) => {
|
|
7814
|
+
unwrap(await bridge.sendPhoneCode(phone, captcha));
|
|
7815
|
+
},
|
|
7351
7816
|
loginInfo: async (token) => unwrap(await bridge.loginInfo(token)),
|
|
7352
7817
|
htmlList: async (token, page, size, search) => unwrap(await bridge.htmlList(token, page, size, search)),
|
|
7353
7818
|
htmlShare: async (token, id) => unwrap(await bridge.htmlShare(token, id)),
|