Merge pull request #210 from cormier/add-assets

Add assets
This commit is contained in:
David Cormier 2014-03-04 12:49:05 -05:00
commit 44feb0411a
12 changed files with 26 additions and 5 deletions

BIN
assets/audio/sonar.mp3 Normal file

Binary file not shown.

BIN
assets/audio/sonar.ogg Normal file

Binary file not shown.

View file

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

View file

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View file

@ -8,9 +8,9 @@
<meta name="mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes">
<title ng-bind-template="{{ notificationStatus }}WeeChat {{ pageTitle}}"></title> <title ng-bind-template="{{ notificationStatus }}WeeChat {{ pageTitle}}"></title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" media="screen"> <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link rel="shortcut icon" sizes="128x128" href="img/glowing_bear_128x128.png"> <link rel="shortcut icon" sizes="128x128" href="assets/img/glowing_bear_128x128.png">
<link rel="apple-touch-icon" sizes="128x128" href="img/glowing_bear_128x128.png"> <link rel="apple-touch-icon" sizes="128x128" href="assets/img/glowing_bear_128x128.png">
<link rel="shortcut icon" type="image/png" href="img/favicon.png" > <link rel="shortcut icon" type="image/png" href="assets/img/favicon.png" >
<link href="css/style.css" rel="stylesheet" media="screen"> <link href="css/style.css" rel="stylesheet" media="screen">
<link href="css/glowingbear.css" rel="stylesheet" media="screen"> <link href="css/glowingbear.css" rel="stylesheet" media="screen">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
@ -35,7 +35,7 @@
<body ng-controller="WeechatCtrl" ng-keydown="handleKeyPress($event)"> <body ng-controller="WeechatCtrl" ng-keydown="handleKeyPress($event)">
<div ng-hide="connected" class="container"> <div ng-hide="connected" class="container">
<h2> <h2>
<img alt="logo" src="img/favicon.png"> <img alt="logo" src="assets/img/favicon.png">
glowing bear glowing bear
<small> <small>
WeeChat web frontend WeeChat web frontend
@ -189,7 +189,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
<div id="topbar"> <div id="topbar">
<div class="brand"> <div class="brand">
<a href="#" ng-click="swipeSidebar()"> <a href="#" ng-click="swipeSidebar()">
<img alt="brand" src="img/favicon.png" title="Connected to {{ host }}:{{ port}}"> <img alt="brand" src="assets/img/favicon.png" title="Connected to {{ host }}:{{ port}}">
</a> </a>
<button ng-show="debugMode" ng-click="countWatchers()">Count<br />Watchers</button> <button ng-show="debugMode" ng-click="countWatchers()">Count<br />Watchers</button>
</div> </div>
@ -266,6 +266,8 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
<div id="footer" ng-show="connected"> <div id="footer" ng-show="connected">
<div class="navbar navbar-inverse navbar-fixed-bottom" ng-class="{'withnicklist': showNicklist, 'withsidebar': showSidebar}"> <div class="navbar navbar-inverse navbar-fixed-bottom" ng-class="{'withnicklist': showNicklist, 'withsidebar': showSidebar}">
<div input-bar input-id="sendMessage"></div> <div input-bar input-id="sendMessage"></div>
</div>
<div id="soundNotification"></div>
</div> </div>
<div id="settingsModal" class="modal fade"> <div id="settingsModal" class="modal fade">
<div class="modal-dialog"> <div class="modal-dialog">
@ -347,6 +349,16 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
</div> </div>
</form> </form>
</li> </li>
<li>
<form class="form-inline" role="form">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="soundnotification">
Play sound on notification
</label>
</div>
</form>
</li>
<li> <li>
<form class="form-inline" role="form"> <form class="form-inline" role="form">
<div class="checkbox"> <div class="checkbox">

View file

@ -685,6 +685,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
$store.bind($scope, "useFavico", true); $store.bind($scope, "useFavico", true);
// Save setting for notimestamp // Save setting for notimestamp
$store.bind($scope, "notimestamp", notimestamp); $store.bind($scope, "notimestamp", notimestamp);
// Save setting for playing sound on notification
$store.bind($scope, "soundnotification", false);
// Save setting for displaying embeds in rootScope so it can be used from service // Save setting for displaying embeds in rootScope so it can be used from service
$rootScope.visible = $scope.noembed === false; $rootScope.visible = $scope.noembed === false;
@ -876,6 +878,13 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
window.focus(); window.focus();
notification.close(); notification.close();
}; };
if ($scope.soundnotification) {
// TODO fill in a sound file
var audioFile = "assets/audio/sonar";
var soundHTML = '<audio autoplay="autoplay"><source src="' + audioFile + '.ogg" type="audio/ogg" /><source src="' + audioFile + '.mp3" type="audio/mpeg" /></audio>';
document.getElementById("soundNotification").innerHTML = soundHTML;
}
}; };
$scope.hasUnread = function(buffer) { $scope.hasUnread = function(buffer) {