dan
/
ui
forked from cwtch.im/ui
1
0
Fork 0

Message Editor refactor; and small bits like tabs; and a divider between contactlist and overlay pane

05-sendmsg
Dan Ballard 2 years ago
parent af3c593228
commit 0ba6a200cc
  1. 118
      go/ui/gcd.go
  2. BIN
      i18n/translation_de.qm
  3. 73
      i18n/translation_de.ts
  4. BIN
      i18n/translation_en.qm
  5. 85
      i18n/translation_en.ts
  6. BIN
      i18n/translation_fr.qm
  7. 73
      i18n/translation_fr.ts
  8. BIN
      i18n/translation_pt.qm
  9. 73
      i18n/translation_pt.ts
  10. 1
      qml.qrc
  11. 12
      qml/const/Const.qml
  12. 25
      qml/main.qml
  13. 2
      qml/opaque
  14. 240
      qml/overlays/ChatOverlay.qml
  15. 33
      qml/overlays/ListOverlay.qml
  16. 95
      qml/panes/OverlayPane.qml
  17. 2
      qml/panes/PeerSettingsPane.qml
  18. 8
      qml/utils.js
  19. 39
      qml/widgets/ContactList.qml
  20. 9
      qml/widgets/ContactRow.qml
  21. 3
      qml/widgets/Message.qml
  22. 291
      qml/widgets/MessageEditor.qml
  23. 103
      qml/widgets/Overlay.qml
  24. 9
      qml/widgets/ProfileList.qml

