Browse Source

Added gulp for building tasks - Fix #41

master
Pablo Terradillos 11 years ago
parent
commit
15ffd8354a
  1. 70
      app/css/app.css
  2. 44
      app/index.html
  3. 9
      app/js/app.js
  4. 2
      app/js/background.js
  5. 8
      app/js/controllers.js
  6. 6
      app/js/directives.js
  7. 2
      app/js/filters.js
  8. 2
      app/js/lib/aes_worker.js
  9. 2
      app/js/lib/mtproto.js
  10. 2
      app/js/lib/pq_worker.js
  11. 2
      app/js/lib/sha1_worker.js
  12. 10
      app/js/services.js
  13. 2
      app/js/util.js
  14. 2
      app/partials/im.html
  15. 4
      app/partials/login.html
  16. 4
      app/partials/welcome.html
  17. 86
      gulpfile.js
  18. 36
      package.json

70
app/css/app.css

@ -1,7 +1,7 @@
/* app css stylesheet */ /* app css stylesheet */
html { html {
background: #dee4e9 url(../img/bg_tile.png?1) 0 0 repeat; background: #dee4e9 url(../img/bg_tile.png) 0 0 repeat;
/*background-size: 300px 468px;*/ /*background-size: 300px 468px;*/
} }
body { body {
@ -255,12 +255,12 @@ input[type="number"]::-webkit-inner-spin-button {
height: 18px; height: 18px;
vertical-align: text-top; vertical-align: text-top;
background: url(../img/icons/IconsetW.png?1) -15px -419px no-repeat; background: url(../img/icons/IconsetW.png) -15px -419px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
opacity: 0.6; opacity: 0.6;
} }
.is_1x .icon-back { .is_1x .icon-back {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
.tg_page_head .navbar-quick-nav a:hover .icon-back { .tg_page_head .navbar-quick-nav a:hover .icon-back {
opacity: 1; opacity: 1;
@ -510,7 +510,7 @@ input[type="number"]::-webkit-inner-spin-button {
.im_dialogs_search_field { .im_dialogs_search_field {
font-size: 12px; font-size: 12px;
line-height: normal; line-height: normal;
background: #F2F2F2 url(../img/icons/IconsetW.png?1) -6px -205px no-repeat; background: #F2F2F2 url(../img/icons/IconsetW.png) -6px -205px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
border: 1px solid #F2F2F2; border: 1px solid #F2F2F2;
border-radius: 3px; border-radius: 3px;
@ -519,7 +519,7 @@ input[type="number"]::-webkit-inner-spin-button {
margin: 0; margin: 0;
} }
.is_1x .im_dialogs_search_field { .is_1x .im_dialogs_search_field {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
.im_dialogs_search_field:focus, .im_dialogs_search_field:focus,
.im_dialogs_search_field:active { .im_dialogs_search_field:active {
@ -534,12 +534,12 @@ input[type="number"]::-webkit-inner-spin-button {
width: 13px; width: 13px;
height: 13px; height: 13px;
vertical-align: text-top; vertical-align: text-top;
background: url(../img/icons/IconsetW.png?1) -15px -192px no-repeat; background: url(../img/icons/IconsetW.png) -15px -192px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
opacity: 0.6; opacity: 0.6;
} }
.is_1x .im_dialogs_search_clear { .is_1x .im_dialogs_search_clear {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
.im_dialogs_search_clear:hover { .im_dialogs_search_clear:hover {
opacity: 1; opacity: 1;
@ -787,11 +787,11 @@ a.im_dialog:hover .im_dialog_date {
margin-top: 7px; margin-top: 7px;
margin-left: 6px; margin-left: 6px;
background: url(../img/icons/IconsetW.png?1) -17px -444px no-repeat; background: url(../img/icons/IconsetW.png) -17px -444px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
} }
.is_1x .icon-caret { .is_1x .icon-caret {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
.im_history_panel_media_dropdown .dropdown-menu { .im_history_panel_media_dropdown .dropdown-menu {
@ -986,11 +986,11 @@ div.im_message_video_thumb {
width: 15px; width: 15px;
height: 19px; height: 19px;
background: url(../img/icons/IconsetW.png?1) -14px -389px no-repeat; background: url(../img/icons/IconsetW.png) -14px -389px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
} }
.is_1x .icon-geo-point { .is_1x .icon-geo-point {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
@ -1014,7 +1014,7 @@ div.im_message_video_thumb {
height: 38px; height: 38px;
vertical-align: text-top; vertical-align: text-top;
background: #F2F2F2 url(../img/icons/IconsetW.png?1) -2px -229px no-repeat; background: #F2F2F2 url(../img/icons/IconsetW.png) -2px -229px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
border-radius: 3px; border-radius: 3px;
margin-right: 10px; margin-right: 10px;
@ -1022,7 +1022,7 @@ div.im_message_video_thumb {
.is_1x .icon-document, .is_1x .icon-document,
.is_1x .icon-photo, .is_1x .icon-photo,
.is_1x .icon-video { .is_1x .icon-video {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
.im_message_selected .icon-document, .im_message_selected .icon-document,
@ -1075,13 +1075,13 @@ div.im_message_video_thumb {
height: 38px; height: 38px;
vertical-align: text-top; vertical-align: text-top;
background: #F2F2F2 url(../img/icons/IconsetW.png?1) -2px -277px no-repeat; background: #F2F2F2 url(../img/icons/IconsetW.png) -2px -277px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
border-radius: 3px; border-radius: 3px;
margin-right: 10px; margin-right: 10px;
} }
.is_1x .icon-audio { .is_1x .icon-audio {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
.im_message_audio_info { .im_message_audio_info {
@ -1202,14 +1202,14 @@ div.im_message_video_thumb {
display: none; display: none;
width: 16px; width: 16px;
height: 10px; height: 10px;
background: url(../img/icons/Checks2_2x.png?1) 0 0 no-repeat; background: url(../img/icons/Checks2_2x.png) 0 0 no-repeat;
background-size: 16px 10px; background-size: 16px 10px;
top: 2px; top: 2px;
position: relative; position: relative;
} }
.icon-message-status-tick.message-status-unread-tick { .icon-message-status-tick.message-status-unread-tick {
/*width: 13px;*/ /*width: 13px;*/
background: url(../img/icons/Checks1_2x.png?1) 0 0 no-repeat; background: url(../img/icons/Checks1_2x.png) 0 0 no-repeat;
background-size: 16px 10px; background-size: 16px 10px;
} }
.im_message_date { .im_message_date {
@ -1334,12 +1334,12 @@ textarea.im_message_field {
width: 19px; width: 19px;
height: 23px; height: 23px;
vertical-align: text-top; vertical-align: text-top;
background: url(../img/icons/IconsetW.png?1) -12px -68px no-repeat; background: url(../img/icons/IconsetW.png) -12px -68px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
opacity: 0.8; opacity: 0.8;
} }
.is_1x .icon-paperclip { .is_1x .icon-paperclip {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
.im_attach:hover .icon-paperclip { .im_attach:hover .icon-paperclip {
opacity: 1; opacity: 1;
@ -1362,12 +1362,12 @@ textarea.im_message_field {
width: 23px; width: 23px;
height: 23px; height: 23px;
vertical-align: text-top; vertical-align: text-top;
background: url(../img/icons/IconsetW.png?1) -10px -4px no-repeat; background: url(../img/icons/IconsetW.png) -10px -4px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
opacity: 0.8; opacity: 0.8;
} }
.is_1x .icon-emoji { .is_1x .icon-emoji {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
.im_emoji_btn:hover .icon-emoji { .im_emoji_btn:hover .icon-emoji {
opacity: 1; opacity: 1;
@ -1412,12 +1412,12 @@ textarea.im_message_field {
width: 25px; width: 25px;
height: 21px; height: 21px;
vertical-align: text-top; vertical-align: text-top;
background: url(../img/icons/IconsetW.png?1) -9px -132px no-repeat; background: url(../img/icons/IconsetW.png) -9px -132px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
opacity: 0.8; opacity: 0.8;
} }
.is_1x .icon-camera { .is_1x .icon-camera {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
.im_media_attach:hover .icon-camera { .im_media_attach:hover .icon-camera {
opacity: 1; opacity: 1;
@ -1832,14 +1832,14 @@ img.img_fullsize {
.emoji-menu-tail { .emoji-menu-tail {
display: none; display: none;
background: url(../img/icons/IconsetW.png?1) -14px -268px no-repeat; background: url(../img/icons/IconsetW.png) -14px -268px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
width: 14px; width: 14px;
height: 7px; height: 7px;
margin: 0 83px; margin: 0 83px;
} }
.is_1x .emoji-menu-tail { .is_1x .emoji-menu-tail {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
@ -1983,7 +1983,7 @@ img.img_fullsize {
.contacts_modal_search_field { .contacts_modal_search_field {
font-size: 12px; font-size: 12px;
line-height: normal; line-height: normal;
background: #F2F2F2 url(../img/icons/IconsetW.png?1) -6px -205px no-repeat; background: #F2F2F2 url(../img/icons/IconsetW.png) -6px -205px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
border: 1px solid #F2F2F2; border: 1px solid #F2F2F2;
border-radius: 3px; border-radius: 3px;
@ -1992,7 +1992,7 @@ img.img_fullsize {
margin: 0; margin: 0;
} }
.is_1x .contacts_modal_search_field { .is_1x .contacts_modal_search_field {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
.contacts_modal_search_field:focus, .contacts_modal_search_field:focus,
.contacts_modal_search_field:active { .contacts_modal_search_field:active {
@ -2007,12 +2007,12 @@ img.img_fullsize {
width: 13px; width: 13px;
height: 13px; height: 13px;
vertical-align: text-top; vertical-align: text-top;
background: url(../img/icons/IconsetW.png?1) -15px -192px no-repeat; background: url(../img/icons/IconsetW.png) -15px -192px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
opacity: 0.6; opacity: 0.6;
} }
.is_1x .contacts_modal_search_clear { .is_1x .contacts_modal_search_clear {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
.contacts_modal_search_clear:hover { .contacts_modal_search_clear:hover {
opacity: 1; opacity: 1;
@ -2084,12 +2084,12 @@ a.contacts_modal_contact:hover .contacts_modal_contact_status {
top: 22px; top: 22px;
width: 17px; width: 17px;
height: 15px; height: 15px;
background: url(../img/icons/IconsetW.png?1) -13px -366px no-repeat; background: url(../img/icons/IconsetW.png) -13px -366px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
opacity: 0.5; opacity: 0.5;
} }
.is_1x .icon-contact-tick { .is_1x .icon-contact-tick {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
.contacts_modal_members_list a.contacts_modal_contact:hover .icon-contact-tick { .contacts_modal_members_list a.contacts_modal_contact:hover .icon-contact-tick {
background-position: -13px -366px; background-position: -13px -366px;
@ -2182,11 +2182,11 @@ a.contacts_modal_contact:hover .contacts_modal_contact_status {
width: 12px; width: 12px;
height: 15px; height: 15px;
background: url(../img/icons/IconsetW.png?1) -15px -319px no-repeat; background: url(../img/icons/IconsetW.png) -15px -319px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
} }
.is_1x .icon-delete { .is_1x .icon-delete {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
.im_message_selected { .im_message_selected {
background: #f2f6fa; background: #f2f6fa;
@ -2229,11 +2229,11 @@ a.contacts_modal_contact:hover .contacts_modal_contact_status {
width: 26px; width: 26px;
height: 26px; height: 26px;
margin: 13px 0 0 40px; margin: 13px 0 0 40px;
background: url(../img/icons/IconsetW.png?1) -9px -516px no-repeat; background: url(../img/icons/IconsetW.png) -9px -516px no-repeat;
background-size: 42px 560px; background-size: 42px 560px;
} }
.is_1x .icon-select-tick { .is_1x .icon-select-tick {
background-image: url(../img/icons/IconsetW_1x.png?2); background-image: url(../img/icons/IconsetW_1x.png);
} }
.im_history_selectable .icon-select-tick, .im_history_selectable .icon-select-tick,
.im_content_message_select_area:hover .icon-select-tick { .im_content_message_select_area:hover .icon-select-tick {

44
app/index.html

@ -4,10 +4,14 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no"> <meta name="viewport" content="width=device-width, user-scalable=no">
<title>Webogram</title> <title>Webogram</title>
<!-- build:css css/app.css -->
<link rel="stylesheet" href="vendor/angular/angular-csp.css"/> <link rel="stylesheet" href="vendor/angular/angular-csp.css"/>
<link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.css?1"/> <link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.css"/>
<link rel="stylesheet" href="vendor/jquery.nanoscroller/nanoscroller.css"/> <link rel="stylesheet" href="vendor/jquery.nanoscroller/nanoscroller.css"/>
<link rel="stylesheet" href="css/app.css?25"/> <link rel="stylesheet" href="css/app.css"/>
<!-- endbuild -->
<link rel="icon" href="favicon.ico" type="image/x-icon" /> <link rel="icon" href="favicon.ico" type="image/x-icon" />
<meta property="og:title" content="Webogram"> <meta property="og:title" content="Webogram">
@ -21,31 +25,35 @@
<div ng-view></div> <div ng-view></div>
<script type="text/javascript" src="vendor/console-polyfill/console-polyfill.js?1"></script> <!-- build:js js/app.js -->
<script type="text/javascript" src="vendor/console-polyfill/console-polyfill.js"></script>
<script type="text/javascript" src="vendor/jquery/jquery.min.js"></script> <script type="text/javascript" src="vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="vendor/jquery.nanoscroller/nanoscroller.js"></script> <script type="text/javascript" src="vendor/jquery.nanoscroller/nanoscroller.js"></script>
<script type="text/javascript" src="vendor/jquery.emojiarea/jquery.emojiarea.js?5"></script> <script type="text/javascript" src="vendor/jquery.emojiarea/jquery.emojiarea.js"></script>
<script type="text/javascript" src="vendor/angular/angular.js?1"></script> <script type="text/javascript" src="vendor/angular/angular.js"></script>
<script type="text/javascript" src="vendor/angular/angular-route.js?1"></script> <script type="text/javascript" src="vendor/angular/angular-route.js"></script>
<script type="text/javascript" src="vendor/angular/angular-animate.js?1"></script> <script type="text/javascript" src="vendor/angular/angular-animate.js"></script>
<script type="text/javascript" src="vendor/angular/angular-sanitize.js?1"></script> <script type="text/javascript" src="vendor/angular/angular-sanitize.js"></script>
<script type="text/javascript" src="vendor/ui-bootstrap/ui-bootstrap-custom-tpls-0.10.0.js?1"></script> <script type="text/javascript" src="vendor/ui-bootstrap/ui-bootstrap-custom-tpls-0.10.0.js"></script>
<script type="text/javascript" src="vendor/jsbn/jsbn_combined.js"></script> <script type="text/javascript" src="vendor/jsbn/jsbn_combined.js"></script>
<script type="text/javascript" src="vendor/cryptoJS/crypto.js?1"></script> <script type="text/javascript" src="vendor/cryptoJS/crypto.js"></script>
<script type="text/javascript" src="vendor/zlib/gunzip.min.js"></script> <script type="text/javascript" src="vendor/zlib/gunzip.min.js"></script>
<script type="text/javascript" src="js/lib/config.js"></script> <script type="text/javascript" src="js/lib/config.js"></script>
<script type="text/javascript" src="js/lib/mtproto.js?19"></script> <script type="text/javascript" src="js/lib/mtproto.js"></script>
<script type="text/javascript" src="js/util.js?2"></script> <script type="text/javascript" src="js/util.js"></script>
<script type="text/javascript" src="js/app.js?16"></script> <script type="text/javascript" src="js/partials.js"></script>
<script type="text/javascript" src="js/services.js?21"></script> <script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript" src="js/controllers.js?29"></script> <script type="text/javascript" src="js/services.js"></script>
<script type="text/javascript" src="js/filters.js?4"></script> <script type="text/javascript" src="js/controllers.js"></script>
<script type="text/javascript" src="js/directives.js?20"></script> <script type="text/javascript" src="js/filters.js"></script>
<script type="text/javascript" src="js/directives.js"></script>
<!-- endbuild -->
</body> </body>
</html> </html>

9
app/js/app.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.0.19 - messaging web application for MTProto * Webogram v0.0.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE
@ -30,6 +30,7 @@ angular.module('myApp', [
'ngAnimate', 'ngAnimate',
'ngSanitize', 'ngSanitize',
'ui.bootstrap', 'ui.bootstrap',
'partials',
'myApp.filters', 'myApp.filters',
'myApp.services', 'myApp.services',
'mtproto.services', 'mtproto.services',
@ -63,9 +64,9 @@ config(['$locationProvider', '$routeProvider', '$compileProvider', function($loc
// $locationProvider.html5Mode(true); // $locationProvider.html5Mode(true);
$routeProvider.when('/', {templateUrl: 'partials/welcome.html?4', controller: 'AppWelcomeController'}); $routeProvider.when('/', {templateUrl: 'partials/welcome.html', controller: 'AppWelcomeController'});
$routeProvider.when('/login', {templateUrl: 'partials/login.html?5', controller: 'AppLoginController'}); $routeProvider.when('/login', {templateUrl: 'partials/login.html', controller: 'AppLoginController'});
$routeProvider.when('/im', {templateUrl: 'partials/im.html?13', controller: 'AppIMController', reloadOnSearch: false}); $routeProvider.when('/im', {templateUrl: 'partials/im.html', controller: 'AppIMController', reloadOnSearch: false});
$routeProvider.otherwise({redirectTo: '/'}); $routeProvider.otherwise({redirectTo: '/'});
}]); }]);

2
app/js/background.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.0.19 - messaging web application for MTProto * Webogram v0.0.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

8
app/js/controllers.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.0.19 - messaging web application for MTProto * Webogram v0.0.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE
@ -168,7 +168,7 @@ angular.module('myApp.controllers', [])
$scope.isLoggedIn = true; $scope.isLoggedIn = true;
$scope.openSettings = function () { $scope.openSettings = function () {
$modal.open({ $modal.open({
templateUrl: 'partials/settings_modal.html?3', templateUrl: 'partials/settings_modal.html',
controller: 'SettingsModalController', controller: 'SettingsModalController',
scope: $rootScope.$new(), scope: $rootScope.$new(),
windowClass: 'settings_modal_window' windowClass: 'settings_modal_window'
@ -191,7 +191,7 @@ angular.module('myApp.controllers', [])
scope.userIDs = userIDs; scope.userIDs = userIDs;
$modal.open({ $modal.open({
templateUrl: 'partials/chat_create_modal.html?3', templateUrl: 'partials/chat_create_modal.html',
controller: 'ChatCreateModalController', controller: 'ChatCreateModalController',
scope: scope, scope: scope,
windowClass: 'contacts_modal_window' windowClass: 'contacts_modal_window'
@ -965,7 +965,7 @@ angular.module('myApp.controllers', [])
scope.chatID = $scope.chatID; scope.chatID = $scope.chatID;
$modal.open({ $modal.open({
templateUrl: 'partials/chat_edit_modal.html?3', templateUrl: 'partials/chat_edit_modal.html',
controller: 'ChatEditModalController', controller: 'ChatEditModalController',
scope: scope, scope: scope,
windowClass: 'contacts_modal_window' windowClass: 'contacts_modal_window'

6
app/js/directives.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.0.19 - messaging web application for MTProto * Webogram v0.0.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE
@ -16,7 +16,7 @@ angular.module('myApp.directives', ['myApp.filters'])
restrict: 'AE', restrict: 'AE',
scope: true, scope: true,
translude: false, translude: false,
templateUrl: 'partials/dialog.html?5' templateUrl: 'partials/dialog.html'
}; };
}) })
@ -25,7 +25,7 @@ angular.module('myApp.directives', ['myApp.filters'])
restrict: 'AE', restrict: 'AE',
scope: true, scope: true,
translude: false, translude: false,
templateUrl: 'partials/message.html?7' templateUrl: 'partials/message.html'
}; };
}) })

2
app/js/filters.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.0.19 - messaging web application for MTProto * Webogram v0.0.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
app/js/lib/aes_worker.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.0.19 - messaging web application for MTProto * Webogram v0.0.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
app/js/lib/mtproto.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.0.19 - messaging web application for MTProto * Webogram v0.0.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
app/js/lib/pq_worker.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.0.19 - messaging web application for MTProto * Webogram v0.0.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
app/js/lib/sha1_worker.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.0.19 - messaging web application for MTProto * Webogram v0.0.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

10
app/js/services.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.0.19 - messaging web application for MTProto * Webogram v0.0.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE
@ -289,7 +289,7 @@ angular.module('myApp.services', [])
scope.userID = userID; scope.userID = userID;
var modalInstance = $modal.open({ var modalInstance = $modal.open({
templateUrl: 'partials/user_modal.html?2', templateUrl: 'partials/user_modal.html',
controller: 'UserModalController', controller: 'UserModalController',
scope: scope, scope: scope,
windowClass: 'user_modal_window' windowClass: 'user_modal_window'
@ -425,7 +425,7 @@ angular.module('myApp.services', [])
scope.chatID = chatID; scope.chatID = chatID;
var modalInstance = $modal.open({ var modalInstance = $modal.open({
templateUrl: 'partials/chat_modal.html?4', templateUrl: 'partials/chat_modal.html',
controller: 'ChatModalController', controller: 'ChatModalController',
windowClass: 'chat_modal_window', windowClass: 'chat_modal_window',
scope: scope scope: scope
@ -1724,7 +1724,7 @@ angular.module('myApp.services', [])
scope.photoID = photoID; scope.photoID = photoID;
var modalInstance = $modal.open({ var modalInstance = $modal.open({
templateUrl: 'partials/photo_modal.html?1', templateUrl: 'partials/photo_modal.html',
controller: 'PhotoModalController', controller: 'PhotoModalController',
scope: scope scope: scope
}); });
@ -1824,7 +1824,7 @@ angular.module('myApp.services', [])
scope.player = {}; scope.player = {};
var modalInstance = $modal.open({ var modalInstance = $modal.open({
templateUrl: 'partials/video_modal.html?1', templateUrl: 'partials/video_modal.html',
controller: 'VideoModalController', controller: 'VideoModalController',
scope: scope scope: scope
}); });

2
app/js/util.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.0.19 - messaging web application for MTProto * Webogram v0.0.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
app/partials/im.html

@ -1,4 +1,4 @@
<div ng-include="'partials/head.html?3'"></div> <div ng-include="'partials/head.html'"></div>
<div class="im_page_wrap" ng-class="{im_page_peer_not_selected: !curDialog.peer}"> <div class="im_page_wrap" ng-class="{im_page_peer_not_selected: !curDialog.peer}">

4
app/partials/login.html

@ -1,4 +1,4 @@
<div ng-include="'partials/head.html?3'"></div> <div ng-include="'partials/head.html'"></div>
<div class="login_form_wrap"> <div class="login_form_wrap">
@ -35,4 +35,4 @@
{{progress.enabled ? 'Checking code...' : 'Sign in'}} {{progress.enabled ? 'Checking code...' : 'Sign in'}}
</button> </button>
</form> </form>
</div> </div>

4
app/partials/welcome.html

@ -1,4 +1,4 @@
<div ng-include="'partials/head.html?3'"></div> <div ng-include="'partials/head.html'"></div>
<div ng-show="showWelcome"> <div ng-show="showWelcome">
@ -14,4 +14,4 @@
<a href="#/login" class="btn btn-success btn-block">Start Messaging</a> <a href="#/login" class="btn btn-success btn-block">Start Messaging</a>
</div> </div>
</div> </div>

86
gulpfile.js

@ -0,0 +1,86 @@
var gulp = require('gulp');
var es = require('event-stream');
var pj = require('./package.json');
var $ = require('gulp-load-plugins')();
var concat = require('gulp-concat');
// The generated file is being created at src
// so it can be fetched by usemin.
gulp.task('templates', function() {
return gulp.src('app/partials/*.html')
.pipe($.angularTemplatecache('partials.js', {
root: 'partials',
module: 'partials',
standalone: true
}))
.pipe(gulp.dest('app/js'));
});
gulp.task('copy', function() {
return es.concat(
gulp.src(['app/favicon.ico', 'app/favicon_unread.ico', 'app/manifest.webapp', 'app/manifest.json', 'app/**/*worker.js', 'app/img/**/*', '!app/img/screenshot*'])
.pipe(gulp.dest('dist')),
gulp.src('app/vendor/console-polyfill/console-polyfill.js')
.pipe(gulp.dest('dist/vendor/console-polyfill')),
gulp.src('app/js/lib/mtproto.js')
.pipe(gulp.dest('dist/js/lib')),
gulp.src('app/js/lib/config.js')
.pipe(gulp.dest('dist/js/lib')),
gulp.src('app/vendor/jsbn/jsbn_combined.js')
.pipe(gulp.dest('dist/vendor/jsbn')),
gulp.src('app/vendor/cryptoJS/crypto.js')
.pipe(gulp.dest('dist/vendor/cryptoJS'))
);
});
gulp.task('update-version-manifests', function() {
return gulp.src(['app/manifest.webapp', 'app/manifest.json'])
.pipe($.replace(/"version": ".*",/, '"version": "' + pj.version + '",'))
.pipe(gulp.dest('app'));
});
gulp.task('update-version-settings', function() {
return gulp.src('app/partials/settings_modal.html')
.pipe($.replace(/<span class="settings_version">alpha .*<\/span>/, '<span class="settings_version">alpha ' + pj.version + '<\/span>'))
.pipe(gulp.dest('app/partials'));
});
gulp.task('update-version-comments', function() {
return gulp.src('app/**/*')
.pipe($.grepStream('Webogram v'))
.pipe($.replace(/Webogram v[0-9.]*/, 'Webogram v' + pj.version))
.pipe(gulp.dest('app'));
});
gulp.task('usemin', ['templates'], function() {
return gulp.src('app/index.html')
.pipe($.usemin({
html: [$.minifyHtml({empty: true})],
js: ['concat', $.rev()],
css: [$.minifyCss(), 'concat']
}))
.pipe(gulp.dest('dist'));
});
gulp.task('clean', function() {
return gulp.src('dist').pipe($.clean());
});
gulp.task('compress-dist', function() {
return es.concat(
gulp.src('dist/*')
.pipe($.zip('webogram_v' + pj.version + '.zip'))
.pipe(gulp.dest('package')),
gulp.src('package/*.zip')
.pipe(gulp.dest('.')),
gulp.src('package/**/*').pipe($.clean())
);
});
gulp.task('bump', ['update-version-manifests', 'update-version-settings', 'update-version-comments']);
gulp.task('build', ['clean', 'templates', 'usemin', 'copy']);
gulp.task('package', ['build', 'compress-dist']);
gulp.task('default', function() {
gulp.start('build');
});

36
package.json

@ -0,0 +1,36 @@
{
"name": "webogram",
"version": "0.0.1",
"description": "UNOFFICIAL Telegram Web App.",
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"repository": {
"type": "git",
"url": "https://github.com/zhukov/webogram.git"
},
"author": "zhukov",
"license": "GPL",
"bugs": {
"url": "https://github.com/zhukov/webogram/issues"
},
"homepage": "http://zhukov.github.io/webogram",
"devDependencies": {
"gulp": "~3.5.5",
"gulp-angular-templatecache": "^1.1.0",
"gulp-load-plugins": "^0.4.0",
"gulp-usemin": "^0.3.3",
"gulp-uglify": "^0.2.1",
"gulp-rev": "^0.3.0",
"gulp-minify-css": "^0.3.0",
"gulp-minify-html": "^0.1.1",
"gulp-imagemin": "^0.1.5",
"gulp-clean": "^0.2.4",
"gulp-replace": "^0.2.0",
"gulp-concat": "^2.1.7",
"gulp-grep-stream": "0.0.2",
"event-stream": "^3.1.0",
"gulp-zip": "^0.1.2"
}
}
Loading…
Cancel
Save