@oniti/quasar-app-extension-vlank-auth 3.2.24 → 3.2.25

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/README.md CHANGED
@@ -23,9 +23,43 @@ quasar ext remove @oniti/vlank-auth
23
23
  yarn upgrade @oniti/vlank-auth
24
24
  ```
25
25
 
26
- ### Publication
26
+ ### Live extension development
27
27
  ```bash
28
- # seule étape nécessaire (la commande demande le nouveau de version)
28
+ # in this extension root directory (once for all):
29
+ yarn link
30
+
31
+ # in host project (laravel-vlank, probably) frontend directory:
32
+ # (delete node_modules + yarn install to get to the original state)
33
+ yarn link "@oniti/quasar-app-extension-vlank-auth"
34
+ ```
35
+ In quasar.conf.js of host project:
36
+ ```javascript
37
+ devServer: {
38
+ …
39
+ watchFiles: [
40
+ '/node_modules/@oniti/quasar-app-extension-vlank-auth/src/**/*',
41
+ ],
42
+ }
43
+ ```
44
+
45
+ ### Live extension development (alternative)
46
+ I (Julien) was unable to make the above work ("missing index script") so I use this instead:
47
+ ```bash
48
+ # delete the src subdirectory of the extension in the host project (in front-end directory):
49
+ rm -rf node_modules/@oniti/quasar-app-extension-vlank-auth/src
50
+ # link directly the src directory of the extension:
51
+ ln -s /home/xfennec/git/vlank-auth/src/ node_modules/@oniti/quasar-app-extension-vlank-auth/src
52
+ ```
53
+
54
+ That's it. The extension is already in devServer's watchFiles of laravel-vlank,
55
+ so it will be reloaded automatically when you change something in the extension.
56
+
57
+ edit: I was also able to make it work by modifying files in node_modules and
58
+ running `quasar clean` in the host project + restarting `./serve.sh` for quick tests.
59
+
60
+ ### Publish
61
+ ```bash
62
+ # only necessary step (asks for new version):
29
63
  yarn publish
30
64
  ```
31
65
 
@@ -101,6 +135,7 @@ Route example:
101
135
  // passwordCreateRoute : '/', // optional, defaultpasswordCreateRoute otherwise
102
136
  rights : ['admin-panel'] // optional
103
137
  logoutOnUnsufisantRights: true, // optional
138
+ // ignoreAuthRedirect: true // optional
104
139
  },
105
140
  component: () => import('layouts/MainLayout.vue'),
106
141
  children: [
@@ -121,6 +156,7 @@ Route example:
121
156
  | rights | array of required rights, a message will pop if **any** right is missing! |
122
157
  | typeRightCheck | string, "any" or "all" define if all rights are requiered or only one |
123
158
  | logoutOnUnsufisantRights | self explaining :) |
159
+ | ignoreAuthRedirect | if true, no redirection will be done on this route (useful for public pages where you want to preserve query params) |
124
160
 
125
161
  ## Helpers
126
162
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oniti/quasar-app-extension-vlank-auth",
3
- "version": "3.2.24",
3
+ "version": "3.2.25",
4
4
  "description": "Authentification",
5
5
  "author": "François BOUYER <francois@oniti.fr>",
6
6
  "license": "MIT",
package/src/boot/index.js CHANGED
@@ -182,7 +182,10 @@ export default boot(({ app, router, store }) => {
182
182
  : config.defaultRedirectRoute;
183
183
  route_to_go = redirectRoute;
184
184
  }
185
- if (router.currentRoute.path !== route_to_go) {
185
+
186
+ const ignoreRedirect = router.currentRoute.value.matched.some(record => record.meta.ignoreAuthRedirect);
187
+
188
+ if (!ignoreRedirect && router.currentRoute.value.path !== route_to_go) {
186
189
  router.push(route_to_go);
187
190
  }
188
191
  resolve();
@@ -1,5 +1,9 @@
1
1
  <template>
2
2
  <div class="absolute-center container">
3
+ <!--
4
+ Attention avec Firefox, le logo DOIT avoir un width et un height dans
5
+ le fichier SVG lui-même, sinon il apparaitra avec de mauvaises proportions.
6
+ -->
3
7
  <q-img alt="" class="logo q-mb-md" :src="getLogoImage()" />
4
8
  <q-card class="fit column q-pa-lg login-form-container">
5
9
  <vlank-input