Skip to content

Commit

Permalink
Merge pull request #557 from nextcloud/fix/289/disable-button-for-emp…
Browse files Browse the repository at this point in the history
…ty-entries

fix(App): disable button when one of the entries is empty
  • Loading branch information
DorraJaouad authored Feb 12, 2024
2 parents 4baf51f + 88a5575 commit 22c9a70
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions js/bruteforcesettings-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/bruteforcesettings-main.js.map

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
placeholder="64" />
<NcButton type="secondary"
class="whitelist__submit"
:disabled="disabled"
@click="addWhitelist">
<template #icon>
<PlusIcon />
Expand Down Expand Up @@ -132,6 +133,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 @@ -182,11 +187,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 22c9a70

Please sign in to comment.