Skip to content

Commit 84b08d7

Browse files
committed
deploy: 606b7d0
1 parent 3013515 commit 84b08d7

File tree

109 files changed

+1480
-328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+1480
-328
lines changed

appConfig.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ window.AppConfig = {
55
"app_name_about": "Phoenix Code",
66
"about_icon": "styles/images/phoenix-icon.svg",
77
"account_url": "https://account.phcode.dev/",
8+
"promotions_url": "https://promotions.phcode.dev/dev/",
9+
"purchase_url": "https://phcode.io/pricing",
810
"how_to_use_url": "https://github.com/adobe/brackets/wiki/How-to-Use-Brackets",
911
"docs_url": "https://docs.phcode.dev/",
1012
"support_url": "https://account.phcode.dev/?returnUrl=https%3A%2F%2Faccount.phcode.dev%2F%23support",
@@ -28,7 +30,7 @@ window.AppConfig = {
2830
"app_notification_url": "assets/notifications/dev/",
2931
"app_update_url": "https://updates.phcode.io/tauri/update-latest-experimental-build.json",
3032
"linting.enabled_by_default": true,
31-
"build_timestamp": "2025-09-06T10:11:10.953Z",
33+
"build_timestamp": "2025-09-08T05:06:29.606Z",
3234
"googleAnalyticsID": "G-P4HJFPDB76",
3335
"googleAnalyticsIDDesktop": "G-VE5BXWJ0HF",
3436
"mixPanelID": "49c4d164b592be2350fc7af06a259bf3",
@@ -40,7 +42,7 @@ window.AppConfig = {
4042
"bugsnagEnv": "development"
4143
},
4244
"name": "Phoenix Code",
43-
"version": "4.1.2-21405",
45+
"version": "4.1.2-21410",
4446
"apiVersion": "4.1.2",
4547
"homepage": "https://core.ai",
4648
"issues": {

assets/default-project/en.zip

0 Bytes
Binary file not shown.

assets/sample-projects/HTML5.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

assets/sample-projects/explore.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

brackets-min.js

Lines changed: 133 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112399,6 +112399,7 @@ define("nls/root/strings", {
112399112399
// promos
112400112400
"PROMO_UPGRADE_TITLE": "You’ve been upgraded to {0}",
112401112401
"PROMO_UPGRADE_MESSAGE": "Enjoy full access to all premium features for the next {0} days:",
112402+
"PROMO_ENDED_MESSAGE": "Subscribe now to continue using these advanced features:",
112402112403
"PROMO_CARD_1": "Drag & Drop Elements",
112403112404
"PROMO_CARD_1_MESSAGE": "Rearrange sections visually — Phoenix updates the HTML & CSS for you.",
112404112405
"PROMO_CARD_2": "Image Replacement",
@@ -112407,7 +112408,9 @@ define("nls/root/strings", {
112407112408
"PROMO_CARD_3_MESSAGE": "Duplicate and delete elements with a single click.",
112408112409
"PROMO_CARD_4": "Editing Text In Preview",
112409112410
"PROMO_CARD_4_MESSAGE": "Edit headings, buttons, and copy directly in the preview.",
112410-
"PROMO_LEARN_MORE": "Learn More\u2026"
112411+
"PROMO_LEARN_MORE": "Learn More\u2026",
112412+
"PROMO_GET_APP_UPSELL_BUTTON": "Get {0}",
112413+
"PROMO_PRO_ENDED_TITLE": "Your {0} upgrade has ended"
112411112414
});
112412112415

112413112416
/*
@@ -167119,7 +167122,7 @@ define("services/login-service", function (require, exports, module) {
167119167122

167120167123
try {
167121167124
const accountBaseURL = LoginService.getAccountBaseURL();
167122-
const language = Phoenix.app && Phoenix.app.language ? Phoenix.app.language : 'en';
167125+
const language = brackets.getLocale();
167123167126
let url = `${accountBaseURL}/getAppEntitlements?lang=${language}`;
167124167127
let fetchOptions = {
167125167128
method: 'GET',
@@ -167220,13 +167223,17 @@ define("services/pro-dialogs", function (require, exports, module) {
167220167223
const proTitle = `<span class="phoenix-pro-title">
167221167224
<span class="pro-plan-name">Phoenix Pro</span>
167222167225
<i class="fa-solid fa-feather orange-gold" style="margin-left: 3px;"></i>
167223-
</span>`;
167226+
</span>`,
167227+
proTitlePlain = `<span class="pro-plan-name">Phoenix Pro</span>
167228+
<i class="fa-solid fa-feather" style="margin-left: 2px;"></i>`;
167224167229
require("./setup-login-service"); // this adds loginService to KernalModeTrust
167225167230
const Dialogs = require("widgets/Dialogs"),
167226167231
Mustache = require("thirdparty/mustache/mustache"),
167227167232
Strings = require("strings"),
167228167233
StringUtils = require("utils/StringUtils"),
167229-
proUpgradeHTML = `<div class="browser-login-waiting-dialog modal">
167234+
ThemeManager = require("view/ThemeManager"),
167235+
Metrics = require("utils/Metrics"),
167236+
proUpgradeHTML = `<div class="pro-upgrade-dialog modal">
167230167237
<div class="modal-header">
167231167238
<h1 class="dialog-title">{{{title}}}</h1>
167232167239
</div>
@@ -167278,25 +167285,125 @@ define("services/pro-dialogs", function (require, exports, module) {
167278167285
</div>
167279167286

167280167287
<div class="modal-footer">
167281-
<button class="dialog-button btn" data-button-id="learn_more">{{Strings.PROMO_LEARN_MORE}}</button>
167282-
<button class="dialog-button btn primary" data-button-id="ok">{{Strings.OK}}</button>
167288+
<button class="dialog-button btn" data-button-id="secondaryButton">{{secondaryButton}}</button>
167289+
<button class="dialog-button btn primary" data-button-id="ok">{{{primaryButton}}}</button>
167290+
</div>
167291+
</div>
167292+
`,
167293+
proEndedHTML = `<div class="pro-ended-dialog modal">
167294+
<div class="modal-header">
167295+
<h1 class="dialog-title">{{{title}}}</h1>
167296+
</div>
167297+
167298+
<div class="modal-body">
167299+
<div class="promo-iframe-wrap">
167300+
<iframe
167301+
class="promo-iframe"
167302+
src="{{promoURL}}"
167303+
title="{{title}}"
167304+
loading="lazy"
167305+
referrerpolicy="no-referrer">
167306+
</iframe>
167307+
</div>
167308+
</div>
167309+
167310+
<div class="modal-footer">
167311+
<button class="dialog-button btn" data-button-id="cancel">{{Strings.CANCEL}}</button>
167312+
<button class="dialog-button btn primary" data-button-id="get_pro">{{{buttonGetPro}}}</button>
167283167313
</div>
167284167314
</div>
167285167315
`;
167286167316

167287167317
function showProUpgradeDialog(trialDays) {
167288167318
const title = StringUtils.format(Strings.PROMO_UPGRADE_TITLE, proTitle);
167289167319
const message = StringUtils.format(Strings.PROMO_UPGRADE_MESSAGE, trialDays);
167290-
const $template = $(Mustache.render(proUpgradeHTML, {title, message, Strings}));
167320+
const $template = $(Mustache.render(proUpgradeHTML, {
167321+
title, message, Strings,
167322+
secondaryButton: Strings.PROMO_LEARN_MORE,
167323+
primaryButton: Strings.OK
167324+
}));
167325+
Dialogs.showModalDialogUsingTemplate($template).done(function (id) {
167326+
console.log("Dialog closed with id: " + id);
167327+
Metrics.countEvent(Metrics.EVENT_TYPE.PRO, "dlgShow", "promo");
167328+
if(id === 'secondaryButton') {
167329+
Metrics.countEvent(Metrics.EVENT_TYPE.PRO, "dlgAct", "promoLearn");
167330+
Phoenix.app.openURLInDefaultBrowser(brackets.config.purchase_url);
167331+
} else {
167332+
Metrics.countEvent(Metrics.EVENT_TYPE.PRO, "dlgAct", "promoCancel");
167333+
}
167334+
});
167335+
}
167336+
167337+
function _showLocalProEndedDialog() {
167338+
const title = StringUtils.format(Strings.PROMO_PRO_ENDED_TITLE, proTitle);
167339+
const buttonGetPro = StringUtils.format(Strings.PROMO_GET_APP_UPSELL_BUTTON, proTitlePlain);
167340+
const $template = $(Mustache.render(proUpgradeHTML, {
167341+
title, Strings,
167342+
message: Strings.PROMO_ENDED_MESSAGE,
167343+
secondaryButton: Strings.CANCEL,
167344+
primaryButton: buttonGetPro
167345+
}));
167346+
Dialogs.showModalDialogUsingTemplate($template).done(function (id) {
167347+
console.log("Dialog closed with id: " + id);
167348+
Metrics.countEvent(Metrics.EVENT_TYPE.PRO, "dlgShow", "localUpgrade");
167349+
if(id === 'ok') {
167350+
Metrics.countEvent(Metrics.EVENT_TYPE.PRO, "dlgAct", "localGetPro");
167351+
Phoenix.app.openURLInDefaultBrowser(brackets.config.purchase_url);
167352+
} else {
167353+
Metrics.countEvent(Metrics.EVENT_TYPE.PRO, "dlgAct", "localCancel");
167354+
}
167355+
});
167356+
}
167357+
167358+
function _showRemoteProEndedDialog(currentVersion, promoHtmlURL, upsellPurchaseURL) {
167359+
const buttonGetPro = StringUtils.format(Strings.PROMO_GET_APP_UPSELL_BUTTON, proTitlePlain);
167360+
const title = StringUtils.format(Strings.PROMO_PRO_ENDED_TITLE, proTitle);
167361+
const currentTheme = ThemeManager.getCurrentTheme();
167362+
const theme = currentTheme && currentTheme.dark ? "dark" : "light";
167363+
const promoURL = `${promoHtmlURL}?lang=${
167364+
brackets.getLocale()}&theme=${theme}&version=${currentVersion}`;
167365+
const $template = $(Mustache.render(proEndedHTML, {Strings, title, buttonGetPro, promoURL}));
167291167366
Dialogs.showModalDialogUsingTemplate($template).done(function (id) {
167292167367
console.log("Dialog closed with id: " + id);
167293-
if(id === 'learn_more') {
167294-
Phoenix.app.openURLInDefaultBrowser(brackets.config.homepage_url);
167368+
Metrics.countEvent(Metrics.EVENT_TYPE.PRO, "dlgShow", "remoteUpgrade");
167369+
if(id === 'get_pro') {
167370+
Metrics.countEvent(Metrics.EVENT_TYPE.PRO, "dlgAct", "remoteGetPro");
167371+
Phoenix.app.openURLInDefaultBrowser(upsellPurchaseURL || brackets.config.purchase_url);
167372+
} else {
167373+
Metrics.countEvent(Metrics.EVENT_TYPE.PRO, "dlgAct", "remoteCancel");
167295167374
}
167296167375
});
167297167376
}
167298167377

167378+
async function showProEndedDialog() {
167379+
const currentVersion = window.AppConfig.apiVersion;
167380+
167381+
if (!navigator.onLine) {
167382+
_showLocalProEndedDialog();
167383+
return;
167384+
}
167385+
167386+
try {
167387+
const configURL = `${brackets.config.promotions_url}app/config.json`;
167388+
const response = await fetch(configURL);
167389+
if (!response.ok) {
167390+
_showLocalProEndedDialog();
167391+
return;
167392+
}
167393+
167394+
const config = await response.json();
167395+
if (config.upsell_after_trial_url) {
167396+
_showRemoteProEndedDialog(currentVersion, config.upsell_after_trial_url, config.upsell_purchase_url);
167397+
} else {
167398+
_showLocalProEndedDialog();
167399+
}
167400+
} catch (error) {
167401+
_showLocalProEndedDialog();
167402+
}
167403+
}
167404+
167299167405
exports.showProUpgradeDialog = showProUpgradeDialog;
167406+
exports.showProEndedDialog = showProEndedDialog;
167300167407
});
167301167408

167302167409
define("services/profile-menu", function (require, exports, module) {
@@ -167888,7 +167995,6 @@ define("services/profile-menu", function (require, exports, module) {
167888167995
title: Strings.CMD_USER_PROFILE
167889167996
})
167890167997
.appendTo($("#main-toolbar .bottom-buttons"));
167891-
// _updateProfileIcon("CA", "blue");
167892167998
$icon.on('click', ()=>{
167893167999
togglePopup();
167894168000
});
@@ -168135,7 +168241,20 @@ define("services/promotions", function (require, exports, module) {
168135168241

168136168242
// Check if we should grant any trial
168137168243
if (remainingDays <= 0 && !isNewerVersion) {
168138-
console.log("Existing trial expired, same/older version - no new trial");
168244+
// Check if promo ended dialog was already shown for this version
168245+
if (existingTrialData.upgradeDialogShownVersion !== currentVersion) {
168246+
// todo we should not show this to logged in pro subscribers, but at startup time,
168247+
// we do not know if login is done yet.
168248+
console.log("Existing trial expired, showing promo ended dialog");
168249+
ProDialogs.showProEndedDialog();
168250+
// Store that dialog was shown for this version
168251+
await _setTrialData({
168252+
...existingTrialData,
168253+
upgradeDialogShownVersion: currentVersion
168254+
});
168255+
} else {
168256+
console.log("Existing trial expired, upgrade dialog already shown for this version");
168257+
}
168139168258
return;
168140168259
}
168141168260

@@ -168185,7 +168304,9 @@ define("services/promotions", function (require, exports, module) {
168185168304

168186168305
function _isAnyDialogsVisible() {
168187168306
const $modal = $(`.modal.instance`);
168188-
return $modal.length > 0 && $modal.is(':visible');
168307+
const $notifications = $(`.notification-ui-tooltip`);
168308+
return ($modal.length > 0 && $modal.is(':visible')) ||
168309+
($notifications.length > 0 && $notifications.is(':visible'));
168189168310
}
168190168311

168191168312
/**

brackets.config.dist.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
"buildtype" : "production",
1010
"bugsnagEnv" : "production",
1111
"app_notification_url" : "https://updates.phcode.io/appNotifications/prod/",
12-
"app_update_url" : "https://updates.phcode.io/tauri/update-latest-stable-prod.json"
12+
"app_update_url" : "https://updates.phcode.io/tauri/update-latest-stable-prod.json",
13+
"promotions_url" : "https://promotions.phcode.dev/prod/"
1314
}

brackets.config.staging.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
"buildtype" : "staging",
1010
"bugsnagEnv" : "staging",
1111
"app_notification_url" : "https://updates.phcode.io/appNotifications/staging/",
12-
"app_update_url" : "https://updates.phcode.io/tauri/update-latest-pre-release.json"
12+
"app_update_url" : "https://updates.phcode.io/tauri/update-latest-pre-release.json",
13+
"promotions_url" : "https://promotions.phcode.dev/dev/"
1314
}

0 commit comments

Comments
 (0)