@stoker-platform/web-app 0.5.113 → 0.5.114

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.114
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: hide file name dialog on upload
8
+
3
9
  ## 0.5.113
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.113",
3
+ "version": "0.5.114",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
package/src/Files.tsx CHANGED
@@ -520,7 +520,7 @@ export const RecordFiles = ({ collection, record }: FilesProps) => {
520
520
  [uploadFiles, shouldSkipPermissionsDialog, getDefaultPermissions],
521
521
  )
522
522
 
523
- const handleConfirmFilename = useCallback(async () => {
523
+ const handleConfirmFilename = useCallback(() => {
524
524
  if (!pendingUploadFile) return
525
525
  const trimmedName = editingFilename.trim()
526
526
  const validationError = validateStorageName(trimmedName)
@@ -531,12 +531,12 @@ export const RecordFiles = ({ collection, record }: FilesProps) => {
531
531
  if (shouldSkipPermissionsDialog()) {
532
532
  if (uploadLockRef.current) return
533
533
  uploadLockRef.current = true
534
- try {
535
- await uploadFiles([pendingUploadFile], getDefaultPermissions(), trimmedName)
536
- } finally {
534
+ setShowFilenameDialog(false)
535
+ uploadFiles([pendingUploadFile], getDefaultPermissions(), trimmedName).finally(() => {
537
536
  uploadLockRef.current = false
538
- }
537
+ })
539
538
  } else {
539
+ setShowFilenameDialog(false)
540
540
  setShowPermissionsDialog(true)
541
541
  }
542
542
  }, [pendingUploadFile, editingFilename, shouldSkipPermissionsDialog, uploadFiles, getDefaultPermissions])