Browse Source

Mobile game improved

master
Igor Zhukov 8 years ago
parent
commit
8aadfe3909
  1. 3
      app/js/locales/en-us.json
  2. 4
      app/js/services.js
  3. 10
      app/less/mobile.less
  4. 45
      app/partials/mobile/game_modal.html

3
app/js/locales/en-us.json

@ -152,6 +152,9 @@
"media_modal_forward": "Forward", "media_modal_forward": "Forward",
"media_modal_download": "Download", "media_modal_download": "Download",
"media_modal_delete": "Delete", "media_modal_delete": "Delete",
"game_modal_share_game": "Share Game",
"game_modal_share_score": "Share Score",
"game_modal_bot_info": "by @{bot}",
"error_browser_no_local_file_system_image_md": "Your browser doesn't support {moz-link: https://developer.mozilla.org/en-US/docs/Web/API/LocalFileSystem | LocalFileSystem} feature which is needed to display this image.\nPlease, install {chrome-link: http://google.com/chrome | Google Chrome} or use {telegram-link: https://telegram.org/ | mobile app} instead.", "error_browser_no_local_file_system_image_md": "Your browser doesn't support {moz-link: https://developer.mozilla.org/en-US/docs/Web/API/LocalFileSystem | LocalFileSystem} feature which is needed to display this image.\nPlease, install {chrome-link: http://google.com/chrome | Google Chrome} or use {telegram-link: https://telegram.org/ | mobile app} instead.",
"error_image_download_failed": "Download failed", "error_image_download_failed": "Download failed",

4
app/js/services.js

@ -1787,7 +1787,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
windowTemplateUrl: templateUrl('media_modal_layout'), windowTemplateUrl: templateUrl('media_modal_layout'),
controller: 'GameModalController', controller: 'GameModalController',
scope: scope, scope: scope,
windowClass: 'photo_modal_window' windowClass: 'photo_modal_window mobile_modal'
}) })
} }
@ -1808,7 +1808,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
var game = wrapForHistory(gameID) var game = wrapForHistory(gameID)
var fullWidth = $(window).width() - (Config.Mobile ? 0 : 10) var fullWidth = $(window).width() - (Config.Mobile ? 0 : 10)
var fullHeight = $($window).height() - (Config.Mobile ? 92 : 150) var fullHeight = $($window).height() - (Config.Mobile ? 51 : 150)
if (!Config.Mobile && fullWidth > 800) { if (!Config.Mobile && fullWidth > 800) {
fullWidth -= 208 fullWidth -= 208

10
app/less/mobile.less

@ -931,6 +931,11 @@ a.im_message_author_via {
font-size: 12px; font-size: 12px;
} }
} }
.im_service_message a.im_message_author {
display: inline;
font-size: 13px;
font-weight: normal;
}
.im_grouped_short a.im_message_from_photo, .im_grouped_short a.im_message_from_photo,
.im_grouped_short a.im_message_author, .im_grouped_short a.im_message_author,
@ -1352,6 +1357,11 @@ a.im_message_fwd_author {
} }
} }
.game_modal_wrap .modal-body {
padding: 0;
}
.modal-content { .modal-content {
.photo_modal_window &, .photo_modal_window &,
.video_modal_window & { .video_modal_window & {

45
app/partials/mobile/game_modal.html

@ -0,0 +1,45 @@
<div class="game_modal_wrap">
<div class="tg_page_head tg_modal_head">
<div class="navbar navbar-static-top navbar-inverse">
<div class="container">
<div class="navbar-toggle-wrap dropdown" dropdown>
<a class="dropdown-toggle navbar-toggle" dropdown-toggle>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<ul class="dropdown-menu">
<li>
<a ng-click="forward()" my-i18n="game_modal_share_game"></a>
</li>
<li>
<a ng-click="forward(true)" my-i18n="game_modal_share_score"></a>
</li>
</ul>
</div>
<div class="navbar-header">
<ul class="nav navbar-nav navbar-quick-nav">
<li>
<a ng-click="$close()" class="navbar-quick-back">
<i class="icon icon-back"></i>
<div class="navbar-quick-back-title">
<h4 ng-bind-html="game.rTitle"></h4>
<small>@<span my-peer-link="botID"></span></small>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="modal-body mobile_modal_body" ng-bind-html="game.full.html" my-game-communication></div>
</div>
Loading…
Cancel
Save