@hostlink/nuxt-light 1.10.5 → 1.10.6

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/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.10.5"
4
+ "version": "1.10.6"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { useQuasar,Dialog, Notify } from "quasar"
2
+ import { useQuasar } from "quasar"
3
3
  import { computed, ref, reactive } from "vue";
4
4
  import { q, m } from "#imports";
5
5
 
@@ -69,7 +69,7 @@ const onRestore = () => {
69
69
  revision_id: selectedRevision.value.revision_id,
70
70
  fields: restore_fields.value
71
71
  })) {
72
- Notify.create({
72
+ quasar.notify({
73
73
  message: 'Restored successfully',
74
74
  color: 'positive'
75
75
  })
@@ -144,9 +144,9 @@ const getDiffHtml = (diffs) => {
144
144
 
145
145
  <q-checkbox label="Show changed only" v-model="showOnlyDelta" :color="$light.color"></q-checkbox>
146
146
 
147
- <q-btn-toggle class="q-mx-md" v-model="outputFormat" :toggle-color="$light.color" :options="[
148
- { label: 'side-by-side', value: 'side-by-side' }, { label: 'line-by-line', value: 'line-by-line' }
149
- ]" />
147
+ <q-btn-toggle class="q-mx-md" v-model="outputFormat" :toggle-color="$light.color" :options="[
148
+ { label: 'side-by-side', value: 'side-by-side' }, { label: 'line-by-line', value: 'line-by-line' }
149
+ ]" />
150
150
  <q-space />
151
151
  <q-btn flat round dense icon="close" @click="showDialog = false" />
152
152
  </q-toolbar>
@@ -1,10 +1,11 @@
1
1
  <script setup>
2
2
  import { useLight } from "#imports";
3
3
  import { ref, reactive, onMounted } from 'vue'
4
- import { useQuasar, Notify, Dialog } from 'quasar';
4
+ import { useQuasar } from 'quasar';
5
5
  import { useI18n } from 'vue-i18n';
6
6
  import { m, notify } from '#imports';
7
7
 
8
+
8
9
  import { login, webauthnLogin } from '@hostlink/light';
9
10
 
10
11
  const light = useLight();
@@ -21,6 +22,7 @@ const data = reactive({
21
22
  });
22
23
 
23
24
  const qua = useQuasar()
25
+
24
26
  const submit = async () => {
25
27
  if (await form1.value.validate()) {
26
28
 
@@ -35,7 +37,7 @@ const submit = async () => {
35
37
  }
36
38
 
37
39
  const forgetPassword = async () => {
38
- Dialog.create({
40
+ qua.dialog({
39
41
  title: i18n.t("Forget password"),
40
42
  message: "Please enter your email address, we will send you a code to reset your password",
41
43
  prompt: {
@@ -142,7 +144,7 @@ onMounted(() => {
142
144
 
143
145
 
144
146
  if (!window.google) {
145
- Notify.create({
147
+ qua.notify({
146
148
  message: "Google login is not available", //set script https://accounts.google.com/gsi/client in nuuxt.config.js
147
149
  color: "negative",
148
150
  icon: "sym_o_error",
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import { ref } from 'vue'
3
3
  import { useRouter, useRoute } from "vue-router";
4
- import { useQuasar, Dialog, Notify } from "quasar";
4
+ import { useQuasar } from "quasar";
5
5
  import { model } from "@hostlink/light"
6
6
 
7
7
  const route = useRoute();
@@ -41,7 +41,7 @@ if (!props.context.onSubmit) {
41
41
  try {
42
42
  if (route.params[id_name]) {//edit
43
43
  if (await model(module).update(parseInt(route.params[id_name]), v)) {
44
- Notify.create({
44
+ quasar.notify({
45
45
  message: "Updated successfully",
46
46
  color: "positive",
47
47
  icon: "sym_o_check"
@@ -51,7 +51,7 @@ if (!props.context.onSubmit) {
51
51
  }
52
52
  } else {
53
53
  if (await model(module).add(v)) {
54
- Notify.create({
54
+ quasar.notify({
55
55
  message: "Added successfully",
56
56
  color: "positive",
57
57
  icon: "sym_o_check"
@@ -5,6 +5,7 @@ import { ref } from "vue"
5
5
  import { useI18n } from 'vue-i18n';
6
6
  const { t } = useI18n();
7
7
  const qua = useQuasar();
8
+ const quasar = useQuasar();
8
9
 
9
10
  const loadData = async () => {
10
11
  return await q("listRole", ["name", "canDelete", "canUpdate", "children", {
@@ -1,20 +1,21 @@
1
1
  <script setup>
2
2
  import { m } from '../../'
3
- import { Notify } from "quasar"
3
+ import { useQuasar } from "quasar"
4
+ const quasar = useQuasar();
4
5
 
5
6
  const onSubmit = async (data) => {
6
7
  try {
7
8
  await m("mailTest", data)
8
9
 
9
10
 
10
- Notify.create({
11
+ quasar.notify({
11
12
  message: "Email sent",
12
13
  color: "positive",
13
14
  icon: "check"
14
15
  });
15
16
 
16
17
  } catch (e) {
17
- Notify.create({
18
+ quasar.notify({
18
19
  message: e.message,
19
20
  color: "negative",
20
21
  icon: "warning"
@@ -1,8 +1,9 @@
1
1
  <script setup>
2
2
  import { ref } from 'vue'
3
- import { Notify } from 'quasar'
3
+ import { useQuasar } from 'quasar'
4
4
  import { reset } from "@formkit/core"
5
5
  import { q, m } from '#imports'
6
+ const quasar = useQuasar()
6
7
 
7
8
  const { app } = await q({ app: { config: ["name", "value"] } })
8
9
  const obj = app.config.reduce((acc, cur) => {
@@ -47,7 +48,7 @@ const onSubmit = async (d, form) => {
47
48
 
48
49
  await m("updateAppConfigs", { data })
49
50
  //show success
50
- Notify.create({
51
+ quasar.notify({
51
52
  message: "Settings updated",
52
53
  color: "positive",
53
54
  icon: "check"
@@ -83,11 +84,11 @@ const tab = ref('general')
83
84
  </template>
84
85
  <template #after>
85
86
  <FormKit type="l-form" :bordered="false" :value="{
86
- company: obj.company,
87
- company_logo: obj.company_logo,
88
- copyright_name: obj.copyright_name,
89
- copyright_year: obj.copyright_year
90
- }" v-if="tab == 'general'" @submit="onSubmit">
87
+ company: obj.company,
88
+ company_logo: obj.company_logo,
89
+ copyright_name: obj.copyright_name,
90
+ copyright_year: obj.copyright_year
91
+ }" v-if="tab == 'general'" @submit="onSubmit">
91
92
  <FormKit type="l-input" label="Company" name="company" validation="required"></FormKit>
92
93
  <FormKit type="l-input" label="Company logo" name="company_logo"></FormKit>
93
94
 
@@ -97,16 +98,16 @@ const tab = ref('general')
97
98
  </FormKit>
98
99
 
99
100
  <FormKit type="l-form" :bordered="false" :value="{
100
- password_contains_uppercase: obj.password_contains_uppercase,
101
- password_contains_lowercase: obj.password_contains_lowercase,
102
- password_contains_numeric: obj.password_contains_numeric,
103
- password_contains_symbol: obj.password_contains_symbol,
104
- password_min_length: obj.password_min_length,
105
- two_factor_authentication: obj.two_factor_authentication,
106
- auth_lockout_duration: obj.auth_lockout_duration,
107
- auth_lockout_attempts: obj.auth_lockout_attempts,
108
- access_token_expire: obj.access_token_expire,
109
- }" v-if="tab == 'security'" @submit="onSubmit">
101
+ password_contains_uppercase: obj.password_contains_uppercase,
102
+ password_contains_lowercase: obj.password_contains_lowercase,
103
+ password_contains_numeric: obj.password_contains_numeric,
104
+ password_contains_symbol: obj.password_contains_symbol,
105
+ password_min_length: obj.password_min_length,
106
+ two_factor_authentication: obj.two_factor_authentication,
107
+ auth_lockout_duration: obj.auth_lockout_duration,
108
+ auth_lockout_attempts: obj.auth_lockout_attempts,
109
+ access_token_expire: obj.access_token_expire,
110
+ }" v-if="tab == 'security'" @submit="onSubmit">
110
111
  <q-field label="Password policy" stack-label>
111
112
  <FormKit type="l-checkbox" label="Upper Case" name="password_contains_uppercase"
112
113
  true-value="1" false-value="0" />
@@ -142,9 +143,9 @@ const tab = ref('general')
142
143
  </FormKit>
143
144
 
144
145
  <FormKit type="l-form" :bordered="false" :value="{
145
- file_manager: obj.file_manager,
146
- revision: obj.revision
147
- }" v-if="tab == 'Modules'" @submit="onSubmit">
146
+ file_manager: obj.file_manager,
147
+ revision: obj.revision
148
+ }" v-if="tab == 'Modules'" @submit="onSubmit">
148
149
  <q-field label="File manager" stack-label>
149
150
  <FormKit type="l-checkbox" label="Show" name="file_manager" true-value="1"
150
151
  false-value="0" />
@@ -157,14 +158,14 @@ const tab = ref('general')
157
158
  </FormKit>
158
159
 
159
160
  <FormKit type="l-form" :bordered="false" :value="{
160
- mode: obj.mode,
161
+ mode: obj.mode,
161
162
 
162
- }" v-if="tab == 'Developer'" @submit="onSubmit">
163
+ }" v-if="tab == 'Developer'" @submit="onSubmit">
163
164
  <FormKit label="Mode" type="l-select" :options="[
164
- { label: 'Production', value: 'prod' },
165
- { label: 'Development', value: 'dev' },
165
+ { label: 'Production', value: 'prod' },
166
+ { label: 'Development', value: 'dev' },
166
167
 
167
- ]" name="mode" validation="required">
168
+ ]" name="mode" validation="required">
168
169
  </FormKit>
169
170
  </FormKit>
170
171
  </template>
@@ -1,8 +1,9 @@
1
1
  <script setup>
2
2
  import { ref, reactive } from 'vue';
3
3
  import { m, q } from '#imports'
4
- import { Notify } from 'quasar';
4
+ import { useQuasar } from 'quasar';
5
5
  import { useI18n } from 'vue-i18n';
6
+ const quasar = useQuasar();
6
7
  const { t } = useI18n();
7
8
  const app = await q("app", ["languages"])
8
9
 
@@ -29,7 +30,7 @@ const onSave = async () => {
29
30
  }
30
31
  })
31
32
 
32
- Notify.create({
33
+ quasar.notify({
33
34
  message: "Save success",
34
35
  color: "positive",
35
36
  icon: "check"
@@ -69,7 +70,7 @@ const onUpdateTranslate = async (value, language, name) => {
69
70
  language: language,
70
71
  value: value
71
72
  })) {
72
- Notify.create({
73
+ quasar.notify({
73
74
  message: "Update success",
74
75
  color: "positive",
75
76
  icon: "check"
@@ -83,7 +84,7 @@ const onDelete = async (name) => {
83
84
  if (await m("deleteTranslate", {
84
85
  name: name
85
86
  })) {
86
- Notify.create({
87
+ quasar.notify({
87
88
  message: "Delete success",
88
89
  color: "positive",
89
90
  icon: "check"
@@ -104,7 +105,8 @@ const onDelete = async (name) => {
104
105
  <template #body="props">
105
106
  <q-tr :props="props">
106
107
  <q-td key="_delete" auto-width>
107
- <q-btn dense flat round icon="sym_o_delete" @click="onDelete(props.row.name)"></q-btn>
108
+ <q-btn dense flat round icon="sym_o_delete"
109
+ @click="onDelete(props.row.name)"></q-btn>
108
110
  </q-td>
109
111
  <q-td key="name">
110
112
  {{ props.row.name }}
@@ -2,8 +2,9 @@
2
2
  import { useI18n } from 'vue-i18n'
3
3
  import { q, m } from '#imports'
4
4
  import { useRouter, useRoute } from "vue-router"
5
- import { Notify } from 'quasar';
5
+ import { useQuasar } from 'quasar';
6
6
  import { computed } from 'vue'
7
+ const quasar = useQuasar();
7
8
  const { t } = useI18n()
8
9
 
9
10
  const system = await q("system", ["passwordPolicy"]);
@@ -16,7 +17,7 @@ const onSubmit = async (data) => {
16
17
  id: parseInt(id),
17
18
  password: data.password
18
19
  }).then(() => {
19
- Notify.create({
20
+ quasar.notify({
20
21
  message: "Password changed successfully",
21
22
  color: "positive",
22
23
  icon: "check"
@@ -1,9 +1,9 @@
1
1
  <script setup>
2
2
  import { reactive } from 'vue'
3
- import { Notify } from 'quasar';
3
+ import { useQuasar } from 'quasar';
4
4
  import { useRouter } from "vue-router"
5
5
  import { getObject, q, m } from '../../../'
6
-
6
+ const quasar = useQuasar();
7
7
  const router = useRouter();
8
8
  const obj = reactive(await getObject(["user_id", "roles"]));
9
9
 
@@ -26,7 +26,7 @@ const submit = async (data, form) => {
26
26
  })) {
27
27
  //show success message
28
28
 
29
- Notify.create({
29
+ quasar.notify({
30
30
  message: 'Role updated',
31
31
  color: 'positive',
32
32
  icon: 'check',
@@ -1,8 +1,9 @@
1
1
  <script setup>
2
2
  import { useLight, model, q } from "#imports"
3
3
  import { ref } from "vue"
4
- import { Notify } from "quasar";
4
+ import { useQuasar } from "quasar";
5
5
  const light = useLight()
6
+ const quasar = useQuasar()
6
7
 
7
8
  const columns = [
8
9
  { name: "_delete", align: "center" },
@@ -16,7 +17,7 @@ const onSave = async (id, data) => {
16
17
  await model("MyFavorite").update(id, data);
17
18
 
18
19
  //show success message
19
- Notify.create({
20
+ quasar.notify({
20
21
  message: "Updated successfully",
21
22
  color: "positive",
22
23
  icon: "check"
@@ -1,7 +1,8 @@
1
1
  <script setup>
2
2
  import { reactive, onMounted, nextTick } from "vue"
3
- import { Notify } from "quasar";
3
+ import { useQuasar } from "quasar";
4
4
  import { q, m } from '#imports'
5
+ const quasar = useQuasar();
5
6
  let { app, my } = await q({ app: ['googleClientId'], my: ["gmail"] })
6
7
 
7
8
  my = reactive(my);
@@ -13,7 +14,7 @@ const handleGoogleCredentialResponse = async (response) => {
13
14
  const resp = await q("my", ["gmail"]);
14
15
  my.gmail = resp.gmail;
15
16
 
16
- Notify.create({
17
+ quasar.notify({
17
18
  message: "Google account linked",
18
19
  color: "positive",
19
20
  position: "top",
@@ -28,7 +29,7 @@ onMounted(() => {
28
29
 
29
30
  if (app.googleClientId) {
30
31
  if (!window.google) {
31
- Notify.create({
32
+ quasar.notify({
32
33
  message: "Google login is not available", //set script https://accounts.google.com/gsi/client in nuuxt.config.js
33
34
  color: "negative",
34
35
  icon: "sym_o_error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.10.5",
3
+ "version": "1.10.6",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": "@hostlink/nuxt-light",
6
6
  "license": "MIT",