mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
Simplify and lint
This commit is contained in:
parent
e50a29ffa5
commit
ef6b22f6b9
|
@ -12,7 +12,6 @@
|
|||
initialize() {
|
||||
this.pubKeyRequests = [];
|
||||
this.pubKey = null;
|
||||
this.secretWords = null;
|
||||
this.accepted = false;
|
||||
this.view = '';
|
||||
this.render();
|
||||
|
@ -65,10 +64,6 @@
|
|||
nextPubKey() {
|
||||
// FIFO: pop at the back of the array using pop()
|
||||
this.pubKey = this.pubKeyRequests.pop();
|
||||
this.secretWords = window.mnemonic.mn_encode(this.pubKey.slice(2), 'english')
|
||||
.split(' ')
|
||||
.slice(-3)
|
||||
.join(' ');
|
||||
},
|
||||
showView() {
|
||||
const waitingForRequestView = this.$('.waitingForRequestView');
|
||||
|
@ -79,7 +74,12 @@
|
|||
waitingForRequestView.hide();
|
||||
requestAcceptedView.show();
|
||||
} else if (this.pubKey) {
|
||||
this.$('.secretWords').text(this.secretWords);
|
||||
const secretWords = window.mnemonic
|
||||
.mn_encode(this.pubKey.slice(2), 'english')
|
||||
.split(' ')
|
||||
.slice(-3)
|
||||
.join(' ');
|
||||
this.$('.secretWords').text(secretWords);
|
||||
requestReceivedView.show();
|
||||
waitingForRequestView.hide();
|
||||
requestAcceptedView.hide();
|
||||
|
|
|
@ -208,7 +208,8 @@
|
|||
countDownCallBack();
|
||||
this.pairingInterval = setInterval(countDownCallBack, 1000);
|
||||
const pubkey = textsecure.storage.user.getNumber();
|
||||
const words = window.mnemonic.mn_encode(pubkey.slice(2), 'english')
|
||||
const words = window.mnemonic
|
||||
.mn_encode(pubkey.slice(2), 'english')
|
||||
.split(' ')
|
||||
.slice(-3)
|
||||
.join(' ');
|
||||
|
|
|
@ -110,7 +110,9 @@
|
|||
'private'
|
||||
);
|
||||
const lokiProfile = conversation.getLokiProfile();
|
||||
const profile = new textsecure.protobuf.DataMessage.LokiProfile(lokiProfile);
|
||||
const profile = new textsecure.protobuf.DataMessage.LokiProfile(
|
||||
lokiProfile
|
||||
);
|
||||
const dataMessage = new textsecure.protobuf.DataMessage({
|
||||
profile,
|
||||
});
|
||||
|
|
|
@ -715,7 +715,8 @@ $loading-height: 16px;
|
|||
background: $color-loki-green-gradient;
|
||||
border-radius: 100px;
|
||||
|
||||
&:disabled, &:disabled:hover {
|
||||
&:disabled,
|
||||
&:disabled:hover {
|
||||
background: $color-loki-dark-gray;
|
||||
cursor: default;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue