@etsoo/react 1.5.13 → 1.5.14
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/app/ServiceApp.d.ts
CHANGED
|
@@ -66,8 +66,11 @@ export declare class ServiceApp<U extends IServiceUser = IServiceUser, P extends
|
|
|
66
66
|
serviceEncrypt(message: string, passphrase?: string, iterations?: number): string;
|
|
67
67
|
/**
|
|
68
68
|
* Try login
|
|
69
|
+
* @param data Additional data
|
|
70
|
+
* @param showLoading Show loading bar or not
|
|
71
|
+
* @returns Result
|
|
69
72
|
*/
|
|
70
|
-
tryLogin<D extends {} = {}>(data?: D): Promise<boolean>;
|
|
73
|
+
tryLogin<D extends {} = {}>(data?: D, showLoading?: boolean): Promise<boolean>;
|
|
71
74
|
/**
|
|
72
75
|
* User login extended
|
|
73
76
|
* @param user Core system user
|
package/lib/app/ServiceApp.js
CHANGED
|
@@ -206,10 +206,13 @@ export class ServiceApp extends ReactApp {
|
|
|
206
206
|
}
|
|
207
207
|
/**
|
|
208
208
|
* Try login
|
|
209
|
+
* @param data Additional data
|
|
210
|
+
* @param showLoading Show loading bar or not
|
|
211
|
+
* @returns Result
|
|
209
212
|
*/
|
|
210
|
-
async tryLogin(data) {
|
|
213
|
+
async tryLogin(data, showLoading) {
|
|
211
214
|
// Reset user state
|
|
212
|
-
const result = await super.tryLogin(data);
|
|
215
|
+
const result = await super.tryLogin(data, showLoading);
|
|
213
216
|
if (!result)
|
|
214
217
|
return false;
|
|
215
218
|
// Refresh token
|
|
@@ -228,6 +231,7 @@ export class ServiceApp extends ReactApp {
|
|
|
228
231
|
});
|
|
229
232
|
},
|
|
230
233
|
data,
|
|
234
|
+
showLoading,
|
|
231
235
|
relogin: true
|
|
232
236
|
});
|
|
233
237
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.14",
|
|
4
4
|
"description": "TypeScript ReactJs framework",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@emotion/react": "^11.7.1",
|
|
51
51
|
"@emotion/style": "^0.8.0",
|
|
52
52
|
"@emotion/styled": "^11.6.0",
|
|
53
|
-
"@etsoo/appscript": "^1.2.
|
|
53
|
+
"@etsoo/appscript": "^1.2.49",
|
|
54
54
|
"@etsoo/notificationbase": "^1.1.1",
|
|
55
55
|
"@etsoo/shared": "^1.1.11",
|
|
56
56
|
"@mui/icons-material": "^5.4.1",
|
package/src/app/ServiceApp.ts
CHANGED
|
@@ -300,10 +300,16 @@ export class ServiceApp<
|
|
|
300
300
|
|
|
301
301
|
/**
|
|
302
302
|
* Try login
|
|
303
|
+
* @param data Additional data
|
|
304
|
+
* @param showLoading Show loading bar or not
|
|
305
|
+
* @returns Result
|
|
303
306
|
*/
|
|
304
|
-
override async tryLogin<D extends {} = {}>(
|
|
307
|
+
override async tryLogin<D extends {} = {}>(
|
|
308
|
+
data?: D,
|
|
309
|
+
showLoading?: boolean
|
|
310
|
+
) {
|
|
305
311
|
// Reset user state
|
|
306
|
-
const result = await super.tryLogin(data);
|
|
312
|
+
const result = await super.tryLogin(data, showLoading);
|
|
307
313
|
if (!result) return false;
|
|
308
314
|
|
|
309
315
|
// Refresh token
|
|
@@ -323,6 +329,7 @@ export class ServiceApp<
|
|
|
323
329
|
});
|
|
324
330
|
},
|
|
325
331
|
data,
|
|
332
|
+
showLoading,
|
|
326
333
|
relogin: true
|
|
327
334
|
});
|
|
328
335
|
}
|