@drax/settings-vue 0.11.5 → 0.12.1

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
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.11.5",
6
+ "version": "0.12.1",
7
7
  "type": "module",
8
8
  "main": "./src/index.ts",
9
9
  "module": "./src/index.ts",
@@ -24,9 +24,9 @@
24
24
  "format": "prettier --write src/"
25
25
  },
26
26
  "dependencies": {
27
- "@drax/common-front": "^0.11.5",
28
- "@drax/settings-front": "^0.11.3",
29
- "@drax/settings-share": "^0.11.3"
27
+ "@drax/common-front": "^0.12.1",
28
+ "@drax/settings-front": "^0.12.1",
29
+ "@drax/settings-share": "^0.12.1"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "pinia": "^2.2.2",
@@ -63,5 +63,5 @@
63
63
  "vue-tsc": "^2.1.10",
64
64
  "vuetify": "^3.7.1"
65
65
  },
66
- "gitHead": "e67f10f0af29468c9d30f16135cfdbdff166d916"
66
+ "gitHead": "76fd366e12449f5f605662197f985a28d98058a2"
67
67
  }
@@ -38,13 +38,13 @@ function clearEdit() {
38
38
  ></setting-editor>
39
39
 
40
40
  <v-row >
41
- <v-col cols="12" v-for="(group,k) in settingsGrouped">
41
+ <v-col cols="12" v-for="(category,k) in settingsGrouped">
42
42
  <v-card>
43
43
  <v-card-title>
44
44
  {{ k }}
45
45
  </v-card-title>
46
46
  <v-card-text>
47
- <v-row v-for="(setting, i) in group" :key="i">
47
+ <v-row v-for="(setting, i) in category" :key="i">
48
48
  <v-col cols="9">
49
49
  <setting-field
50
50
 
@@ -27,7 +27,7 @@ const emit = defineEmits(['updateValue'])
27
27
  async function updateValue() {
28
28
  try {
29
29
  loading.value = true
30
- await updateSettingValue(setting.id, value.value)
30
+ await updateSettingValue(setting._id, value.value)
31
31
  emit('updateValue', value.value)
32
32
  } catch (e) {
33
33
  console.error(e)
@@ -31,10 +31,10 @@ export function useSetting() {
31
31
 
32
32
  const settingsGrouped = computed(() => {
33
33
  return settings.value.reduce((acc, item) => {
34
- if (!acc[item.group]) {
35
- acc[item.group] = [];
34
+ if (!acc[item.category]) {
35
+ acc[item.category] = [];
36
36
  }
37
- acc[item.group].push(item);
37
+ acc[item.category].push(item);
38
38
  return acc;
39
39
  }, {} as { [key: string]: ISetting[] });
40
40
  })
@@ -26,7 +26,7 @@ export const useSettingStore = defineStore('SettingStore', {
26
26
  this.settings = settings
27
27
  },
28
28
  updateSetting(setting: ISetting): void {
29
- const index = this.settings.findIndex((s) => s.id === setting.id)
29
+ const index = this.settings.findIndex((s) => s._id === setting._id)
30
30
  if (index > -1) {
31
31
  this.settings[index] = setting
32
32
  } else {