working
This commit is contained in:
parent
133a1d2e8f
commit
e75ac7b3c0
6 changed files with 84 additions and 12 deletions
11
packages/desktopbridge/loggerbridge.mjs
Normal file
11
packages/desktopbridge/loggerbridge.mjs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { listen } from '@tauri-apps/api/event';
|
||||
import { logger } from '../core/logger.mjs';
|
||||
|
||||
// listen for log events from the Tauri backend and log in the UI
|
||||
await listen('log-event', (e) => {
|
||||
if (e.payload == null) {
|
||||
return;
|
||||
}
|
||||
const { message, message_type } = e.payload;
|
||||
logger(message, message_type);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue