@hostlink/nuxt-light 1.28.4 → 1.29.0

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,7 +1,7 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.28.4",
4
+ "version": "1.29.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.1",
7
7
  "unbuild": "3.5.0"
@@ -289,11 +289,11 @@ const onLogout = async () => {
289
289
  <q-btn flat round dense icon="sym_o_person" class="q-mr-sm">
290
290
  <q-menu max-width="250px">
291
291
  <q-list>
292
- <q-item v-close-popup to="/User/profile">
292
+ <q-item v-close-popup to="/User/profile" >
293
293
  <q-item-section avatar>
294
294
  <q-icon name="sym_o_person" />
295
295
  </q-item-section>
296
- <q-item-section>{{ $t('Profile') }}</q-item-section>
296
+ <q-item-section >{{ $t('Profile') }}</q-item-section>
297
297
  </q-item>
298
298
 
299
299
  <q-item v-close-popup to="/User/setting">
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import { ref } from "vue";
3
- import { reloadNuxtApp, useLight, watch } from "#imports";
3
+ import { useLight, watch } from "#imports";
4
4
  import { useQuasar } from "quasar";
5
5
  import { q } from "#imports";
6
6
  import { useRoute } from "vue-router";
@@ -666,7 +666,9 @@ selectedNodePath.value = drives[0].index.toString();
666
666
  <q-table flat :columns="columns" :rows="items" @row-dblclick="onDblclickRow" @row-click="onClickRow"
667
667
  :pagination="pagination" row-key="path" selection="multiple" v-model:selected="selected" dense
668
668
  :loading="loading" :loading-label="$t('Loading...')" :no-data-label="$t('No data available')"
669
- :color="$light.color">
669
+ :color="$light.color"
670
+ separator="horizontal" :rows-per-page-options="[0]"
671
+ >
670
672
  <template #body-cell-icon="props">
671
673
  <q-td auto-width>
672
674
  <q-icon name="sym_o_folder" v-if="props.value == 'folder'" size="sm" />
@@ -158,13 +158,9 @@ const forgetPassword = async () => {
158
158
  });
159
159
  });
160
160
  };
