diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-12-06 19:16:22 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-12-06 19:16:22 -0600 |
| commit | 93afab4aadd02688002bac34133f884bf5ffa067 (patch) | |
| tree | 74b88ec26cd51cc212925b70c88f3a56f2ef4f66 /src | |
| parent | bfd282f7c4a02cccf61e782bb712803b5dafba76 (diff) | |
| download | slskd-93afab4aadd02688002bac34133f884bf5ffa067.tar.gz | |
rough in buttons
Diffstat (limited to 'src')
| -rw-r--r-- | src/web/src/components/System/Info.js | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/src/web/src/components/System/Info.js b/src/web/src/components/System/Info.js index 8d7db123..a39cfb6e 100644 --- a/src/web/src/components/System/Info.js +++ b/src/web/src/components/System/Info.js @@ -1,19 +1,49 @@ import React from 'react'; import YAML from 'yaml'; +import { restart, shutdown, getVersion } from '../../lib/application'; + +import { Button, Icon, Modal, Header } from 'semantic-ui-react'; import CodeEditor from '../Shared/CodeEditor'; const Info = ({ state }) => { const stateAsYaml = YAML.stringify(state, { simpleKeys: true, sortMapEntries: true }) return ( - <div className='state-code-container'> - <CodeEditor - value={stateAsYaml} - basicSetup={false} - editable={false} - /> - </div> + <> + <div className='view-code-container'> + <CodeEditor + value={stateAsYaml} + basicSetup={false} + editable={false} + /> + </div> + <div className='footer-buttons'> + <div style={{float: 'left'}}> + <Button onClick={() => getVersion({ forceCheck: true })}><Icon name='search'/>Check for Updates</Button> + </div> + <Modal + trigger={ + <Button><Icon name='shutdown'/>Shut Down</Button> + } + centered + size='mini' + header={<Header icon='redo' content='Confirm Shutdown' />} + content="Are you sure you want shut the application down? You'll need to manually start it again." + actions={['Cancel', { key: 'done', content: 'Shut Down', negative: true, onClick: shutdown }]} + /> + <Modal + trigger={ + <Button><Icon name='redo'/>Restart</Button> + } + centered + size='mini' + header={<Header icon='redo' content='Confirm Restart' />} + content='Are you sure you want restart the application?' + actions={['Cancel', { key: 'done', content: 'Restart', negative: true, onClick: restart }]} + /> + </div> + </> ); } |
