'Connect your device' notification (#553)
* 'Connect your device' notification for UWP app
This commit is contained in:
		@@ -222,13 +222,9 @@ namespace pxt.editor {
 | 
			
		||||
        })
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    export function deployCoreAsync(resp: pxtc.CompileResult, isCli = false): Promise<void> {
 | 
			
		||||
    export function deployCoreAsync(resp: pxtc.CompileResult, d: pxt.commands.DeployOptions = {}): Promise<void> {
 | 
			
		||||
        let saveHexAsync = () => {
 | 
			
		||||
            if (isCli) {
 | 
			
		||||
                return Promise.resolve()
 | 
			
		||||
            } else {
 | 
			
		||||
                return pxt.commands.saveOnlyAsync(resp)
 | 
			
		||||
            }
 | 
			
		||||
            return pxt.commands.saveOnlyAsync(resp)
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        startTime = 0
 | 
			
		||||
@@ -332,7 +328,15 @@ namespace pxt.editor {
 | 
			
		||||
                    })
 | 
			
		||||
            })
 | 
			
		||||
            .catch(e => {  
 | 
			
		||||
                return saveHexAsync();
 | 
			
		||||
                if (e.type === "devicenotfound" && d.reportError) {
 | 
			
		||||
                    if (d.reportError) {
 | 
			
		||||
                        d.reportError(Util.lf("Please connect your device."))
 | 
			
		||||
                    } else {
 | 
			
		||||
                        console.error(e)
 | 
			
		||||
                    }
 | 
			
		||||
                } else {
 | 
			
		||||
                    saveHexAsync()
 | 
			
		||||
                }           
 | 
			
		||||
            })
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -38,6 +38,6 @@
 | 
			
		||||
    "semantic-ui-less": "^2.2.4"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "pxt-core": "0.14.5"
 | 
			
		||||
    "pxt-core": "0.14.7"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user