@live-change/frontend-base 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. package/main.js +13 -0
  2. package/package.json +5 -5
package/main.js CHANGED
@@ -49,6 +49,19 @@ export function createApp(api, App, createRouter) {
49
49
  app.use(DialogService)
50
50
  app.provide(PrimeVueDialogSymbol, app.config.globalProperties.$dialog)
51
51
 
52
+ const oldCommand = api.command
53
+ api.command = async (...args) => {
54
+ console.log("API COMMAND!")
55
+ try {
56
+ return await oldCommand.apply(api, args)
57
+ } catch(error) {
58
+ const text = error.message || error
59
+ const toast = app.config.globalProperties.$toast
60
+ if(text == 'notAuthorized') toast.add({ severity:'error', summary: "Not Authorized", life: 5000 })
61
+ throw error
62
+ }
63
+ }
64
+
52
65
  app.directive('styleclass', StyleClass)
53
66
  app.directive('ripple', Ripple)
54
67
  app.directive('badge', BadgeDirective)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/frontend-base",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "scripts": {
5
5
  "memDev": "lcli memDev --enableSessions --initScript ./init.js --templatePath ../../base-frontend/index.html",
6
6
  "localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@live-change/cli": "0.6.5",
24
- "@live-change/dao": "0.4.13",
24
+ "@live-change/dao": "0.5.0",
25
25
  "@live-change/dao-vue3": "0.4.13",
26
26
  "@live-change/dao-websocket": "0.4.13",
27
- "@live-change/framework": "0.6.5",
27
+ "@live-change/framework": "0.6.6",
28
28
  "@live-change/password-authentication-service": "0.2.39",
29
29
  "@live-change/secret-code-service": "0.2.39",
30
30
  "@live-change/secret-link-service": "0.2.39",
31
- "@live-change/security-frontend": "^0.1.3",
31
+ "@live-change/security-frontend": "^0.1.4",
32
32
  "@live-change/session-service": "0.2.39",
33
33
  "@live-change/user-service": "0.2.37",
34
34
  "@live-change/vue3-components": "0.2.12",
@@ -70,5 +70,5 @@
70
70
  "author": "",
71
71
  "license": "ISC",
72
72
  "description": "",
73
- "gitHead": "fc40c38d8e23285a468b5d2ee68d46a540426f78"
73
+ "gitHead": "cd4fa394f01bacdfebb021bb0949e35ca16cc016"
74
74
  }