Skip to content

Commit f499761

Browse files
committed
chore: extension registry update taskbar ui
1 parent 1a7ac8c commit f499761

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/extensibility/ExtensionManager.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ define(function (require, exports, module) {
4949
Strings = require("strings"),
5050
StringUtils = require("utils/StringUtils"),
5151
ThemeManager = require("view/ThemeManager"),
52+
TaskManager = require("features/TaskManager"),
5253
Metrics = require("utils/Metrics");
5354

5455
const EXTENSION_REGISTRY_LOCAL_STORAGE_KEY = Phoenix.isTestWindow ?
@@ -355,6 +356,9 @@ define(function (require, exports, module) {
355356

356357
function _updateRegistry(newVersion) {
357358
console.log("downloading extension registry: ", newVersion, brackets.config.extension_registry);
359+
const downloadTask = TaskManager.addNewTask(Strings.EXTENSIONS_REGISTRY_TASK_TITLE,
360+
Strings.EXTENSIONS_REGISTRY_TASK_MESSAGE,
361+
`<i class="fa-solid fa-list"></i>`);
358362
$.ajax({
359363
url: brackets.config.extension_registry,
360364
dataType: "json",
@@ -371,9 +375,11 @@ define(function (require, exports, module) {
371375
}
372376
}).finally(()=>{
373377
pendingDownloadRegistry = null;
378+
downloadTask.close();
374379
});
375380
})
376381
.fail(function (err) {
382+
downloadTask.close();
377383
console.error("error Fetching Extension Registry", err);
378384
if(!pendingDownloadRegistry.alreadyResolvedFromCache){
379385
pendingDownloadRegistry.reject();

src/nls/root/strings.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,8 @@ define({
811811
"EXTENSIONS_UPDATES_TITLE": "Updates",
812812
"EXTENSIONS_LAST_UPDATED": "Last Updated",
813813
"EXTENSIONS_DOWNLOADS": "Downloads",
814+
"EXTENSIONS_REGISTRY_TASK_TITLE": "Updating Extension List",
815+
"EXTENSIONS_REGISTRY_TASK_MESSAGE": "Downloading\u2026",
814816

815817
"INLINE_EDITOR_NO_MATCHES": "No matches available.",
816818
"INLINE_EDITOR_HIDDEN_MATCHES": "All matches are collapsed. Expand the files listed at right to view matches.",

0 commit comments

Comments
 (0)