@ -1,6 +1,8 @@
package ui
import (
"sync"
"cwtch.im/cwtch/app"
"cwtch.im/cwtch/event"
"cwtch.im/cwtch/model"
@ -8,14 +10,14 @@ import (
"cwtch.im/cwtch/protocol/connections"
"cwtch.im/ui/go/constants"
"github.com/therecipe/qt/qml"
"sync"
"cwtch.im/ui/go/the"
"encoding/base32"
"git.openprivacy.ca/openprivacy/log"
"github.com/therecipe/qt/core"
"strings"
"time"
"cwtch.im/ui/go/the"
"git.openprivacy.ca/openprivacy/log"
"github.com/therecipe/qt/core"
)
type GrandCentralDispatcher struct {
@ -94,27 +96,27 @@ type GrandCentralDispatcher struct {
_ func(onion, currentPassword, newPassword string, defaultPass bool) `signal:"changePassword,auto""`
_ func(key, val string) `signal:"storeSetting,auto"`
// operating a profile
_ func(message string, mid string) `signal:"sendMessage,auto"`
_ func(onion string, auth string) `signal:"setPeerAuthorization,auto"`
_ func(onion string) `signal:"loadMessagesPane,auto"`
_ func(signal string) `signal:"broadcast,auto"` // convenience relay signal
_ func(str string) `signal:"importString,auto"`
_ func(str string) `signal:"createContact,auto"`
_ func(str string) `signal:"popup,auto"`
_ func(server, groupName string) `signal:"createGroup,auto"`
_ func(groupID string) `signal:"leaveGroup,auto"`
_ func(groupID string) `signal:"acceptGroup,auto"`
_ func() `signal:"requestSettings,auto"`
_ func(groupID string) `signal:"requestGroupSettings,auto"`
_ func(groupID, nick string) `signal:"saveGroupSettings,auto"`
_ func() `signal:"requestPeerSettings,auto"`
_ func(onion, nick string) `signal:"savePeerSettings,auto"`
_ func(onion, groupID string) `signal:"inviteToGroup,auto"`
_ func(onion string) `signal:"deleteContact,auto"`
_ func() `signal:"allowUnknownPeers,auto"`
_ func() `signal:"blockUnknownPeers,auto"`
_ func(onion string) `signal:"storeHistoryForPeer,auto"`
_ func(onion string) `signal:"deleteHistoryForPeer,auto"`
_ func(message string) `signal:"sendMessage,auto"`
_ func(onion string, auth string) `signal:"setPeerAuthorization,auto"`
_ func(onion string) `signal:"loadMessagesPane,auto"`
_ func(signal string) `signal:"broadcast,auto"` // convenience relay signal
_ func(str string) `signal:"importString,auto"`
_ func(str string) `signal:"createContact,auto"`
_ func(str string) `signal:"popup,auto"`
_ func(server, groupName string) `signal:"createGroup,auto"`
_ func(groupID string) `signal:"leaveGroup,auto"`
_ func(groupID string) `signal:"acceptGroup,auto"`
_ func() `signal:"requestSettings,auto"`
_ func(groupID string) `signal:"requestGroupSettings,auto"`
_ func(groupID, nick string) `signal:"saveGroupSettings,auto"`
_ func(handle string) `signal:"requestPeerSettings,auto"`
_ func(onion, nick string) `signal:"savePeerSettings,auto"`
_ func(onion, groupID string) `signal:"inviteToGroup,auto"`
_ func(onion string) `signal:"deleteContact,auto"`
_ func() `signal:"allowUnknownPeers,auto"`
_ func() `signal:"blockUnknownPeers,auto"`
_ func(onion string) `signal:"storeHistoryForPeer,auto"`
_ func(onion string) `signal:"deleteHistoryForPeer,auto"`
_ func() `constructor:"init"`
}
@ -197,7 +199,7 @@ func (this *GrandCentralDispatcher) DoIfConversation(conversation string, fn fun
}
}
func (this *GrandCentralDispatcher) sendMessage(message string, mID string) {
func (this *GrandCentralDispatcher) sendMessage(message string) {
if len(message) > 65530 {
this.InvokePopup("message is too long")
return
@ -217,8 +219,7 @@ func (this *GrandCentralDispatcher) sendMessage(message string, mID string) {
}
}
var err error
mID, err = the.Peer.SendMessageToGroupTracked(this.SelectedConversation(), message)
mID, err := the.Peer.SendMessageToGroupTracked(this.SelectedConversation(), message)
this.GetUiManager(this.selectedProfile()).AddMessage(this.SelectedConversation(), "me", message, true, mID, time.Now(), false)
@ -228,7 +229,7 @@ func (this *GrandCentralDispatcher) sendMessage(message string, mID string) {
}
} else {
to := this.SelectedConversation()
mID = the.Peer.SendMessageToPeer(to, message)
mID := the.Peer.SendMessageToPeer(to, message)
this.GetUiManager(this.selectedProfile()).AddMessage(to, "me", message, true, mID, time.Now(), false)
}
@ -255,6 +256,7 @@ func (this *GrandCentralDispatcher) loadMessagesPaneHelper(handle string) {
loading = true
}
this.UpdateContactStatus(group.GroupID, int(state), loading)
this.requestGroupSettings(handle)
tl := group.GetTimeline()
nick := getNick(handle)
@ -265,35 +267,41 @@ func (this *GrandCentralDispatcher) loadMessagesPaneHelper(handle string) {
this.SetToolbarTitle(nick)
}
for i := len(tl) - 1; i >= 0; i-- {
if tl[i].PeerID == the.Peer.GetOnion() {
handle = "me"
} else {
handle = tl[i].PeerID
go func() {
// Janky hack to let the ui/qml respond to the status updates first before freezing under a deluge of new messages
time.Sleep(10 * time.Millisecond)
for i := len(tl) - 1; i >= 0; i-- {
if tl[i].PeerID == the.Peer.GetOnion() {
handle = "me"
} else {
handle = tl[i].PeerID
}
name := getNick(tl[i].PeerID)
image := getProfilePic(tl[i].PeerID)
this.PrependMessage(
handle,
tl[i].PeerID,
name,
tl[i].Message,
image,
string(tl[i].Signature),
tl[i].PeerID == the.Peer.GetOnion(),
tl[i].Timestamp.Unix(),
tl[i].Received.Equal(time.Unix(0, 0)) == false, // If the received timestamp is epoch, we have not yet received this message through an active server
false,
)
}
}()
name := getNick(tl[i].PeerID)
image := getProfilePic(tl[i].PeerID)
this.PrependMessage(
handle,
tl[i].PeerID,
name,
tl[i].Message,
image,
string(tl[i].Signature),
tl[i].PeerID == the.Peer.GetOnion(),
tl[i].Timestamp.Unix(),
tl[i].Received.Equal(time.Unix(0, 0)) == false, // If the received timestamp is epoch, we have not yet received this message through an active server
false,
)
}
return
} // ELSE LOAD CONTACT
contact := the.Peer.GetContact(handle)
this.UpdateContactStatus(handle, int(connections.ConnectionStateToType[contact.State]), false)
this.requestPeerSettings(handle)
var nick string
if contact != nil {
@ -337,11 +345,11 @@ func (this *GrandCentralDispatcher) saveSettings(zoom, locale string) {
}
func (this *GrandCentralDispatcher) requestPeerSettings() {
contact := the.Peer.GetContact(this.SelectedConversation())
func (this *GrandCentralDispatcher) requestPeerSettings(handle string) {
contact := the.Peer.GetContact(handle)
if contact == nil {
log.Errorf("error: requested settings for unknown contact %v?", this.SelectedConversation())
this.SupplyPeerSettings(this.SelectedConversation(), this.SelectedConversation(), string(contact.Authorization), "")
log.Errorf("error: requested settings for unknown contact %v?", handle)
this.SupplyPeerSettings(this.SelectedConversation(), this.SelectedConversation(), string(model.AuthUnknown), "")
return
}
@ -387,9 +395,7 @@ func (this *GrandCentralDispatcher) requestGroupSettings(groupID string) {
contactnames := make([]string, len(contactaddrs))
for i, contact := range contactaddrs {
contactnames[i] = getNick(contact)
}
this.SupplyGroupSettings(group.GroupID, nick, group.GroupServer, invite, group.Accepted, contactnames, contactaddrs)
}

Binary file not shown.

@ -61,7 +61,7 @@
<translation type="unfinished">Adresse hier hinzufügen, um einen Kontakt aufzunehmen</translation>
</message>
<message>
<location filename="../qml/widgets/ContactList.qml" line="251"/>
<location filename="../qml/widgets/ContactList.qml" line="232"/>
<source>blocked</source>
<translation type="unfinished"></translation>
</message>
@ -140,7 +140,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ListOverlay.qml" line="203"/>
<location filename="../qml/overlays/ListOverlay.qml" line="200"/>
<source>add-list-item-btn</source>
<translation type="unfinished"></translation>
</message>
@ -157,28 +157,43 @@
<context>
<name>Message</name>
<message>
<location filename="../qml/widgets/Message.qml" line="57"/>
<location filename="../qml/widgets/Message.qml" line="66"/>
<source>dm-tooltip</source>
<extracomment>Click to DM</extracomment>
<translation>Klicken, um DM zu senden</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="164"/>
<location filename="../qml/widgets/Message.qml" line="189"/>
<source>could-not-send-msg-error</source>
<extracomment>Could not send this message</extracomment>
<translation>Nachricht konnte nicht gesendet werden</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="164"/>
<location filename="../qml/widgets/Message.qml" line="189"/>
<source>acknowledged-label</source>
<translation>bestätigt</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="164"/>
<location filename="../qml/widgets/Message.qml" line="189"/>
<source>pending-label</source>
<translation>Bestätigung ausstehend</translation>
</message>
</context>
<context>
<name>MessageEditor</name>
<message>
<location filename="../qml/widgets/MessageEditor.qml" line="32"/>
<source>peer-blocked-message</source>
<extracomment>Peer is blockced</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/widgets/MessageEditor.qml" line="49"/>
<source>peer-offline-message</source>
<extracomment>Peer is offline, messages can&apos;t be delivered right now</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MyProfile</name>
<message>
@ -205,35 +220,32 @@
<context>
<name>OverlayPane</name>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="24"/>
<source>accept-group-invite-label</source>
<extracomment>Do you want to accept the invitation to $GROUP</extracomment>
<translation>Möchtest Du die Einladung annehmen</translation>
<translation type="vanished">Möchtest Du die Einladung annehmen</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="29"/>
<source>accept-group-btn</source>
<extracomment>Accept group invite button</extracomment>
<translation>Annehmen</translation>
<translation type="vanished">Annehmen</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="39"/>
<source>reject-group-btn</source>
<extracomment>Reject Group invite button</extracomment>
<translation>Ablehnen</translation>
<translation type="vanished">Ablehnen</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="53"/>
<location filename="../qml/panes/OverlayPane.qml" line="66"/>
<source>chat-btn</source>
<translation>Chat</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="60"/>
<location filename="../qml/panes/OverlayPane.qml" line="80"/>
<source>lists-btn</source>
<translation>Listen</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="67"/>
<location filename="../qml/panes/OverlayPane.qml" line="94"/>
<source>bulletins-btn</source>
<translation>Meldungen</translation>
</message>
@ -271,34 +283,29 @@
<translation>speichern</translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="90"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="103"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="89"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="99"/>
<source>save-peer-history</source>
<extracomment>Save Peer History</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="91"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="90"/>
<source>save-peer-history-description</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="101"/>
<source>dont-save-peer-history-default</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="102"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="98"/>
<source>dont-save-peer-history</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="129"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="120"/>
<source>delete-btn</source>
<translation>löschen</translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="65"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="64"/>
<source>block-btn</source>
<translation type="unfinished"></translation>
</message>
@ -411,7 +418,7 @@
<context>
<name>ProfileList</name>
<message>
<location filename="../qml/widgets/ProfileList.qml" line="107"/>
<location filename="../qml/widgets/ProfileList.qml" line="101"/>
<source>add-new-profile-btn</source>
<translation type="unfinished"></translation>
</message>
@ -487,34 +494,34 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="86"/>
<location filename="../qml/panes/SettingsPane.qml" line="87"/>
<source>large-text-label</source>
<translation>Groß</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="94"/>
<location filename="../qml/panes/SettingsPane.qml" line="95"/>
<source>setting-theme</source>
<extracomment>Theme</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="103"/>
<location filename="../qml/panes/SettingsPane.qml" line="104"/>
<source>theme-light</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="104"/>
<location filename="../qml/panes/SettingsPane.qml" line="105"/>
<source>theme-dark</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="153"/>
<location filename="../qml/panes/SettingsPane.qml" line="154"/>
<source>version %1</source>
<extracomment>Version %1</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="162"/>
<location filename="../qml/panes/SettingsPane.qml" line="163"/>
<source>builddate %2</source>
<extracomment>Built on: %2</extracomment>
<translation type="unfinished"></translation>

Binary file not shown.

@ -61,7 +61,7 @@
<translation>... paste an address here to add a contact...</translation>
</message>
<message>
<location filename="../qml/widgets/ContactList.qml" line="251"/>
<location filename="../qml/widgets/ContactList.qml" line="232"/>
<source>blocked</source>
<translation>Blocked</translation>
</message>
@ -212,17 +212,17 @@ Right-click to reset.</translation>
<location filename="../qml/overlays/ListOverlay.qml" line="33"/>
<source>search-list</source>
<extracomment>ex: &quot;... paste an address here to add a contact ...&quot;</extracomment>
<translation type="unfinished">Search List</translation>
<translation>Search List</translation>
</message>
<message>
<location filename="../qml/overlays/ListOverlay.qml" line="62"/>
<source>peer-not-online</source>
<translation type="unfinished">Peer is Offline. Applications cannot be used right now.</translation>
<translation>Peer is Offline. Applications cannot be used right now.</translation>
</message>
<message>
<location filename="../qml/overlays/ListOverlay.qml" line="203"/>
<location filename="../qml/overlays/ListOverlay.qml" line="200"/>
<source>add-list-item-btn</source>
<translation type="unfinished">Add Item</translation>
<translation>Add Item</translation>
</message>
</context>
<context>
@ -237,28 +237,43 @@ Right-click to reset.</translation>
<context>
<name>Message</name>
<message>
<location filename="../qml/widgets/Message.qml" line="57"/>
<location filename="../qml/widgets/Message.qml" line="66"/>
<source>dm-tooltip</source>
<extracomment>Click to DM</extracomment>
<translation>Click to DM</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="164"/>
<location filename="../qml/widgets/Message.qml" line="189"/>
<source>could-not-send-msg-error</source>
<extracomment>Could not send this message</extracomment>
<translation>Could not send this message</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="164"/>
<location filename="../qml/widgets/Message.qml" line="189"/>
<source>acknowledged-label</source>
<translation>Acknowledged</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="164"/>
<location filename="../qml/widgets/Message.qml" line="189"/>
<source>pending-label</source>
<translation>Pending</translation>
</message>
</context>
<context>
<name>MessageEditor</name>
<message>
<location filename="../qml/widgets/MessageEditor.qml" line="32"/>
<source>peer-blocked-message</source>
<extracomment>Peer is blockced</extracomment>
<translation>Peer is blocked</translation>
</message>
<message>
<location filename="../qml/widgets/MessageEditor.qml" line="49"/>
<source>peer-offline-message</source>
<extracomment>Peer is offline, messages can&apos;t be delivered right now</extracomment>
<translation>Peer is offline, messages can&apos;t be delivered right now</translation>
</message>
</context>
<context>
<name>MyProfile</name>
<message>
@ -285,35 +300,32 @@ Right-click to reset.</translation>
<context>
<name>OverlayPane</name>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="24"/>
<source>accept-group-invite-label</source>
<extracomment>Do you want to accept the invitation to $GROUP</extracomment>
<translation>Do you want to accept the invitation to</translation>
<translation type="vanished">Do you want to accept the invitation to</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="29"/>
<source>accept-group-btn</source>
<extracomment>Accept group invite button</extracomment>
<translation>Accept</translation>
<translation type="vanished">Accept</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="39"/>
<source>reject-group-btn</source>
<extracomment>Reject Group invite button</extracomment>
<translation>Reject</translation>
<translation type="vanished">Reject</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="53"/>
<location filename="../qml/panes/OverlayPane.qml" line="66"/>
<source>chat-btn</source>
<translation>Chat</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="60"/>
<location filename="../qml/panes/OverlayPane.qml" line="80"/>
<source>lists-btn</source>
<translation>Lists</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="67"/>
<location filename="../qml/panes/OverlayPane.qml" line="94"/>
<source>bulletins-btn</source>
<translation>Bulletins</translation>
</message>
@ -351,38 +363,33 @@ Right-click to reset.</translation>
<translation>Save</translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="65"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="64"/>
<source>block-btn</source>
<translation>Block Peer</translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="90"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="103"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="89"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="99"/>
<source>save-peer-history</source>
<extracomment>Save Peer History</extracomment>
<translation type="unfinished">Save Peer History</translation>
<translation>Save Peer History</translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="91"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="90"/>
<source>save-peer-history-description</source>
<translation type="unfinished">Determines whether or not to delete any history associated with the peer.</translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="101"/>
<source>dont-save-peer-history-default</source>
<translation type="unfinished"></translation>
<translation>Determines whether or not to delete any history associated with the peer.</translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="102"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="98"/>
<source>dont-save-peer-history</source>
<translation type="unfinished">Delete Peer History</translation>
<translation>Delete Peer History</translation>
</message>
<message>
<source>unblock-btn</source>
<translation type="vanished">Unblock Peer</translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="129"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="120"/>
<source>delete-btn</source>
<translation>Delete</translation>
</message>
@ -503,7 +510,7 @@ Right-click to reset.</translation>
<context>
<name>ProfileList</name>
<message>
<location filename="../qml/widgets/ProfileList.qml" line="107"/>
<location filename="../qml/widgets/ProfileList.qml" line="101"/>
<source>add-new-profile-btn</source>
<translation>Add new profile</translation>
</message>
@ -588,34 +595,34 @@ Right-click to reset.</translation>
<translation>Zoom level</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="86"/>
<location filename="../qml/panes/SettingsPane.qml" line="87"/>
<source>large-text-label</source>
<translation>Large</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="94"/>
<location filename="../qml/panes/SettingsPane.qml" line="95"/>
<source>setting-theme</source>
<extracomment>Theme</extracomment>
<translation>Theme</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="103"/>
<location filename="../qml/panes/SettingsPane.qml" line="104"/>
<source>theme-light</source>
<translation>Light</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="104"/>
<location filename="../qml/panes/SettingsPane.qml" line="105"/>
<source>theme-dark</source>
<translation>Dark</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="153"/>
<location filename="../qml/panes/SettingsPane.qml" line="154"/>
<source>version %1</source>
<extracomment>Version %1</extracomment>
<translation>Version %1</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="162"/>
<location filename="../qml/panes/SettingsPane.qml" line="163"/>
<source>builddate %2</source>
<extracomment>Built on: %2</extracomment>
<translation>Built on: %2</translation>

Binary file not shown.

@ -61,7 +61,7 @@
<translation type="unfinished">... coller une adresse ici pour ajouter un contact...</translation>
</message>
<message>
<location filename="../qml/widgets/ContactList.qml" line="251"/>
<location filename="../qml/widgets/ContactList.qml" line="232"/>
<source>blocked</source>
<translation type="unfinished"></translation>
</message>
@ -140,7 +140,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ListOverlay.qml" line="203"/>
<location filename="../qml/overlays/ListOverlay.qml" line="200"/>
<source>add-list-item-btn</source>
<translation type="unfinished"></translation>
</message>
@ -157,28 +157,43 @@
<context>
<name>Message</name>
<message>
<location filename="../qml/widgets/Message.qml" line="57"/>
<location filename="../qml/widgets/Message.qml" line="66"/>
<source>dm-tooltip</source>
<extracomment>Click to DM</extracomment>
<translation>Envoyer un message privé</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="164"/>
<location filename="../qml/widgets/Message.qml" line="189"/>
<source>could-not-send-msg-error</source>
<extracomment>Could not send this message</extracomment>
<translation>Impossible d&apos;envoyer ce message</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="164"/>
<location filename="../qml/widgets/Message.qml" line="189"/>
<source>acknowledged-label</source>
<translation>Confirmé</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="164"/>
<location filename="../qml/widgets/Message.qml" line="189"/>
<source>pending-label</source>
<translation>En attente</translation>
</message>
</context>
<context>
<name>MessageEditor</name>
<message>
<location filename="../qml/widgets/MessageEditor.qml" line="32"/>
<source>peer-blocked-message</source>
<extracomment>Peer is blockced</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/widgets/MessageEditor.qml" line="49"/>
<source>peer-offline-message</source>
<extracomment>Peer is offline, messages can&apos;t be delivered right now</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MyProfile</name>
<message>
@ -205,35 +220,32 @@
<context>
<name>OverlayPane</name>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="24"/>
<source>accept-group-invite-label</source>
<extracomment>Do you want to accept the invitation to $GROUP</extracomment>
<translation>Voulez-vous accepter l&apos;invitation au groupe</translation>
<translation type="vanished">Voulez-vous accepter l&apos;invitation au groupe</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="29"/>
<source>accept-group-btn</source>
<extracomment>Accept group invite button</extracomment>
<translation>Accepter</translation>
<translation type="vanished">Accepter</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="39"/>
<source>reject-group-btn</source>
<extracomment>Reject Group invite button</extracomment>
<translation>Refuser</translation>
<translation type="vanished">Refuser</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="53"/>
<location filename="../qml/panes/OverlayPane.qml" line="66"/>
<source>chat-btn</source>
<translation>Discuter</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="60"/>
<location filename="../qml/panes/OverlayPane.qml" line="80"/>
<source>lists-btn</source>
<translation>Listes</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="67"/>
<location filename="../qml/panes/OverlayPane.qml" line="94"/>
<source>bulletins-btn</source>
<translation>Bulletins</translation>
</message>
@ -271,34 +283,29 @@
<translation>Sauvegarder</translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="90"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="103"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="89"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="99"/>
<source>save-peer-history</source>
<extracomment>Save Peer History</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="91"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="90"/>
<source>save-peer-history-description</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="101"/>
<source>dont-save-peer-history-default</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="102"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="98"/>
<source>dont-save-peer-history</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="129"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="120"/>
<source>delete-btn</source>
<translation>Effacer</translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="65"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="64"/>
<source>block-btn</source>
<translation type="unfinished"></translation>
</message>
@ -411,7 +418,7 @@
<context>
<name>ProfileList</name>
<message>
<location filename="../qml/widgets/ProfileList.qml" line="107"/>
<location filename="../qml/widgets/ProfileList.qml" line="101"/>
<source>add-new-profile-btn</source>
<translation type="unfinished"></translation>
</message>
@ -487,34 +494,34 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="86"/>
<location filename="../qml/panes/SettingsPane.qml" line="87"/>
<source>large-text-label</source>
<translation type="unfinished">Large</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="94"/>
<location filename="../qml/panes/SettingsPane.qml" line="95"/>
<source>setting-theme</source>
<extracomment>Theme</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="103"/>
<location filename="../qml/panes/SettingsPane.qml" line="104"/>
<source>theme-light</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="104"/>
<location filename="../qml/panes/SettingsPane.qml" line="105"/>
<source>theme-dark</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="153"/>
<location filename="../qml/panes/SettingsPane.qml" line="154"/>
<source>version %1</source>
<extracomment>Version %1</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="162"/>
<location filename="../qml/panes/SettingsPane.qml" line="163"/>
<source>builddate %2</source>
<extracomment>Built on: %2</extracomment>
<translation type="unfinished"></translation>

Binary file not shown.

@ -61,7 +61,7 @@
<translation type="unfinished"> cole um endereço aqui para adicionar um contato</translation>
</message>
<message>
<location filename="../qml/widgets/ContactList.qml" line="251"/>
<location filename="../qml/widgets/ContactList.qml" line="232"/>
<source>blocked</source>
<translation type="unfinished"></translation>
</message>
@ -140,7 +140,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/overlays/ListOverlay.qml" line="203"/>
<location filename="../qml/overlays/ListOverlay.qml" line="200"/>
<source>add-list-item-btn</source>
<translation type="unfinished"></translation>
</message>
@ -157,28 +157,43 @@
<context>
<name>Message</name>
<message>
<location filename="../qml/widgets/Message.qml" line="57"/>
<location filename="../qml/widgets/Message.qml" line="66"/>
<source>dm-tooltip</source>
<extracomment>Click to DM</extracomment>
<translation>Clique para DM</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="164"/>
<location filename="../qml/widgets/Message.qml" line="189"/>
<source>could-not-send-msg-error</source>
<extracomment>Could not send this message</extracomment>
<translation>Não deu para enviar esta mensagem</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="164"/>
<location filename="../qml/widgets/Message.qml" line="189"/>
<source>acknowledged-label</source>
<translation>Confirmada</translation>
</message>
<message>
<location filename="../qml/widgets/Message.qml" line="164"/>
<location filename="../qml/widgets/Message.qml" line="189"/>
<source>pending-label</source>
<translation>Pendente</translation>
</message>
</context>
<context>
<name>MessageEditor</name>
<message>
<location filename="../qml/widgets/MessageEditor.qml" line="32"/>
<source>peer-blocked-message</source>
<extracomment>Peer is blockced</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/widgets/MessageEditor.qml" line="49"/>
<source>peer-offline-message</source>
<extracomment>Peer is offline, messages can&apos;t be delivered right now</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MyProfile</name>
<message>
@ -205,35 +220,32 @@
<context>
<name>OverlayPane</name>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="24"/>
<source>accept-group-invite-label</source>
<extracomment>Do you want to accept the invitation to $GROUP</extracomment>
<translation>Você quer aceitar o convite para</translation>
<translation type="vanished">Você quer aceitar o convite para</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="29"/>
<source>accept-group-btn</source>
<extracomment>Accept group invite button</extracomment>
<translation>Aceitar</translation>
<translation type="vanished">Aceitar</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="39"/>
<source>reject-group-btn</source>
<extracomment>Reject Group invite button</extracomment>
<translation>Recusar</translation>
<translation type="vanished">Recusar</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="53"/>
<location filename="../qml/panes/OverlayPane.qml" line="66"/>
<source>chat-btn</source>
<translation>Chat</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="60"/>
<location filename="../qml/panes/OverlayPane.qml" line="80"/>
<source>lists-btn</source>
<translation>Listas</translation>
</message>
<message>
<location filename="../qml/panes/OverlayPane.qml" line="67"/>
<location filename="../qml/panes/OverlayPane.qml" line="94"/>
<source>bulletins-btn</source>
<translation>Boletins</translation>
</message>
@ -271,34 +283,29 @@
<translation>Salvar</translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="90"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="103"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="89"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="99"/>
<source>save-peer-history</source>
<extracomment>Save Peer History</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="91"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="90"/>
<source>save-peer-history-description</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="101"/>
<source>dont-save-peer-history-default</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="102"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="98"/>
<source>dont-save-peer-history</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="129"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="120"/>
<source>delete-btn</source>
<translation>Deletar</translation>
</message>
<message>
<location filename="../qml/panes/PeerSettingsPane.qml" line="65"/>
<location filename="../qml/panes/PeerSettingsPane.qml" line="64"/>
<source>block-btn</source>
<translation type="unfinished"></translation>
</message>
@ -411,7 +418,7 @@
<context>
<name>ProfileList</name>
<message>
<location filename="../qml/widgets/ProfileList.qml" line="107"/>
<location filename="../qml/widgets/ProfileList.qml" line="101"/>
<source>add-new-profile-btn</source>
<translation type="unfinished"></translation>
</message>
@ -487,34 +494,34 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="86"/>
<location filename="../qml/panes/SettingsPane.qml" line="87"/>
<source>large-text-label</source>
<translation>Grande</translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="94"/>
<location filename="../qml/panes/SettingsPane.qml" line="95"/>
<source>setting-theme</source>
<extracomment>Theme</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="103"/>
<location filename="../qml/panes/SettingsPane.qml" line="104"/>
<source>theme-light</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="104"/>
<location filename="../qml/panes/SettingsPane.qml" line="105"/>
<source>theme-dark</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="153"/>
<location filename="../qml/panes/SettingsPane.qml" line="154"/>
<source>version %1</source>
<extracomment>Version %1</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/panes/SettingsPane.qml" line="162"/>
<location filename="../qml/panes/SettingsPane.qml" line="163"/>
<source>builddate %2</source>
<extracomment>Built on: %2</extracomment>
<translation type="unfinished"></translation>

@ -16,6 +16,7 @@
<file>qml/widgets/ContactList.qml</file>
<file>qml/widgets/ContactRow.qml</file>
<file>qml/widgets/Message.qml</file>
<file>qml/widgets/MessageEditor.qml</file>
<file>qml/widgets/MyProfile.qml</file>
<file>qml/widgets/ProfileList.qml</file>
<file>qml/widgets/ProfileRow.qml</file>

@ -11,4 +11,16 @@ Item {
// defined in cwtch.im/ui/go/constants/attributes.go
readonly property string show_blocked: "show-blocked"
// defined in cwtch.im/cwtch/protocol/connection/state.go
//0:Disconnected,1:Connecting,2:Connected,3:Authenticated,4:Synced,5:Failed,6:Killed
readonly property int state_disconnected: 0
readonly property int state_connecting: 1
readonly property int state_connected: 2
readonly property int state_authenticated: 3
readonly property int state_synced: 4
readonly property int state_failed: 5
readonly property int state_killed: 6
}

@ -93,7 +93,7 @@ ApplicationWindow {
gcd.requestGroupSettings(gcd.selectedConversation)
} else {
theStack.pane = theStack.userProfilePane
gcd.requestPeerSettings()
gcd.requestPeerSettings(gcd.selectedConversation)
}
}
}
@ -165,7 +165,7 @@ ApplicationWindow {
}
RowLayout { // CONTAINS EVERYTHING EXCEPT THE TOOLBAR
RowLayout { // Profile Pane (contact list + overlays)
Layout.fillHeight: true
Layout.fillWidth: true
spacing: 0
@ -179,9 +179,24 @@ ApplicationWindow {
ContactList {
anchors.fill: parent
anchors.top: parent.top
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.right: (divider.visible ? divider.left : parent.right)
//anchors.topMargin: 10 * gcd.themeScale
dualPane: theStack.pane != theStack.emptyPane || theStack.pane == undefined
}
Rectangle {
id: divider
width: 2
anchors.right: parent.right
height: parent.height - (20 * gcd.themeScale)
anchors.verticalCenter: parent.verticalCenter
visible: theStack.pane != theStack.emptyPane
//Layout.fillHeight: true
color: Theme.dividerColor
}
}
Rectangle { // THE RIGHT PANE WHERE THE MESSAGES AND STUFF GO
@ -189,7 +204,6 @@ ApplicationWindow {
Layout.fillWidth: true
Layout.fillHeight: true
StackLayout {
id: theStack
anchors.fill: parent
@ -204,12 +218,13 @@ ApplicationWindow {
Item { anchors.fill: parent } // empty
Rectangle {
Rectangle {
color: Theme.backgroundMainColor
Layout.fillWidth: true
Layout.fillHeight: true
OverlayPane { // messagePane
anchors.fill: parent
anchors.topMargin: 10 * gcd.themeScale