forked from cwtch.im/ui
merge README
This commit is contained in:
commit
eb50e36849
|
@ -10,8 +10,10 @@ pipeline:
|
|||
- QT_DIR=/opt/Qt
|
||||
- QT_DOCKER='true'
|
||||
- QT_API=5.12.0
|
||||
- GOPATH=/home/user/work:/media/sf_GOPATH1/
|
||||
commands:
|
||||
- echo $QT_DIR
|
||||
- export GOPATH=$GOPATH:/media/sf_GOPATH1/
|
||||
- echo $GOPATH
|
||||
- export PATH=$PATH:/home/user/work/bin:/media/sf_GOPATH1/bin
|
||||
- echo $PATH
|
||||
- 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.
|
||||
|
||||
Currently you will need to manually run tor first before running cwtch.im/ui
|
||||
- [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`
|
||||
Currently you will need to manually run tor first before running cwtch.im/ui. Use the included tor and torrc file: `tor -f torrc`
|
||||
|
|
|
@ -40,6 +40,18 @@ func IncomingListener(callback func(*gobjects.Message), groupErrorCallback func(
|
|||
the.Peer.SendMessageToPeer(e.Data[event.RemotePeer], "ack")
|
||||
}
|
||||
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])
|
||||
callback(&gobjects.Message{
|
||||
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,
|
||||
Timestamp: ts,
|
||||
Acknowledged: true,
|
||||
DisplayName: name,
|
||||
})
|
||||
case event.NewGroupInvite:
|
||||
log.Debugf("got a group invite!")
|
||||
|
|
|
@ -5,6 +5,9 @@ import QtQuick.Controls.Material 2.0
|
|||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Window 2.11
|
||||
import QtQuick.Controls 1.4
|
||||
|
||||
import "../styles"
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
@ -200,46 +203,16 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
|
||||
Rectangle { // ADD CONTACTS TEXTFIELD
|
||||
width: parent.width - 4
|
||||
height: 20
|
||||
color: "#EDEDED"
|
||||
border.color: "#AAAAAA"
|
||||
border.width: 1
|
||||
radius: 10
|
||||
TextField {
|
||||
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
|
||||
style: CwtchTextFieldStyle{ width: 400 }
|
||||
placeholderText: "... paste an address here to add a contact ..."
|
||||
horizontalAlignment: TextInput.AlignHCenter
|
||||
|
||||
onTextChanged: {
|
||||
if (text != hint && text != "") {
|
||||
console.log("to handle: "+text)
|
||||
if (text != "") {
|
||||
gcd.importString(text)
|
||||
text = hint
|
||||
}
|
||||
}
|
||||
|
||||
onFocusChanged: {
|
||||
text = focus ? "" : hint
|
||||
}
|
||||
|
||||
onCursorPositionChanged: {
|
||||
text = focus ? "" : hint
|
||||
}
|
||||
text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue