diff --git a/app/assets/styles/blink/_HistoryCard.scss b/app/assets/styles/blink/_HistoryCard.scss
index 033aff1..b712c08 100644
--- a/app/assets/styles/blink/_HistoryCard.scss
+++ b/app/assets/styles/blink/_HistoryCard.scss
@@ -1,47 +1,49 @@
.content {
flex: 1;
flex-direction: row;
}
.mainContent {
width: 100%;
}
.userAvatarContent {
margin-top: 7px;
margin-left: auto;
}
.landscapeContainer {
width: 50%;
height: 110px;
margin-left: 0%;
margin-top: 0px;
border-radius: 2px;
border: 1px;
}
.portraitContainer {
width: 100%;
margin: 0 auto;
height: 110px;
border: 1px;
margin-top: 0px;
border-radius: 2px;
}
.landscapeTabletContainer {
- width: 29%;
+ width: 33%;
height: 110px;
- margin-left: 3%;
- margin-top: 10px;
+ margin-left: 0%;
+ margin-top: 0px;
+ border: 1px;
border-radius: 2px;
}
.portraitTabletContainer {
- width: 41%;
+ width: 50%;
height: 110px;
margin: 0 auto;
- margin-top: 10px;
+ margin-top: 0px;
+ border: 1px;
border-radius: 2px;
}
diff --git a/app/assets/styles/blink/_NavigationBar.scss b/app/assets/styles/blink/_NavigationBar.scss
index 8186bab..1317518 100644
--- a/app/assets/styles/blink/_NavigationBar.scss
+++ b/app/assets/styles/blink/_NavigationBar.scss
@@ -1,19 +1,28 @@
.titleContainer {
}
.subtitle {
color: white;
font-size: 12;
margin-right: 10px;
+}
+.tabletSubtitle {
+ color: white;
+ font-size: 16;
+ margin-right: 10px;
}
.title {
font-size: 20;
}
+.tabletTitle {
+ font-size: 24;
+}
+
.logo {
margin-left: 10px;
height: 35px;
width: 35px;
}
diff --git a/app/assets/styles/blink/_ReadyBox.scss b/app/assets/styles/blink/_ReadyBox.scss
index cd7ad8c..20ea08c 100644
--- a/app/assets/styles/blink/_ReadyBox.scss
+++ b/app/assets/styles/blink/_ReadyBox.scss
@@ -1,150 +1,154 @@
@import './variables';
.wholeContainer {
flex: 1;
flex-direction: column;
justify-content: center;
}
.landscapeTitle {
color: white;
font-size: 20px;
width: 90%;
margin-left: 5%;
}
.portraitTitle {
color: white;
font-size: 20px;
width: 90%;
margin-top: 10px;
margin-left: 5%;
}
.landscapeTabletTitle {
margin-top: 20px;
color: white;
- font-size: 20px;
- width: 90%;
- margin-left: 3%;
+ font-size: 24px;
+ width: 100%;
+ margin-left: 3px;
}
.portraitTabletTitle {
margin-top: 20px;
color: white;
font-size: 20px;
- width: 90%;
- margin-left: 5%;
+ width: 100%;
+ margin-left: 10px;
}
.portraitUriButtonGroup {
flex-direction: column;
width: 100%;
margin-left: 0%;
}
.landscapeUriButtonGroup {
flex-direction: row;
width: 100%;
margin-left: 0%;
justify-content: space-between;
}
.portraitTabletUriButtonGroup {
flex-direction: column;
- width: 90%;
- margin-left: 5%;
+ width: 100%;
+ margin-left: 0%;
justify-content: space-between;
}
.landscapeTabletUriButtonGroup {
flex-direction: row;
- width: 94%;
- margin-left: 3%;
+ width: 100%;
+ margin-left: 0%;
justify-content: space-between;
}
.portraitUriInputBox {
align: left;
padding-top: 20px;
width: 100%;
}
.landscapeUriInputBox {
align: left;
padding-top: 10px;
width: 50%;
}
.portraitTabletUriInputBox {
align: left;
padding-top: 10px;
width: 100%;
}
.landscapeTabletUriInputBox {
align: left;
padding-top: 10px;
- width: 65%;
+ width: 66%;
+ margin-left: 3px;
+
}
.buttonGroup {
flex-direction: row;
padding-top: 5px;
justify-content: center;
}
.landscapeButtonGroup {
flex-direction: row;
padding-top: 5px;
justify-content: flex-end;
}
.uriInputBox {
align: left;
padding-top: 10px;
width: 100%;
}
.button {
background-color: rgba(#6DAA63, .9);
margin: 10px;
padding-top: 2px;
padding-left: 1px;
}
.iosButton {
background-color: rgba(#6DAA63, .9);
margin: 10px;
padding-top: 4px;
padding-left: 1px;
}
.androidButton {
background-color: rgba(#6DAA63, .9);
margin: 10px;
padding-top: 1px;
padding-left: 1px;
}
.conferenceButton {
background-color: rgba(#4572a6, 1);
margin: 10px;
}
.landscapeHistory {
+ margin-top: 20px;
width: 100%;
+ margin-left: 3px;
flex: 9;
}
.portraitHistory {
width: 100%;
flex: 9;
}
.footer {
flex: 1;
justify-content: flex-end;
padding-bottom: 15px;
}
diff --git a/app/components/NavigationBar.js b/app/components/NavigationBar.js
index 9f6fe4a..20b72fb 100644
--- a/app/components/NavigationBar.js
+++ b/app/components/NavigationBar.js
@@ -1,148 +1,151 @@
import React, { Component } from 'react';
import { Linking, Image, View } from 'react-native';
import PropTypes from 'prop-types';
import autoBind from 'auto-bind';
import { Appbar, Menu, Divider, Text } from 'react-native-paper';
import { Icon } from 'material-bread';
import config from '../config';
import AboutModal from './AboutModal';
import CallMeMaybeModal from './CallMeMaybeModal';
import styles from '../assets/styles/blink/_NavigationBar.scss';
const blinkLogo = require('../assets/images/blink-white-big.png');
class NavigationBar extends Component {
constructor(props) {
super(props);
autoBind(this);
this.state = {
showAboutModal: false,
showCallMeMaybeModal: false,
mute: false,
menuVisible: false
}
this.menuRef = React.createRef();
}
handleMenu(event) {
this.callUrl = `${config.publicUrl}/call/${this.props.account.id}`;
switch (event) {
case 'about':
this.toggleAboutModal();
break;
case 'callMeMaybe':
this.toggleCallMeMaybeModal();
break;
case 'logOut':
this.props.logout();
break;
case 'preview':
this.props.preview();
break;
case 'settings':
Linking.openURL(config.serverSettingsUrl);
break;
default:
break;
}
this.setState({menuVisible: false});
}
toggleMute() {
this.setState(prevState => ({mute: !prevState.mute}));
this.props.toggleMute();
}
toggleAboutModal() {
this.setState({showAboutModal: !this.state.showAboutModal});
}
toggleCallMeMaybeModal() {
this.setState({showCallMeMaybeModal: !this.state.showCallMeMaybeModal});
}
render() {
const muteIcon = this.state.mute ? 'bell-off' : 'bell';
+ let subtitleStyle = this.props.isTablet ? styles.tabletSubtitle: styles.subtitle;
+ let titleStyle = this.props.isTablet ? styles.tabletTitle: styles.title;
+
let statusIcon = null;
let account_id = '';
statusIcon = 'check-circle';
if (!this.props.connection || this.props.connection.state !== 'ready') {
statusIcon = 'error-outline';
} else if (this.props.registrationState && this.props.registrationState !== 'registered') {
statusIcon = 'priority-high';
}
//
let callUrl = '';
if (this.props.account) {
account_id = this.props.account.id;
callUrl = config.publicUrl + "/call/" + account_id;
}
- let subtitle = 'Signed in as ' + account_id.split('@')[0];
+ let subtitle = 'Signed in as ' + account_id;
return (
{this.props.isTablet?
- {account_id}
+ {subtitle}
: null}
{statusIcon ?
: null }
);
}
}
NavigationBar.propTypes = {
notificationCenter : PropTypes.func.isRequired,
account : PropTypes.object.isRequired,
logout : PropTypes.func.isRequired,
preview : PropTypes.func.isRequired,
toggleMute : PropTypes.func,
orientation : PropTypes.string,
isTablet : PropTypes.bool
};
export default NavigationBar;
diff --git a/app/components/ReadyBox.js b/app/components/ReadyBox.js
index cd1a767..0866af7 100644
--- a/app/components/ReadyBox.js
+++ b/app/components/ReadyBox.js
@@ -1,248 +1,248 @@
import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
// import VizSensor = require('react-visibility-sensor').default;
import autoBind from 'auto-bind';
import { View, Platform} from 'react-native';
import { IconButton, Title } from 'react-native-paper';
import ConferenceModal from './ConferenceModal';
import HistoryTileBox from './HistoryTileBox';
import FooterBox from './FooterBox';
import URIInput from './URIInput';
import config from '../config';
import utils from '../utils';
import styles from '../assets/styles/blink/_ReadyBox.scss';
class ReadyBox extends Component {
constructor(props) {
super(props);
autoBind(this);
this.state = {
targetUri: this.props.missedTargetUri,
contacts: this.props.contacts,
selectedContact: null,
showConferenceModal: false,
sticky: false
};
}
getTargetUri() {
const defaultDomain = this.props.account.id.substring(this.props.account.id.indexOf('@') + 1);
return utils.normalizeUri(this.state.targetUri, defaultDomain);
}
async componentDidMount() {
//console.log('Ready now');
if (this.state.targetUri) {
console.log('We must call', this.state.targetUri);
}
}
handleTargetChange(value, contact) {
let new_value = value;
if (contact) {
if (this.state.targetUri === contact.uri) {
new_value = '';
}
}
if (this.state.targetUri === value) {
new_value = '';
}
this.setState({targetUri: new_value,
selectedContact: contact});
}
handleTargetSelect() {
if (this.props.connection === null) {
this.props._notificationCenter.postSystemNotification("Server unreachable", {timeout: 2});
return;
}
// the user pressed enter, start a video call by default
if (this.state.targetUri.endsWith(`@${config.defaultConferenceDomain}`)) {
this.props.startConference(this.state.targetUri, {audio: true, video: true});
} else {
this.props.startCall(this.getTargetUri(), {audio: true, video: true});
}
}
showConferenceModal(event) {
event.preventDefault();
if (this.state.targetUri.length !== 0) {
const uri = `${this.state.targetUri.split('@')[0].replace(/[\s()-]/g, '')}@${config.defaultConferenceDomain}`;
this.handleConferenceCall(uri.toLowerCase());
} else {
this.setState({showConferenceModal: true});
}
}
handleAudioCall(event) {
if (this.props.connection === null) {
this.props._notificationCenter.postSystemNotification("Server unreachable", {timeout: 2});
return;
}
event.preventDefault();
if (this.state.targetUri.endsWith(`@${config.defaultConferenceDomain}`)) {
this.props.startConference(this.state.targetUri, {audio: true, video: false});
} else {
this.props.startCall(this.getTargetUri(), {audio: true, video: false});
}
}
handleVideoCall(event) {
if (this.props.connection === null) {
this.props._notificationCenter.postSystemNotification("Server unreachable", {timeout: 2});
return;
}
event.preventDefault();
if (this.state.targetUri.endsWith(`@${config.defaultConferenceDomain}`)) {
this.props.startConference(this.state.targetUri, {audio: true, video: false});
} else {
this.props.startCall(this.getTargetUri(), {audio: true, video: true});
}
}
handleConferenceCall(targetUri, options={audio: true, video: true}) {
if (targetUri) {
if (!options.video) {
console.log('ReadyBox: Handle audio only conference call to',targetUri);
} else {
console.log('ReadyBox: Handle video conference call to',targetUri);
}
this.props.startConference(targetUri, options);
}
this.setState({showConferenceModal: false});
}
render() {
//utils.timestampedLog('Render ready');
const defaultDomain = `${config.defaultDomain}`;
let uriClass = styles.portraitUriInputBox;
let uriGroupClass = styles.portraitUriButtonGroup;
let titleClass = styles.portraitTitle;
const buttonClass = (Platform.OS === 'ios') ? styles.iosButton : styles.androidButton;
if (this.props.isTablet) {
titleClass = this.props.orientation === 'landscape' ? styles.landscapeTabletTitle : styles.portraitTabletTitle;
} else {
titleClass = this.props.orientation === 'landscape' ? styles.landscapeTitle : styles.portraitTitle;
}
if (this.props.isTablet) {
uriGroupClass = this.props.orientation === 'landscape' ? styles.landscapeTabletUriButtonGroup : styles.portraitTabletUriButtonGroup;
} else {
uriGroupClass = this.props.orientation === 'landscape' ? styles.landscapeUriButtonGroup : styles.portraitUriButtonGroup;
}
if (this.props.isTablet) {
uriClass = this.props.orientation === 'landscape' ? styles.landscapeTabletUriInputBox : styles.portraitTabletUriInputBox;
} else {
uriClass = this.props.orientation === 'landscape' ? styles.landscapeUriInputBox : styles.portraitUriInputBox;
}
const historyClass = this.props.orientation === 'landscape' ? styles.landscapeHistory : styles.portraitHistory;
return (
- {this.props.isTablet === 'landscape'?Enter address: null}
+ {this.props.isTablet?Enter address: null}
{this.props.isTablet ?
: null}
);
}
}
ReadyBox.propTypes = {
account : PropTypes.object.isRequired,
password : PropTypes.string.isRequired,
config : PropTypes.object.isRequired,
startCall : PropTypes.func.isRequired,
startConference : PropTypes.func.isRequired,
missedTargetUri : PropTypes.string,
contacts : PropTypes.array,
orientation : PropTypes.string,
isTablet : PropTypes.bool,
refreshHistory : PropTypes.bool,
cacheHistory : PropTypes.func,
initialHistory : PropTypes.array,
localHistory : PropTypes.array,
myDisplayName : PropTypes.string,
myPhoneNumber : PropTypes.string
};
export default ReadyBox;