docs: improve doucmentation

improve doucmentation and fix small store changes
This commit is contained in:
2026-04-30 01:16:48 +02:00
parent 3f92e74350
commit 0a714428f6
31 changed files with 4161 additions and 23 deletions

View File

@@ -213,6 +213,10 @@ export class PluginStoreService {
? await this.installedPluginsForServer(targetServerId)
: this.installedPluginsForScope(installScope);
const existing = currentScopePlugins.find((candidate) => candidate.manifest.id === manifest.id);
const installOptions = {
...options,
activate: options.activate === true || (installScope === 'server' && !existing)
};
const installedPlugin = await this.cacheInstalledPlugin({
bundleUrl: manifest.bundle?.url ?? plugin.bundleUrl,
installedAt: existing?.installedAt ?? now,
@@ -226,8 +230,8 @@ export class PluginStoreService {
.concat(installedPlugin)
.sort(sortInstalledPlugins);
await this.persistInstallResult(installScope, targetServerId, nextInstalledPlugins, installedPlugin, options);
await this.registerInstallResult(installScope, targetServerId, nextInstalledPlugins, installedPlugin, options);
await this.persistInstallResult(installScope, targetServerId, nextInstalledPlugins, installedPlugin, installOptions);
await this.registerInstallResult(installScope, targetServerId, nextInstalledPlugins, installedPlugin, installOptions);
return installedPlugin;
}
@@ -272,6 +276,10 @@ export class PluginStoreService {
await this.writeLocalServerInstalledPlugins(targetServerId, nextInstalledPlugins);
}
if (installScope === 'server' && options.activate) {
this.registry.setEnabled(installedPlugin.manifest.id, true);
}
if (installScope !== 'client' && targetServerId !== this.currentRoomId?.()) {
if (options.activate) {
await this.host.rememberActivation(installedPlugin.manifest.id);
@@ -367,6 +375,7 @@ export class PluginStoreService {
if (options.activate) {
for (const installedPlugin of installedPlugins) {
this.registry.setEnabled(installedPlugin.manifest.id, true);
await this.host.rememberActivation(installedPlugin.manifest.id);
}
}