mirror of
https://github.com/Ravinou/borgwarehouse
synced 2024-06-01 13:32:22 +02:00
feat: add checkbox to generate LAN commands
This commit is contained in:
parent
fca4560e18
commit
bbe1de8b8a
|
@ -118,6 +118,7 @@ export default function RepoManage(props) {
|
|||
sshPublicKey: dataForm.sshkey,
|
||||
comment: dataForm.comment,
|
||||
alert: dataForm.alert.value,
|
||||
lanCommand: dataForm.lanCommand,
|
||||
};
|
||||
//POST API to send new repo
|
||||
await fetch('/api/repo/add', {
|
||||
|
@ -153,6 +154,7 @@ export default function RepoManage(props) {
|
|||
sshPublicKey: dataForm.sshkey,
|
||||
comment: dataForm.comment,
|
||||
alert: dataForm.alert.value,
|
||||
lanCommand: dataForm.lanCommand,
|
||||
};
|
||||
await fetch('/api/repo/id/' + router.query.slug + '/edit', {
|
||||
method: 'PUT',
|
||||
|
@ -363,6 +365,22 @@ export default function RepoManage(props) {
|
|||
{errors.comment.message}
|
||||
</span>
|
||||
)}
|
||||
{/* LAN COMMAND GENERATION */}
|
||||
<div className={classes.lanCommandWrapper}>
|
||||
<input
|
||||
type='checkbox'
|
||||
name='lanCommand'
|
||||
defaultChecked={
|
||||
props.mode == 'edit'
|
||||
? targetRepo.lanCommand
|
||||
: false
|
||||
}
|
||||
{...register('lanCommand')}
|
||||
/>
|
||||
<label htmlFor='lanCommand'>
|
||||
Generates commands for use over LAN.
|
||||
</label>
|
||||
</div>
|
||||
{/* ALERT */}
|
||||
<label
|
||||
style={{ margin: '25px auto 10px auto' }}
|
||||
|
|
Loading…
Reference in a new issue