Skip to content

Commit fabf6eb

Browse files
committed
deploy: 8a905e4
1 parent 37a495f commit fabf6eb

File tree

28 files changed

+249
-54
lines changed

28 files changed

+249
-54
lines changed

appConfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ window.AppConfig = {
2323
"extension_store_url": "https://store.core.ai/src/",
2424
"app_notification_url": "assets/notifications/dev/",
2525
"linting.enabled_by_default": true,
26-
"build_timestamp": "2024-01-25T07:52:38.644Z",
26+
"build_timestamp": "2024-01-25T09:20:31.477Z",
2727
"googleAnalyticsID": "G-P4HJFPDB76",
2828
"googleAnalyticsIDDesktop": "G-VE5BXWJ0HF",
2929
"mixPanelID": "49c4d164b592be2350fc7af06a259bf3",
@@ -34,7 +34,7 @@ window.AppConfig = {
3434
"bugsnagEnv": "development"
3535
},
3636
"name": "Phoenix",
37-
"version": "3.2.21-19779",
37+
"version": "3.2.21-19780",
3838
"apiVersion": "3.2.21",
3939
"homepage": "https://core.ai",
4040
"issues": {

assets/default-project/en.zip

0 Bytes
Binary file not shown.

assets/sample-projects/HTML5.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

assets/sample-projects/explore.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

brackets-min.js

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30099,13 +30099,22 @@ define("extensionsIntegrated/NavigationAndHistory/FileRecovery", function (requi
3009930099
recoveryTemplate = `<div>
3010030100
<span>{{Strings.RECOVER_UNSAVED_FILES_MESSAGE}}</span>
3010130101
<br />
30102+
<button
30103+
style="float: right; margin-right: 6px"
30104+
class="btn btn-mini primary file-recovery-button"
30105+
data-project="{{PROJECT_TO_RECOVER}}"
30106+
onclick="EventManager.triggerEvent('ph-recovery', 'restoreProject', this.getAttribute('data-project'))"
30107+
>
30108+
{{Strings.RECOVER_UNSAVED_FILES_RESTORE}}
30109+
</button>
3010230110
<button
30103-
style="float: right; margin-right: 6px"
30104-
class="btn btn-mini remove primary file-recovery-button"
30105-
data-project="{{PROJECT_TO_RECOVER}}"
30106-
onclick="EventManager.triggerEvent('ph-recovery', 'restoreProject', this.getAttribute('data-project'))"
30111+
style="float: right; margin-right: 6px"
30112+
class="btn btn-mini danger"
30113+
data-project="{{PROJECT_TO_RECOVER}}"
30114+
id="DISCARD_UNSAVED_FILES_RESTORE"
30115+
onclick="EventManager.triggerEvent('ph-recovery', 'discardProject', this.getAttribute('data-project'))"
3010730116
>
30108-
{{Strings.RECOVER_UNSAVED_FILES_RESTORE}}
30117+
{{Strings.DISCARD_UNSAVED_FILES_RESTORE}}
3010930118
</button>
3011030119
</div>
3011130120
`,
@@ -30377,10 +30386,18 @@ define("extensionsIntegrated/NavigationAndHistory/FileRecovery", function (requi
3037730386
// done by the user. The user may not have yet clicked on the restore backup button. But as the user
3037830387
// made an edit, we should delete the project restore folder to start a new backup session. The user
3037930388
// can still restore the last backup session from the in memory `project.lastBackedUpFileContents`
30389+
console.log("Discarding old backup for restore...");
3038030390
await silentlyRemoveDirectory(project.restoreRoot);
3038130391
await createDir(project.restoreRoot);
3038230392
await backupChangedDocs(currentProjectRoot);
3038330393
project.firstEditHandled = true;
30394+
if(project.restoreNotification) {
30395+
// this means the user edited a file while the restore dialog was shown. This generally means the
30396+
// restore folder has been nuked to make way for the new session, but the old restore contents are still
30397+
// available in project.lastBackedUpFileContents. So the contents can be restored, but the restore
30398+
// data has already been discarded. We hide the discard option in the case as it's already done.
30399+
$("#DISCARD_UNSAVED_FILES_RESTORE").addClass("forced-hidden");
30400+
}
3038430401
} else {
3038530402
await backupChangedDocs(currentProjectRoot);
3038630403
await cleanupUntrackedFiles(docPathsToTrack, currentProjectRoot);
@@ -30447,10 +30464,33 @@ define("extensionsIntegrated/NavigationAndHistory/FileRecovery", function (requi
3044730464
}
3044830465
}
3044930466

30467+
async function discardBtnClicked(_event, projectToRestore) {
30468+
let currentProjectRoot = ProjectManager.getProjectRoot();
30469+
const project = trackedProjects[currentProjectRoot.fullPath];
30470+
Metrics.countEvent(Metrics.EVENT_TYPE.PROJECT, "recovery", "discardClick");
30471+
if(!project || projectToRestore !== currentProjectRoot.fullPath){
30472+
console.error(`[recovery] current project ${currentProjectRoot.fullPath} != restore ${projectToRestore}`);
30473+
return;
30474+
}
30475+
trackedProjects[currentProjectRoot.fullPath].lastBackedUpFileContents = {};
30476+
// if first edit is handled, the restore directory is nuked and the backup discarded.The discard button will
30477+
// not be shown so this fn should never get called in the case. We also should mark firstEditHandled to true to
30478+
// indicate a fresh backup start for the project
30479+
trackedProjects[currentProjectRoot.fullPath].firstEditHandled = true;
30480+
if(project.restoreNotification) {
30481+
project.restoreNotification.close();
30482+
project.restoreNotification = null;
30483+
}
30484+
await silentlyRemoveDirectory(project.restoreRoot);
30485+
await createDir(project.restoreRoot);
30486+
await backupChangedDocs(currentProjectRoot);
30487+
}
30488+
3045030489
function initWith(scanIntervalMs, restoreDir) {
3045130490
ProjectManager.on(ProjectManager.EVENT_AFTER_PROJECT_OPEN, projectOpened);
3045230491
ProjectManager.on(ProjectManager.EVENT_PROJECT_BEFORE_CLOSE, beforeProjectClosed);
3045330492
exports.on("restoreProject", restoreBtnClicked);
30493+
exports.on("discardProject", discardBtnClicked);
3045430494
sessionRestoreDir = restoreDir;
3045530495
createDir(sessionRestoreDir);
3045630496
setInterval(changeScanner, scanIntervalMs);
@@ -79121,6 +79161,7 @@ define("nls/root/strings", {
7912179161
"RECOVER_UNSAVED_FILES_TITLE": "Recover Unsaved Files?",
7912279162
"RECOVER_UNSAVED_FILES_MESSAGE": "Restore unsaved files from your previous session?",
7912379163
"RECOVER_UNSAVED_FILES_RESTORE": "Restore",
79164+
"DISCARD_UNSAVED_FILES_RESTORE": "Discard",
7912479165

7912579166
// Descriptions of core preferences
7912679167
"DESCRIPTION_CLOSE_BRACKETS": "true to automatically close braces, brackets and parentheses",

cacheManifest.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"appConfig.js": "56f569eeeb4ce790157f602043cbbe52",
3-
"assets/default-project/en.zip": "fe441ab9be7eccc255b28b7d1bcd4aea",
2+
"appConfig.js": "aae96b11b20cabf0806a3376b94683af",
3+
"assets/default-project/en.zip": "26d80a544a2c859bb9c2b9a074760e9d",
44
"assets/default-project/en/images/cloud1.svg": "aca7bba84a2237f1c1988caea54a67a9",
55
"assets/default-project/en/images/cloud2.svg": "02880216ac461f1578ac8a18f158ce28",
66
"assets/default-project/en/images/cloud3.svg": "7a78bb29bd895ead8c171001244d9b7d",
@@ -120,7 +120,7 @@
120120
"assets/phoenix-splash/live-preview-error.html": "98b11e5ae0c9341ab1450e029065ac7b",
121121
"assets/phoenix-splash/no-preview.html": "2c51d14109552b59976145fe9ac33236",
122122
"assets/phoenix-splash/styles.css": "6809a039001526eeec64eeef1f0ad807",
123-
"assets/sample-projects/bootstrap-blog.zip": "e7eb5c8d7c32229ad95c23115d592f4d",
123+
"assets/sample-projects/bootstrap-blog.zip": "75296ee2548802acd91d6b748478cc67",
124124
"assets/sample-projects/bootstrap-blog/assets/brand/bootstrap-logo-white.svg": "2e642df55357162ad28519305c8fd4fe",
125125
"assets/sample-projects/bootstrap-blog/assets/brand/bootstrap-logo.svg": "88eef7f3c2bcf988457a0e6d123c3f1d",
126126
"assets/sample-projects/bootstrap-blog/assets/dist/css/bootstrap.min.css": "6d9c6fda1e7087224431cc8068bb998f",
@@ -130,7 +130,7 @@
130130
"assets/sample-projects/bootstrap-blog/blog.rtl.css": "c6c275bf0b804d3dec264ec7fb3d7677",
131131
"assets/sample-projects/bootstrap-blog/index-rtl.html": "506e2d3fd1c4bb3651377144a62d5e82",
132132
"assets/sample-projects/bootstrap-blog/index.html": "dd8824ad3c9520dc0a825176d20eb694",
133-
"assets/sample-projects/dashboard.zip": "db536c8a8e79d197c29a307cd48360eb",
133+
"assets/sample-projects/dashboard.zip": "dabdc2a01351fea94efba5c2f6d2452e",
134134
"assets/sample-projects/dashboard/assets/brand/bootstrap-logo-white.svg": "2e642df55357162ad28519305c8fd4fe",
135135
"assets/sample-projects/dashboard/assets/brand/bootstrap-logo.svg": "88eef7f3c2bcf988457a0e6d123c3f1d",
136136
"assets/sample-projects/dashboard/assets/dist/css/bootstrap.min.css": "6d9c6fda1e7087224431cc8068bb998f",
@@ -142,7 +142,7 @@
142142
"assets/sample-projects/dashboard/index.html": "ddfda6ea9dfc8e12a8dcbbf065c804de",
143143
"assets/sample-projects/dashboard/signin.css": "a71ff2b493f230e0d6585793c2115809",
144144
"assets/sample-projects/dashboard/signin.html": "b108c183dfa7e2da3d88ec79bee79509",
145-
"assets/sample-projects/explore.zip": "03cfc1541ae3ef505f90edfe367cd591",
145+
"assets/sample-projects/explore.zip": "ce158f6a9c5df5d149970b7780f779c7",
146146
"assets/sample-projects/explore/A-tribute-page.html": "007699e85177db3d1cd87d0d47440b36",
147147
"assets/sample-projects/explore/adjustable-fireworks.html": "706a0995d00d8ae009b5426cf7ee69be",
148148
"assets/sample-projects/explore/ant_colony.html": "d0885229e57caecc83049b50ee98560c",
@@ -232,7 +232,7 @@
232232
"assets/sample-projects/explore/watermelon-pixel.html": "6f6754e8073436bb823807a10a0446ea",
233233
"assets/sample-projects/explore/webmine.html": "9879458a48c757dc6671d408e940da4d",
234234
"assets/sample-projects/explore/whack-a-mole.html": "827f15c53657350b9c898fa27ecf15ac",
235-
"assets/sample-projects/home-pages.zip": "0ab5b959498a0d4516a3fbe635255218",
235+
"assets/sample-projects/home-pages.zip": "63ae2be008b0b04fac7f3db34b7631b2",
236236
"assets/sample-projects/home-pages/album/index.html": "df20e4a479659463ab9d3f6b4ca4dbd1",
237237
"assets/sample-projects/home-pages/assets/brand/bootstrap-logo-white.svg": "2e642df55357162ad28519305c8fd4fe",
238238
"assets/sample-projects/home-pages/assets/brand/bootstrap-logo.svg": "88eef7f3c2bcf988457a0e6d123c3f1d",
@@ -244,24 +244,24 @@
244244
"assets/sample-projects/home-pages/carousel/index.html": "fc5bf7b2d8640a2c393f465294210e7c",
245245
"assets/sample-projects/home-pages/cover/cover.css": "3738586a82dd90263617020e7f1db82e",
246246
"assets/sample-projects/home-pages/cover/index.html": "a0ae1a11224672532b3466df93ce0821",
247-
"assets/sample-projects/HTML5.zip": "f156381da577dc22bacecb14383ad9e3",
247+
"assets/sample-projects/HTML5.zip": "4573cdfe5771edf76e2c56fd33c84ff4",
248248
"assets/sample-projects/HTML5/index.html": "ca318e370d63b3e083d3bd63052b8252",
249249
"assets/sample-projects/HTML5/script.js": "47de56d88cd6d866c4f77027128c0dd7",
250250
"assets/sample-projects/HTML5/styles.css": "8c798c8b3bba7e4d49dfe99b4deccd47",
251251
"assets/sample-projects/new-project-list.json": "52493b6373285d18a51a7e0319d812c2",
252252
"assets/sample-projects/zips/bootstrap.zip": "47b3132b5dbf324d6396188cf68ecae1",
253253
"base-config/keyboard.json": "f98057c64d33ec7ecc48be662abfdc40",
254-
"brackets-min.js": "0e0f151e080ece322c24c849f9d944aa",
254+
"brackets-min.js": "8ad251287d4643d1dfbfdd43440d7643",
255255
"brackets.config.dist.json": "65a7ad178b006a23115433cead0e3dc4",
256256
"brackets.config.staging.json": "64d4ae88ab3bf0a0841ee76ef036991d",
257257
"brackets.js": "f5c895786d1fa2c4c42a1f70653b6ab4",
258-
"cacheManifest.json": "e5a366b249fdaa19123368571d41d3a4",
258+
"cacheManifest.json": "c954edc6d60d8c78bde0912f4f4d2952",
259259
"command/CommandManager.js": "8763fce16883bbef252604330ac3bf49",
260260
"command/Commands.js": "15ae60b455ceef44d09dbfbdebf05567",
261261
"command/DefaultMenus.js": "95ac6ecc14fc1a5f5681d8535df92964",
262262
"command/KeyBindingManager.js": "6f084a5f01f94c1526aff6ebfa048394",
263263
"command/Menus.js": "1dc0ebdbebf8815667452d61ae63728e",
264-
"config.json": "333b1f0de5e59b2696c6fe38527db2c2",
264+
"config.json": "c00eccedbaff04359f4d1f75d4d6db59",
265265
"devEnable.html": "5c494d5e246bdb4260557c03b73eea32",
266266
"document/ChangedDocumentTracker.js": "8763dbbd784b9e8a3614a8ee723d5273",
267267
"document/Document.js": "eb760e79fc98a767f350cea658935803",
@@ -542,9 +542,9 @@
542542
"extensionsIntegrated/InAppNotifications/styles/styles.css": "de4b824783bc15e47ca9ebccbe091169",
543543
"extensionsIntegrated/InAppNotifications/utils.js": "22a9f800e46a703b3f84dfef4f848123",
544544
"extensionsIntegrated/loader.js": "c9e74c4e512f469356d97119d041b2b1",
545-
"extensionsIntegrated/NavigationAndHistory/FileRecovery.js": "0fcf088b6df8762e10945f3e40106d33",
545+
"extensionsIntegrated/NavigationAndHistory/FileRecovery.js": "83751cc6e14f61805ab699b54ac83c29",
546546
"extensionsIntegrated/NavigationAndHistory/html/recentfiles-template.html": "4df0261347a193464eac1d06dda03c16",
547-
"extensionsIntegrated/NavigationAndHistory/html/recovery-template.html": "86c32a132cd644c1410d10d7ded7b22e",
547+
"extensionsIntegrated/NavigationAndHistory/html/recovery-template.html": "2562ccde737ac05007594e4a09315a53",
548548
"extensionsIntegrated/NavigationAndHistory/keyboard.json": "294e56b46381f5e31d70d54ef3a86bca",
549549
"extensionsIntegrated/NavigationAndHistory/main.js": "2306ba76857f5c319a16526c745b255c",
550550
"extensionsIntegrated/NavigationAndHistory/NavigationProvider.js": "865ed5e1b397d55b2deb390ec5d2b85b",
@@ -806,7 +806,7 @@
806806
"nls/ro/lastTranslatedLocale.json": "4e336d0a556a16d393399df4c03a851d",
807807
"nls/ro/strings.js": "55dd07a3f449a097f1c1da9433ce0661",
808808
"nls/root/strings-app.js": "37fb6ea3db612dd5260ce00202d7c364",
809-
"nls/root/strings.js": "d3b0a6bfdfd49776984a3540df930ac3",
809+
"nls/root/strings.js": "129716a11c65d6b93135b188e825282b",
810810
"nls/root/urls.js": "2c5e2a12c3412c1efe22c686aa78bce0",
811811
"nls/ru/expertTranslations.json": "89cf849840b48e07ca9397092df1d15e",
812812
"nls/ru/lastTranslated.json": "290fb8f5aa9e9f66c74cc277dc90870a",

config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"extension_store_url": "https://store.core.ai/src/",
2323
"app_notification_url": "assets/notifications/dev/",
2424
"linting.enabled_by_default": true,
25-
"build_timestamp": "2024-01-25T07:52:38.644Z",
25+
"build_timestamp": "2024-01-25T09:20:31.477Z",
2626
"googleAnalyticsID": "G-P4HJFPDB76",
2727
"googleAnalyticsIDDesktop": "G-VE5BXWJ0HF",
2828
"mixPanelID": "49c4d164b592be2350fc7af06a259bf3",
@@ -33,7 +33,7 @@
3333
"bugsnagEnv": "development"
3434
},
3535
"name": "Phoenix",
36-
"version": "3.2.21-19779",
36+
"version": "3.2.21-19780",
3737
"apiVersion": "3.2.21",
3838
"homepage": "https://core.ai",
3939
"issues": {

0 commit comments

Comments
 (0)