diff --git a/src/brackets.js b/src/brackets.js index 8097116a9..3f598dceb 100644 --- a/src/brackets.js +++ b/src/brackets.js @@ -46,6 +46,8 @@ define(function (require, exports, module) { QuickFileOpen = require("search/QuickFileOpen"), Menus = require("command/Menus"), FileUtils = require("file/FileUtils"), + Strings = require("strings"), + Dialogs = require("widgets/Dialogs"), ExtensionLoader = require("utils/ExtensionLoader"); //Load modules the self-register and just need to get included in the main project @@ -220,6 +222,15 @@ define(function (require, exports, module) { EditorManager.setEditorHolder($('#editorHolder')); + + // Let the user know Brackets doesn't run in a web browser yet + if (brackets.inBrowser) { + Dialogs.showModalDialog( + Dialogs.DIALOG_ID_ERROR, + Strings.ERROR_BRACKETS_IN_BROWSER_TITLE, + Strings.ERROR_BRACKETS_IN_BROWSER + ); + } initListeners(); initProject(); diff --git a/src/strings.js b/src/strings.js index 1cc37ba8a..a22c1656e 100644 --- a/src/strings.js +++ b/src/strings.js @@ -57,6 +57,10 @@ define(function (require, exports, module) { exports.ERROR_CREATING_FILE_TITLE = "Error creating file"; exports.ERROR_CREATING_FILE = "An error occurred when trying to create the file {0}. {1}"; + // Application error strings + exports.ERROR_BRACKETS_IN_BROWSER_TITLE = "Oops! Brackets doesn't run in browsers yet."; + exports.ERROR_BRACKETS_IN_BROWSER = "Brackets is built in HTML, but right now it runs as a desktop app so you can use it to edit local files. Please use the application shell in the github.com/adobe/brackets-app repo to run Brackets."; + // FileIndexManager error string exports.ERROR_MAX_FILES_TITLE = "Error Indexing Files"; exports.ERROR_MAX_FILES = "The maximum number of files have been indexed. Actions that look up files in the index may function incorrectly.";