Merge pull request #760 from vincentbavitz/clearnet

Keyboard navigation and local rebase
pull/768/head
Vince 5 years ago committed by GitHub
commit a45c4428c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,7 +63,7 @@ yarn install --frozen-lockfile # Install and build dependencies (this will take
yarn grunt # Generate final JS and CSS assets yarn grunt # Generate final JS and CSS assets
yarn icon-gen # Generate full set of icons for Electron yarn icon-gen # Generate full set of icons for Electron
yarn test # A good idea to make sure tests run first yarn test # A good idea to make sure tests run first
yarn start # Start Session Messenger! yarn start # Start Session!
``` ```
You'll need to restart the application regularly to see your changes, as there You'll need to restart the application regularly to see your changes, as there
@ -84,7 +84,7 @@ yarn grunt dev # runs until you stop it, re-generating built assets on file chan
## Additional storage profiles ## Additional storage profiles
Since there is no registration for Session Messenger, you can create as many accounts as you Since there is no registration for Session, you can create as many accounts as you
can public keys. To test the P2P functionality on the same machine, however, requries can public keys. To test the P2P functionality on the same machine, however, requries
that each client binds their message server to a different port. that each client binds their message server to a different port.

@ -1,8 +1,8 @@
# Session Messenger # Session
[![Build Status](https://travis-ci.org/loki-project/loki-messenger.svg?branch=development)](https://travis-ci.org/loki-project/loki-messenger) [![Build Status](https://travis-ci.org/loki-project/loki-messenger.svg?branch=development)](https://travis-ci.org/loki-project/loki-messenger)
Session Messenger allows for truly decentralized, end to end, and private encrypted chats. Session Messenger is built to handle both online and fully Asynchronous offline messages. Loki messenger implements the Signal protocol for message encryption. Our Client interface is a fork of [Signal Messenger](https://signal.org/). All communication that passes through Loki messenger is routed through [Lokinet](https://github.com/loki-project/loki-network). Session allows for truly decentralized, end to end, and private encrypted chats. Session is built to handle both online and fully Asynchronous offline messages. Loki messenger implements the Signal protocol for message encryption. Our Client interface is a fork of [Signal Messenger](https://signal.org/). All communication that passes through Loki messenger is routed through [Lokinet](https://github.com/loki-project/loki-network).
## Summary ## Summary
@ -14,11 +14,11 @@ If Alice and Bob are both online they can simply resolve each others public keys
**Offline messages** **Offline messages**
Offline messaging uses Swarms, given any users public key the user can resolve a public key to a specific grouping of Service Nodes (AKA Swarm) each user in Session Messenger belongs to a Swarm. When routing a message offline the user selects a Service node in the destination users Swarm, when the user comes online they query any node in their Swarm, if the Swarm is holding any messages for the user they disseminate those messages to the user. Offline messaging uses Swarms, given any users public key the user can resolve a public key to a specific grouping of Service Nodes (AKA Swarm) each user in Session belongs to a Swarm. When routing a message offline the user selects a Service node in the destination users Swarm, when the user comes online they query any node in their Swarm, if the Swarm is holding any messages for the user they disseminate those messages to the user.
![Swarm Messaging](https://i.imgur.com/o13Knds.png) ![Swarm Messaging](https://i.imgur.com/o13Knds.png)
Spam protections for Session Messenger are based on a Proof of Work which is attached to any message that exceeds a default size or Time To Live, this process is discussed further in the [Loki whitepaper](https://loki.network/whitepaper). Spam protections for Session are based on a Proof of Work which is attached to any message that exceeds a default size or Time To Live, this process is discussed further in the [Loki whitepaper](https://loki.network/whitepaper).
## Want to Contribute? Found a Bug or Have a feature request? ## Want to Contribute? Found a Bug or Have a feature request?

@ -52,7 +52,7 @@
"description": "Application menu command to show all application windows" "description": "Application menu command to show all application windows"
}, },
"appMenuQuit": { "appMenuQuit": {
"message": "Quit Session Messenger", "message": "Quit Session",
"description": "Application menu command to close the application" "description": "Application menu command to close the application"
}, },
"editMenuUndo": { "editMenuUndo": {

@ -52,7 +52,7 @@
"description": "Application menu command to show all application windows" "description": "Application menu command to show all application windows"
}, },
"appMenuQuit": { "appMenuQuit": {
"message": "Quit Session Messenger", "message": "Quit Session",
"description": "Application menu command to close the application" "description": "Application menu command to close the application"
}, },
"editMenuUndo": { "editMenuUndo": {

@ -52,7 +52,7 @@
"description": "Application menu command to show all application windows" "description": "Application menu command to show all application windows"
}, },
"appMenuQuit": { "appMenuQuit": {
"message": "Opustit Session Messenger", "message": "Opustit Session",
"description": "Application menu command to close the application" "description": "Application menu command to close the application"
}, },
"editMenuUndo": { "editMenuUndo": {

@ -66,7 +66,7 @@
"description": "Application menu command to show all application windows" "description": "Application menu command to show all application windows"
}, },
"appMenuQuit": { "appMenuQuit": {
"message": "Quit Session Messenger", "message": "Quit Session",
"description": "Application menu command to close the application" "description": "Application menu command to close the application"
}, },
"editMenuUndo": { "editMenuUndo": {
@ -265,7 +265,7 @@
"Header shown on the screen at the end of a successful import process" "Header shown on the screen at the end of a successful import process"
}, },
"importCompleteStartButton": { "importCompleteStartButton": {
"message": "Start using Session Messenger", "message": "Start using Session",
"description": "description":
"Button shown at end of successful import process, nothing left but a restart" "Button shown at end of successful import process, nothing left but a restart"
}, },
@ -295,6 +295,9 @@
} }
} }
}, },
"capsLockOn": {
"message": "Caps lock is on."
},
"me": { "me": {
"message": "Me", "message": "Me",
"description": "The label for yourself when shown in a group member list" "description": "The label for yourself when shown in a group member list"
@ -719,12 +722,12 @@
"Item under the Help menu, takes you to GitHub new issue form (title case)" "Item under the Help menu, takes you to GitHub new issue form (title case)"
}, },
"signalDesktopPreferences": { "signalDesktopPreferences": {
"message": "Session Messenger Preferences", "message": "Session Preferences",
"description": "description":
"Title of the window that pops up with Signal Desktop preferences in it" "Title of the window that pops up with Signal Desktop preferences in it"
}, },
"aboutSignalDesktop": { "aboutSignalDesktop": {
"message": "About Session Messenger", "message": "About Session",
"description": "Item under the Help menu, which opens a small about window" "description": "Item under the Help menu, which opens a small about window"
}, },
"speech": { "speech": {
@ -745,7 +748,7 @@
"description": "Command in the tray icon menu, to quit the application" "description": "Command in the tray icon menu, to quit the application"
}, },
"lokiMessenger": { "lokiMessenger": {
"message": "Session Messenger" "message": "Session"
}, },
"search": { "search": {
"message": "Search", "message": "Search",
@ -895,7 +898,7 @@
}, },
"audioPermissionNeeded": { "audioPermissionNeeded": {
"message": "message":
"To send audio messages, allow Session Messenger to access your microphone.", "To send audio messages, allow Session to access your microphone.",
"description": "description":
"Shown if the user attempts to send an audio message without audio permssions turned on" "Shown if the user attempts to send an audio message without audio permssions turned on"
}, },
@ -1093,7 +1096,7 @@
"Placeholder text in the message entry field when it is disabled while we are waiting for a friend request approval" "Placeholder text in the message entry field when it is disabled while we are waiting for a friend request approval"
}, },
"sendMessageFriendRequest": { "sendMessageFriendRequest": {
"message": "Hi there! This is <insert name here> !", "message": "Hi there! This is ...!",
"description": "description":
"Placeholder text in the message entry field when it is the first message sent to that contact" "Placeholder text in the message entry field when it is the first message sent to that contact"
}, },
@ -1169,7 +1172,7 @@
"Confirmation dialog title that asks the user if they really wish to delete a public channel. Answer buttons use the strings 'ok' and 'cancel'. The deletion is permanent, i.e. it cannot be undone." "Confirmation dialog title that asks the user if they really wish to delete a public channel. Answer buttons use the strings 'ok' and 'cancel'. The deletion is permanent, i.e. it cannot be undone."
}, },
"deletePublicChannelConfirmation": { "deletePublicChannelConfirmation": {
"message": "Leave this public channel?", "message": "Leave this Open Group?",
"description": "description":
"Confirmation dialog text that tells the user what will happen if they leave the public channel." "Confirmation dialog text that tells the user what will happen if they leave the public channel."
}, },
@ -1212,7 +1215,7 @@
"This is a past tense, informational message. In other words, your secure session has been reset." "This is a past tense, informational message. In other words, your secure session has been reset."
}, },
"betaDisclaimerTitle": { "betaDisclaimerTitle": {
"message": "Thanks for using Session Messenger!", "message": "Thanks for using Session!",
"description": "Title for beta disclaimer modal" "description": "Title for beta disclaimer modal"
}, },
"betaDisclaimerSubtitle": { "betaDisclaimerSubtitle": {
@ -1273,7 +1276,7 @@
} }
}, },
"installWelcome": { "installWelcome": {
"message": "Welcome to Session Messenger", "message": "Welcome to Session",
"description": "Welcome title on the install page" "description": "Welcome title on the install page"
}, },
"installTagline": { "installTagline": {
@ -1282,12 +1285,12 @@
"Tagline displayed under 'installWelcome' string on the install page" "Tagline displayed under 'installWelcome' string on the install page"
}, },
"linkYourPhone": { "linkYourPhone": {
"message": "Link your phone to Session Messenger", "message": "Link your phone to Session",
"description": "description":
"Shown on the front page when the application first starst, above the QR code" "Shown on the front page when the application first starst, above the QR code"
}, },
"signalSettings": { "signalSettings": {
"message": "Session Messenger Settings", "message": "Session Settings",
"description": "description":
"Used in the guidance to help people find the 'link new device' area of their Signal mobile app" "Used in the guidance to help people find the 'link new device' area of their Signal mobile app"
}, },
@ -1507,7 +1510,7 @@
}, },
"expiredWarning": { "expiredWarning": {
"message": "message":
"This version of Session Messenger has expired. Please upgrade to the latest version to continue messaging.", "This version of Session has expired. Please upgrade to the latest version to continue messaging.",
"description": "description":
"Warning notification that this version of the app has expired" "Warning notification that this version of the app has expired"
}, },

