Started checking for themes updates

This commit is contained in:
Mauro Balades
2024-08-25 11:27:27 +02:00
parent 5c4c3e6fb2
commit 3def55d48b
12 changed files with 85 additions and 33 deletions

View File

@@ -23,8 +23,18 @@ const kZenOSToSmallName = {
var gZenMarketplaceManager = {
init() {
this._buildThemesList();
Services.prefs.addObserver(this.updatePref, this._buildThemesList.bind(this));
this._buildThemesList();
document.getElementById("zenThemeMarketplaceCheckForUpdates").addEventListener("click", (event) => {
this._checkForThemeUpdates(event);
});
},
_checkForThemeUpdates(event) {
// Send a message to the child to check for theme updates.
event.target.disabled = true;
// send an event that will be listened by the child process.
document.dispatchEvent(new CustomEvent("ZenCheckForThemeUpdates"));
},
get updatePref() {