Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some design tweaks to make voice-client-javascript more mobile friendly. #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions voice-client-javascript/assets/index.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Twilio Client Quickstart</title>
<link rel="stylesheet" href="site.css">
</head>
<body>
<div id="controls">
<div id="info">
<p class="instructions">Twilio Client</p>
<div id="client-name"></div>
<div id="output-selection">
<label>Ringtone Devices</label>
<select id="ringtone-devices" multiple></select>
<label>Speaker Devices</label>
<select id="speaker-devices" multiple></select><br/>
<a id="get-devices">Seeing unknown devices?</a>
</div>
</div>
<div id="call-controls">
<p class="instructions">Make a Call:</p>
<input id="phone-number" type="text" placeholder="Enter a phone # or client name" />
Expand All @@ -29,7 +19,21 @@
<div id="output-volume"></div>
</div>
</div>
<div id="log"></div>
<div id="info">
<p class="instructions">Twilio Client</p>
<div id="client-name"></div>
<div id="output-selection">
<label>Ringtone Devices</label>
<select id="ringtone-devices" multiple></select>
<label>Speaker Devices</label>
<select id="speaker-devices" multiple></select><br/>
<a id="get-devices">Seeing unknown devices?</a>
</div>
</div>
<div id="log-container">
<p class="instructions">Log</p>
<div id="log"></div>
</div>
</div>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions voice-client-javascript/assets/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ $(function() {
inputColor = "yellow";
}

inputVolumeBar.style.width = Math.floor(inputVolume * 300) + "px";
inputVolumeBar.style.width = Math.floor(inputVolume * 100) + "%";
inputVolumeBar.style.background = inputColor;

var outputColor = "red";
Expand All @@ -158,7 +158,7 @@ $(function() {
outputColor = "yellow";
}

outputVolumeBar.style.width = Math.floor(outputVolume * 300) + "px";
outputVolumeBar.style.width = Math.floor(outputVolume * 100) + "%";
outputVolumeBar.style.background = outputColor;
});
}
Expand Down
31 changes: 20 additions & 11 deletions voice-client-javascript/assets/site.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@import url(https://fonts.googleapis.com/css?family=Share+Tech+Mono);

* {
box-sizing: border-box;
}
body,
p {
padding: 0;
Expand All @@ -22,20 +24,30 @@ div#controls {
padding: 3em;
max-width: 1200px;
margin: 0 auto;
display: flex;
flex-direction: column;
justify-content: space-between;
}

div#controls div {
float: left;
@media screen and (min-width: 700px) {
div#controls {
flex-direction: row;
}

div#controls div#call-controls,
div#controls div#info {
margin: 0 1.5em;
}
}

div#controls div#call-controls,
div#controls div#info {
width: 16em;
margin: 0 1.5em;
text-align: center;
margin-bottom: 1.5em;
}
div#controls div#info div#output-selection {
display: none;
margin-bottom: 1.5em;
}

div#controls div#info a {
Expand All @@ -46,20 +58,20 @@ div#controls {
}

div#controls div#info select {
width: 300px;
width: 100%;
height: 60px;
margin-bottom: 2em;
}

div#controls div#info label {
width: 300px;
width: 100%;
}

div#controls div#call-controls div#volume-indicators {
display: none;
padding: 10px;
margin-top: 20px;
width: 500px;
width: 100%;
text-align: left;
}

Expand Down Expand Up @@ -128,12 +140,9 @@ div#controls {

div#controls div#log {
border: 1px solid #686865;
width: 35%;
height: 9.5em;
margin-top: 2.75em;
text-align: left;
padding: 1.5em;
float: right;
overflow-y: scroll;
}

Expand Down