Browse Source

remove emoji from Informer messages

Artur Paikin 8 years ago
parent
commit
b19881edd1
2 changed files with 11 additions and 3 deletions
  1. 10 2
      src/core/Core.js
  2. 1 1
      src/plugins/Webcam/index.js

+ 10 - 2
src/core/Core.js

@@ -209,6 +209,14 @@ class Uppy {
   addThumbnail (fileID) {
     const file = this.getState().files[fileID]
 
+    // const thumbnail = URL.createObjectURL(file.data)
+    // const updatedFiles = Object.assign({}, this.getState().files)
+    // const updatedFile = Object.assign({}, updatedFiles[fileID], {
+    //   preview: thumbnail
+    // })
+    // updatedFiles[fileID] = updatedFile
+    // this.setState({files: updatedFiles})
+
     Utils.readFile(file.data)
       .then((imgDataURI) => Utils.createImageThumbnail(imgDataURI, 200))
       .then((thumbnail) => {
@@ -379,12 +387,12 @@ class Uppy {
     const online = status || window.navigator.onLine
     if (!online) {
       this.emit('is-offline')
-      this.emit('informer', '⚠️ No internet connection', 'error', 0)
+      this.emit('informer', 'No internet connection', 'error', 0)
       this.wasOffline = true
     } else {
       this.emit('is-online')
       if (this.wasOffline) {
-        this.emit('informer', 'Connected 👌🏼', 'success', 3000)
+        this.emit('informer', 'Connected', 'success', 3000)
         this.wasOffline = false
       }
     }

+ 1 - 1
src/plugins/Webcam/index.js

@@ -199,7 +199,7 @@ module.exports = class Webcam extends Plugin {
 
   focus () {
     setTimeout(() => {
-      this.core.emitter.emit('informer', 'Smile! 📸', 'info', 2000)
+      this.core.emitter.emit('informer', 'Smile!', 'warning', 2000)
     }, 1000)
   }