@sowell/quasar-app-extension-auth 1.2.0 → 1.2.2

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": "1.2.0",
3
+ "version": "1.2.2",
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",
@@ -2,7 +2,7 @@
2
2
  <q-layout>
3
3
  <div class="row window-height">
4
4
  <div class="col column content-center bgWhite">
5
- <div class="q-mt-xl">
5
+ <div class="q-mt-xl custom-screen">
6
6
  <img src="../../assets/Sowell-logo.svg" style="width: 210px" />
7
7
  </div>
8
8
  <div class="column col content-center justify-center center">
@@ -345,4 +345,13 @@ export default defineComponent({
345
345
  display: none;
346
346
  }
347
347
  }
348
+ @media screen and (max-width: 1366px) and (max-height: 768px) {
349
+ .custom-screen {
350
+ margin-top: 15px;
351
+ margin-bottom: 125px;
352
+ }
353
+ .subtitle {
354
+ margin-bottom: 20px !important;
355
+ }
356
+ }
348
357
  </style>
@@ -8,10 +8,7 @@
8
8
  class="q-mb-sm q-mr-md"
9
9
  style="width: 190px" />
10
10
  </div>
11
- <div
12
- class="column justify-center full-height"
13
- style="max-width: 550px; margin-top: -90px">
14
- <div></div>
11
+ <div class="column justify-center full-height" style="max-width: 550px">
15
12
  <div
16
13
  class="text-subtitle1 q-mt-lg"
17
14
  style="font-size: 34px; font-weight: 600; line-height: 34px">
@@ -43,10 +40,11 @@
43
40
  class="full-width q-mb-md">
44
41
  <template #append>
45
42
  <q-icon
46
- :name="showPassword
47
- ? icons.ionEyeOffOutline
48
- : icons.ionEyeOutline
49
- "
43
+ :name="
44
+ showPassword
45
+ ? icons.ionEyeOffOutline
46
+ : icons.ionEyeOutline
47
+ "
50
48
  class="cursor-pointer q-mr-sm"
51
49
  @click="showPassword = !showPassword" />
52
50
  </template>
@@ -108,7 +106,7 @@ export default defineComponent({
108
106
  canSubmit,
109
107
  passwordUpdated,
110
108
  showPassword,
111
- icons,
109
+ icons,
112
110
  goToLoginPage,
113
111
  onSubmit
114
112
  }
@@ -1,9 +1,15 @@
1
- import CryptoJS from "crypto-js";
1
+ import CryptoJS from "crypto-js"
2
2
 
3
3
  export function encrypt(password: string): string {
4
- return CryptoJS.AES.encrypt(password, process.env.ENCRYPTION_KEY).toString()
4
+ const key = process.env.ENCRYPTION_KEY
5
+ if (!key) throw new Error(" is not defined")
6
+ return CryptoJS.AES.encrypt(password, key).toString()
5
7
  }
6
8
 
7
9
  export function decrypt(encryptedPassword: string): string {
8
- return CryptoJS.AES.decrypt(encryptedPassword, process.env.ENCRYPTION_KEY).toString(CryptoJS.enc.Utf8)
10
+ const key = process.env.ENCRYPTION_KEY
11
+ if (!key) throw new Error("ENCRYPTION_KEY is not defined")
12
+ return CryptoJS.AES.decrypt(encryptedPassword, key).toString(
13
+ CryptoJS.enc.Utf8
14
+ )
9
15
  }