mirror of
https://github.com/kopia/kopia.git
synced 2026-03-28 19:15:02 -04: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
25 lines
607 B
JavaScript
25 lines
607 B
JavaScript
import React, { Component } from 'react';
|
|
|
|
export default class ServerStatus extends Component {
|
|
constructor() {
|
|
super();
|
|
this.state = {
|
|
running: false,
|
|
};
|
|
|
|
if (window.require) {
|
|
const { ipcRenderer } = window.require('electron');
|
|
|
|
ipcRenderer.on('status-updated', (event, args) => {
|
|
this.setState(args);
|
|
})
|
|
|
|
ipcRenderer.send('subscribe-to-status');
|
|
}
|
|
}
|
|
|
|
render() {
|
|
return <div>Server: <b>{this.state.status}</b> on <code>{this.state.serverAddress}</code></div>;
|
|
}
|
|
}
|