Skip to content

Commit d1887b0

Browse files
committed
fix: clicking on phoenix pro title on new project window does nothing
1 parent ed70df7 commit d1887b0

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/assets/new-project/assets/js/code-editor.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ function _openURLInTauri(url) {
186186
function _updateProBranding() {
187187
try {
188188
const $freeTitle = $('.phoenix-free-title');
189-
const $proTitle = $('.phoenix-pro-title');
189+
const $proTitle = $('#phoenix-pro-title');
190190
const $proTitleSpan = $('.pro-plan-name');
191191

192192
if (!$freeTitle.length || !$proTitle.length || !$proTitleSpan.length) {
@@ -222,6 +222,10 @@ function initCodeEditor() {
222222
Metrics.countEvent(Metrics.EVENT_TYPE.NEW_PROJECT, "main.Click", "viewMore");
223223
window.location.href = 'new-project-more.html';
224224
};
225+
document.getElementById("phoenix-pro-title").onclick = function() {
226+
Metrics.countEvent(Metrics.EVENT_TYPE.NEW_PROJECT, "main.Click", "proTitle");
227+
_openURLInTauri("https://account.phcode.dev");
228+
};
225229
document.getElementById("githubStarsButton").onclick = function() {
226230
Metrics.countEvent(Metrics.EVENT_TYPE.NEW_PROJECT, "main.Click", "githubStars");
227231
_openURLInTauri("https://github.com/phcode-dev/phoenix");

src/assets/new-project/code-editor.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<script src="../../thirdparty/floating-ui.dom.umd.min.js"></script>
1717
<script src="assets/js/notification-ui.js"></script>
1818
<style>
19-
.phoenix-pro-title {
19+
#phoenix-pro-title {
2020
background: linear-gradient(
2121
45deg,
2222
#ff8c42, /* deep orange */
@@ -41,7 +41,7 @@
4141
</div>
4242
<div class="editor-name">
4343
<h4 class="localize phoenix-free-title">{{APP_TITLE}}</h4>
44-
<h4 class="phoenix-pro-title forced-hidden"><a href="https://account.phcode.dev" target="_blank" rel="noopener" class="phoenix-pro"><span class="pro-plan-name">Phoenix Pro</span><i class="fa-solid fa-feather orange-gold" style="margin-left: 4px;"></i></a></h4>
44+
<h4 id="phoenix-pro-title" class="forced-hidden"><a href="https://account.phcode.dev" target="_blank" rel="noopener" class="phoenix-pro"><span class="pro-plan-name">Phoenix Pro</span><i class="fa-solid fa-feather orange-gold" style="margin-left: 4px;"></i></a></h4>
4545
<!-- Place this tag where you want the button to render. -->
4646
<div style="display: flex; justify-content: space-between;">
4747
<span class="localize">{{BUILD_THE_WEB}}</span>

0 commit comments

Comments
 (0)