diff --git a/serve-proxy.js b/serve-proxy.js index 4773be090f..01a870bc02 100644 --- a/serve-proxy.js +++ b/serve-proxy.js @@ -8,8 +8,8 @@ const fs = require('fs'); const httpProxy = require('http-proxy'); // Account server configuration - switch between local and production -//const ACCOUNT_SERVER = 'https://account.phcode.dev'; // Production -const ACCOUNT_SERVER = 'http://localhost:5000'; // Local development +const ACCOUNT_SERVER = 'https://account.phcode.dev'; // Production +// const ACCOUNT_SERVER = 'http://localhost:5000'; // Local development // Default configuration let config = { diff --git a/src/assets/new-project/assets/css/responsive.css b/src/assets/new-project/assets/css/responsive.css index 588b056742..8edbc0bb7c 100644 --- a/src/assets/new-project/assets/css/responsive.css +++ b/src/assets/new-project/assets/css/responsive.css @@ -36,7 +36,7 @@ width: 100%; } - .editor-name h4 { + .editor-name h4, .editor-name h4 span { font-size: 22px; } @@ -79,21 +79,21 @@ margin-left: 0px; width: 48%; } - + .project-content-right { width: 48%; } - + .website-detail input { width: 242px; height: 42px; } - + #noProjectIframe { width: 267px; } - + } @media (max-width: 650px) { diff --git a/src/assets/new-project/assets/js/code-editor.js b/src/assets/new-project/assets/js/code-editor.js index 64b82987bf..d8e82c4033 100644 --- a/src/assets/new-project/assets/js/code-editor.js +++ b/src/assets/new-project/assets/js/code-editor.js @@ -183,6 +183,36 @@ function _openURLInTauri(url) { } } +function _updateProBranding() { + try { + const $freeTitle = $('.phoenix-free-title'); + const $proTitle = $('.phoenix-pro-title'); + const $proTitleSpan = $('.pro-plan-name'); + + if (!$freeTitle.length || !$proTitle.length || !$proTitleSpan.length) { + console.warn('Pro branding elements not found'); + return; + } + + // Get plan info from window.top.Phoenix.pro.plan + const planInfo = window.top.Phoenix && window.top.Phoenix.pro && window.top.Phoenix.pro.plan; + + if (planInfo && planInfo.paidSubscriber) { + // Hide free title, show pro title + $freeTitle.addClass('forced-hidden'); + $proTitle.removeClass('forced-hidden'); + // Update plan name + $proTitleSpan.text(planInfo.name || 'Phoenix Pro'); + } else { + // Show free title, hide pro title + $freeTitle.removeClass('forced-hidden'); + $proTitle.addClass('forced-hidden'); + } + } catch (error) { + console.error('Error updating pro branding:', error); + } +} + function initCodeEditor() { document.getElementById("openFolderBtn").onclick = function() { Metrics.countEvent(Metrics.EVENT_TYPE.NEW_PROJECT, "main.Click", "open-folder"); @@ -252,4 +282,5 @@ function initCodeEditor() { _showFirstTimeExperience(); $("body").append($(``)); _attachSettingBtnEventListeners(); + _updateProBranding(); } diff --git a/src/assets/new-project/code-editor.html b/src/assets/new-project/code-editor.html index 643f6e9a99..6362e1adf2 100644 --- a/src/assets/new-project/code-editor.html +++ b/src/assets/new-project/code-editor.html @@ -15,6 +15,22 @@ +
@@ -24,7 +40,8 @@ image
-

{{APP_TITLE}}

+

{{APP_TITLE}}

+

Phoenix Pro

{{BUILD_THE_WEB}} diff --git a/src/index.html b/src/index.html index 3bfd308b3f..9e287c2feb 100644 --- a/src/index.html +++ b/src/index.html @@ -350,6 +350,7 @@ baseURL: _getBaseURL(), isTestWindow: _isTestWindow(), firstBoot: false, // will be set below + pro: {}, startTime: Date.now(), TRUSTED_ORIGINS: { // if modifying this list, make sure to update in https://github.com/phcode-dev/phcode.live/blob/main/docs/trustedOrigins.js diff --git a/src/nls/root/strings.js b/src/nls/root/strings.js index dcca36044d..abb3b0e46c 100644 --- a/src/nls/root/strings.js +++ b/src/nls/root/strings.js @@ -1606,7 +1606,6 @@ define({ "CONTACT_SUPPORT": "Contact support", "SIGN_OUT": "Sign out", "ACCOUNT_DETAILS": "Account Details", - "AI_QUOTA_USED": "AI quota used", "LOGIN_REFRESH": "Check Login Status", "SIGN_IN_WAITING_TITLE": "Waiting for Sign In", "SIGN_IN_WAITING_MESSAGE": "Please complete sign-in in the new tab, then return here.", diff --git a/src/services/html/profile-popup.html b/src/services/html/profile-popup.html index 29f906483a..8080c83aff 100644 --- a/src/services/html/profile-popup.html +++ b/src/services/html/profile-popup.html @@ -8,18 +8,20 @@
-
{{planName}}
+
{{planName}}