Skip to content

Commit

Permalink
fix(App): disable button when one of the entries is empty
Browse files Browse the repository at this point in the history
Signed-off-by: DorraJaouad <[email protected]>
  • Loading branch information
DorraJaouad committed Feb 12, 2024
1 parent 00a7ddc commit 0713ee1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
placeholder="64" />
<NcButton type="secondary"
class="whitelist__submit"
:disabled="disabled"
@click="addWhitelist">
<template #icon>
<PlusIcon />
Expand Down Expand Up @@ -131,6 +132,10 @@ export default {
}
return 'success'
},

disabled() {
return !this.newWhitelist.ip.length || !this.newWhitelist.mask.length
},
},
beforeMount() {
this.remoteAddress = loadState('bruteforcesettings', 'remote-address', '127.0.0.1')
Expand Down Expand Up @@ -181,11 +186,11 @@ export default {
}

.whitelist__ip {
width: 300px;
width: 300px !important;
}

.whitelist__mask {
width: 100px;
width: 100px !important;;
}

.whitelist__submit {
Expand Down

0 comments on commit 0713ee1

Please sign in to comment.