@waline/client 2.15.7 → 2.15.8

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@waline/client",
3
- "version": "2.15.7",
3
+ "version": "2.15.8",
4
4
  "description": "client for waline comment system",
5
5
  "keywords": [
6
6
  "valine",
@@ -443,6 +443,7 @@ const uploadImage = (file: File): Promise<void> => {
443
443
  const uploadText = `![${config.value.locale.uploading} ${file.name}]()`;
444
444
 
445
445
  insert(uploadText);
446
+ isSubmitting.value = true;
446
447
 
447
448
  return Promise.resolve()
448
449
  .then(() => (config.value.imageUploader as WalineImageUploader)(file))
@@ -455,6 +456,9 @@ const uploadImage = (file: File): Promise<void> => {
455
456
  .catch((err: Error) => {
456
457
  alert(err.message);
457
458
  editor.value = editor.value.replace(uploadText, '');
459
+ })
460
+ .then(() => {
461
+ isSubmitting.value = false;
458
462
  });
459
463
  };
460
464