Skip to content

Commit

Permalink
Show warning if user already set an application password
Browse files Browse the repository at this point in the history
Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Jun 15, 2024
1 parent 4349f68 commit 3681d71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/pi-hole/js/settings-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ function processWebServerConfig() {
})
.done(function (data) {
setConfigValues("webserver", "webserver", data.config.webserver);
if (data.config.webserver.api.app_pwhash.value.length > 0)
$("#existing_apppw_warning").show();
})
.fail(function (data) {
apiFailure(data);
Expand Down
3 changes: 3 additions & 0 deletions settings-api.lp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ mg.include('scripts/pi-hole/lua/settings_header.lp','r')
<p>IMPORTANT: The app password generated here will only be shown
once and cannot be recovered. Make sure to store it in a safe
place!</p>
<div class="danger-area" style="display: none;" id="existing_apppw_warning">
<h4>Application password already configured</h4>Enabling the new app password will forcefully log out all existing applications.
</div>
</div>
<div class="modal-footer">
<button type="button" id="apppw_clear" class="btn btn-default btn-danger pull-left">Remove currently set app password</button>
Expand Down

0 comments on commit 3681d71

Please sign in to comment.