Skip to content

Commit

Permalink
chore: extension registry update taskbar ui
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Nov 21, 2024
1 parent 1a7ac8c commit f499761
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/extensibility/ExtensionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ define(function (require, exports, module) {
Strings = require("strings"),
StringUtils = require("utils/StringUtils"),
ThemeManager = require("view/ThemeManager"),
TaskManager = require("features/TaskManager"),
Metrics = require("utils/Metrics");

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

function _updateRegistry(newVersion) {
console.log("downloading extension registry: ", newVersion, brackets.config.extension_registry);
const downloadTask = TaskManager.addNewTask(Strings.EXTENSIONS_REGISTRY_TASK_TITLE,
Strings.EXTENSIONS_REGISTRY_TASK_MESSAGE,
`<i class="fa-solid fa-list"></i>`);
$.ajax({
url: brackets.config.extension_registry,
dataType: "json",
Expand All @@ -371,9 +375,11 @@ define(function (require, exports, module) {
}
}).finally(()=>{
pendingDownloadRegistry = null;
downloadTask.close();
});
})
.fail(function (err) {
downloadTask.close();
console.error("error Fetching Extension Registry", err);
if(!pendingDownloadRegistry.alreadyResolvedFromCache){
pendingDownloadRegistry.reject();
Expand Down
2 changes: 2 additions & 0 deletions src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,8 @@ define({
"EXTENSIONS_UPDATES_TITLE": "Updates",
"EXTENSIONS_LAST_UPDATED": "Last Updated",
"EXTENSIONS_DOWNLOADS": "Downloads",
"EXTENSIONS_REGISTRY_TASK_TITLE": "Updating Extension List",
"EXTENSIONS_REGISTRY_TASK_MESSAGE": "Downloading\u2026",

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

0 comments on commit f499761

Please sign in to comment.