1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 10:19:35 +02:00

Fix client html cache on theme update

This commit is contained in:
Chocobozzz 2022-03-17 09:09:06 +01:00
parent 52fe4b671a
commit 2769876fb2
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 87 additions and 52 deletions

View file

@ -277,6 +277,8 @@ export class PluginManager implements ServerHook {
logger.info('Regenerating registered plugin CSS to global file.')
await this.regeneratePluginGlobalCSS()
}
ClientHtml.invalidCache()
}
// ###################### Installation ######################
@ -419,6 +421,8 @@ export class PluginManager implements ServerHook {
}
await this.addTranslations(plugin, npmName, packageJSON.translations)
ClientHtml.invalidCache()
}
private async registerPlugin (plugin: PluginModel, pluginPath: string, packageJSON: PluginPackageJSON) {
@ -473,8 +477,6 @@ export class PluginManager implements ServerHook {
// ###################### CSS ######################
private resetCSSGlobalFile () {
ClientHtml.invalidCache()
return outputFile(PLUGIN_GLOBAL_CSS_PATH, '')
}
@ -482,8 +484,6 @@ export class PluginManager implements ServerHook {
for (const cssPath of cssRelativePaths) {
await this.concatFiles(join(pluginPath, cssPath), PLUGIN_GLOBAL_CSS_PATH)
}
ClientHtml.invalidCache()
}
private concatFiles (input: string, output: string) {