Skip to content

Commit a4e424a

Browse files
committed
chore: add a get pro link in the profile popup
1 parent 300b12b commit a4e424a

File tree

5 files changed

+23
-5
lines changed

5 files changed

+23
-5
lines changed

src/nls/root/strings.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1679,5 +1679,6 @@ define({
16791679
"PROMO_LEARN_MORE": "Learn More\u2026",
16801680
"PROMO_GET_APP_UPSELL_BUTTON": "Get {0}",
16811681
"PROMO_PRO_ENDED_TITLE": "Your {0} Trial has ended",
1682-
"PROMO_PRO_TRIAL_DAYS_LEFT": "Phoenix Pro Trial ({0} days left)"
1682+
"PROMO_PRO_TRIAL_DAYS_LEFT": "Phoenix Pro Trial ({0} days left)",
1683+
"GET_PHOENIX_PRO": "Get Phoenix Pro"
16831684
});

src/services/html/login-popup.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ <h1 class="popup-title">{{Strings.PROFILE_POP_TITLE}}</h1>
99
</span>
1010
</div>
1111
{{/trialInfo}}
12+
<a href="{{getProLink}}" style="font-size: 13px;">
13+
{{Strings.GET_PHOENIX_PRO}}
14+
<i class="fa fa-arrow-right" style="font-size: 10px;margin-left: 4px;"></i>
15+
</a>
1216
</div>
1317
<div class="popup-body">
1418
<button id="phoenix-signin-btn" class="btn dialog-button primary">

src/services/html/profile-popup.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
<div class="user-email"><secure-email></secure-email></div>
1010
<iframe id="user-details-frame" class="user-details-iframe" style="display: none; padding: 0; border: none; background: transparent; width: 100%; height: auto; overflow: hidden;" scrolling="no"></iframe>
1111
<div class="user-plan-name {{planClass}}">{{planName}}</div>
12+
<a class="get-phoenix-pro-profile" href="{{getProLink}}" style="font-size: 13px;">
13+
{{Strings.GET_PHOENIX_PRO}}
14+
<i class="fa fa-arrow-right" style="font-size: 10px;margin-left: 4px;"></i>
15+
</a>
1216
</div>
1317
</div>
1418
</div>

src/services/profile-menu.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ define(function (require, exports, module) {
151151
closePopup(); // close any existing popup first
152152

153153
// Render template with basic data first for instant response
154-
const renderedTemplate = Mustache.render(loginTemplate, {Strings});
154+
const renderedTemplate = Mustache.render(loginTemplate, {
155+
Strings,
156+
getProLink: brackets.config.purchase_url
157+
});
155158
$popup = $(renderedTemplate);
156159

157160
$("body").append($popup);
@@ -352,8 +355,9 @@ define(function (require, exports, module) {
352355
if (!$popup || !entitlements) {
353356
return;
354357
}
355-
358+
// entitlements will always be present for login popup.
356359
// Update plan information
360+
const $getProLink = $popup.find('.get-phoenix-pro-profile');
357361
if (entitlements.plan) {
358362
const $planName = $popup.find('.user-plan-name');
359363

@@ -371,18 +375,22 @@ define(function (require, exports, module) {
371375
<i class="fa-solid fa-feather" style="margin-left: 3px;"></i>
372376
</span>`;
373377
$planName.addClass('user-plan-paid').html(proTitle);
378+
$getProLink.removeClass('forced-hidden');
374379
} else {
375380
// For paid users: regular plan name with icon
376381
const proTitle = `<span class="phoenix-pro-title">
377382
<span class="pro-plan-name">${entitlements.plan.name}</span>
378383
<i class="fa-solid fa-feather" style="margin-left: 3px;"></i>
379384
</span>`;
380385
$planName.addClass('user-plan-paid').html(proTitle);
386+
$getProLink.addClass('forced-hidden');
381387
}
382388
} else {
383389
// Use simple text for free users
384390
$planName.addClass('user-plan-free').text(entitlements.plan.name);
385391
}
392+
} else {
393+
$getProLink.removeClass('forced-hidden');
386394
}
387395

388396
// Update quota section if available
@@ -432,7 +440,8 @@ define(function (require, exports, module) {
432440
titleText: "Ai Quota Used",
433441
usageText: "100 / 200 credits",
434442
usedPercent: 0,
435-
Strings: Strings
443+
Strings: Strings,
444+
getProLink: brackets.config.purchase_url
436445
};
437446

438447
// Note: We don't await here to keep popup display instant

src/styles/brackets_core_ui_variables.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,4 @@
300300
);
301301

302302
@phoenixPro-brand-light: #cc5500;
303-
@phoenixPro-brand-dark: #ff8c42;
303+
@phoenixPro-brand-dark: #FD8C2F;

0 commit comments

Comments
 (0)