Skip to content
Snippets Groups Projects
Commit 454a8d42 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Merge pull request #441 from RocketChat/mobile-improvements

Mobile improvements
parents 1ab26c31 8376d422
No related merge requests found
#!/bin/bash
meteor build ../Rocket.Chat-build --server https://rocket.chat
jarsigner -digestalg SHA1 .meteor/local/cordova-build/platforms/android/ant-build/CordovaApp-release-unsigned.apk RocketChat
~/.meteor/android_bundle/android-sdk/build-tools/21.0.0/zipalign 4 .meteor/local/cordova-build/platforms/android/ant-build/CordovaApp-release-unsigned.apk .meteor/local/cordova-build/platforms/android/ant-build/RocketChat-release-signed.apk
open .meteor/local/cordova-build/platforms/android/ant-build/
\ No newline at end of file
if Meteor.isCordova if Meteor.isCordova
document.addEventListener 'deviceready', -> if device.platform.toLowerCase() isnt 'android'
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); document.addEventListener 'deviceready', ->
cordova.plugins.Keyboard.disableScroll(true); cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
window.addEventListener 'native.keyboardshow', -> window.addEventListener 'native.keyboardshow', ->
$('.main-content').css 'height', window.innerHeight $('.main-content').css 'height', window.innerHeight
window.addEventListener 'native.keyboardhide', -> window.addEventListener 'native.keyboardhide', ->
$('.main-content').css 'height', window.innerHeight $('.main-content').css 'height', window.innerHeight
\ No newline at end of file \ No newline at end of file
...@@ -8,16 +8,10 @@ ...@@ -8,16 +8,10 @@
open: -> open: ->
if not @isOpen() if not @isOpen()
@container?.removeClass("menu-closed").addClass("menu-opened") @container?.removeClass("menu-closed").addClass("menu-opened")
if Meteor.isCordova
StatusBar.hide()
close: -> close: ->
if @isOpen() if @isOpen()
@container?.removeClass("menu-opened").addClass("menu-closed") @container?.removeClass("menu-opened").addClass("menu-closed")
if Meteor.isCordova
Meteor.setTimeout ->
StatusBar.show()
, 300
toggle: -> toggle: ->
if @isOpen() if @isOpen()
......
...@@ -3336,18 +3336,7 @@ a.github-fork { ...@@ -3336,18 +3336,7 @@ a.github-fork {
} }
.is-cordova { .is-cordova {
.main-content {
top: 10px;
}
.side-nav > .header {
padding-top: 10px;
height: 70px;
}
.flex-tab { .flex-tab {
padding-top: 10px;
.control { .control {
padding-left: 50px; padding-left: 50px;
} }
...@@ -3360,7 +3349,6 @@ a.github-fork { ...@@ -3360,7 +3349,6 @@ a.github-fork {
} }
.connection-status > .alert { .connection-status > .alert {
padding-top: 18px;
border-width: 0 0 1px 0; border-width: 0 0 1px 0;
} }
} }
\ No newline at end of file
...@@ -69,14 +69,7 @@ Template.body.onRendered -> ...@@ -69,14 +69,7 @@ Template.body.onRendered ->
Template.main.helpers Template.main.helpers
logged: -> logged: ->
if Meteor.userId()? return Meteor.userId()?
if Meteor.isCordova
StatusBar.styleDefault()
return true
else
if Meteor.isCordova
StatusBar.styleLightContent()
return false
subsReady: -> subsReady: ->
return not Meteor.userId()? or (FlowRouter.subsReady('userData', 'activeUsers')) return not Meteor.userId()? or (FlowRouter.subsReady('userData', 'activeUsers'))
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// the entire section is optional. // the entire section is optional.
App.info({ App.info({
id: 'com.konecty.rocket.chat', id: 'com.konecty.rocket.chat',
version: '0.1.0',
name: 'Rocket.Chat', name: 'Rocket.Chat',
description: 'Rocket.Chat', description: 'Rocket.Chat',
author: 'Rocket.Chat Development Group', author: 'Rocket.Chat Development Group',
...@@ -47,7 +48,9 @@ App.launchScreens({ ...@@ -47,7 +48,9 @@ App.launchScreens({
// Set PhoneGap/Cordova preferences // Set PhoneGap/Cordova preferences
App.setPreference('HideKeyboardFormAccessoryBar', true); App.setPreference('HideKeyboardFormAccessoryBar', true);
App.setPreference('StatusBarStyle', 'default'); App.setPreference('StatusBarOverlaysWebView', false);
App.setPreference('StatusBarStyle', 'lightcontent');
App.setPreference('StatusBarBackgroundColor', '#000000');
App.accessRule('*'); App.accessRule('*');
// // Pass preferences for a particular PhoneGap/Cordova plugin // // Pass preferences for a particular PhoneGap/Cordova plugin
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment