Skip to content

Commit 8ba3d92

Browse files
committed
feat: support us on open collective button
1 parent 3394d11 commit 8ba3d92

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ function initCodeEditor() {
196196
Metrics.countEvent(Metrics.EVENT_TYPE.NEW_PROJECT, "main.Click", "githubStars");
197197
_openURLInTauri("https://github.com/phcode-dev/phoenix");
198198
};
199-
const icons = ['githubIcon', 'twitterIcon', 'youtubeIcon'];
199+
document.getElementById("sponsorIcon").title = Strings.SUPPORT_US_OPEN_COLLECTIVE;
200+
const icons = ['githubIcon', 'twitterIcon', 'youtubeIcon', 'sponsorIcon'];
200201
for(let iconID of icons) {
201202
document.getElementById(iconID).onclick = function() {
202203
Metrics.countEvent(Metrics.EVENT_TYPE.NEW_PROJECT, "main.Click", iconID);

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ <h4 class="localize">{{APP_TITLE}}</h4>
3535
<i class="fa-brands fa-twitter" style="color: #1da1f2; margin-right: .9em;"></i></a>
3636
<a id="youtubeIcon" href="https://www.youtube.com/channel/UCNK2a8DKqPQQe3GlfTk-RHg" rel="noopener" target="_blank"
3737
style="display: flex; align-items: center">
38-
<img src="images/youtube.svg" alt="" style="width: 1.7em;"></a>
38+
<img src="images/youtube.svg" alt="" style="width: 1.7em; margin-right: .9em;"></a>
39+
<a id="sponsorIcon" href="https://opencollective.com/phoenix-ide" target="_blank" rel="noopener noreferrer"
40+
style="color: rgb(234, 74, 170); margin-right: .9em;">
41+
<i class="far fa-heart"></i></a>
3942
</span>
4043
</div>
4144
<div id="githubStarsButton" style="display: flex; justify-content: space-between; margin-top: 10px;">

src/nls/root/strings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ define({
3333
"DELETING": "Deleting {0}",
3434
"RENAMING": "Renaming",
3535
"STORED_IN_YOUR_BROWSER": "Stored in Your Browser",
36+
"SUPPORT_US_OPEN_COLLECTIVE": "Support us on Open Collective",
3637
// General file io error strings
3738
"GENERIC_ERROR": "(error {0})",
3839
"NOT_FOUND_ERR": "The file/directory could not be found.",

0 commit comments

Comments
 (0)