Commit 9808dd04 authored by armin's avatar armin
Browse files

Merge branch 'master' into 'production'

Master

See merge request !64
parents 9ccf6b20 5e88a29d
Pipeline #237 failed with stage
in 3 minutes and 5 seconds
image: docker:stable
image: augusteo/centos-rsync-openssh
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- build
- deploy
docker:build:Qt:5.9:
image: afelder/qt-android-docker
......@@ -20,4 +21,22 @@ docker:build:Qt:5.9:
name: "$CI_COMMIT_REF_NAME"
paths:
- build/android-build/build/outputs/apk/android-build-debug.apk
expire_in: 6 week
\ No newline at end of file
- build/android-build/VARIABLES.txt
expire_in: 1 hour
when: on_success
deploy:
stage: deploy
before_script:
- eval $(ssh-agent -s)
- echo "$PRIVATEKEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- version=`cat build/android-build/VARIABLES.txt|grep -E '^VERSION=(.*)'|sed -e 's/VERSION=//g'`
- cp build/android-build/build/outputs/apk/android-build-debug.apk fairchat-$version.apk
- rsync -avz fairchat-$version.apk cideploy@5.9.93.243:/home/cideploy/
only:
- production
Subproject commit cde73995a5fa3fcd7a6b7f8baa14faaf74eb0287
Subproject commit 8063065e18bb8a31eff880ec3924d07526b3f564
......@@ -66,17 +66,17 @@ crashlytics {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
compile('com.crashlytics.sdk.android:crashlytics:2.9.2@aar') {
transitive = true
}
compile('com.crashlytics.sdk.android:crashlytics-ndk:2.0.1@aar') {
compile('com.crashlytics.sdk.android:crashlytics-ndk:2.0.3@aar') {
transitive = true
}
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.android.gms:play-services-gcm:11.8.0'
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-crash:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.android.gms:play-services-gcm:15.0.0'
compile 'com.google.firebase:firebase-core:15.0.0'
compile 'com.google.firebase:firebase-crash:15.0.0'
compile 'com.google.firebase:firebase-messaging:15.0.0'
compile 'com.android.support:multidex:1.0.1'
compile 'me.leolin:ShortcutBadger:1.1.19@aar'
......@@ -135,7 +135,7 @@ android {
apply plugin: 'com.google.gms.google-services'
copy {
from 'build/intermediates/exploded-aar/com.crashlytics.sdk.android/crashlytics-ndk/2.0.1/jni/'
from 'build/intermediates/exploded-aar/com.crashlytics.sdk.android/crashlytics-ndk/2.0.3/jni/'
into 'libs'
include '**/*'
}
......
......@@ -25,7 +25,7 @@ else:unix: PRE_TARGETDEPS += $$OUT_PWD/../engine/libengine.a
TARGET = fairchat
VER_MAJ = 1
VER_MIN = 1
VER_PAT = 6
VER_PAT = 7
VERSION = $$sprintf("%1.%2.%3",$$VER_MAJ,$$VER_MIN,$$VER_PAT)
DEFINES += VERSION=\\\"$$VERSION\\\"
......
......@@ -92,7 +92,7 @@
<string>iPhoneOS</string>
</array>
<key>CFBundleVersion</key>
<string>2018.02.17.1908</string>
<string>2018.04.23.2008</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
......
......@@ -227,8 +227,8 @@ ApplicationWindow {
Print.log(close)
Print.log(mainStack.depth)
if (mainStack.depth <= 2) {
close.accepted = true
close.accepted = false
// rocketChatController.end()
} else {
close.accepted = false
mainStack.navBack()
......
......@@ -39,11 +39,12 @@ Page {
// color: "#7c9b6c"
}
function resetLoginMethods(){
loginMethodStack.push(loginMethodStack.data[0].qml,loginMethodStack.data[0].properties,StackView.Immediate)
var item = loginMethodStack.data[0]
loginMethodStack.data = Object()
loginMethodStack.data[0] = item
loginMethodsModel.reset()
loginMethodStack.push(loginMethodStack.dataObj[0].qml,loginMethodStack.dataObj[0].properties,StackView.Immediate)
var item = loginMethodStack.dataObj[0]
loginMethodStack.dataObj = Object()
loginMethodStack.dataObj[0] = item
loginMethodsModel.clear()
loginMethodSelection.currentIndex = 0;
}
Settings {
......@@ -51,6 +52,7 @@ Page {
property string previousServer:""
property alias currentServerChoice: currentServer.text
property alias currentServerChoiceDesc: currentServerdesc.text
property int offlineMode: 0;
Component.onCompleted: {
var current = serverChoices.currentServer
if (serverChoices.currentServer) {
......@@ -166,14 +168,22 @@ Page {
var obj = Object()
obj.qml = "qrc:/qml/pages/login/LoginMethod.qml"
obj.properties = {loginButtonText:item.buttonText,idpUrl:item.idpUrl,redirectUrl:item.redirectUrl,loginMethod:item.service }
loginMethodStack.data[count-1] = obj;
loginMethodStack.dataObj[count-1] = obj;
loginMethodSelection.currentIndex =count-1;
var index = count-1;
displayText = item.service
loginMethodStack.push(loginMethodStack.dataObj[index].qml,loginMethodStack.dataObj[index].properties,StackView.Immediate)
}else{
var initItem = model.get(0);
displayText = initItem.service
}
}
onActivated: {
var item = model.get(index);
displayText = item.service
loginMethodStack.pop(StackView.Immediate)
loginMethodStack.push(loginMethodStack.data[index].qml,loginMethodStack.data[index].properties,StackView.Immediate)
loginMethodStack.push(loginMethodStack.dataObj[index].qml,loginMethodStack.dataObj[index].properties,StackView.Immediate)
}
Component.onCompleted: {
var item = model.get(0);
......@@ -181,14 +191,14 @@ Page {
var obj = Object()
obj.qml = "qrc:/qml/pages/login/LoginUserPassword.qml"
obj.properties = {}
loginMethodStack.data[0] = obj
loginMethodStack.push(loginMethodStack.data[0].qml,loginMethodStack.data[0].properties,StackView.Immediate)
loginMethodStack.dataObj[0] = obj
loginMethodStack.push(loginMethodStack.dataObj[0].qml,loginMethodStack.dataObj[0].properties,StackView.Immediate)
}
}
StackView{
visible: ddpConnected
property var data: Object()
property var dataObj: Object()
anchors.left: parent.left
anchors.right: parent.right
id: loginMethodStack
......@@ -248,8 +258,12 @@ Page {
target: rocketChatController
onLoggedIn: {
Print.log("logged in")
currentServerSetting.offlineMode = 1
mainStack.toMainView()
}
onOfflineMode: {
mainStack.toMainView()
}
onHashLoggedIn: {
// welcomePopup.open()
}
......@@ -257,6 +271,7 @@ Page {
onLoginError: {
Print.log("error login")
loginStatus.text = qsTr("username or password wrong")
currentServerSetting.offlineMode = 0
}
onStorageReady: {
......@@ -269,10 +284,16 @@ Page {
ddpConnected = false
resetLoginMethods()
}
onLoggedOut:{
currentServerSetting.offlineMode = 0
}
}
Component.onCompleted: {
ddpConnected = rocketChatController.getDdpConnectionEstablished()
rocketChatController.checkLoggedIn()
if(currentServerSetting.offlineMode == 1){
mainStack.toMainView();
}
}
}
......@@ -64,7 +64,7 @@ Page {
Text {
anchors.top: parent.top
anchors.bottom: parent.bottom
text: qsTr("Server Choice")
text: qsTr("Login")
font.bold: false
font.family: Fonts.opensans.name
color: Colors.white
......
......@@ -106,7 +106,9 @@ Popup {
StdButton{
text: qsTr("add")
onPressed: {
serverChoices.addDomain(serverAddress.text,serverName.text)
var address = serverAddress.text
address = address.replace(/https?:\/\//,"")
serverChoices.addDomain(address,serverName.text)
serverSelectionPopup.close()
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment