Removed IdentityKeyHeader.
This commit is contained in:
parent
1be63b52b2
commit
cb3599eea8
|
@ -71,7 +71,6 @@
|
|||
<img src='images/loki/loki_icon_text.png'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='identity-key-placeholder'></div>
|
||||
<div class='underneathIdentityWrapper'>
|
||||
<div class='conversation-stack'>
|
||||
<div class='conversation placeholder'>
|
||||
|
|
|
@ -43,7 +43,6 @@ const {
|
|||
MediaGallery,
|
||||
} = require('../../ts/components/conversation/media-gallery/MediaGallery');
|
||||
const { MainHeader } = require('../../ts/components/MainHeader');
|
||||
const { IdentityKeyHeader } = require('../../ts/components/IdentityKeyHeader');
|
||||
const { Message } = require('../../ts/components/conversation/Message');
|
||||
const { MessageBody } = require('../../ts/components/conversation/MessageBody');
|
||||
const {
|
||||
|
@ -185,7 +184,6 @@ exports.setup = (options = {}) => {
|
|||
Lightbox,
|
||||
LightboxGallery,
|
||||
MainHeader,
|
||||
IdentityKeyHeader,
|
||||
MediaGallery,
|
||||
Message,
|
||||
MessageBody,
|
||||
|
|
|
@ -115,16 +115,6 @@
|
|||
this.listenTo(me, 'change', update);
|
||||
this.$('.main-header-placeholder').append(this.mainHeaderView.el);
|
||||
|
||||
this.identityKeyView = new Whisper.ReactWrapperView({
|
||||
className: 'identity-key-wrapper',
|
||||
Component: Signal.Components.IdentityKeyHeader,
|
||||
props: this._getIdentityKeyViewProps(),
|
||||
});
|
||||
this.on('updateProfile', () => {
|
||||
this.identityKeyView.update(this._getIdentityKeyViewProps());
|
||||
})
|
||||
this.$('.identity-key-placeholder').append(this.identityKeyView.el);
|
||||
|
||||
this.conversation_stack = new Whisper.ConversationStack({
|
||||
el: this.$('.conversation-stack'),
|
||||
model: { window: options.window },
|
||||
|
@ -221,20 +211,6 @@
|
|||
this.$el.addClass('expired');
|
||||
}
|
||||
},
|
||||
_getIdentityKeyViewProps() {
|
||||
const identityKey = textsecure.storage.get('identityKey').pubKey;
|
||||
const pubKey = StringView.arrayBufferToHex(identityKey);
|
||||
const profile = storage.getLocalProfile();
|
||||
const name = profile && profile.name && profile.name.displayName;
|
||||
|
||||
return {
|
||||
identityKey: pubKey,
|
||||
name,
|
||||
onEditProfile: async () => {
|
||||
window.Whisper.events.trigger('onEditProfile');
|
||||
},
|
||||
}
|
||||
},
|
||||
render_attributes() {
|
||||
return {
|
||||
welcomeToSignal: i18n('welcomeToSignal'),
|
||||
|
|
|
@ -142,51 +142,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
.identity-key-wrapper {
|
||||
background-color: $color-black-008-no-tranparency;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
height: $header-height;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
.identity-key-container {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
white-space: nowrap;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.identity-key-text-container {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.identity-key-container div {
|
||||
overflow-x: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.identity-key_bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.identity-key-wrapper__pencil-icon {
|
||||
@include color-svg('../images/lead-pencil.svg', $color-gray-60);
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
margin-left: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.underneathIdentityWrapper {
|
||||
position: absolute;
|
||||
top: $header-height;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 300px;
|
||||
right: 0;
|
||||
|
|
|
@ -6,16 +6,6 @@ body.dark-theme {
|
|||
}
|
||||
|
||||
.dark-theme {
|
||||
// identity key
|
||||
.identity-key-wrapper {
|
||||
background-color:$color-gray-85;
|
||||
}
|
||||
|
||||
.identity-key-wrapper__pencil-icon {
|
||||
@include color-svg('../images/lead-pencil.svg', $color-gray-25);
|
||||
}
|
||||
|
||||
|
||||
// _conversation
|
||||
|
||||
.conversation {
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
import React from 'react';
|
||||
|
||||
interface Props {
|
||||
identityKey: string;
|
||||
name?: string;
|
||||
onEditProfile: () => void;
|
||||
}
|
||||
|
||||
export class IdentityKeyHeader extends React.Component<Props> {
|
||||
public render() {
|
||||
const {
|
||||
name,
|
||||
identityKey,
|
||||
onEditProfile,
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<div className='identity-key-container'>
|
||||
<div className='identity-key-text-container'>
|
||||
<div>
|
||||
Your identity key: <span className='identity-key_bold'>{identityKey}</span>
|
||||
</div>
|
||||
{!!name &&
|
||||
<div>
|
||||
Your display name: <span className='identity-key_bold'>{name}</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div
|
||||
id='editProfile'
|
||||
role="button"
|
||||
onClick={onEditProfile}
|
||||
className="identity-key-wrapper__pencil-icon"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue