@velor/remote-mouse 6.6.1 → 6.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28,6 +28,7 @@ export function bindBrowserRemoteButtons(services, dom) {
|
|
|
28
28
|
btnVideoFullscreen,
|
|
29
29
|
} = dom.remotes.browser;
|
|
30
30
|
let launcherButtons = [];
|
|
31
|
+
let launcherLoadId = 0;
|
|
31
32
|
const staticButtons = [
|
|
32
33
|
btnBrowserBack,
|
|
33
34
|
btnBrowserForward,
|
|
@@ -60,6 +61,7 @@ export function bindBrowserRemoteButtons(services, dom) {
|
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
62
63
|
|
|
64
|
+
const loadId = ++launcherLoadId;
|
|
63
65
|
browserLaunchers.textContent = '';
|
|
64
66
|
launcherButtons = [];
|
|
65
67
|
|
|
@@ -69,6 +71,9 @@ export function bindBrowserRemoteButtons(services, dom) {
|
|
|
69
71
|
|
|
70
72
|
try {
|
|
71
73
|
const payload = await backend.getAvailableBrowsers();
|
|
74
|
+
if (loadId !== launcherLoadId) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
72
77
|
const browsers = Array.isArray(payload?.browsers) ? payload.browsers : [];
|
|
73
78
|
|
|
74
79
|
for (const browser of browsers) {
|
|
@@ -91,6 +96,9 @@ export function bindBrowserRemoteButtons(services, dom) {
|
|
|
91
96
|
bindTouchPassthrough(launcherButtons, touchpad);
|
|
92
97
|
}
|
|
93
98
|
} catch (_error) {
|
|
99
|
+
if (loadId !== launcherLoadId) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
94
102
|
browserLaunchers.textContent = '';
|
|
95
103
|
launcherButtons = [];
|
|
96
104
|
}
|
package/package.json
CHANGED
package/public/styles.css
CHANGED
|
@@ -18,7 +18,7 @@ export function createForceUpdateCheckAction(services) {
|
|
|
18
18
|
} = services;
|
|
19
19
|
return async function forceUpdateCheck({clientId} = {}) {
|
|
20
20
|
log.info('Début force update check');
|
|
21
|
-
const result = await getUpdateManager().check();
|
|
21
|
+
const result = await getUpdateManager().check({force: true});
|
|
22
22
|
|
|
23
23
|
if (result && result.checked && result.hasUpdate) {
|
|
24
24
|
log.info('Force update check: mise à jour détectée');
|
|
@@ -23,11 +23,11 @@ export function createUpdateManager(services) {
|
|
|
23
23
|
}, {type});
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
async function check() {
|
|
26
|
+
async function check({force = false} = {}) {
|
|
27
27
|
const updateCheckEnabled = Boolean(services.getConfig().updateCheck?.enabled);
|
|
28
|
-
log.debug({ enabled: updateCheckEnabled, lastKey }, 'Update check: start');
|
|
28
|
+
log.debug({ enabled: updateCheckEnabled, force, lastKey }, 'Update check: start');
|
|
29
29
|
|
|
30
|
-
if (!updateCheckEnabled) {
|
|
30
|
+
if (!updateCheckEnabled && !force) {
|
|
31
31
|
log.debug('Update check: skipped because disabled');
|
|
32
32
|
lastResult = {
|
|
33
33
|
checked: true,
|
|
@@ -48,7 +48,7 @@ export function createUpdateManager(services) {
|
|
|
48
48
|
const result = await runCheck();
|
|
49
49
|
log.debug({ result }, 'Update check: source returned');
|
|
50
50
|
|
|
51
|
-
if (!result?.hasUpdate || !result.key || result.key === lastKey) {
|
|
51
|
+
if (!result?.hasUpdate || !result.key || (!force && result.key === lastKey)) {
|
|
52
52
|
log.debug({
|
|
53
53
|
hasUpdate: Boolean(result?.hasUpdate),
|
|
54
54
|
key: result?.key || '',
|