diff --git a/lib/client.js b/lib/client.js index ddba1df..51ca40b 100644 --- a/lib/client.js +++ b/lib/client.js @@ -8,7 +8,7 @@ import Path from 'path'; import stripJsonComments from 'strip-json-comments'; import ignore from 'ignore'; import sshConfig from 'ssh-config'; -import { multipleHostsEnabled, getObject, hasProject, logger, traverseTree, validateConfig, resolveHome, mkdirSyncRecursive } from './helpers'; +import { multipleProjects, getObject, hasProject, logger, traverseTree, validateConfig, resolveHome, mkdirSyncRecursive } from './helpers'; import Directory from './directory'; import Progress from './progress'; import FTP from './connectors/ftp'; @@ -335,7 +335,7 @@ export default class Client { getProjectPath() { let projectPath = null; - if (multipleHostsEnabled() === true) { + if (multipleProjects() === true) { const $selectedDir = $('.tree-view .selected'); const $currentProject = $selectedDir.hasClass('project-root') ? $selectedDir : $selectedDir.closest('.project-root'); projectPath = $currentProject.find('> .header span.name').data('path'); diff --git a/lib/config-schema.json b/lib/config-schema.json index d67bb8f..d3be6da 100644 --- a/lib/config-schema.json +++ b/lib/config-schema.json @@ -123,7 +123,7 @@ "type": "object", "title": "Beta strategies", "properties": { - "multipleHosts": { + "multipleProjects": { "type": "boolean", "title": "", "default": false, diff --git a/lib/directory.js b/lib/directory.js index 80e3656..b1d2882 100644 --- a/lib/directory.js +++ b/lib/directory.js @@ -2,7 +2,7 @@ import path from 'path'; import { Emitter } from 'event-kit'; -import { multipleHostsEnabled, simpleSort } from './helpers'; +import { multipleProjects, simpleSort } from './helpers'; import File from './file'; class Directory { @@ -227,7 +227,7 @@ class Directory { return p; } - return multipleHostsEnabled() === true ? this.client.projectPath : atom.project.getPaths()[0]; + return multipleProjects() === true ? this.client.projectPath : atom.project.getPaths()[0]; } get remote() { diff --git a/lib/helpers.js b/lib/helpers.js index 534c9b4..03b5413 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -12,7 +12,7 @@ export const checkIgnoreRemote = item => (item && !atom.project.remoteftp.checkI export const checkIgnoreLocal = item => (!atom.project.remoteftp.checkIgnore(item)); export const checkPaths = (index, elem) => (elem.getPath ? elem.getPath() : ''); export const hasProject = () => atom.project && atom.project.getPaths().length; -export const multipleHostsEnabled = () => atom.config.get('remote-ftp.beta.multipleHosts'); +export const multipleProjectsEnabled = () => atom.config.get('remote-ftp.beta.multipleProjects'); export const hasOwnProperty = ({ obj, prop }) => Object.prototype.hasOwnProperty.call(obj, prop); export const splitPaths = path => path.replace(/^\/+/, '').replace(/\/+$/, '').split('/'); diff --git a/lib/remote-ftp.js b/lib/remote-ftp.js index 002927e..d5d8763 100644 --- a/lib/remote-ftp.js +++ b/lib/remote-ftp.js @@ -90,7 +90,7 @@ export default { // NOTE: if there is a project folder & show view on startup // is true, show the Remote FTP sidebar if (hasProject()) { - // NOTE: setTimeout is for when multiple hosts option is true + // NOTE: setTimeout is for when multiple projects option is true setTimeout(() => { const conf = new File(this.client.getConfigPath());