Make unpairing a toggle-able feature (enable with window.lokiFeatureFlags.multiDeviceUnpairing = true)

pull/602/head
sachaaaaa 5 years ago
parent cd2c4b993a
commit 3f52b9df93

@ -161,12 +161,15 @@
if (pubKeys && pubKeys.length > 0) {
pubKeys.forEach(x => {
const name = this.getPubkeyName(x);
const li = $('<li>').html(`${name} - `);
const link = $('<a>')
.text('Unpair')
.attr('href', '#');
link.on('click', () => this.requestUnpairDevice(x));
li.append(link);
const li = $('<li>').html(name);
if (window.lokiFeatureFlags.multiDeviceUnpairing) {
const link = $('<a>')
.text('Unpair')
.attr('href', '#');
link.on('click', () => this.requestUnpairDevice(x));
li.append(' - ');
li.append(link);
}
this.$('#pairedPubKeys').append(li);
});
} else {

@ -456,3 +456,7 @@ if (config.environment === 'test') {
window.shortenPubkey = pubkey => `(...${pubkey.substring(pubkey.length - 6)})`;
window.pubkeyPattern = /@[a-fA-F0-9]{64,66}\b/g;
window.lokiFeatureFlags = {
multiDeviceUnpairing: false,
};

Loading…
Cancel
Save