mirror of
https://github.com/kopia/kopia.git
synced 2026-01-28 00:08:04 -05:00
* 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
29 lines
684 B
JavaScript
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>;
|
|
}
|
|
}
|