Skip to content

Commit 348f169

Browse files
committed
deploy: 84352e3
1 parent 2fc2a7c commit 348f169

File tree

462 files changed

+12491
-141561
lines changed

Some content is hidden

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

462 files changed

+12491
-141561
lines changed

appConfig.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ window.AppConfig = {
2424
"app_notification_url": "assets/notifications/dev/",
2525
"app_update_url": "https://updates.phcode.io/tauri/update-latest-experimental-build.json",
2626
"linting.enabled_by_default": true,
27-
"build_timestamp": "2024-03-11T07:22:18.945Z",
27+
"build_timestamp": "2024-03-21T09:55:50.538Z",
2828
"googleAnalyticsID": "G-P4HJFPDB76",
2929
"googleAnalyticsIDDesktop": "G-VE5BXWJ0HF",
3030
"mixPanelID": "49c4d164b592be2350fc7af06a259bf3",
@@ -36,8 +36,8 @@ window.AppConfig = {
3636
"bugsnagEnv": "development"
3737
},
3838
"name": "Phoenix Code",
39-
"version": "3.4.7-19978",
40-
"apiVersion": "3.4.7",
39+
"version": "3.4.9-20040",
40+
"apiVersion": "3.4.9",
4141
"homepage": "https://core.ai",
4242
"issues": {
4343
"url": "https://github.com/phcode-dev/phoenix/issues"

assets/default-project/en.zip

161 Bytes
Binary file not shown.

assets/default-project/en/Newly_added_features.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ We are continuously adding features every week to improve the life of web develo
77

88
Here's a list of top features recently added to Phoenix:
99

10+
<h2><a target="_blank" href="https://docs.phcode.dev/docs/find-in-files/">Search Filters - Advanced find in files</a></h2>
11+
12+
`Added on March, 2024`
13+
14+
All new search filters to find exactly what you want.
15+
`Search in files` or `Exclude files` matching the given pattern instantly.
16+
17+
![new find in files](https://github.com/phcode-dev/phoenix/assets/5336369/9a46a6a8-01a2-45db-aebc-9b280977bdc1)
18+
1019
## Native Desktop Apps - Windows, Linux, and Mac (Intel/M1)
1120
`Added on Feb,2024`
1221

@@ -18,7 +27,7 @@ seamless cross-platform experience.
1827

1928
Download your copy from <a href="https://phcode.io" target="_blank">phcode.io</a>
2029

21-
![captured-div (1)](https://github.com/phcode-dev/phoenix/assets/5336369/9ea4f9cc-5ebd-4d67-bf36-0a6ae7611767)
30+
![Desktop apps](https://github.com/phcode-dev/phoenix/assets/5336369/9ea4f9cc-5ebd-4d67-bf36-0a6ae7611767)
2231

2332
## Make It Yours: Custom Keyboard Shortcuts
2433
`Added on Feb,2024`

assets/new-project/assets/css/style.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,11 @@ img {
964964
cursor: pointer;
965965
}
966966

967+
.create-btn:disabled {
968+
background: #555555;
969+
cursor: unset;
970+
}
971+
967972
.flex-column-fill{
968973
display: flex;
969974
flex-flow: column;
@@ -1071,6 +1076,10 @@ img {
10711076
display: none !important;
10721077
}
10731078

1079+
.forced-inVisible {
1080+
visibility: hidden !important;
1081+
}
1082+
10741083
/* notification ui styles */
10751084
.notification-ui-arrow {
10761085
position: absolute;

assets/new-project/assets/js/new-project-from-url.js

Lines changed: 88 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -37,75 +37,113 @@ const CREDITS = params.credits;
3737
const CREDITS_URL = params.creditsURL;
3838
const PREVIEW_URL = params.previewURL;
3939
const BACK_URL = params.backURL;
40+
let projectLocation = null, projectName = null;
4041

41-
function _validateProjectLocation() {
42-
if(!window.showDirectoryPicker){ // fs access apis not present
43-
$(document.getElementById("projectLocation")).addClass("forced-hidden");
44-
return true;
42+
function _computeProjectPath() {
43+
if($(projectNameInput).is(":visible")){
44+
let suggestedName = projectNameInput.value;
45+
if(suggestedName && projectLocation){
46+
return projectLocation+suggestedName;
47+
}
48+
return null;
4549
}
46-
let location = locationInput.value;
47-
if( location === Strings.PLEASE_SELECT_A_FOLDER){
50+
return projectLocation;
51+
}
52+
53+
async function _validateProjectLocation() {
54+
if($(locationInput).is(":visible")){
55+
// this is desktop or browsers with fs access api
56+
let isLocationValid = projectLocation &&
57+
await newProjectExtension.alreadyExists(projectLocation);
58+
if(isLocationValid){
59+
$(locationInput).removeClass("error-border");
60+
return true;
61+
}
4862
$(locationInput).addClass("error-border");
4963
return false;
5064
}
51-
$(locationInput).removeClass("error-border");
65+
// location input is hidden only in browsers with no fs access API. If its hidden,
66+
// we dont need to validate location, as _validateSuggestedName will be in effect
5267
return true;
5368
}
5469

5570
async function _validateSuggestedName() {
56-
let suggestedName = projectNameInput.value;
57-
if(await newProjectExtension.alreadyExists(suggestedName)){
58-
$(projectNameInput).addClass("error-border");
59-
return;
71+
if($(projectNameInput).is(":visible")){
72+
// the project name input is only visible in desktop and browsers with no fs access api.
73+
let suggestedName = projectNameInput.value;
74+
if(!suggestedName || !projectLocation ||
75+
await newProjectExtension.alreadyExists(projectLocation+suggestedName)){
76+
$(projectNameInput).addClass("error-border");
77+
return false;
78+
}
79+
$(projectNameInput).removeClass("error-border");
6080
}
61-
$(projectNameInput).removeClass("error-border");
81+
return true;
82+
}
83+
84+
async function _validateAll() {
85+
const locIsValid = await _validateProjectLocation();
86+
const nameIsValid = await _validateSuggestedName();
87+
document.getElementById('createProjectBtn').disabled = !(locIsValid && nameIsValid);
88+
document.getElementById('createProjectWithNameBtn').disabled = !(locIsValid && nameIsValid);
89+
return locIsValid && nameIsValid;
6290
}
6391

6492
function _selectFolder() {
6593
newProjectExtension.showFolderSelect()
6694
.then(file =>{
67-
locationInput.fullPath = file;
68-
locationInput.value = file.replace(newProjectExtension.getMountDir(), "");
69-
_validateProjectLocation();
95+
projectLocation = file;
96+
if(!projectLocation.endsWith("/")){
97+
projectLocation = projectLocation + "/";
98+
}
99+
locationInput.value = window.parent.Phoenix.app.getDisplayPath(file);
100+
_validateAll();
70101
});
71102
}
72103

73-
function _createProjectClicked() {
74-
if(_validateProjectLocation()){
75-
newProjectExtension.downloadAndOpenProject(
76-
PARAM_SUGGESTED_URL,
77-
locationInput.fullPath, PARAM_SUGGESTED_NAME, FLATTEN_ZIP_FIRST_LEVEL_DIR)
78-
.then(()=>{
79-
Metrics.countEvent(Metrics.EVENT_TYPE.NEW_PROJECT, "createProject.Click", "create.success");
80-
newProjectExtension.closeDialogue();
81-
});
82-
} else {
104+
async function _createProjectClicked() {
105+
const projectPath = _computeProjectPath();
106+
if(!projectPath){
83107
newProjectExtension.showErrorDialogue(
84108
Strings.MISSING_FIELDS,
85109
Strings.PLEASE_FILL_ALL_REQUIRED);
110+
return;
86111
}
112+
await window.parent.Phoenix.VFS.ensureExistsDirAsync(projectPath);
113+
newProjectExtension.downloadAndOpenProject(
114+
PARAM_SUGGESTED_URL,
115+
projectPath, PARAM_SUGGESTED_NAME, FLATTEN_ZIP_FIRST_LEVEL_DIR)
116+
.then(()=>{
117+
Metrics.countEvent(Metrics.EVENT_TYPE.NEW_PROJECT, "createProject.Click", "create.success");
118+
newProjectExtension.closeDialogue();
119+
});
87120
Metrics.countEvent(Metrics.EVENT_TYPE.NEW_PROJECT, "createProject.Click", "create");
88121
}
89122

90123
function _showLicensingInfo() {
91-
if(LICENSE || LICENSE_URL){
124+
if(LICENSE || LICENSE_URL || CREDITS || CREDITS_URL){
92125
$(document.getElementById("License")).removeClass("forced-hidden");
126+
}
127+
if(LICENSE || LICENSE_URL){
93128
let el = document.getElementById("licenseLink");
94129
el.textContent = LICENSE || LICENSE_URL;
95-
let licenseURL = LICENSE_URL || '#';
96-
el.href = licenseURL;
97-
if(licenseURL === '#'){
98-
$(el).attr('target', '');
130+
if(LICENSE_URL){
131+
$(el).click((evt)=>{
132+
window.parent.brackets.app.openURLInDefaultBrowser(LICENSE_URL);
133+
evt.preventDefault();
134+
evt.stopPropagation();
135+
});
99136
}
100137
}
101138
if(CREDITS || CREDITS_URL){
102-
$(document.getElementById("Credits")).removeClass("forced-hidden");
103139
let el = document.getElementById("creditsLink");
104140
el.textContent = CREDITS || CREDITS_URL;
105-
let creditsURL = CREDITS_URL || '#';
106-
el.href = creditsURL;
107-
if(creditsURL === '#'){
108-
$(el).attr('target', '');
141+
if(CREDITS_URL){
142+
$(el).click((evt)=>{
143+
window.parent.brackets.app.openURLInDefaultBrowser(CREDITS_URL);
144+
evt.preventDefault();
145+
evt.stopPropagation();
146+
});
109147
}
110148
}
111149
}
@@ -127,10 +165,16 @@ function _setupNavigation() {
127165

128166
function initNewProjectFromURL() {
129167
_setupNavigation();
130-
if(!window.showDirectoryPicker){ // fs access apis not present
131-
$(document.getElementById("projectLocation")).addClass("forced-hidden");
132-
} else {
168+
if(window.parent.Phoenix.browser.isTauri){ // desktop builds
169+
projectLocation = newProjectExtension.getLocalProjectsPath();
170+
projectName = PARAM_SUGGESTED_NAME;
171+
$(document.getElementById("createProjectBtn")).addClass("forced-inVisible");
172+
} else if(window.showDirectoryPicker){ // fs access apis- chrome/opera etc..
133173
$(document.getElementById("projectName")).addClass("forced-hidden");
174+
} else {
175+
projectName = PARAM_SUGGESTED_NAME;
176+
projectLocation = newProjectExtension.getLocalProjectsPath();
177+
$(document.getElementById("projectLocation")).addClass("forced-hidden");
134178
}
135179
document.getElementById("titleNewProject").textContent = PARAM_SUGGESTED_TITLE;
136180
projectNameInput = document.getElementById("projectNameInput");
@@ -139,12 +183,14 @@ function initNewProjectFromURL() {
139183
createProjectWithNameBtn = document.getElementById("createProjectWithNameBtn");
140184
createProjectBtn.onclick = _createProjectClicked;
141185
createProjectWithNameBtn.onclick = _createProjectClicked;
142-
$(projectNameInput).keyup(_validateSuggestedName);
186+
$(projectNameInput).keyup(_validateAll);
143187
locationInput.value = Strings.PLEASE_SELECT_A_FOLDER;
144-
projectNameInput.value = PARAM_SUGGESTED_NAME;
188+
projectNameInput.value = projectName;
145189
locationInput.onclick = _selectFolder;
190+
if(projectLocation){
191+
locationInput.value = window.parent.Phoenix.app.getDisplayPath(projectLocation);
192+
}
146193
_showLicensingInfo();
147194
_showPreview();
148-
_validateProjectLocation();
149-
_validateSuggestedName();
195+
_validateAll();
150196
}

assets/new-project/code-editor.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
6+
<meta name="robots" content="noindex">
67
<title>Extension Sidebar Dashboard</title>
78
<!-- CSS -->
89
<link rel="stylesheet" href="assets/css/bootstrap.min.css"/>

assets/new-project/new-project-from-url.html

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,19 @@
5050
</div>
5151

5252
<div class="website-main-content flex-column-fill flex-1-1-auto">
53-
<div id="projectLocation" class="website-detail d-flex align-items-center flex-0-1-auto">
54-
<span class="localize">{{LOCATION}}</span>
55-
<input id="locationInput" type="button" name="web-url" value="">
56-
<button id="createProjectBtn" class="create-btn localize">{{CREATE_PROJECT}}</button>
57-
</div>
5853
<div id="projectName" class="website-detail d-flex align-items-center flex-0-1-auto">
5954
<span class="localize">{{PROJECT_NAME}}</span>
6055
<input id="projectNameInput" class="" type="text" name="project-name" value="project"/>
6156
<button id="createProjectWithNameBtn" class="create-btn localize">{{CREATE_PROJECT}}</button>
6257
</div>
63-
<div id="License" class="forced-hidden website-detail d-flex align-items-center flex-0-1-auto">
64-
<span class="localize">{{LICENSE}}</span>
65-
<a id="licenseLink" href="#" target="_blank"></a>
58+
<div id="projectLocation" class="website-detail d-flex align-items-center flex-0-1-auto">
59+
<span class="localize">{{LOCATION}}</span>
60+
<input id="locationInput" type="button" name="web-url" value="">
61+
<button id="createProjectBtn" class="create-btn localize">{{CREATE_PROJECT}}</button>
6662
</div>
67-
<div id="Credits" class="forced-hidden website-detail d-flex align-items-center flex-0-1-auto">
68-
<span class="localize">{{CREDITS}}</span>
63+
<div id="License" class="forced-hidden website-detail d-flex align-items-center flex-0-1-auto" style="color: white">
64+
<span class="localize">{{LICENSE}}</span>
65+
<a id="licenseLink" href="#" target="_blank"></a>,&nbsp;
6966
<a id="creditsLink" href="#" target="_blank"></a>
7067
</div>
7168
<div id="previewBox" class="website-preview-content flex-1-1-auto forced-hidden">

assets/phoenix-splash/error.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<head>
44
<title>Phoenix editor</title>
55
<link rel="stylesheet" href="styles.css">
6+
<meta name="robots" content="noindex">
67
</head>
78

89
<body>

assets/phoenix-splash/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<head>
44
<title>Phoenix editor</title>
55
<link rel="stylesheet" href="styles.css">
6+
<meta name="robots" content="noindex">
67
</head>
78

89
<body>

assets/phoenix-splash/live-preview-error.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<head>
44
<title>Phoenix editor</title>
55
<link rel="stylesheet" href="styles.css">
6+
<meta name="robots" content="noindex">
67
<script type="text/javascript">
78
function applyTranslations() {
89
const urlSearchParams = new URLSearchParams(window.location.search);

0 commit comments

Comments
 (0)