79:e0fd1f0f59bf
Anton Shestakov <av6@dwimlabs.net>, Sat, 02 Apr 2016 19:14:26 +0800
sidebar: new ui element

next change 80:addc62773413
previous change 76:625459f68893

index.html

Permissions: -rw-r--r--

Other formats: Feeds:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tram IM</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.25.0/css/uikit.min.css">
<link rel="stylesheet" href="/css/tram-im.css">
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.2.3/backbone-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rivets/0.8.1/rivets.bundled.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.25.0/js/uikit.min.js"></script>
<script src="/vendor/strophejs/strophe.min.js"></script>
<script src="/vendor/strophejs-plugins/disco/strophe.disco.js"></script>
<script src="/vendor/strophejs-plugins/ping/strophe.ping.js"></script>
<script src="/vendor/strophejs-plugins/roster/strophe.roster.js"></script>
<script src="/vendor/strophejs-plugins/vcard/strophe.vcard.js"></script>
<script src="/vendor/webrtc-adapter-1.0.4.js"></script>
</head>
<body>
<div class="smart-container" data-step="noscript">
<div class="uk-alert">
<p class="uk-text-center">This page needs JavaScript to work.</p>
<hr>
<small>It uses resources from code.jquery.com and cdnjs.cloudflare.com.</small>
</div>
</div>
<div class="smart-container uk-hidden" data-step="login">
<div class="uk-form uk-form-horizontal" data-form="connect">
<div class="uk-form-row">
<label for="username" class="uk-form-label">Username</label>
<div class="uk-form-controls">
<input id="username" type="text" class="uk-width-1-1" required autofocus
rv-value="data:username" rv-class-uk-form-danger="data:username-errors">
<div class="uk-text-danger" rv-each-error="data:username-errors">{ error }</div>
</div>
</div>
<div class="uk-form-row">
<label for="password" class="uk-form-label">Password</label>
<div class="uk-form-controls">
<input id="password" type="password" class="uk-width-1-1" required
rv-value="data:password" rv-class-uk-form-danger="data:password-errors">
<div class="uk-text-danger" rv-each-error="data:password-errors">{ error }</div>
</div>
</div>
<div class="uk-form-row">
<div class="uk-form-controls">
<div class="uk-alert uk-alert-danger" rv-each-error="data:auth-errors">{ error }</div>
<button type="button" class="uk-button uk-button-primary" rv-on-click="connect">
<i class="uk-icon-sign-in"></i>&nbsp;Log in
</button>
<a class="uk-float-right uk-button uk-button-link" href="/register.html">Register</a>
</div>
</div>
</div>
</div>
<script>
$('[data-step="noscript"]').addClass('uk-hidden');
</script>
<div class="has-sidebar uk-hidden" data-step="main">
<div class="sidebar" data-app="sidebar">
<ul class="uk-nav uk-nav-side uk-nav-offcanvas uk-text-nowrap">
<li><a rv-on-click="view.disconnect"><i class="uk-icon-sign-out"></i> Log out</a></li>
</ul>
</div>
<div data-app="calls"></div>
<div class="uk-grid main-grid">
<div class="uk-width-xlarge-1-4 uk-width-large-1-3 uk-width-medium-1-2 contact-list-block">
<ul class="uk-list contact-list" data-app="contacts"></ul>
<div class="uk-form input-group">
<input id="new-contact" class="uk-width-3-4" type="text" value="" required>
<span class="input-group-button">
<button type="button" class="uk-button uk-button-success" data-add-button>
<i class="uk-icon-plus"></i>
</button>
</span>
</div>
</div>
<div class="uk-width-xlarge-3-4 uk-width-large-2-3 uk-width-medium-1-2">
<div class="log" data-app="log"></div>
</div>
</div>
</div>
<script type="text/template" id="video-block-template">
<video class="remote" rv-src="model:remote/stream/url" autoplay></video>
<video class="local" rv-src="model:local/stream/url" autoplay muted></video>
<div class="buttons uk-text-center">
<button type="button" class="uk-button uk-button-success autofade" data-mute-cam
rv-if="model:local/stream" rv-hide="model:local/video/muted">
<i class="uk-icon-eye"></i>
</button>
<button type="button" class="uk-button uk-button-danger" data-unmute-cam
rv-if="model:local/stream" rv-show="model:local/video/muted">
<i class="uk-icon-eye-slash"></i>
</button>
<button type="button" class="uk-button uk-button-success autofade" data-mute-mic
rv-if="model:local/stream" rv-hide="model:local/audio/muted">
<i class="uk-icon-microphone"></i>
</button>
<button type="button" class="uk-button uk-button-danger" data-unmute-mic
rv-if="model:local/stream" rv-show="model:local/audio/muted">
<i class="uk-icon-microphone-slash"></i>
</button>
<button type="button" class="uk-button uk-button-success autofade" data-mute-audio
rv-if="model:remote/stream" rv-hide="model:remote/audio/muted">
<i class="uk-icon-volume-up"></i>
</button>
<button type="button" class="uk-button uk-button-danger" data-unmute-audio
rv-if="model:remote/stream" rv-show="model:remote/audio/muted">
<i class="uk-icon-volume-off"></i>
</button>
</div>
</script>
<script type="text/template" id="avatar-template">
<img class="avatar" rv-if="model:d/avatar" rv-src="model:d/avatar">
<div class="avatar" rv-unless="model:d/avatar" rv-style="model:bjid | dumb-hash | fn view.getColors">
{ model:d/handle | first-letter }
</div>
</script>
<script type="text/template" id="message-template">
<div class="splitter" rv-if="model:d/split"></div>
<div class="column avatar-column" rv-class-uk-invisible="model:d/fold"></div>
<div class="column text-column">
<div rv-hide="model:d/fold">
<strong>{ view.getHandle < model:contact:d/handle model:from }</strong>
</div>
<div rv-class="model:cls">
<span>{ model:text }</span>
<time class="stamp uk-text-muted uk-float-right"
rv-datetime="model:d/mstamp | iso-date"
rv-title="model:d/mstamp | format-date 'HH:mm:ss'">
{ model:d/mstamp | from-now }
</time>
</div>
</div>
</script>
<script type="text/template" id="contact-template">
<div class="column avatar-column">
<div class="status-pip" rv-title="model:show" rv-style="model:show | fn view.getPipColor"></div>
</div>
<div class="column uk-width-1-1">
<div class="uk-text-bold">{ model:d/handle }</div>
<div class="uk-text-nowrap">
<span>{ model:status }</span>
<span rv-hide="model:type | eq 'self'">{ model:chatstate | only 'composing' }</span>
</div>
</div>
<div class="column uk-text-nowrap">
<i class="uk-icon-phone calling-icon" data-wait rv-if="model:d/actions | has 'wait'"></i>
<button type="button" class="uk-button" data-call="av" rv-if="model:d/actions | has 'call'">
<i class="uk-icon-video-camera"></i>
</button>
<button type="button" class="uk-button" data-call="a" rv-if="model:d/actions | has 'call'">
<i class="uk-icon-phone"></i>
</button>
<button type="button" class="uk-button uk-button-success" data-accept="av" rv-if="model:d/actions | has 'accept'">
<i class="uk-icon-video-camera"></i>
</button>
<button type="button" class="uk-button uk-button-success" data-accept="a" rv-if="model:d/actions | has 'accept'">
<i class="uk-icon-phone"></i>
</button>
<button type="button" class="uk-button uk-button-danger" data-decline rv-if="model:d/actions | has 'decline'">
<i class="uk-icon-times"></i>
</button>
<button type="button" class="uk-button uk-button-danger" data-hang-up rv-if="model:d/actions | has 'hang-up'">
<i class="uk-icon-phone"></i> Hang up
</button>
<div class="uk-button-dropdown" data-uk-dropdown="{mode:'click',pos:'bottom-right'}" rv-if="model:d/actions | has 'remove'">
<button class="uk-button"><i class="uk-icon-caret-down"></i></button>
<div class="uk-dropdown uk-dropdown-small">
<ul class="uk-nav uk-nav-dropdown">
<li><a data-remove rv-if="model:d/actions | has 'remove'">Remove</a></li>
</ul>
</div>
</div>
</div>
<div class="uk-text-center">
<button type="button" class="uk-button uk-button-success" data-authorize rv-if="model:d/actions | has 'authorize'">
<i class="uk-icon-plus"></i> Authorize
</button>
<button type="button" class="uk-button uk-button-danger" data-unauthorize rv-if="model:d/actions | has 'unauthorize'">
<i class="uk-icon-times"></i> Decline
</button>
</div>
</script>
<script src='/js/tram.js'></script>
<script src='/js/rivets.js'></script>
<script src='/js/xmpp.js'></script>
<script src='/js/webrtc.js'></script>
<script src='/js/contacts.js'></script>
<script src='/js/messages.js'></script>
<script src='/js/calls.js'></script>
<script src='/js/favicon.js'></script>
<script src='/js/sidebar.js'></script>
<script src='/config.js'></script>
<script src='/js/index.js'></script>
<script>
$('[data-step="login"]').removeClass('uk-hidden');
</script>
</body>
</html>