Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

refactor: try to fetch local plugin images first #1826

Merged
merged 1 commit into from
Mar 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/renderer/services/plugin-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,13 @@ export class PluginManager {
} catch (error) {
pluginConfig.logo = null
}
}

try {
pluginConfig.images = pluginConfig.images.map(image => {
return fs.readFileSync(`${pluginPath}/images/${image.split('/').pop()}`).toString('base64')
})
} catch (error) {
try {
pluginConfig.images = await this.fetchImages(pluginConfig.images)
} catch (error) {
Expand Down