@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d-mok/quasar-app-extension-quasar-axe",
3
- "version": "2.1.41",
3
+ "version": "2.1.43",
4
4
  "description": "A Quasar App Extension",
5
5
  "author": "d-mok <49301824+d-mok@users.noreply.github.com>",
6
6
  "license": "MIT",
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',
@@ -0,0 +1,8 @@
1
+ import { boot } from 'quasar/wrappers'
2
+ import { qNotify } from '../../utils'
3
+
4
+ console.log('[QuasarAxe] Run Boot LoadEnd')
5
+
6
+ export default boot(({ app }) => {
7
+ qNotify.unload()
8
+ })
@@ -0,0 +1,8 @@
1
+ import { boot } from 'quasar/wrappers'
2
+ import { qNotify } from '../../utils'
3
+
4
+ console.log('[QuasarAxe] Run Boot LoadStart')
5
+
6
+ export default boot(({ app }) => {
7
+ qNotify.load()
8
+ })
@@ -9,7 +9,7 @@ async function fetchAPI(
9
9
  action: 'read' | 'insert' | 'delete',
10
10
  payload: object = {}
11
11
  ) {
12
- let stopLoading = qNotify.load('Loading...')
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
- stopLoading()
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...'): () => void {
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
- return () => {
42
- if (loadingCount === 1) {
43
- stopper()
44
- }
45
- loadingCount--
46
- }
41
+ }
42
+
43
+ export function unload(): void {
44
+ if (loadingCount === 1) stopper()
45
+ loadingCount--
47
46
  }