@fy-/fws-vue 2.3.91 → 2.3.93

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.
@@ -19,10 +19,11 @@ interface ConfirmModalData {
19
19
  }
20
20
 
21
21
  const _onConfirm = useDebounceFn(async () => {
22
- if (onConfirm.value) {
23
- await onConfirm.value()
22
+ const callback = onConfirm.value
23
+ resetConfirm() // Close modal immediately so loading can show
24
+ if (callback) {
25
+ await callback()
24
26
  }
25
- resetConfirm()
26
27
  }, 300)
27
28
 
28
29
  function resetConfirm() {
@@ -1130,7 +1130,7 @@ onUnmounted(() => {
1130
1130
  >
1131
1131
  <input
1132
1132
  type="number"
1133
- min="0"
1133
+ min="-1"
1134
1134
  :value="getItemPosition(images[i - 1], i - 1)"
1135
1135
  class="w-24 h-10 text-sm text-center rounded border-2 border-blue-400 bg-white/95 dark:bg-black/95 dark:text-white font-bold"
1136
1136
  @blur="(e: Event) => onPositionChange ? onPositionChange(images[i - 1], parseInt((e.target as HTMLInputElement).value)) : () => {}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.3.91",
3
+ "version": "2.3.93",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/fy-to/FWJS#readme",
@@ -30,12 +30,18 @@ export const useServerRouter = defineStore('routerStore', {
30
30
  },
31
31
  push(path: any, status = 302) {
32
32
  this.status = status
33
- if (status !== 302) this.redirect = path
33
+ if (status !== 302) {
34
+ // Resolve path to string if it's a route location object
35
+ this.redirect = typeof path === 'string' ? path : this._router?.resolve(path)?.fullPath || path
36
+ }
34
37
  return this._router?.push(path)
35
38
  },
36
39
  replace(path: any, status = 302) {
37
40
  this.status = status
38
- if (status !== 302) this.redirect = path
41
+ if (status !== 302) {
42
+ // Resolve path to string if it's a route location object
43
+ this.redirect = typeof path === 'string' ? path : this._router?.resolve(path)?.fullPath || path
44
+ }
39
45
  return this._router?.replace(path)
40
46
  },
41
47
  go(delta: number) {