hl-core 0.0.8-beta.2 → 0.0.8-beta.3

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.
@@ -35,7 +35,7 @@
35
35
  <div v-if="$dataStore.buttons && $dataStore.buttons.length" class="flex flex-col gap-[10px] justify-self-end absolute bottom-5 lg:bottom-[30%] w-full pr-4">
36
36
  <div v-for="(item, index) of $dataStore.buttons" :key="index">
37
37
  <transition enter-active-class="animate__animated animate__fadeIn animate__faster" leave-active-class="animate__animated animate__fadeOut animate__faster">
38
- <base-btn v-if="typeof item.show === 'boolean' ? item.show : true" :text="item.title!" :btn="item.color" :disabled="item.disabled" @click="item.action"> </base-btn>
38
+ <base-btn v-if="typeof item.show === 'boolean' ? item.show : true" :text="item.title!" :btn="item.color" :disabled="item.disabled" :loading="$dataStore.isButtonsLoading" @click="item.action"> </base-btn>
39
39
  </transition>
40
40
  </div></div
41
41
  ></base-fade-transition>
@@ -801,6 +801,7 @@ export class DataStoreClass {
801
801
  items: MenuItem[];
802
802
  };
803
803
  buttons: MenuItem[];
804
+ isButtonsLoading: boolean;
804
805
  panelAction: string | null;
805
806
  panel: {
806
807
  open: boolean;
@@ -891,6 +892,7 @@ export class DataStoreClass {
891
892
  items: [],
892
893
  };
893
894
  this.buttons = [];
895
+ this.isButtonsLoading = false;
894
896
  this.panel = {
895
897
  open: false,
896
898
  overlay: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.8-beta.2",
3
+ "version": "0.0.8-beta.3",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -45,6 +45,6 @@
45
45
  "v-idle-3": "^0.3.14",
46
46
  "vue-toastification": "^2.0.0-rc.5",
47
47
  "vue-uuid": "^3.0.0",
48
- "vuetify": "^3.2.1"
48
+ "vuetify": "^3.2.2"
49
49
  }
50
50
  }
@@ -1716,6 +1716,7 @@ export const useDataStore = defineStore('data', {
1716
1716
  },
1717
1717
  async handleTask(action, taskId, comment) {
1718
1718
  if (action && Object.keys(constants.actions).includes(action)) {
1719
+ this.isButtonsLoading = true;
1719
1720
  switch (action) {
1720
1721
  case constants.actions.claim: {
1721
1722
  try {
@@ -1745,6 +1746,7 @@ export const useDataStore = defineStore('data', {
1745
1746
  }
1746
1747
  }
1747
1748
  }
1749
+ this.isButtonsLoading = false;
1748
1750
  } else {
1749
1751
  console.error('No handleTask action');
1750
1752
  }