Skip to content

Commit 0c5ca39

Browse files
committed
feat: graduate out of beta and fix web cache issues
1 parent c9b7747 commit 0c5ca39

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

src/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"config": {
3-
"app_title": "Phoenix Code Beta",
4-
"app_name_about": "Phoenix Code Beta",
3+
"app_title": "Phoenix Code",
4+
"app_name_about": "Phoenix Code",
55
"about_icon": "styles/images/phoenix-icon.svg",
66
"how_to_use_url": "https://github.com/adobe/brackets/wiki/How-to-Use-Brackets",
77
"support_url": "https://github.com/phcode-dev/phoenix/discussions",

src/index.html

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,20 @@
410410
}
411411
await clearLegacyCache();
412412

413+
const shouldRefreshLess = window.localStorage.getItem(LESS_REFRESH_SCHEDULED_KEY) === 'yes';
414+
if(shouldRefreshLess){
415+
let lessRefreshInterval = setInterval(()=>{
416+
// wait for less to get loaded. less caches css in local storage in production urls
417+
// and might not load new css classes if we don't reset. less doesn't cache in localhost.
418+
if(window.less && less.refresh){
419+
less.refresh(true).finally(()=>{
420+
localStorage.setItem(LESS_REFRESH_SCHEDULED_KEY, "no");
421+
});
422+
clearInterval(lessRefreshInterval);
423+
}
424+
}, 500);
425+
}
426+
413427
const currentCacheName = await _readFileSafe(WEB_CACHE_FILE_PATH);
414428
if(!currentCacheName) {
415429
// fresh install, no cache
@@ -423,20 +437,10 @@
423437
await window.caches.delete(currentCacheName);
424438
await _writeFileSafe(WEB_CACHE_FILE_PATH, PHOENIX_APP_CACHE_VERSION);
425439
localStorage.setItem(LESS_REFRESH_SCHEDULED_KEY, "yes");
426-
}
427-
428-
const shouldRefreshLess = window.localStorage.getItem(LESS_REFRESH_SCHEDULED_KEY) === 'yes';
429-
if(shouldRefreshLess){
430-
let lessRefreshInterval = setInterval(()=>{
431-
// wait for less to get loaded. less caches css in local storage in production urls
432-
// and might not load new css classes if we don't reset. less doesn't cache in localhost.
433-
if(window.less && less.refresh){
434-
less.refresh(true).finally(()=>{
435-
localStorage.setItem(LESS_REFRESH_SCHEDULED_KEY, "no");
436-
});
437-
clearInterval(lessRefreshInterval);
438-
}
439-
}, 500);
440+
if(!force){
441+
location.reload();
442+
// force reload handlers should reload themselves.
443+
}
440444
}
441445
}
442446
_resetCacheIfNeeded();

0 commit comments

Comments
 (0)