161
- const hasBioLogin = ref(false);
162
- if (localStorage.getItem("username")) {
163
- hasBioLogin.value = true;
164
- }
165
161
  const bioLogin = async () => {
166
162
  try {
167
- await api.auth.WebAuthn.login(localStorage.getItem("username"));
163
+ await api.auth.WebAuthn.login();
168
164
  window.self.location.reload();
169
165
  } catch (e) {
170
166
  $q.notify({
@@ -275,9 +271,9 @@ const facebookLogin = (accessToken) => {
275
271
  </q-form>
276
272
  </q-card-section>
277
273
  <q-card-actions>
274
+ <l-btn outline rounded color="primary" icon="sym_o_fingerprint" @click="bioLogin" />
278
275
  <l-btn label="Login" outline rounded color="primary" icon="sym_o_login" @click="submit"
279
276
  v-if="passwordBasedEnabled" />
280
- <l-btn v-if="hasBioLogin" outline rounded color="primary" icon="sym_o_fingerprint" @click="bioLogin" />
281
277
  <l-btn label="Forget password" outline rounded color="primary" icon="sym_o_lock_reset" @click="forgetPassword"
282
278
  v-if="forgetPasswordEnabled" />
283
279
  </q-card-actions>
@@ -184,8 +184,8 @@ declare const __VLS_self: import("vue").DefineComponent<__VLS_PublicProps, {
184
184
  selection: "none" | "multiple" | "single";
185
185
  loadingLabel: string;
186
186
  noDataLabel: string;
187
- rowsPerPageLabel: string;
188
187
  rowsPerPageOptions: readonly any[];
188
+ rowsPerPageLabel: string;
189
189
  searchable: any;
190
190
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
191
191
  declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {
@@ -222,8 +222,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
222
222
  selection: "none" | "multiple" | "single";
223
223
  loadingLabel: string;
224
224
  noDataLabel: string;
225
- rowsPerPageLabel: string;
226
225
  rowsPerPageOptions: readonly any[];
226
+ rowsPerPageLabel: string;
227
227
  searchable: any;
228
228
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
229
229
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -1,5 +1 @@
1
- export default function (): {
2
- merge: (obj1: any, obj2: any) => any;
3
- add: (f: any) => void;
4
- get(): any;
5
- };
1
+ export default function (): any;
@@ -1,30 +1,23 @@
1
1
  import { toQuery } from "@hostlink/light";
2
+ import { defu } from "defu";
2
3
  export default function() {
3
- const merge = (obj1, obj2) => {
4
- for (let key in obj2) {
5
- if (obj2.hasOwnProperty(key)) {
6
- obj1[key] = obj1[key] && obj1[key].toString() === "[object Object]" ? merge(obj1[key], obj2[key]) : obj1[key] = obj2[key];
7
- }
8
- }
9
- return obj1;
10
- };
11
4
  let fields = {};
12
5
  return {
13
6
  //deep merge
14
- merge,
7
+ merge: defu,
15
8
  add: (f) => {
16
9
  if (typeof f === "string") {
17
- fields[f] = true;
10
+ fields = defu(fields, { [f]: true });
18
11
  return;
19
12
  }
20
13
  if (Array.isArray(f)) {
21
14
  f.forEach((item) => {
22
- fields[item] = true;
15
+ fields = defu(fields, { [item]: true });
23
16
  });
24
17
  return;
25
18
  }
26
19
  if (typeof f === "object") {
27
- fields = merge(fields, toQuery(f));
20
+ fields = defu(fields, toQuery(f));
28
21
  return;
29
22
  }
30
23
  },
@@ -1,6 +1,13 @@
1
1
  <script setup>
2
2
  import { model } from "#imports";
3
- const columns = model("EventLog").columns(["eventlog_id", "class", "id", "action", "created_time", "username"]);
3
+ const columns = model("EventLog").columns({
4
+ eventlog_id: true,
5
+ class: true,
6
+ id: true,
7
+ action: true,
8
+ created_time: true,
9
+ username: true
10
+ });
4
11
  </script>
5
12
 
6
13
  <template>
@@ -1,6 +1,13 @@
1
1
  <script setup>
2
2
  import { model } from "#imports";
3
- const columns = model("MailLog").columns(["maillog_id", "from", "to", "subject", "created_time"]);
3
+ const columns = model("MailLog").columns({
4
+ maillog_id: true,
5
+ from: true,
6
+ to: true,
7
+ subject: true,
8
+ created_time: true,
9
+ body: true
10
+ });
4
11
  </script>
5
12
 
6
13
  <template>
@@ -1,8 +1,6 @@
1
1
  <script setup>
2
2
  import { list, m, useLight } from "#imports";
3
- import { useRouter } from "vue-router";
4
3
  import { ref, computed } from "vue";
5
- import { useQuasar } from "quasar";
6
4
  const light = useLight();
7
5
  let { data: users } = await list("User", null, ["user_id", "username", "name", "roles", "email"]);
8
6
  let columns = [
@@ -23,7 +23,6 @@ const status = ref("0");
23
23
  <l-tabs v-model="status">
24
24
  <l-tab label="Active" name="0">
25
25
  <l-table ref="table" row-key="user_id" @request-data="onRequest" :columns="columns"
26
- :add-component="testDialog"
27
26
  :actions="['view', 'edit', 'delete']"></l-table>
28
27
  </l-tab>
29
28
  <l-tab label="Inactive" name="1">
@@ -1,6 +1,14 @@
1
1
  <script setup>
2
2
  import { model } from "#imports";
3
- const columns = model("UserLog").columns(["userlog_id", "username", "login_dt", "last_access_time", "logout_dt", "result", "user_agent"]);
3
+ const columns = model("UserLog").columns({
4
+ userlog_id: true,
5
+ username: true,
6
+ login_dt: true,
7
+ last_access_time: true,
8
+ logout_dt: true,
9
+ result: true,
10
+ user_agent: true
11
+ });
4
12
  </script>
5
13
 
6
14
  <template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.28.4",
3
+ "version": "1.29.0",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,6 +36,7 @@
36
36
  "@nuxt/module-builder": "^1.0.1",
37
37
  "@quasar/extras": "^1.16.11",
38
38
  "axios": "^1.5.0",
39
+ "defu": "^6.1.4",
39
40
  "diff2html": "^3.4.47",
40
41
  "formkit-quasar": "^0.0.15",
41
42
  "json-to-graphql-query": "^2.2.5",