Skip to content

Commit

Permalink
The badge in Header is active for update
Browse files Browse the repository at this point in the history
  • Loading branch information
Luligu committed May 4, 2024
1 parent cca9169 commit 27210c9
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions frontend/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"files": {
"main.css": "/static/css/main.979e07d2.css",
"main.js": "/static/js/main.375b2c49.js",
"main.js": "/static/js/main.cde7de68.js",
"static/js/453.d855a71b.chunk.js": "/static/js/453.d855a71b.chunk.js",
"index.html": "/index.html",
"main.979e07d2.css.map": "/static/css/main.979e07d2.css.map",
"main.375b2c49.js.map": "/static/js/main.375b2c49.js.map",
"main.cde7de68.js.map": "/static/js/main.cde7de68.js.map",
"453.d855a71b.chunk.js.map": "/static/js/453.d855a71b.chunk.js.map"
},
"entrypoints": [
"static/css/main.979e07d2.css",
"static/js/main.375b2c49.js"
"static/js/main.cde7de68.js"
]
}
2 changes: 1 addition & 1 deletion frontend/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="/manifest.json"/><script defer="defer" src="/static/js/main.375b2c49.js"></script><link href="/static/css/main.979e07d2.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="/manifest.json"/><script defer="defer" src="/static/js/main.cde7de68.js"></script><link href="/static/css/main.979e07d2.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1 change: 0 additions & 1 deletion frontend/build/static/js/main.375b2c49.js.map

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/build/static/js/main.cde7de68.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions frontend/src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ function Header() {
<Link to="/settings" className="nav-link">Settings</Link>
</nav>
<div className="header" style={{ flex: 1, display: 'flex', flexDirection: 'row', justifyContent: 'flex-end' }}>
<Tooltip title="Version">
<Tooltip title="Matterbridge version">
{matterbridgeInfo.matterbridgeVersion === matterbridgeInfo.matterbridgeLatestVersion ?
<span className="status-information">v{matterbridgeInfo.matterbridgeVersion}</span> :
<span className="status-warning">current v{matterbridgeInfo.matterbridgeVersion} latest v{matterbridgeInfo.matterbridgeLatestVersion}</span>
<span className="status-warning" onClick={handleUpdateClick}>current v{matterbridgeInfo.matterbridgeVersion} latest v{matterbridgeInfo.matterbridgeLatestVersion}</span>
}
</Tooltip>
{matterbridgeInfo.bridgeMode !== '' ? (
Expand Down
8 changes: 4 additions & 4 deletions src/matterbridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ export class Matterbridge extends EventEmitter {
this.log.error(`Plugin ${plg}${plugin.name}${er} already loaded`);
return Promise.resolve(plugin.platform);
}
this.log.info(`Loading plugin ${plg}${plugin.name}${db} type ${typ}${plugin.type}${db}`);
this.log.info(`Loading plugin ${plg}${plugin.name}${nf} type ${typ}${plugin.type}${nf}`);
try {
// Load the package.json of the plugin
const packageJson = JSON.parse(await fs.readFile(plugin.path, 'utf8'));
Expand Down Expand Up @@ -1478,14 +1478,14 @@ export class Matterbridge extends EventEmitter {
.then(async (latestVersion) => {
plugin.latestVersion = latestVersion;
await this.nodeContext?.set<RegisteredPlugin[]>('plugins', this.getBaseRegisteredPlugins());
if (plugin.version !== latestVersion) this.log.warn(`The plugin ${plugin.name} is out of date. Current version: ${plugin.version}, Latest version: ${latestVersion}`);
else this.log.info(`The plugin ${plugin.name} is up to date. Current version: ${plugin.version}, Latest version: ${latestVersion}`);
if (plugin.version !== latestVersion) this.log.warn(`The plugin ${plg}${plugin.name}${wr} is out of date. Current version: ${plugin.version}, Latest version: ${latestVersion}`);
else this.log.info(`The plugin ${plg}${plugin.name}${nf} is up to date. Current version: ${plugin.version}, Latest version: ${latestVersion}`);
})
.catch((error) => {
this.log.error(`Error getting ${plugin.name} latest version: ${error}`);
});

this.log.info(`Loaded plugin ${plg}${plugin.name}${db} type ${typ}${platform.type}${db} (entrypoint ${UNDERLINE}${pluginEntry}${UNDERLINEOFF})`);
this.log.info(`Loaded plugin ${plg}${plugin.name}${nf} type ${typ}${platform.type} ${db}(entrypoint ${UNDERLINE}${pluginEntry}${UNDERLINEOFF})`);
if (start) this.startPlugin(plugin, message); // No await do it asyncronously
return Promise.resolve(platform);
} else {
Expand Down

0 comments on commit 27210c9

Please sign in to comment.