|
@@ -95,11 +95,6 @@ async function runBackgroundUpdateCheck(
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (pluginInfo.isPinned) {
|
|
|
|
|
- log(`[auto-update-checker] Version is pinned; skipping update check.`);
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
const channel = extractChannel(pluginInfo.pinnedVersion ?? currentVersion);
|
|
const channel = extractChannel(pluginInfo.pinnedVersion ?? currentVersion);
|
|
|
const latestVersion = await getLatestVersion(channel);
|
|
const latestVersion = await getLatestVersion(channel);
|
|
|
if (!latestVersion) {
|
|
if (!latestVersion) {
|
|
@@ -122,11 +117,23 @@ async function runBackgroundUpdateCheck(
|
|
|
`[auto-update-checker] Update available (${channel}): ${currentVersion} → ${latestVersion}`,
|
|
`[auto-update-checker] Update available (${channel}): ${currentVersion} → ${latestVersion}`,
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
+ if (pluginInfo.isPinned) {
|
|
|
|
|
+ showToast(
|
|
|
|
|
+ ctx,
|
|
|
|
|
+ `OMO-Slim ${latestVersion}`,
|
|
|
|
|
+ `v${latestVersion} available.\nVersion is pinned. Update your plugin config to apply.`,
|
|
|
|
|
+ 'info',
|
|
|
|
|
+ 8000,
|
|
|
|
|
+ );
|
|
|
|
|
+ log(`[auto-update-checker] Version is pinned; skipping auto-update.`);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (!autoUpdate) {
|
|
if (!autoUpdate) {
|
|
|
showToast(
|
|
showToast(
|
|
|
ctx,
|
|
ctx,
|
|
|
`OMO-Slim ${latestVersion}`,
|
|
`OMO-Slim ${latestVersion}`,
|
|
|
- `v${latestVersion} available. Restart to apply.`,
|
|
|
|
|
|
|
+ `v${latestVersion} available. Auto-update is disabled.`,
|
|
|
'info',
|
|
'info',
|
|
|
8000,
|
|
8000,
|
|
|
);
|
|
);
|