Files
kopia/app/src/ServerLogs.js
Jarek Kowalski c3ead4bc3e Kopia UI: added desktop app shell based on Electron that runs in the tray (#183)
* app: added desktop app shell based on Electron that runs in the tray, starts a background kopia server and allows access to the UI

* icons: updated icons for the app

* htmlui: flexible containers
2020-02-01 11:58:22 -08:00

29 lines
684 B
JavaScript

import React, { Component } from 'react';
import Form from 'react-bootstrap/Form';
export default class ServerLogs extends Component {
constructor() {
super();
this.state = {
logs: "",
};
if (window.require) {
const { ipcRenderer } = window.require('electron');
ipcRenderer.on('logs-updated', (event, args) => {
this.setState({logs:args});
})
ipcRenderer.send('subscribe-to-logs');
}
}
render() {
return <Form.Group controlId="logs">
<Form.Control as="textarea" rows="30" value={this.state.logs} />
</Form.Group>;
}
}