Mercurial > xmpp-account-manager
changeset 46:af2874ff7234
mathieui: Ask the user for confirmation before deleting PEP nodes or contacts.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 23 May 2020 19:01:23 +0200 |
parents | 8b69b3a1ef8e |
children | b76146a09e07 |
files | index.xhtml pep.js prosody.css roster.js |
diffstat | 4 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/index.xhtml +++ b/index.xhtml @@ -58,7 +58,7 @@ <div class="row tab-profile"> <div class="col-sm-4"> <h2>Avatar</h2> -<p>This image allows your contact to quickly identify you.</p> +<p>This image allows your contacts to quickly identify you.</p> </div> <div class="col-sm-8"> <img id="avatar" style="max-width:96px;max-height:96px"/> <span id="avatar-size"/> <img width="24" height="24" id="avatar-spinner"/><br/> @@ -142,7 +142,7 @@ This can be used if you forget your pass <div class="row tab-pep" hidden=""> <div class="col-sm-4"> -<h2>PEP (advanced)</h2> +<h2>PEP</h2> </div> <div class="col-sm-8"> <div class="alert alert-warning">This section is for <b>advanced</b> users, use at your own risk!</div>
--- a/pep.js +++ b/pep.js @@ -65,6 +65,9 @@ function initPEP(connection) { button.classList.add('btn-danger'); button.textContent = '✕'; button.onclick = function (evt) { + const really = confirm('Do you really want to remove the node ' + node + '?'); + if (!really) + return; const iq = $iq({type: 'set'}) .c('pubsub', {xmlns: NS.pubsub_owner}) .c('delete', {node: node});
--- a/prosody.css +++ b/prosody.css @@ -24,6 +24,9 @@ h1 img { margin-bottom: 1em; margin-top: 1em; } +#connect { + margin-top: 1em; +} .navbar { background-color: #6197d6; background-image: linear-gradient(to right, #000080, #6197d6);
--- a/roster.js +++ b/roster.js @@ -55,6 +55,9 @@ function initRoster(connection) { button.classList.add('btn-danger'); button.textContent = '✕'; button.onclick = function (evt) { + const really = confirm('Do you really want to remove ' + jid + '?'); + if (!really) + return; const iq = $iq({type: 'set'}) .c('query', {xmlns: NS.roster}) .c('item', {jid: jid, subscription: 'unsubscribe'});