Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/API-Reference/command/Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,12 @@ Opens support resources
## HELP\_GET\_PRO
Opens Phoenix Pro page

**Kind**: global variable
<a name="HELP_VIEW_LICENSE"></a>

## HELP\_VIEW\_LICENSE
Opens Phoenix License page

**Kind**: global variable
<a name="HELP_MANAGE_LICENSES"></a>

Expand Down
3 changes: 3 additions & 0 deletions src/command/Commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ define(function (require, exports, module) {
/** Opens Phoenix Pro page */
exports.HELP_GET_PRO = "help.getPro"; // HelpCommandHandlers.js _handleLinkMenuItem()

/** Opens Phoenix License page */
exports.HELP_VIEW_LICENSE = "help.viewLicense"; // HelpCommandHandlers.js _handleLinkMenuItem()

/** Manage Pro licenses */
exports.HELP_MANAGE_LICENSES = "help.manageLicenses"; // HelpCommandHandlers.js _handleLinkMenuItem()

Expand Down
1 change: 1 addition & 0 deletions src/command/DefaultMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ define(function (require, exports, module) {
menu.addMenuItem(Commands.HELP_SUPPORT);
menu.addMenuDivider();
menu.addMenuItem(Commands.HELP_GET_PRO);
menu.addMenuItem(Commands.HELP_VIEW_LICENSE);
menu.addMenuDivider();
if (brackets.config.suggest_feature_url) {
menu.addMenuItem(Commands.HELP_SUGGEST);
Expand Down
1 change: 1 addition & 0 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"account_url": "https://account.phcode.dev/",
"promotions_url": "https://promotions.phcode.dev/dev/",
"purchase_url": "https://phcode.io/pricing",
"license_url": "https://www.gnu.org/licenses/agpl-3.0.en.html",
"how_to_use_url": "https://github.com/adobe/brackets/wiki/How-to-Use-Brackets",
"docs_url": "https://docs.phcode.dev/",
"support_url": "https://account.phcode.dev/?returnUrl=https%3A%2F%2Faccount.phcode.dev%2F%23support",
Expand Down
8 changes: 8 additions & 0 deletions src/help/HelpCommandHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ define(function (require, exports, module) {
});
});

function _openLicenseLink() {
if(brackets.config.license_url) {
// license loaded based on pro-context from config
NativeApp.openURLInDefaultBrowser(brackets.config.license_url);
}
}

const getProString = `${Strings.CMD_GET_PRO}<i class='fa fa-feather' style='margin-left: 4px;'></i>`;

CommandManager.register(Strings.CMD_HOW_TO_USE_BRACKETS, Commands.HELP_HOW_TO_USE_BRACKETS, _handleLinkMenuItem(brackets.config.how_to_use_url));
Expand All @@ -173,6 +180,7 @@ define(function (require, exports, module) {
CommandManager.register(Strings.CMD_GET_PRO, Commands.HELP_GET_PRO, _handleLinkMenuItem(brackets.config.purchase_url), {
htmlName: getProString
});
CommandManager.register(Strings.CMD_VIEW_LICENSE, Commands.HELP_VIEW_LICENSE, _openLicenseLink);
CommandManager.register(Strings.CMD_SUGGEST, Commands.HELP_SUGGEST, _handleLinkMenuItem(brackets.config.suggest_feature_url));
CommandManager.register(Strings.CMD_REPORT_ISSUE, Commands.HELP_REPORT_ISSUE, _handleLinkMenuItem(brackets.config.report_issue_url));
CommandManager.register(Strings.CMD_RELEASE_NOTES, Commands.HELP_RELEASE_NOTES, _handleLinkMenuItem(brackets.config.release_notes_url));
Expand Down
1 change: 1 addition & 0 deletions src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ define({
"CMD_HOW_TO_USE_BRACKETS": "How to Use {APP_NAME}",
"CMD_SUPPORT": "{APP_NAME} Support",
"CMD_GET_PRO": "Get Phoenix Pro",
"CMD_VIEW_LICENSE": "View License",
"CMD_MANAGE_LICENSES": "Manage Licenses",
"CMD_USER_PROFILE": "{APP_NAME} Account",
"CMD_DOCS": "Help, Getting Started",
Expand Down
Loading