diff --git a/src/app/files/remixd-handle.js b/src/app/files/remixd-handle.js index bd08cb4829e..6fb527a33be 100644 --- a/src/app/files/remixd-handle.js +++ b/src/app/files/remixd-handle.js @@ -20,6 +20,7 @@ var css = csjs` const profile = { name: 'remixd', + displayName: 'RemixD', url: 'ws://127.0.0.1:65520', methods: ['folderIsReadOnly', 'resolveDirectory', 'get', 'exists', 'isFile', 'set', 'rename', 'remove', 'isDirectory', 'list'], events: [], @@ -57,7 +58,7 @@ export class RemixdHandle extends WebsocketPlugin { * connect to localhost if no connection and render the explorer * disconnect from localhost if connected and remove the explorer * - * @param {String} txHash - hash of the transaction + * @param {String} txHash - hash of the transaction */ async connectToLocalhost () { let connection = (error) => { @@ -83,7 +84,13 @@ export class RemixdHandle extends WebsocketPlugin { fn: () => { try { super.activate() - setTimeout(() => { connection() }, 2000) + setTimeout(() => { + if (!super.socket) { + connection(new Error('Connection with daemon failed.')) + } else { + connection() + } + }, 3000) } catch (error) { connection(error) } diff --git a/src/app/panels/file-panel.js b/src/app/panels/file-panel.js index f20a1a0bd14..532591daec4 100644 --- a/src/app/panels/file-panel.js +++ b/src/app/panels/file-panel.js @@ -65,7 +65,7 @@ module.exports = class Filepanel extends ViewPlugin { const explorers = yo`
${fileExplorer.init()}
-
${fileSystemExplorer.init()}
+
${fileSystemExplorer.init()}
` diff --git a/src/app/ui/TreeView.js b/src/app/ui/TreeView.js index 29337bb8986..fa9d8b1e4ff 100644 --- a/src/app/ui/TreeView.js +++ b/src/app/ui/TreeView.js @@ -80,13 +80,13 @@ class TreeView { var children = Object.keys(json).map((innerkey) => { return this.renderObject(json[innerkey], json, innerkey, expand, innerkey) }) - return yo`` + return yo`` } formatData (key, data, children, expand, keyPath) { var self = this var li = yo`
  • ` - var caret = yo`
    ` + var caret = yo`
    ` var label = yo`
    ${caret} @@ -95,7 +95,7 @@ class TreeView { const expanded = self.expandPath.includes(keyPath) li.appendChild(label) if (data.children) { - var list = yo`` + var list = yo`` list.style.display = expanded ? 'block' : 'none' caret.className = list.style.display === 'none' ? `fas fa-caret-right caret ${css.caret_tv}` : `fas fa-caret-down caret ${css.caret_tv}` caret.setAttribute('data-id', `treeViewToggle${keyPath}`)