@osovitny/anatoly 3.20.42 → 3.20.44
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.
|
@@ -1405,6 +1405,11 @@ class ServiceBase {
|
|
|
1405
1405
|
*/
|
|
1406
1406
|
//Node
|
|
1407
1407
|
class GoServiceBase extends ServiceBase {
|
|
1408
|
+
//gets
|
|
1409
|
+
get currentApp() {
|
|
1410
|
+
this.ensureInitialized();
|
|
1411
|
+
return this._currentApp;
|
|
1412
|
+
}
|
|
1408
1413
|
constructor(route, router) {
|
|
1409
1414
|
super();
|
|
1410
1415
|
this.route = route;
|
|
@@ -1416,7 +1421,7 @@ class GoServiceBase extends ServiceBase {
|
|
|
1416
1421
|
ensureInitialized() {
|
|
1417
1422
|
if (!this.initialized) {
|
|
1418
1423
|
this.isDevMode = IsDevMode;
|
|
1419
|
-
this.
|
|
1424
|
+
this._currentApp = getCurrentApp();
|
|
1420
1425
|
this.initialized = true;
|
|
1421
1426
|
}
|
|
1422
1427
|
}
|
|
@@ -1428,53 +1433,43 @@ class GoServiceBase extends ServiceBase {
|
|
|
1428
1433
|
});
|
|
1429
1434
|
}
|
|
1430
1435
|
getHomeUrl() {
|
|
1431
|
-
this.ensureInitialized();
|
|
1432
1436
|
return this.currentApp.root;
|
|
1433
1437
|
}
|
|
1434
1438
|
locationReload() {
|
|
1435
1439
|
window.location.reload();
|
|
1436
1440
|
}
|
|
1437
1441
|
home(reload = false) {
|
|
1438
|
-
this.ensureInitialized();
|
|
1439
1442
|
this.navigate([this.currentApp.root], {}, reload);
|
|
1440
1443
|
}
|
|
1441
1444
|
dashboard(reload = false) {
|
|
1442
|
-
this.ensureInitialized();
|
|
1443
1445
|
this.navigate([this.currentApp.root + '/dashboard'], {}, reload);
|
|
1444
1446
|
}
|
|
1445
1447
|
//Accounts
|
|
1446
1448
|
accountClosed() {
|
|
1447
|
-
this.ensureInitialized();
|
|
1448
1449
|
this.navigate([this.currentApp.root + '/accounts/closed']);
|
|
1449
1450
|
}
|
|
1450
1451
|
//Errors
|
|
1451
1452
|
error() {
|
|
1452
|
-
this.ensureInitialized();
|
|
1453
1453
|
this.navigate([this.currentApp.root + '/errors/error']);
|
|
1454
1454
|
}
|
|
1455
1455
|
//401 Unauthorized
|
|
1456
1456
|
error401() {
|
|
1457
|
-
this.ensureInitialized();
|
|
1458
1457
|
this.navigate([this.currentApp.root + '/errors/401']);
|
|
1459
1458
|
}
|
|
1460
1459
|
//402 Payment Required
|
|
1461
1460
|
error402() {
|
|
1462
|
-
this.ensureInitialized();
|
|
1463
1461
|
this.navigate([this.currentApp.root + '/errors/402']);
|
|
1464
1462
|
}
|
|
1465
1463
|
//403 Forbidden
|
|
1466
1464
|
error403() {
|
|
1467
|
-
this.ensureInitialized();
|
|
1468
1465
|
this.navigate([this.currentApp.root + '/errors/403']);
|
|
1469
1466
|
}
|
|
1470
1467
|
//404 Not Found
|
|
1471
1468
|
error404() {
|
|
1472
|
-
this.ensureInitialized();
|
|
1473
1469
|
this.navigate([this.currentApp.root + '/errors/404']);
|
|
1474
1470
|
}
|
|
1475
1471
|
//500 Internal Server Error
|
|
1476
1472
|
error500() {
|
|
1477
|
-
this.ensureInitialized();
|
|
1478
1473
|
this.navigate([this.currentApp.root + '/errors/500']);
|
|
1479
1474
|
}
|
|
1480
1475
|
static { this.ɵfac = function GoServiceBase_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GoServiceBase)(i0.ɵɵinject(i1$1.ActivatedRoute), i0.ɵɵinject(i1$1.Router)); }; }
|
|
@@ -9078,10 +9073,10 @@ function Message2UserComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
9078
9073
|
i0.ɵɵconditional(!(ctx_r1.message == null ? null : ctx_r1.message.block) ? 20 : -1);
|
|
9079
9074
|
} }
|
|
9080
9075
|
class Message2UserComponent extends ComponentBase {
|
|
9081
|
-
constructor(go,
|
|
9076
|
+
constructor(go, mus) {
|
|
9082
9077
|
super();
|
|
9083
9078
|
this.go = go;
|
|
9084
|
-
this.
|
|
9079
|
+
this.mus = mus;
|
|
9085
9080
|
this.show = false;
|
|
9086
9081
|
}
|
|
9087
9082
|
ngOnInit() {
|
|
@@ -9091,14 +9086,14 @@ class Message2UserComponent extends ComponentBase {
|
|
|
9091
9086
|
setDefaults() {
|
|
9092
9087
|
}
|
|
9093
9088
|
setValues() {
|
|
9094
|
-
this.subs.sink = this.
|
|
9089
|
+
this.subs.sink = this.mus.subscribe({
|
|
9095
9090
|
next: (data) => {
|
|
9096
9091
|
if (!data) {
|
|
9097
9092
|
return;
|
|
9098
9093
|
}
|
|
9099
9094
|
this.show = true;
|
|
9100
9095
|
this.message = data;
|
|
9101
|
-
this.config = this.
|
|
9096
|
+
this.config = this.mus.getConfig(data.type);
|
|
9102
9097
|
if (this.message?.timeout) {
|
|
9103
9098
|
setTimeout(() => {
|
|
9104
9099
|
this.show = false;
|
|
@@ -9110,7 +9105,7 @@ class Message2UserComponent extends ComponentBase {
|
|
|
9110
9105
|
//Events
|
|
9111
9106
|
onCloseAndBlock() {
|
|
9112
9107
|
this.show = false;
|
|
9113
|
-
if (this.
|
|
9108
|
+
if (this.config.go2dashboard) {
|
|
9114
9109
|
this.go.dashboard();
|
|
9115
9110
|
}
|
|
9116
9111
|
else {
|