Skip to content

Commit

Permalink
feat: add docs and youtibe channel links to help menu
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed May 26, 2024
1 parent 51cba47 commit be35e0a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/base-config/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
"file.rename": [
"Shift-F2"
],
"help.support": [
"help.docs": [
"Shift-F1"
],
"recentProjects.toggle": [
Expand Down
2 changes: 2 additions & 0 deletions src/command/Commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,14 @@ define(function (require, exports, module) {

// HELP
exports.HELP_HOW_TO_USE_BRACKETS = "help.howToUseBrackets"; // HelpCommandHandlers.js _handleLinkMenuItem()
exports.HELP_DOCS = "help.docs"; // HelpCommandHandlers.js _handleLinkMenuItem()
exports.HELP_SUPPORT = "help.support"; // HelpCommandHandlers.js _handleLinkMenuItem()
exports.HELP_SUGGEST = "help.suggest"; // HelpCommandHandlers.js _handleLinkMenuItem()
exports.HELP_RELEASE_NOTES = "help.releaseNotes"; // HelpCommandHandlers.js _handleLinkMenuItem()
exports.HELP_GET_INVOLVED = "help.getInvolved"; // HelpCommandHandlers.js _handleLinkMenuItem()
exports.HELP_SHOW_EXT_FOLDER = "help.showExtensionsFolder"; // HelpCommandHandlers.js _handleShowExtensionsFolder()
exports.HELP_HOMEPAGE = "help.homepage"; // HelpCommandHandlers.js _handleLinkMenuItem()
exports.HELP_YOUTUBE = "help.youtube"; // HelpCommandHandlers.js _handleLinkMenuItem()
exports.HELP_TWITTER = "help.twitter"; // HelpCommandHandlers.js _handleLinkMenuItem()
exports.HELP_TOGGLE_SHORTCUTS_PANEL = "help.toggleShortcuts"; // shortcuts integrated extension
exports.HELP_CHECK_UPDATES = "help.checkUpdates"; // shortcuts integrated extension
Expand Down
10 changes: 4 additions & 6 deletions src/command/DefaultMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,8 @@ define(function (require, exports, module) {
* Help menu
*/
menu = Menus.addMenu(Strings.HELP_MENU, Menus.AppMenuBar.HELP_MENU);
if (brackets.config.support_url) {
menu.addMenuItem(Commands.HELP_SUPPORT);
}
menu.addMenuItem(Commands.HELP_DOCS);
menu.addMenuItem(Commands.HELP_SUPPORT);
if (brackets.config.suggest_feature_url) {
menu.addMenuItem(Commands.HELP_SUGGEST);
}
Expand All @@ -263,9 +262,8 @@ define(function (require, exports, module) {
menu.addMenuDivider();
}

if (brackets.config.twitter_url) {
menu.addMenuItem(Commands.HELP_TWITTER);
}
menu.addMenuItem(Commands.HELP_YOUTUBE);
menu.addMenuItem(Commands.HELP_TWITTER);
if (brackets.config.homepage_url) {
menu.addMenuItem(Commands.HELP_HOMEPAGE);
}
Expand Down
2 changes: 2 additions & 0 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
"app_name_about": "Phoenix Code",
"about_icon": "styles/images/phoenix-icon.svg",
"how_to_use_url": "https://github.com/adobe/brackets/wiki/How-to-Use-Brackets",
"docs_url": "https://docs.phcode.dev/",
"support_url": "https://github.com/phcode-dev/phoenix/discussions",
"suggest_feature_url": "https://github.com/phcode-dev/phoenix/discussions/categories/ideas",
"get_involved_url": "https://github.com/phcode-dev/phoenix/discussions/77",
"release_notes_url": "https://github.com/adobe/brackets/wiki/Release-Notes",
"homepage_url": "https://phcode.io",
"update_download_page": "https://phcode.io/",
"twitter_url": "https://twitter.com/phcodedev",
"youtube_url": "https://www.youtube.com/channel/UCNK2a8DKqPQQe3GlfTk-RHg",
"troubleshoot_url": "https://github.com/adobe/brackets/wiki/Troubleshooting#wiki-livedev",
"twitter_name": "@phcodedev",
"contributors_url": "https://api.github.com/repos/phcode-dev/phoenix/contributors?per_page={0}&page={1}",
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/default/DebugCommands/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ define(function (require, exports, module) {
_updateLogToConsoleMenuItemChecked();

const helpMenu = Menus.getMenu(Menus.AppMenuBar.HELP_MENU);
helpMenu.addMenuItem(DEBUG_SWITCH_LANGUAGE, "", Menus.BEFORE, Commands.HELP_TWITTER);
helpMenu.addMenuItem(DEBUG_SWITCH_LANGUAGE, "", Menus.BEFORE, Commands.HELP_YOUTUBE);
helpMenu.addMenuDivider(Menus.AFTER, DEBUG_SWITCH_LANGUAGE);

const fileMenu = Menus.getMenu(Menus.AppMenuBar.FILE_MENU);
Expand Down
2 changes: 2 additions & 0 deletions src/help/HelpCommandHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,14 @@ define(function (require, exports, module) {
});

CommandManager.register(Strings.CMD_HOW_TO_USE_BRACKETS, Commands.HELP_HOW_TO_USE_BRACKETS, _handleLinkMenuItem(brackets.config.how_to_use_url));
CommandManager.register(Strings.CMD_DOCS, Commands.HELP_DOCS, _handleLinkMenuItem(brackets.config.docs_url));
CommandManager.register(Strings.CMD_SUPPORT, Commands.HELP_SUPPORT, _handleLinkMenuItem(brackets.config.support_url));
CommandManager.register(Strings.CMD_SUGGEST, Commands.HELP_SUGGEST, _handleLinkMenuItem(brackets.config.suggest_feature_url));
CommandManager.register(Strings.CMD_RELEASE_NOTES, Commands.HELP_RELEASE_NOTES, _handleLinkMenuItem(brackets.config.release_notes_url));
CommandManager.register(Strings.CMD_GET_INVOLVED, Commands.HELP_GET_INVOLVED, _handleLinkMenuItem(brackets.config.get_involved_url));
CommandManager.register(Strings.CMD_SHOW_EXTENSIONS_FOLDER, Commands.HELP_SHOW_EXT_FOLDER, _handleShowExtensionsFolder);
CommandManager.register(Strings.CMD_HOMEPAGE, Commands.HELP_HOMEPAGE, _handleLinkMenuItem(brackets.config.homepage_url));
CommandManager.register(Strings.CMD_TWITTER, Commands.HELP_TWITTER, _handleLinkMenuItem(brackets.config.twitter_url));
CommandManager.register(Strings.CMD_YOUTUBE, Commands.HELP_YOUTUBE, _handleLinkMenuItem(brackets.config.youtube_url));
CommandManager.register(Strings.CMD_ABOUT, Commands.HELP_ABOUT, _handleAboutDialog);
});
2 changes: 2 additions & 0 deletions src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -576,13 +576,15 @@ define({
"CMD_AUTO_UPDATE": "Auto Update",
"CMD_HOW_TO_USE_BRACKETS": "How to Use {APP_NAME}",
"CMD_SUPPORT": "{APP_NAME} Support",
"CMD_DOCS": "Help, Getting Started",
"CMD_SUGGEST": "Suggest a Feature",
"CMD_RELEASE_NOTES": "Release Notes",
"CMD_GET_INVOLVED": "Get Involved",
"CMD_SHOW_EXTENSIONS_FOLDER": "Show Extensions Folder",
"CMD_HEALTH_DATA_STATISTICS": "Health Report\u2026",
"CMD_HOMEPAGE": "Download Apps - Home Page",
"CMD_TWITTER": "{TWITTER_NAME} on Twitter",
"CMD_YOUTUBE": "Youtube Channel",
"CMD_ABOUT": "About {APP_TITLE}",
"CMD_OPEN_PREFERENCES": "Open Preferences File",
"CMD_OPEN_KEYMAP": "Open User Key Map File",
Expand Down

0 comments on commit be35e0a

Please sign in to comment.