|
|
|
@ -1,8 +1,8 @@
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import { open as openModal, close as closeModal } from '@vizality/modal';
|
|
|
|
|
import { openModal } from '@vizality/modal';
|
|
|
|
|
import { getModule, getModuleByDisplayName } from '@vizality/webpack';
|
|
|
|
|
import { Directories, Events, Protocols } from '@vizality/constants';
|
|
|
|
|
import { joinClassNames } from '@vizality/util/dom';
|
|
|
|
@ -26,7 +26,7 @@ export default class Updater extends Builtin {
|
|
|
|
|
constructor () {
|
|
|
|
|
super();
|
|
|
|
|
this.changelog = {
|
|
|
|
|
image: `${Protocols.ASSETS}/${this.addonId}/assets/updates-2021-01-11.png`,
|
|
|
|
|
image: `${Protocols.BUILTINS}/${this.addonId}/assets/updates-2021-01-11.png`,
|
|
|
|
|
id: 'updates-2021-01-11'
|
|
|
|
|
};
|
|
|
|
|
this.checking = false;
|
|
|
|
@ -109,7 +109,7 @@ export default class Updater extends Builtin {
|
|
|
|
|
const updates = [];
|
|
|
|
|
const addonsLength = addons.length;
|
|
|
|
|
const parallel = allConcurrent ? addonsLength : this.settings.get('concurrency', 2);
|
|
|
|
|
await Promise.all(Array(parallel).fill(null).map(async () => {
|
|
|
|
|
Promise.all(Array(parallel).fill(null).map(async () => {
|
|
|
|
|
let addon;
|
|
|
|
|
while ((addon = addons.shift())) {
|
|
|
|
|
const repo = await addon.getGitRepo();
|
|
|
|
@ -250,7 +250,7 @@ export default class Updater extends Builtin {
|
|
|
|
|
|
|
|
|
|
// MODALS
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @param {VizalityUpdate} [update] Update
|
|
|
|
|
* @param {Function} [callback] Callback function
|
|
|
|
|
*/
|
|
|
|
@ -354,10 +354,9 @@ export default class Updater extends Builtin {
|
|
|
|
|
|
|
|
|
|
// Change Log
|
|
|
|
|
async openLatestChangelog () {
|
|
|
|
|
const { openModal: openNewModal } = getModule('openModal', 'closeModal');
|
|
|
|
|
const changelogObject = await this.formatChangelog();
|
|
|
|
|
const ChangeLog = await this._getChangeLogsComponent();
|
|
|
|
|
openNewModal(props => <ChangeLog changeLog={changelogObject} {...props} />);
|
|
|
|
|
openModal(() => props => <ChangeLog changeLog={changelogObject} {...props} />);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async _getChangeLogsComponent () {
|
|
|
|
|