@etsoo/appscript 1.5.60 → 1.5.61
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/cjs/app/CoreApp.d.ts +2 -1
- package/lib/cjs/app/CoreApp.js +6 -3
- package/lib/cjs/app/IApp.d.ts +2 -1
- package/lib/mjs/app/CoreApp.d.ts +2 -1
- package/lib/mjs/app/CoreApp.js +6 -3
- package/lib/mjs/app/IApp.d.ts +2 -1
- package/package.json +1 -1
- package/src/app/CoreApp.ts +6 -3
- package/src/app/IApp.ts +2 -1
package/lib/cjs/app/CoreApp.d.ts
CHANGED
|
@@ -635,8 +635,9 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
635
635
|
protected setupTasks(): void;
|
|
636
636
|
/**
|
|
637
637
|
* Signout, with userLogout and toLoginPage
|
|
638
|
+
* @param action Callback
|
|
638
639
|
*/
|
|
639
|
-
signout(): Promise<void>;
|
|
640
|
+
signout(action?: () => void | boolean): Promise<void>;
|
|
640
641
|
/**
|
|
641
642
|
* Go to the login page
|
|
642
643
|
* @param data Login parameters
|
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -1632,8 +1632,9 @@ class CoreApp {
|
|
|
1632
1632
|
}
|
|
1633
1633
|
/**
|
|
1634
1634
|
* Signout, with userLogout and toLoginPage
|
|
1635
|
+
* @param action Callback
|
|
1635
1636
|
*/
|
|
1636
|
-
async signout() {
|
|
1637
|
+
async signout(action) {
|
|
1637
1638
|
// Clear the keep login status
|
|
1638
1639
|
this.keepLogin = false;
|
|
1639
1640
|
// Reset all APIs
|
|
@@ -1656,8 +1657,10 @@ class CoreApp {
|
|
|
1656
1657
|
}
|
|
1657
1658
|
// Clear, noTrigger = true, avoid state update
|
|
1658
1659
|
this.userLogout(true, true);
|
|
1659
|
-
|
|
1660
|
-
|
|
1660
|
+
if (action == null || action() !== false) {
|
|
1661
|
+
// Go to login page
|
|
1662
|
+
this.toLoginPage({ params: { tryLogin: false }, removeUrl: true });
|
|
1663
|
+
}
|
|
1661
1664
|
}
|
|
1662
1665
|
/**
|
|
1663
1666
|
* Go to the login page
|
package/lib/cjs/app/IApp.d.ts
CHANGED
|
@@ -571,8 +571,9 @@ export interface IApp {
|
|
|
571
571
|
setupLogging(action?: (data: ErrorData) => void | Promise<void>, preventDefault?: ((type: ErrorType) => boolean) | boolean): void;
|
|
572
572
|
/**
|
|
573
573
|
* Signout, with userLogout and toLoginPage
|
|
574
|
+
* @param action Callback
|
|
574
575
|
*/
|
|
575
|
-
signout(): Promise<void>;
|
|
576
|
+
signout(action?: () => void | boolean): Promise<void>;
|
|
576
577
|
/**
|
|
577
578
|
* Persist settings to source when application exit
|
|
578
579
|
*/
|
package/lib/mjs/app/CoreApp.d.ts
CHANGED
|
@@ -635,8 +635,9 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
635
635
|
protected setupTasks(): void;
|
|
636
636
|
/**
|
|
637
637
|
* Signout, with userLogout and toLoginPage
|
|
638
|
+
* @param action Callback
|
|
638
639
|
*/
|
|
639
|
-
signout(): Promise<void>;
|
|
640
|
+
signout(action?: () => void | boolean): Promise<void>;
|
|
640
641
|
/**
|
|
641
642
|
* Go to the login page
|
|
642
643
|
* @param data Login parameters
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -1629,8 +1629,9 @@ export class CoreApp {
|
|
|
1629
1629
|
}
|
|
1630
1630
|
/**
|
|
1631
1631
|
* Signout, with userLogout and toLoginPage
|
|
1632
|
+
* @param action Callback
|
|
1632
1633
|
*/
|
|
1633
|
-
async signout() {
|
|
1634
|
+
async signout(action) {
|
|
1634
1635
|
// Clear the keep login status
|
|
1635
1636
|
this.keepLogin = false;
|
|
1636
1637
|
// Reset all APIs
|
|
@@ -1653,8 +1654,10 @@ export class CoreApp {
|
|
|
1653
1654
|
}
|
|
1654
1655
|
// Clear, noTrigger = true, avoid state update
|
|
1655
1656
|
this.userLogout(true, true);
|
|
1656
|
-
|
|
1657
|
-
|
|
1657
|
+
if (action == null || action() !== false) {
|
|
1658
|
+
// Go to login page
|
|
1659
|
+
this.toLoginPage({ params: { tryLogin: false }, removeUrl: true });
|
|
1660
|
+
}
|
|
1658
1661
|
}
|
|
1659
1662
|
/**
|
|
1660
1663
|
* Go to the login page
|
package/lib/mjs/app/IApp.d.ts
CHANGED
|
@@ -571,8 +571,9 @@ export interface IApp {
|
|
|
571
571
|
setupLogging(action?: (data: ErrorData) => void | Promise<void>, preventDefault?: ((type: ErrorType) => boolean) | boolean): void;
|
|
572
572
|
/**
|
|
573
573
|
* Signout, with userLogout and toLoginPage
|
|
574
|
+
* @param action Callback
|
|
574
575
|
*/
|
|
575
|
-
signout(): Promise<void>;
|
|
576
|
+
signout(action?: () => void | boolean): Promise<void>;
|
|
576
577
|
/**
|
|
577
578
|
* Persist settings to source when application exit
|
|
578
579
|
*/
|
package/package.json
CHANGED
package/src/app/CoreApp.ts
CHANGED
|
@@ -2218,8 +2218,9 @@ export abstract class CoreApp<
|
|
|
2218
2218
|
|
|
2219
2219
|
/**
|
|
2220
2220
|
* Signout, with userLogout and toLoginPage
|
|
2221
|
+
* @param action Callback
|
|
2221
2222
|
*/
|
|
2222
|
-
async signout() {
|
|
2223
|
+
async signout(action?: () => void | boolean) {
|
|
2223
2224
|
// Clear the keep login status
|
|
2224
2225
|
this.keepLogin = false;
|
|
2225
2226
|
|
|
@@ -2253,8 +2254,10 @@ export abstract class CoreApp<
|
|
|
2253
2254
|
// Clear, noTrigger = true, avoid state update
|
|
2254
2255
|
this.userLogout(true, true);
|
|
2255
2256
|
|
|
2256
|
-
|
|
2257
|
-
|
|
2257
|
+
if (action == null || action() !== false) {
|
|
2258
|
+
// Go to login page
|
|
2259
|
+
this.toLoginPage({ params: { tryLogin: false }, removeUrl: true });
|
|
2260
|
+
}
|
|
2258
2261
|
}
|
|
2259
2262
|
|
|
2260
2263
|
/**
|
package/src/app/IApp.ts
CHANGED
|
@@ -770,8 +770,9 @@ export interface IApp {
|
|
|
770
770
|
|
|
771
771
|
/**
|
|
772
772
|
* Signout, with userLogout and toLoginPage
|
|
773
|
+
* @param action Callback
|
|
773
774
|
*/
|
|
774
|
-
signout(): Promise<void>;
|
|
775
|
+
signout(action?: () => void | boolean): Promise<void>;
|
|
775
776
|
|
|
776
777
|
/**
|
|
777
778
|
* Persist settings to source when application exit
|