@ -36,7 +36,7 @@
"description": "Application menu command to show all application windows" "description": "Application menu command to show all application windows"
}, },
"appMenuQuit": { "appMenuQuit": {
"message": "Quit Session Messenger", "message": "Quit Session",
"description": "Application menu command to close the application" "description": "Application menu command to close the application"
}, },
"editMenuUndo": { "editMenuUndo": {

@ -52,7 +52,7 @@
"description": "Application menu command to show all application windows" "description": "Application menu command to show all application windows"
}, },
"appMenuQuit": { "appMenuQuit": {
"message": "Quit Session Messenger", "message": "Quit Session",
"description": "Application menu command to close the application" "description": "Application menu command to close the application"
}, },
"editMenuUndo": { "editMenuUndo": {

@ -52,7 +52,7 @@
"description": "Application menu command to show all application windows" "description": "Application menu command to show all application windows"
}, },
"appMenuQuit": { "appMenuQuit": {
"message": "Quit Session Messenger", "message": "Quit Session",
"description": "Application menu command to close the application" "description": "Application menu command to close the application"
}, },
"editMenuUndo": { "editMenuUndo": {

@ -52,7 +52,7 @@
"description": "Application menu command to show all application windows" "description": "Application menu command to show all application windows"
}, },
"appMenuQuit": { "appMenuQuit": {
"message": "Quit Session Messenger", "message": "Quit Session",
"description": "Application menu command to close the application" "description": "Application menu command to close the application"
}, },
"editMenuUndo": { "editMenuUndo": {

@ -52,7 +52,7 @@
"description": "Application menu command to show all application windows" "description": "Application menu command to show all application windows"
}, },
"appMenuQuit": { "appMenuQuit": {
"message": "Quit Session Messenger", "message": "Quit Session",
"description": "Application menu command to close the application" "description": "Application menu command to close the application"
}, },
"editMenuUndo": { "editMenuUndo": {

@ -52,7 +52,7 @@
"description": "Application menu command to show all application windows" "description": "Application menu command to show all application windows"
}, },
"appMenuQuit": { "appMenuQuit": {
"message": "Quit Session Messenger", "message": "Quit Session",
"description": "Application menu command to close the application" "description": "Application menu command to close the application"
}, },
"editMenuUndo": { "editMenuUndo": {

@ -52,7 +52,7 @@
"description": "Application menu command to show all application windows" "description": "Application menu command to show all application windows"
}, },
"appMenuQuit": { "appMenuQuit": {
"message": "Quit Session Messenger", "message": "Quit Session",
"description": "Application menu command to close the application" "description": "Application menu command to close the application"
}, },
"editMenuUndo": { "editMenuUndo": {

@ -52,7 +52,7 @@
"description": "Application menu command to show all application windows" "description": "Application menu command to show all application windows"
}, },
"appMenuQuit": { "appMenuQuit": {
"message": "Quit Session Messenger", "message": "Quit Session",
"description": "Application menu command to close the application" "description": "Application menu command to close the application"
}, },
"editMenuUndo": { "editMenuUndo": {

@ -52,7 +52,7 @@
"description": "Application menu command to show all application windows" "description": "Application menu command to show all application windows"
}, },
"appMenuQuit": { "appMenuQuit": {
"message": "Quit Session Messenger", "message": "Quit Session",
"description": "Application menu command to close the application" "description": "Application menu command to close the application"
}, },
"editMenuUndo": { "editMenuUndo": {

@ -902,7 +902,7 @@ async function updateToLokiSchemaVersion1(currentVersion, instance) {
rssFeed: 'https://loki.network/feed/', rssFeed: 'https://loki.network/feed/',
closable: true, closable: true,
name: 'Loki.network News', name: 'Loki.network News',
profileAvatar: 'images/loki/loki_icon.png', profileAvatar: 'images/loki/session_icon.png',
}; };
const updatesRssFeedData = { const updatesRssFeedData = {
@ -911,7 +911,7 @@ async function updateToLokiSchemaVersion1(currentVersion, instance) {
rssFeed: 'https://loki.network/category/messenger-updates/feed/', rssFeed: 'https://loki.network/category/messenger-updates/feed/',
closable: false, closable: false,
name: 'Messenger updates', name: 'Messenger updates',
profileAvatar: 'images/loki/loki_icon.png', profileAvatar: 'images/loki/session_icon.png',
}; };
const autoJoinLokiChats = false; const autoJoinLokiChats = false;

@ -19,7 +19,7 @@
script-src 'self'; script-src 'self';
style-src 'self' 'unsafe-inline';" style-src 'self' 'unsafe-inline';"
> >
<title>Session Messenger</title> <title>Session</title>
<link href='images/loki/loki_icon_128.png' rel='shortcut icon'> <link href='images/loki/loki_icon_128.png' rel='shortcut icon'>
<link href="stylesheets/manifest.css" rel="stylesheet" type="text/css" /> <link href="stylesheets/manifest.css" rel="stylesheet" type="text/css" />

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 725 B

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

@ -122,7 +122,7 @@
'x_white.svg', 'x_white.svg',
'icon-paste.svg', 'icon-paste.svg',
'loki/loki_icon_text.png', 'loki/loki_icon_text.png',
'loki/loki_icon_128.png', 'loki/session_icon_128.png',
]); ]);
// Set server-client time difference // Set server-client time difference

