@sowell/quasar-app-extension-auth 0.3.9 → 0.3.12

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": "@sowell/quasar-app-extension-auth",
3
- "version": "0.3.9",
3
+ "version": "0.3.12",
4
4
  "description": "A Quasar app extension to manage Authentication",
5
5
  "main": "src/index.js",
6
6
  "repository": "https://github.com/sowell-ai/quasar.extension.auth",
@@ -10,7 +10,6 @@ export default boot(({ app, router }: BootInterface) => {
10
10
  } = prompts;
11
11
 
12
12
  router.beforeEach((to, from, next) => {
13
- const auth = JSON.parse(LocalStorage.getItem("vuex") || "{}");
14
13
  const authState = app.config.globalProperties.authState;
15
14
  const isValid = authState.payload?.exp
16
15
  ? new Date(authState.payload?.exp * 1000) >= new Date()
@@ -18,9 +17,6 @@ export default boot(({ app, router }: BootInterface) => {
18
17
  : false
19
18
  : false;
20
19
 
21
- if (authState.raw === "") {
22
- if (auth) authState.updateRaw(auth?.token?.raw);
23
- }
24
20
  let token = authState.raw;
25
21
  if (
26
22
  (!isValid || !token) &&
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <q-card>
3
3
  <q-page class="row bg-white">
4
- <div class="col-6 q-pa-xl row justify-center">
4
+ <div class="col-6 q-pa-xl row justify-center center">
5
5
  <div class="left-side full-width full-height">
6
6
  <img
7
7
  class="logo"
@@ -29,7 +29,7 @@
29
29
  data-cy="emailReset"
30
30
  autofocus
31
31
  />
32
- <div class="q-mt-lg row">
32
+ <div class="q-mt-lg row justify-between items-center">
33
33
  <q-btn
34
34
  color="primary"
35
35
  :icon-right="icons.ionPaperPlaneOutline"
@@ -43,6 +43,18 @@
43
43
  @click="sendEmail"
44
44
  v-close-popup
45
45
  />
46
+
47
+ <q-btn
48
+ color="primary"
49
+ style="max-width: 330px"
50
+ data-cy="close_send_email"
51
+ align="center"
52
+ no-caps
53
+ flat
54
+ :label="$t('auth.login')"
55
+ class="btn-min"
56
+ v-close-popup
57
+ />
46
58
  </div>
47
59
  </div>
48
60
  </div>
@@ -88,7 +100,7 @@ export default defineComponent({
88
100
  });
89
101
  </script>
90
102
 
91
- <style>
103
+ <style scoped>
92
104
  .bg-image {
93
105
  background: #eef8fd;
94
106
  height: 100vh !important;
@@ -103,6 +115,16 @@ export default defineComponent({
103
115
  max-width: 500px;
104
116
  }
105
117
  .illustration {
106
- width: 600px;
118
+ max-width: 600px;
119
+ width: 100%;
120
+ }
121
+
122
+ @media screen and (max-width: 900px) {
123
+ .bg-image {
124
+ display: none;
125
+ }
126
+ .center{
127
+ width: 100%;
128
+ }
107
129
  }
108
130
  </style>
@@ -72,7 +72,7 @@ export default defineComponent({
72
72
  },
73
73
  });
74
74
  </script>
75
- <style lang="sass">
75
+ <style scoped lang="sass">
76
76
  .top
77
77
  background: #EEF8FD
78
78
 
@@ -6,11 +6,10 @@
6
6
  <img
7
7
  src="../../assets/Sowell-logo.svg"
8
8
  style="width: 210px"
9
- class="logoWhite"
10
9
  />
11
10
  </div>
12
- <div class="column col content-center justify-center bgWhite">
13
- <div style="max-width: 500px">
11
+ <div class="column col content-center justify-center center" >
12
+ <div class="q-pl-md q-pr-md" style="max-width: 500px">
14
13
  <h4 class="title">{{ WELCOME_TITLE }}</h4>
15
14
  <div class="subtitle">{{ WELCOME_SUBTITLE }}</div>
16
15
  <q-form @submit="onSubmit">
@@ -44,7 +43,7 @@
44
43
  <template #append>
45
44
  <q-icon
46
45
  :name="
47
- showPassword ? icons.ionEyeSharp : icons.ionEyeOffSharp
46
+ showPassword ? icons.ionEyeOffSharp : icons.ionEyeSharp
48
47
  "
49
48
  class="cursor-pointer q-mr-sm lightenDark"
50
49
  @click="showPassword = !showPassword"
@@ -78,16 +77,16 @@
78
77
  </div>
79
78
  </div>
80
79
  <div
81
- class="column col justify-center content-center"
80
+ class="column col justify-center content-center mobile"
82
81
  :style="isManager ? 'background: #eef8fd' : ''"
83
82
  :class="!isManager ? 'bgBlue' : ''"
84
83
  >
85
84
  <img
86
85
  v-if="isManager"
87
86
  src="../../assets/illustration-login.svg"
88
- style="width: 600px"
87
+ class="q-pl-md q-pr-md logoWhite"
89
88
  />
90
- <img v-else src="../../assets/SowellWhite.svg" class="logoWhite" />
89
+ <img v-else src="../../assets/SowellWhite.svg" class="q-pl-md q-pr-md logoWhite" />
91
90
  </div>
92
91
  </div>
93
92
  <div>
@@ -221,6 +220,11 @@ export default defineComponent({
221
220
  </script>
222
221
 
223
222
  <style scoped>
223
+
224
+ .center {
225
+ margin-top: -115px;
226
+ }
227
+
224
228
  .bgWhite {
225
229
  background: #ffffff;
226
230
  }
@@ -237,9 +241,16 @@ export default defineComponent({
237
241
  margin-bottom: 80px;
238
242
  }
239
243
  .logoWhite {
240
- width: 30%;
244
+ max-width: 600px;
245
+ width: 100%;
241
246
  }
242
247
  .submitBtn {
243
248
  width: 254px;
244
249
  }
250
+
251
+ @media screen and (max-width: 900px) {
252
+ .mobile {
253
+ display: none;
254
+ }
255
+ }
245
256
  </style>