@d-mok/quasar-app-extension-quasar-axe 2.1.41 → 2.1.43
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/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -2,6 +2,8 @@ function extendQuasarConf(conf, prompts) {
|
|
|
2
2
|
for (let b of ['AutoRoute', 'AutoReg', 'Interceptor'])
|
|
3
3
|
conf.boot.unshift(`axe/${b}`)
|
|
4
4
|
console.log('[QuasarAxe] Config pushed Boots')
|
|
5
|
+
conf.boot.unshift('axe/LoadStart')
|
|
6
|
+
conf.boot.push('axe/LoadEnd')
|
|
5
7
|
|
|
6
8
|
conf.framework.plugins.push(
|
|
7
9
|
'AppVisibility',
|
|
@@ -9,7 +9,7 @@ async function fetchAPI(
|
|
|
9
9
|
action: 'read' | 'insert' | 'delete',
|
|
10
10
|
payload: object = {}
|
|
11
11
|
) {
|
|
12
|
-
|
|
12
|
+
qNotify.load('Loading...')
|
|
13
13
|
const res = await fetch(
|
|
14
14
|
appScriptRootUrl +
|
|
15
15
|
new URLSearchParams({
|
|
@@ -19,7 +19,7 @@ async function fetchAPI(
|
|
|
19
19
|
payload: JSON.stringify(payload),
|
|
20
20
|
})
|
|
21
21
|
)
|
|
22
|
-
|
|
22
|
+
qNotify.unload()
|
|
23
23
|
const data = await res.json()
|
|
24
24
|
console.dev('[gSheet]', action, id, sheet)
|
|
25
25
|
console.dev(action === 'read' ? data : payload)
|
|
@@ -53,4 +53,4 @@ export async function deleteRow(
|
|
|
53
53
|
): Promise<void> {
|
|
54
54
|
const data = await fetchAPI(id, sheet, 'delete', { field, value })
|
|
55
55
|
if (data !== true) throw new Error('[gSheet] delete failed')
|
|
56
|
-
}
|
|
56
|
+
}
|
|
@@ -30,7 +30,7 @@ export function info(message: string): void {
|
|
|
30
30
|
let loadingCount = 0
|
|
31
31
|
let stopper: () => void = () => {}
|
|
32
32
|
|
|
33
|
-
export function load(loadingMsg = 'Loading...'):
|
|
33
|
+
export function load(loadingMsg = 'Loading...'): void {
|
|
34
34
|
if (loadingCount === 0) {
|
|
35
35
|
stopper = Notify.create({
|
|
36
36
|
type: 'ongoing',
|
|
@@ -38,10 +38,9 @@ export function load(loadingMsg = 'Loading...'): () => void {
|
|
|
38
38
|
})
|
|
39
39
|
}
|
|
40
40
|
loadingCount++
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function unload(): void {
|
|
44
|
+
if (loadingCount === 1) stopper()
|
|
45
|
+
loadingCount--
|
|
47
46
|
}
|