@ -6,7 +6,7 @@ const got = require('got');
const BASE_URL = 'https://debuglogs.org'; const BASE_URL = 'https://debuglogs.org';
const VERSION = window.getVersion(); const VERSION = window.getVersion();
const USER_AGENT = `Session Messenger ${VERSION}`; const USER_AGENT = `Session ${VERSION}`;
// Workaround: Submitting `FormData` using native `FormData::submit` procedure // Workaround: Submitting `FormData` using native `FormData::submit` procedure
// as integration with `got` results in S3 error saying we havent set the // as integration with `got` results in S3 error saying we havent set the

@ -222,7 +222,7 @@ function _promiseAjax(providedUrl, options) {
method: options.type, method: options.type,
body: options.data || null, body: options.data || null,
headers: { headers: {
'User-Agent': 'Session Messenger', 'User-Agent': 'Session',
'X-Loki-Messenger-Agent': 'OWD', 'X-Loki-Messenger-Agent': 'OWD',
...options.headers, ...options.headers,
}, },

@ -108,7 +108,7 @@
const last = this.last().toJSON(); const last = this.last().toJSON();
switch (userSetting) { switch (userSetting) {
case SettingNames.COUNT: case SettingNames.COUNT:
title = 'Session Messenger'; title = 'Session';
if (last.isFriendRequest) { if (last.isFriendRequest) {
message = `Friend request ${last.friendRequestType}`; message = `Friend request ${last.friendRequestType}`;

@ -1738,8 +1738,12 @@
if (event.key !== 'Escape') { if (event.key !== 'Escape') {
return; return;
} }
// TODO: this view is not always in focus (e.g. after I've selected a message), // TODO: this view is not always in focus (e.g. after I've selected a message),
// so need to make Esc more robust // so need to make Esc more robust
// Perhaps look into ConversationHeader.tsx and add an event listener in there.
// Up and down arrows should scroll
// Alt + up and down should swap between conversations / setting categories
this.model.resetMessageSelection(); this.model.resetMessageSelection();
this.closeEmojiPanel(); this.closeEmojiPanel();
}, },

@ -75,7 +75,7 @@ describe('Snode Channel', () => {
}); });
it('should encrypt data correctly', async () => { it('should encrypt data correctly', async () => {
// message sent by Session Messenger // message sent by Session
const snode = await generateSnodeKeysAndAddress(); const snode = await generateSnodeKeysAndAddress();
const messageSent = 'I am Groot'; const messageSent = 'I am Groot';
const textEncoder = new TextEncoder(); const textEncoder = new TextEncoder();
@ -133,7 +133,7 @@ describe('Snode Channel', () => {
const encryptedBase64 = dcodeIO.ByteBuffer.wrap(encrypted).toString( const encryptedBase64 = dcodeIO.ByteBuffer.wrap(encrypted).toString(
'base64' 'base64'
); );
// message received by Session Messenger // message received by Session
const decrypted = await channel.decrypt(snode.address, encryptedBase64); const decrypted = await channel.decrypt(snode.address, encryptedBase64);
assert.strictEqual(messageSent, decrypted); assert.strictEqual(messageSent, decrypted);
}); });

@ -308,7 +308,7 @@ OutgoingMessage.prototype = {
return Promise.all( return Promise.all(
devicesPubKeys.map(async devicePubKey => { devicesPubKeys.map(async devicePubKey => {
// Session Messenger doesn't use the deviceId scheme, it's always 1. // Session doesn't use the deviceId scheme, it's always 1.
// Instead, there are multiple device public keys. // Instead, there are multiple device public keys.
const deviceId = 1; const deviceId = 1;
const updatedDevices = await this.getStaleDeviceIdsForNumber( const updatedDevices = await this.getStaleDeviceIdsForNumber(

@ -1,9 +1,9 @@
{ {
"name": "session-messenger-desktop", "name": "session-messenger-desktop",
"productName": "Session Messenger", "productName": "Session",
"description": "Private messaging from your desktop", "description": "Private messaging from your desktop",
"repository": "https://github.com/loki-project/loki-messenger.git", "repository": "https://github.com/loki-project/loki-messenger.git",
"version": "1.0.0-beta10", "version": "1.0.0",
"license": "GPL-3.0", "license": "GPL-3.0",
"author": { "author": {
"name": "Loki Project", "name": "Loki Project",
@ -240,7 +240,7 @@
"linux": { "linux": {
"category": "Network", "category": "Network",
"desktop": { "desktop": {
"StartupWMClass": "Session Messenger" "StartupWMClass": "Session"
}, },
"asarUnpack": "node_modules/spellchecker/vendor/hunspell_dictionaries", "asarUnpack": "node_modules/spellchecker/vendor/hunspell_dictionaries",
"target": [ "target": [

@ -27,16 +27,16 @@ const PRODUCTION_NAME = 'loki-messenger-desktop';
const BETA_NAME = 'loki-messenger-desktop-beta'; const BETA_NAME = 'loki-messenger-desktop-beta';
const PRODUCT_NAME_PATH = 'productName'; const PRODUCT_NAME_PATH = 'productName';
const PRODUCTION_PRODUCT_NAME = 'Session Messenger'; const PRODUCTION_PRODUCT_NAME = 'Session';
const BETA_PRODUCT_NAME = 'Session Messenger Beta'; const BETA_PRODUCT_NAME = 'Session Beta';
const APP_ID_PATH = 'build.appId'; const APP_ID_PATH = 'build.appId';
const PRODUCTION_APP_ID = 'com.loki-project.messenger-desktop'; const PRODUCTION_APP_ID = 'com.loki-project.messenger-desktop';
const BETA_APP_ID = 'com.loki-project.messenger-desktop-beta'; const BETA_APP_ID = 'com.loki-project.messenger-desktop-beta';
const STARTUP_WM_CLASS_PATH = 'build.linux.desktop.StartupWMClass'; const STARTUP_WM_CLASS_PATH = 'build.linux.desktop.StartupWMClass';
const PRODUCTION_STARTUP_WM_CLASS = 'Session Messenger'; const PRODUCTION_STARTUP_WM_CLASS = 'Session';
const BETA_STARTUP_WM_CLASS = 'Session Messenger Beta'; const BETA_STARTUP_WM_CLASS = 'Session Beta';
// ------- // -------

@ -1469,6 +1469,7 @@
} }
.module-conversation-header__avatar { .module-conversation-header__avatar {
cursor: pointer;
min-width: 28px; min-width: 28px;
user-select: none; user-select: none;
} }
@ -1735,6 +1736,7 @@
// Module: Document List Item // Module: Document List Item
.module-document-list-item { .module-document-list-item {
padding-right: 10px;
width: 100%; width: 100%;
height: 72px; height: 72px;
} }
@ -2595,7 +2597,7 @@
.module-typing-animation { .module-typing-animation {
display: inline-flex; display: inline-flex;
flex-directin: row; flex-direction: row;
align-items: center; align-items: center;
height: 8px; height: 8px;

@ -476,6 +476,12 @@ $session-element-border-green: 4px solid $session-color-green;
width: 100%; width: 100%;
display: flex; display: flex;
&-text {
@include session-color-subtle($session-color-white);
font-family: 'SF Pro Text';
font-weight: 300;
}
.module-contact-name { .module-contact-name {
width: 100%; width: 100%;
} }
@ -1277,6 +1283,10 @@ label {
} }
} }
.dark-theme .bottom-bar .send-message[disabled='disabled'] {
background: $session-shade-4 !important;
}
.session-radio-group fieldset { .session-radio-group fieldset {
border: none; border: none;
margin-left: $session-margin-sm; margin-left: $session-margin-sm;
@ -1325,15 +1335,16 @@ label {
} }
.session-id-editable { .session-id-editable {
resize: none; padding: $session-margin-lg;
overflow: hidden;
}
.user-details-dialog { textarea {
.session-id-editable {
width: 30vh; width: 30vh;
} }
} }
.session-id-editable textarea {
resize: none;
overflow: hidden;
}
input { input {
user-select: text; user-select: text;

@ -79,8 +79,15 @@
} }
.module-attachment-section__items { .module-attachment-section__items {
display: grid; &-media {
grid-template-columns: repeat(3, 1fr); display: grid;
grid-template-columns: repeat(3, 1fr);
width: 100%;
}
&-documents {
width: 100%;
}
} }
.module-media { .module-media {

@ -296,7 +296,7 @@ $session-compose-margin: 20px;
margin: 0px 20px; margin: 0px 20px;
} }
.session-id-editable { .session-id-editable textarea::-webkit-inner-spin-button {
margin: 0px 20px; margin: 0px 20px;
width: -webkit-fill-available; width: -webkit-fill-available;
flex-shrink: 0; flex-shrink: 0;
@ -362,6 +362,7 @@ $session-compose-margin: 20px;
height: inherit; height: inherit;
border: none; border: none;
flex-grow: 1; flex-grow: 1;
font-size: $session-font-md;
&:focus { &:focus {
outline: none !important; outline: none !important;

@ -224,22 +224,30 @@
} }
&-id-editable { &-id-editable {
display: flex;
align-items: center;
justify-content: center;
height: 94px; height: 94px;
width: 100%; padding: 20px;
border-radius: 8px; border-radius: 8px;
border: 2px solid $session-color-dark-grey; border: 2px solid #353535;
outline: 0;
background: transparent;
color: $session-color-white;
font-size: 15px;
line-height: 18px;
text-align: center;
margin-bottom: 20px; margin-bottom: 20px;
overflow-wrap: break-word;
padding: 20px 5px 20px 5px; textarea {
display: inline-block; width: 100%;
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; outline: 0;
user-select: all; border: none;
background: transparent;
color: #fff;
font-size: 15px;
line-height: 18px;
text-align: center;
overflow-wrap: break-word;
padding: 20px 5px 20px 5px;
display: inline-block;
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
user-select: all;
}
} }
} }

@ -1,9 +1,9 @@
[ [
{ {
"label": "Session Messenger", "label": "Session",
"submenu": [ "submenu": [
{ {
"label": "About Session Messenger", "label": "About Session",
"click": null "click": null
}, },
{ {
@ -28,7 +28,7 @@
"type": "separator" "type": "separator"
}, },
{ {
"label": "Quit Session Messenger", "label": "Quit Session",
"role": "quit" "role": "quit"
} }
] ]

@ -1,9 +1,9 @@
[ [
{ {
"label": "Session Messenger", "label": "Session",
"submenu": [ "submenu": [
{ {
"label": "About Session Messenger", "label": "About Session",
"click": null "click": null
}, },
{ {
@ -28,7 +28,7 @@
"type": "separator" "type": "separator"
}, },
{ {
"label": "Quit Session Messenger", "label": "Quit Session",
"role": "quit" "role": "quit"
} }
] ]

@ -17,7 +17,7 @@
"type": "separator" "type": "separator"
}, },
{ {
"label": "Quit Session Messenger", "label": "Quit Session",
"role": "quit" "role": "quit"
} }
] ]
@ -134,7 +134,7 @@
"type": "separator" "type": "separator"
}, },
{ {
"label": "About Session Messenger", "label": "About Session",
"click": null "click": null
} }
] ]

@ -6,7 +6,7 @@
"type": "separator" "type": "separator"
}, },
{ {
"label": "Quit Session Messenger", "label": "Quit Session",
"role": "quit" "role": "quit"
} }
] ]
@ -123,7 +123,7 @@
"type": "separator" "type": "separator"
}, },
{ {
"label": "About Session Messenger", "label": "About Session",
"click": null "click": null
} }
] ]

@ -146,15 +146,15 @@
<div class="content"> <div class="content">
<div class="betaDisclaimerView" style="display: none;"> <div class="betaDisclaimerView" style="display: none;">
<h2> <h2>
Thanks for testing Session Messenger! Thanks for testing Session!
</h2> </h2>
<p> <p>
Thanks for testing Session Messenger! This software is a beta version of the full Session Messenger software suite, and so is missing some of the features the full version will have. Thanks for testing Session! This software is a beta version of the full Session software suite, and so is missing some of the features the full version will have.
</p> </p>
<p> <p>
<b> <b>
This version of Session Messenger provides no guarantees of metadata privacy. This version of Session provides no guarantees of metadata privacy.
</b> </b>
</p> </p>
@ -167,7 +167,7 @@
</p> </p>
<p> <p>
However, no one except you and your intended recipients will be able to see the contents of your messages. We recommend using existing methods, like Tor or I2P to mask your IP address while using Session Messenger beta version. However, no one except you and your intended recipients will be able to see the contents of your messages. We recommend using existing methods, like Tor or I2P to mask your IP address while using Session beta version.
</p> </p>
<p> <p>

@ -23,7 +23,7 @@ export class GroupInvitation extends React.Component<Props> {
<div className="contents"> <div className="contents">
<img <img
alt="group-avatar" alt="group-avatar"
src="images/loki/loki_icon.png" src="images/loki/session_icon.png"
className="invite-group-avatar" className="invite-group-avatar"
/> />
<span className="group-details"> <span className="group-details">

@ -16,10 +16,14 @@ interface Props {
export class AttachmentSection extends React.Component<Props> { export class AttachmentSection extends React.Component<Props> {
public render() { public render() {
const { type } = this.props;
return ( return (
<div className="module-attachment-section"> <div className="module-attachment-section">
<div className="module-attachment-section__items"> <div className="module-attachment-section__items">
{this.renderItems()} <div className={`module-attachment-section__items-${type}`}>
{this.renderItems()}
</div>
</div> </div>
</div> </div>
); );

@ -28,16 +28,17 @@ export class SessionIdEditable extends React.PureComponent<Props> {
const { placeholder, editable, text } = this.props; const { placeholder, editable, text } = this.props;
return ( return (
<textarea <div className="session-id-editable">
ref={this.inputRef} <textarea
className="session-id-editable" ref={this.inputRef}
placeholder={placeholder} placeholder={placeholder}
disabled={!editable} disabled={!editable}
spellCheck={false} spellCheck={false}
onKeyDown={this.handleKeyDown} onKeyDown={this.handleKeyDown}
onChange={this.handleChange} onChange={this.handleChange}
value={text} value={text}
/> />
</div>
); );
} }

@ -31,6 +31,12 @@ export class SessionPasswordModal extends React.Component<Props, State> {
this.setPassword = this.setPassword.bind(this); this.setPassword = this.setPassword.bind(this);
this.closeDialog = this.closeDialog.bind(this); this.closeDialog = this.closeDialog.bind(this);
this.onKeyUp = this.onKeyUp.bind(this);
}
public componentDidMount() {
setTimeout(() => $('#password-modal-input').focus(), 100);
} }
public render() { public render() {
@ -58,6 +64,7 @@ export class SessionPasswordModal extends React.Component<Props, State> {
type="password" type="password"
id="password-modal-input" id="password-modal-input"
placeholder={placeholders[0]} placeholder={placeholders[0]}
onKeyUp={this.onKeyUp}
maxLength={window.CONSTANTS.MAX_PASSWORD_LENGTH} maxLength={window.CONSTANTS.MAX_PASSWORD_LENGTH}
/> />
{action !== PasswordAction.Remove && ( {action !== PasswordAction.Remove && (
@ -65,6 +72,7 @@ export class SessionPasswordModal extends React.Component<Props, State> {
type="password" type="password"
id="password-modal-input-confirm" id="password-modal-input-confirm"
placeholder={placeholders[1]} placeholder={placeholders[1]}
onKeyUp={this.onKeyUp}
maxLength={window.CONSTANTS.MAX_PASSWORD_LENGTH} maxLength={window.CONSTANTS.MAX_PASSWORD_LENGTH}
/> />
)} )}
@ -182,4 +190,14 @@ export class SessionPasswordModal extends React.Component<Props, State> {
this.props.onClose(); this.props.onClose();
} }
} }
private async onKeyUp(event: any) {
const { onOk } = this.props;
if (event.key === 'Enter') {
await this.setPassword(onOk);
}
event.preventDefault();
}
} }

@ -27,8 +27,10 @@ export class SessionPasswordPrompt extends React.PureComponent<{}, State> {
this.onKeyUp = this.onKeyUp.bind(this); this.onKeyUp = this.onKeyUp.bind(this);
this.initLogin = this.initLogin.bind(this); this.initLogin = this.initLogin.bind(this);
this.initClearDataView = this.initClearDataView.bind(this); this.initClearDataView = this.initClearDataView.bind(this);
}
window.addEventListener('keyup', this.onKeyUp); public componentDidMount() {
setTimeout(() => $('#password-prompt-input').focus(), 100);
} }
public render() { public render() {
@ -56,9 +58,9 @@ export class SessionPasswordPrompt extends React.PureComponent<{}, State> {
<input <input
id="password-prompt-input" id="password-prompt-input"
type="password" type="password"
autoFocus={true}
defaultValue="" defaultValue=""
placeholder={' '} placeholder={' '}
onKeyUp={this.onKeyUp}
maxLength={window.CONSTANTS.MAX_PASSWORD_LENGTH} maxLength={window.CONSTANTS.MAX_PASSWORD_LENGTH}
/> />
); );

@ -36,8 +36,10 @@ export class SessionSeedModal extends React.Component<Props, State> {
this.confirmPassword = this.confirmPassword.bind(this); this.confirmPassword = this.confirmPassword.bind(this);
this.checkHasPassword = this.checkHasPassword.bind(this); this.checkHasPassword = this.checkHasPassword.bind(this);
this.onEnter = this.onEnter.bind(this); this.onEnter = this.onEnter.bind(this);
}
window.addEventListener('keyup', this.onEnter); public componentDidMount() {
setTimeout(() => $('#seed-input-password').focus(), 100);
} }
public render() { public render() {
@ -84,6 +86,7 @@ export class SessionSeedModal extends React.Component<Props, State> {
type="password" type="password"
id="seed-input-password" id="seed-input-password"
placeholder={i18n('password')} placeholder={i18n('password')}
onKeyUp={this.onEnter}
maxLength={maxPasswordLen} maxLength={maxPasswordLen}
/> />
@ -218,9 +221,7 @@ export class SessionSeedModal extends React.Component<Props, State> {
private onEnter(event: any) { private onEnter(event: any) {
if (event.key === 'Enter') { if (event.key === 'Enter') {
if ($('#seed-input-password').is(':focus')) { this.confirmPassword();
this.confirmPassword();
}
} }
} }
} }

@ -68,9 +68,14 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
this.hasPassword(); this.hasPassword();
this.refreshLinkedDevice = this.refreshLinkedDevice.bind(this); this.refreshLinkedDevice = this.refreshLinkedDevice.bind(this);
this.onKeyUp = this.onKeyUp.bind(this);
window.addEventListener('keyup', this.onKeyUp);
} }
public componentDidMount() { public componentDidMount() {
setTimeout(() => $('#password-lock-input').focus(), 100);
window.Whisper.events.on('refreshLinkedDeviceList', async () => { window.Whisper.events.on('refreshLinkedDeviceList', async () => {
setTimeout(() => { setTimeout(() => {
this.refreshLinkedDevice(); this.refreshLinkedDevice();
@ -398,7 +403,7 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
id: 'media-permissions', id: 'media-permissions',
title: window.i18n('mediaPermissionsTitle'), title: window.i18n('mediaPermissionsTitle'),
description: window.i18n('mediaPermissionsDescription'), description: window.i18n('mediaPermissionsDescription'),
hidden: true, // Hidden until feature works hidden: false,
type: SessionSettingType.Toggle, type: SessionSettingType.Toggle,
category: SessionSettingCategory.Permissions, category: SessionSettingCategory.Permissions,
setFn: window.toggleMediaPermissions, setFn: window.toggleMediaPermissions,
@ -576,4 +581,14 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
}); });
}); });
} }
private async onKeyUp(event: any) {
const lockPasswordFocussed = $('#password-lock-input').is(':focus');
if (event.key === 'Enter' && lockPasswordFocussed) {
await this.validatePasswordLock();
}
event.preventDefault();
}
} }

Loading…
Cancel
Save