forked from cwtch.im/ui
merge README
This commit is contained in:
commit
eb50e36849
|
@ -10,8 +10,10 @@ pipeline:
|
||||||
- QT_DIR=/opt/Qt
|
- QT_DIR=/opt/Qt
|
||||||
- QT_DOCKER='true'
|
- QT_DOCKER='true'
|
||||||
- QT_API=5.12.0
|
- QT_API=5.12.0
|
||||||
- GOPATH=/home/user/work:/media/sf_GOPATH1/
|
|
||||||
commands:
|
commands:
|
||||||
|
- echo $QT_DIR
|
||||||
|
- export GOPATH=$GOPATH:/media/sf_GOPATH1/
|
||||||
|
- echo $GOPATH
|
||||||
- export PATH=$PATH:/home/user/work/bin:/media/sf_GOPATH1/bin
|
- export PATH=$PATH:/home/user/work/bin:/media/sf_GOPATH1/bin
|
||||||
- echo $PATH
|
- echo $PATH
|
||||||
- apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git
|
- apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git
|
||||||
|
|
12
README.md
12
README.md
|
@ -40,14 +40,4 @@ We supply an arm-pie version of tor in `android/libs/armeabi-v7a` with the name
|
||||||
|
|
||||||
If all that is done, then check out cwtch.im/ui and run `qtdeploy` in the root of it.
|
If all that is done, then check out cwtch.im/ui and run `qtdeploy` in the root of it.
|
||||||
|
|
||||||
Currently you will need to manually run tor first before running cwtch.im/ui
|
Currently you will need to manually run tor first before running cwtch.im/ui. Use the included tor and torrc file: `tor -f torrc`
|
||||||
- [https://www.torproject.org/download/download](Tor download) - Get the "Expert Bundle" which just has tor
|
|
||||||
- create a `torrc` file with the following:
|
|
||||||
|
|
||||||
```
|
|
||||||
SOCKSPort 9050
|
|
||||||
ControlPort 9051
|
|
||||||
CookieAuthentication 0
|
|
||||||
```
|
|
||||||
|
|
||||||
- and tun tor with `tor -f torrc`
|
|
||||||
|
|
|
@ -40,6 +40,18 @@ func IncomingListener(callback func(*gobjects.Message), groupErrorCallback func(
|
||||||
the.Peer.SendMessageToPeer(e.Data[event.RemotePeer], "ack")
|
the.Peer.SendMessageToPeer(e.Data[event.RemotePeer], "ack")
|
||||||
}
|
}
|
||||||
case event.NewMessageFromGroup://event.TimestampReceived, event.TimestampSent, event.Data, event.GroupID, event.RemotePeer
|
case event.NewMessageFromGroup://event.TimestampReceived, event.TimestampSent, event.Data, event.GroupID, event.RemotePeer
|
||||||
|
var name string
|
||||||
|
var exists bool
|
||||||
|
ctc := the.Peer.GetContact(e.Data[event.RemotePeer])
|
||||||
|
if ctc != nil {
|
||||||
|
name, exists = ctc.GetAttribute("nick")
|
||||||
|
if !exists || name == "" {
|
||||||
|
name = e.Data[event.RemotePeer] + "..."
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
name = e.Data[event.RemotePeer] + "..."
|
||||||
|
}
|
||||||
|
|
||||||
ts, _ := time.Parse(time.RFC3339Nano, e.Data[event.TimestampSent])
|
ts, _ := time.Parse(time.RFC3339Nano, e.Data[event.TimestampSent])
|
||||||
callback(&gobjects.Message{
|
callback(&gobjects.Message{
|
||||||
MessageID: e.Data[event.Signature],
|
MessageID: e.Data[event.Signature],
|
||||||
|
@ -50,6 +62,7 @@ func IncomingListener(callback func(*gobjects.Message), groupErrorCallback func(
|
||||||
FromMe: e.Data[event.RemotePeer] == the.Peer.GetProfile().Onion,
|
FromMe: e.Data[event.RemotePeer] == the.Peer.GetProfile().Onion,
|
||||||
Timestamp: ts,
|
Timestamp: ts,
|
||||||
Acknowledged: true,
|
Acknowledged: true,
|
||||||
|
DisplayName: name,
|
||||||
})
|
})
|
||||||
case event.NewGroupInvite:
|
case event.NewGroupInvite:
|
||||||
log.Debugf("got a group invite!")
|
log.Debugf("got a group invite!")
|
||||||
|
|
|
@ -5,6 +5,9 @@ import QtQuick.Controls.Material 2.0
|
||||||
import QtQuick.Controls.Styles 1.4
|
import QtQuick.Controls.Styles 1.4
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Window 2.11
|
import QtQuick.Window 2.11
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
|
|
||||||
|
import "../styles"
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
|
@ -200,49 +203,19 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
TextField {
|
||||||
anchors.left: parent.left
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.right: parent.right
|
style: CwtchTextFieldStyle{ width: 400 }
|
||||||
|
placeholderText: "... paste an address here to add a contact ..."
|
||||||
|
horizontalAlignment: TextInput.AlignHCenter
|
||||||
|
|
||||||
|
onTextChanged: {
|
||||||
Rectangle { // ADD CONTACTS TEXTFIELD
|
if (text != "") {
|
||||||
width: parent.width - 4
|
gcd.importString(text)
|
||||||
height: 20
|
text = ""
|
||||||
color: "#EDEDED"
|
}
|
||||||
border.color: "#AAAAAA"
|
}
|
||||||
border.width: 1
|
}
|
||||||
radius: 10
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
|
|
||||||
|
|
||||||
TextEdit {
|
|
||||||
property string hint: "... paste an address here to add a contact ..."
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
font.pixelSize: 9
|
|
||||||
color: "#888888"
|
|
||||||
padding: 2
|
|
||||||
text: hint
|
|
||||||
selectByMouse: true
|
|
||||||
|
|
||||||
onTextChanged: {
|
|
||||||
if (text != hint && text != "") {
|
|
||||||
console.log("to handle: "+text)
|
|
||||||
gcd.importString(text)
|
|
||||||
text = hint
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onFocusChanged: {
|
|
||||||
text = focus ? "" : hint
|
|
||||||
}
|
|
||||||
|
|
||||||
onCursorPositionChanged: {
|
|
||||||
text = focus ? "" : hint
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: gcd
|
target: gcd
|
||||||
|
|
Loading…
Reference in New Issue