Compare commits
3 Commits
trunk
...
fix_self_i
Author | SHA1 | Date |
---|---|---|
Sarah Jamie Lewis | 7c587bf295 | |
Sarah Jamie Lewis | 54c2818cf2 | |
Sarah Jamie Lewis | f3d713cfcc |
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"@@locale": "de",
|
"@@locale": "de",
|
||||||
|
"accepted": "",
|
||||||
"acceptGroupBtn": "Annehmen",
|
"acceptGroupBtn": "Annehmen",
|
||||||
"acceptGroupInviteLabel": "Möchtest Du die Einladung annehmen",
|
"acceptGroupInviteLabel": "Möchtest Du die Einladung annehmen",
|
||||||
"acknowledgedLabel": "bestätigt",
|
"acknowledgedLabel": "bestätigt",
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
"chatBtn": "Chat",
|
"chatBtn": "Chat",
|
||||||
"chatHistoryDefault": "",
|
"chatHistoryDefault": "",
|
||||||
"contactAlreadyExists": "",
|
"contactAlreadyExists": "",
|
||||||
|
"contactSuggestion": "",
|
||||||
"conversationSettings": "",
|
"conversationSettings": "",
|
||||||
"copiedClipboardNotification": "in die Zwischenablage kopiert",
|
"copiedClipboardNotification": "in die Zwischenablage kopiert",
|
||||||
"copiedToClipboardNotification": "in die Zwischenablage kopiert",
|
"copiedToClipboardNotification": "in die Zwischenablage kopiert",
|
||||||
|
@ -121,6 +123,7 @@
|
||||||
"radioNoPassword": "Unverschlüsselt (kein Passwort)",
|
"radioNoPassword": "Unverschlüsselt (kein Passwort)",
|
||||||
"radioUsePassword": "Passwort",
|
"radioUsePassword": "Passwort",
|
||||||
"reallyLeaveThisGroupPrompt": "",
|
"reallyLeaveThisGroupPrompt": "",
|
||||||
|
"rejected": "",
|
||||||
"rejectGroupBtn": "Ablehnen",
|
"rejectGroupBtn": "Ablehnen",
|
||||||
"saveBtn": "Speichern",
|
"saveBtn": "Speichern",
|
||||||
"savePeerHistory": "Peer-Verlauf speichern",
|
"savePeerHistory": "Peer-Verlauf speichern",
|
||||||
|
@ -128,6 +131,7 @@
|
||||||
"saveProfileBtn": "Profil speichern",
|
"saveProfileBtn": "Profil speichern",
|
||||||
"search": "Suche...",
|
"search": "Suche...",
|
||||||
"searchList": "",
|
"searchList": "",
|
||||||
|
"sendAnInvitation": "",
|
||||||
"server": "Server",
|
"server": "Server",
|
||||||
"serverConnectivityConnected": "Server verbunden",
|
"serverConnectivityConnected": "Server verbunden",
|
||||||
"serverConnectivityDisconnected": "Server getrennt",
|
"serverConnectivityDisconnected": "Server getrennt",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"@@locale": "en",
|
"@@locale": "en",
|
||||||
|
"accepted": "Accepted!",
|
||||||
"acceptGroupBtn": "Accept",
|
"acceptGroupBtn": "Accept",
|
||||||
"acceptGroupInviteLabel": "Do you want to accept the invitation to",
|
"acceptGroupInviteLabel": "Do you want to accept the invitation to",
|
||||||
"acknowledgedLabel": "Acknowledged",
|
"acknowledgedLabel": "Acknowledged",
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
"chatBtn": "Chat",
|
"chatBtn": "Chat",
|
||||||
"chatHistoryDefault": "This conversation will be deleted when Cwtch is closed! Message history can be enabled per-conversation via the Settings menu in the upper right.",
|
"chatHistoryDefault": "This conversation will be deleted when Cwtch is closed! Message history can be enabled per-conversation via the Settings menu in the upper right.",
|
||||||
"contactAlreadyExists": "Contact Already Exists",
|
"contactAlreadyExists": "Contact Already Exists",
|
||||||
|
"contactSuggestion": "This is a contact suggestion for: ",
|
||||||
"conversationSettings": "Conversation Settings",
|
"conversationSettings": "Conversation Settings",
|
||||||
"copiedClipboardNotification": "Copied to clipboard",
|
"copiedClipboardNotification": "Copied to clipboard",
|
||||||
"copiedToClipboardNotification": "Copied to Clipboard",
|
"copiedToClipboardNotification": "Copied to Clipboard",
|
||||||
|
@ -121,6 +123,7 @@
|
||||||
"radioNoPassword": "Unencrypted (No password)",
|
"radioNoPassword": "Unencrypted (No password)",
|
||||||
"radioUsePassword": "Password",
|
"radioUsePassword": "Password",
|
||||||
"reallyLeaveThisGroupPrompt": "Are you sure you want to leave this conversation? All messages and attributes will be deleted.",
|
"reallyLeaveThisGroupPrompt": "Are you sure you want to leave this conversation? All messages and attributes will be deleted.",
|
||||||
|
"rejected": "Rejected!",
|
||||||
"rejectGroupBtn": "Reject",
|
"rejectGroupBtn": "Reject",
|
||||||
"saveBtn": "Save",
|
"saveBtn": "Save",
|
||||||
"savePeerHistory": "Save Peer History",
|
"savePeerHistory": "Save Peer History",
|
||||||
|
@ -128,6 +131,7 @@
|
||||||
"saveProfileBtn": "Save Profile",
|
"saveProfileBtn": "Save Profile",
|
||||||
"search": "Search...",
|
"search": "Search...",
|
||||||
"searchList": "Search List",
|
"searchList": "Search List",
|
||||||
|
"sendAnInvitation": "You sent an invitation for: ",
|
||||||
"server": "Server",
|
"server": "Server",
|
||||||
"serverConnectivityConnected": "Server Connected",
|
"serverConnectivityConnected": "Server Connected",
|
||||||
"serverConnectivityDisconnected": "Server Disconnected",
|
"serverConnectivityDisconnected": "Server Disconnected",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"@@locale": "es",
|
"@@locale": "es",
|
||||||
|
"accepted": "",
|
||||||
"acceptGroupBtn": "Aceptar",
|
"acceptGroupBtn": "Aceptar",
|
||||||
"acceptGroupInviteLabel": "¿Quieres aceptar la invitación a ",
|
"acceptGroupInviteLabel": "¿Quieres aceptar la invitación a ",
|
||||||
"acknowledgedLabel": "Reconocido",
|
"acknowledgedLabel": "Reconocido",
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
"chatBtn": "Chat",
|
"chatBtn": "Chat",
|
||||||
"chatHistoryDefault": "",
|
"chatHistoryDefault": "",
|
||||||
"contactAlreadyExists": "",
|
"contactAlreadyExists": "",
|
||||||
|
"contactSuggestion": "",
|
||||||
"conversationSettings": "",
|
"conversationSettings": "",
|
||||||
"copiedClipboardNotification": "Copiado al portapapeles",
|
"copiedClipboardNotification": "Copiado al portapapeles",
|
||||||
"copiedToClipboardNotification": "Copiado al portapapeles",
|
"copiedToClipboardNotification": "Copiado al portapapeles",
|
||||||
|
@ -121,6 +123,7 @@
|
||||||
"radioNoPassword": "Sin cifrado (sin contraseña)",
|
"radioNoPassword": "Sin cifrado (sin contraseña)",
|
||||||
"radioUsePassword": "Contraseña",
|
"radioUsePassword": "Contraseña",
|
||||||
"reallyLeaveThisGroupPrompt": "",
|
"reallyLeaveThisGroupPrompt": "",
|
||||||
|
"rejected": "",
|
||||||
"rejectGroupBtn": "Rechazar",
|
"rejectGroupBtn": "Rechazar",
|
||||||
"saveBtn": "Guardar",
|
"saveBtn": "Guardar",
|
||||||
"savePeerHistory": "Guardar el historial con contacto",
|
"savePeerHistory": "Guardar el historial con contacto",
|
||||||
|
@ -128,6 +131,7 @@
|
||||||
"saveProfileBtn": "Guardar perfil",
|
"saveProfileBtn": "Guardar perfil",
|
||||||
"search": "Búsqueda...",
|
"search": "Búsqueda...",
|
||||||
"searchList": "Buscar en la lista",
|
"searchList": "Buscar en la lista",
|
||||||
|
"sendAnInvitation": "",
|
||||||
"server": "Servidor",
|
"server": "Servidor",
|
||||||
"serverConnectivityConnected": "Servidor conectado",
|
"serverConnectivityConnected": "Servidor conectado",
|
||||||
"serverConnectivityDisconnected": "Servidor desconectado",
|
"serverConnectivityDisconnected": "Servidor desconectado",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"@@locale": "fr",
|
"@@locale": "fr",
|
||||||
|
"accepted": "",
|
||||||
"acceptGroupBtn": "Accepter",
|
"acceptGroupBtn": "Accepter",
|
||||||
"acceptGroupInviteLabel": "Voulez-vous accepter l'invitation au groupe",
|
"acceptGroupInviteLabel": "Voulez-vous accepter l'invitation au groupe",
|
||||||
"acknowledgedLabel": "Confirmé",
|
"acknowledgedLabel": "Confirmé",
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
"chatBtn": "Discuter",
|
"chatBtn": "Discuter",
|
||||||
"chatHistoryDefault": "",
|
"chatHistoryDefault": "",
|
||||||
"contactAlreadyExists": "",
|
"contactAlreadyExists": "",
|
||||||
|
"contactSuggestion": "",
|
||||||
"conversationSettings": "",
|
"conversationSettings": "",
|
||||||
"copiedClipboardNotification": "Copié dans le presse-papier",
|
"copiedClipboardNotification": "Copié dans le presse-papier",
|
||||||
"copiedToClipboardNotification": "Copié dans le presse-papier",
|
"copiedToClipboardNotification": "Copié dans le presse-papier",
|
||||||
|
@ -121,6 +123,7 @@
|
||||||
"radioNoPassword": "",
|
"radioNoPassword": "",
|
||||||
"radioUsePassword": "",
|
"radioUsePassword": "",
|
||||||
"reallyLeaveThisGroupPrompt": "",
|
"reallyLeaveThisGroupPrompt": "",
|
||||||
|
"rejected": "",
|
||||||
"rejectGroupBtn": "Refuser",
|
"rejectGroupBtn": "Refuser",
|
||||||
"saveBtn": "Sauvegarder",
|
"saveBtn": "Sauvegarder",
|
||||||
"savePeerHistory": "",
|
"savePeerHistory": "",
|
||||||
|
@ -128,6 +131,7 @@
|
||||||
"saveProfileBtn": "",
|
"saveProfileBtn": "",
|
||||||
"search": "",
|
"search": "",
|
||||||
"searchList": "",
|
"searchList": "",
|
||||||
|
"sendAnInvitation": "",
|
||||||
"server": "",
|
"server": "",
|
||||||
"serverConnectivityConnected": "",
|
"serverConnectivityConnected": "",
|
||||||
"serverConnectivityDisconnected": "",
|
"serverConnectivityDisconnected": "",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"@@locale": "it",
|
"@@locale": "it",
|
||||||
|
"accepted": "",
|
||||||
"acceptGroupBtn": "Accetta",
|
"acceptGroupBtn": "Accetta",
|
||||||
"acceptGroupInviteLabel": "Vuoi accettare l'invito a",
|
"acceptGroupInviteLabel": "Vuoi accettare l'invito a",
|
||||||
"acknowledgedLabel": "Riconosciuto",
|
"acknowledgedLabel": "Riconosciuto",
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
"chatBtn": "Chat",
|
"chatBtn": "Chat",
|
||||||
"chatHistoryDefault": "",
|
"chatHistoryDefault": "",
|
||||||
"contactAlreadyExists": "",
|
"contactAlreadyExists": "",
|
||||||
|
"contactSuggestion": "",
|
||||||
"conversationSettings": "",
|
"conversationSettings": "",
|
||||||
"copiedClipboardNotification": "Copiato negli Appunti",
|
"copiedClipboardNotification": "Copiato negli Appunti",
|
||||||
"copiedToClipboardNotification": "Copiato negli Appunti",
|
"copiedToClipboardNotification": "Copiato negli Appunti",
|
||||||
|
@ -121,6 +123,7 @@
|
||||||
"radioNoPassword": "Non criptato (senza password)",
|
"radioNoPassword": "Non criptato (senza password)",
|
||||||
"radioUsePassword": "Password",
|
"radioUsePassword": "Password",
|
||||||
"reallyLeaveThisGroupPrompt": "",
|
"reallyLeaveThisGroupPrompt": "",
|
||||||
|
"rejected": "",
|
||||||
"rejectGroupBtn": "Rifiuta",
|
"rejectGroupBtn": "Rifiuta",
|
||||||
"saveBtn": "Salva",
|
"saveBtn": "Salva",
|
||||||
"savePeerHistory": "Salva cronologia peer",
|
"savePeerHistory": "Salva cronologia peer",
|
||||||
|
@ -128,6 +131,7 @@
|
||||||
"saveProfileBtn": "Salva il profilo",
|
"saveProfileBtn": "Salva il profilo",
|
||||||
"search": "Ricerca...",
|
"search": "Ricerca...",
|
||||||
"searchList": "Cerca nella lista",
|
"searchList": "Cerca nella lista",
|
||||||
|
"sendAnInvitation": "",
|
||||||
"server": "Server",
|
"server": "Server",
|
||||||
"serverConnectivityConnected": "Server connesso",
|
"serverConnectivityConnected": "Server connesso",
|
||||||
"serverConnectivityDisconnected": "Server disconnesso",
|
"serverConnectivityDisconnected": "Server disconnesso",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pt",
|
"@@locale": "pt",
|
||||||
|
"accepted": "",
|
||||||
"acceptGroupBtn": "Aceitar",
|
"acceptGroupBtn": "Aceitar",
|
||||||
"acceptGroupInviteLabel": "Você quer aceitar o convite para",
|
"acceptGroupInviteLabel": "Você quer aceitar o convite para",
|
||||||
"acknowledgedLabel": "Confirmada",
|
"acknowledgedLabel": "Confirmada",
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
"chatBtn": "Chat",
|
"chatBtn": "Chat",
|
||||||
"chatHistoryDefault": "",
|
"chatHistoryDefault": "",
|
||||||
"contactAlreadyExists": "",
|
"contactAlreadyExists": "",
|
||||||
|
"contactSuggestion": "",
|
||||||
"conversationSettings": "",
|
"conversationSettings": "",
|
||||||
"copiedClipboardNotification": "Copiado",
|
"copiedClipboardNotification": "Copiado",
|
||||||
"copiedToClipboardNotification": "Copiado",
|
"copiedToClipboardNotification": "Copiado",
|
||||||
|
@ -121,6 +123,7 @@
|
||||||
"radioNoPassword": "",
|
"radioNoPassword": "",
|
||||||
"radioUsePassword": "",
|
"radioUsePassword": "",
|
||||||
"reallyLeaveThisGroupPrompt": "",
|
"reallyLeaveThisGroupPrompt": "",
|
||||||
|
"rejected": "",
|
||||||
"rejectGroupBtn": "Recusar",
|
"rejectGroupBtn": "Recusar",
|
||||||
"saveBtn": "Salvar",
|
"saveBtn": "Salvar",
|
||||||
"savePeerHistory": "",
|
"savePeerHistory": "",
|
||||||
|
@ -128,6 +131,7 @@
|
||||||
"saveProfileBtn": "",
|
"saveProfileBtn": "",
|
||||||
"search": "",
|
"search": "",
|
||||||
"searchList": "",
|
"searchList": "",
|
||||||
|
"sendAnInvitation": "",
|
||||||
"server": "",
|
"server": "",
|
||||||
"serverConnectivityConnected": "",
|
"serverConnectivityConnected": "",
|
||||||
"serverConnectivityDisconnected": "",
|
"serverConnectivityDisconnected": "",
|
||||||
|
|
|
@ -1383,6 +1383,8 @@ ThemeData mkThemeData(Settings opaque) {
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
scrollbarTheme: ScrollbarThemeData(
|
||||||
|
isAlwaysShown: false, thumbColor: MaterialStateProperty.all(opaque.current().scrollbarActiveColor()), trackColor: MaterialStateProperty.all(opaque.current().scrollbarDefaultColor())),
|
||||||
tabBarTheme: TabBarTheme(indicator: UnderlineTabIndicator(borderSide: BorderSide(color: opaque.current().defaultButtonActiveColor()))),
|
tabBarTheme: TabBarTheme(indicator: UnderlineTabIndicator(borderSide: BorderSide(color: opaque.current().defaultButtonActiveColor()))),
|
||||||
dialogTheme: DialogTheme(
|
dialogTheme: DialogTheme(
|
||||||
backgroundColor: opaque.current().backgroundPaneColor(),
|
backgroundColor: opaque.current().backgroundPaneColor(),
|
||||||
|
|
|
@ -177,7 +177,9 @@ class _MessageViewState extends State<MessageView> {
|
||||||
),
|
),
|
||||||
ChangeNotifierProvider.value(
|
ChangeNotifierProvider.value(
|
||||||
value: Provider.of<ProfileInfoState>(ctx, listen: false),
|
value: Provider.of<ProfileInfoState>(ctx, listen: false),
|
||||||
child: DropdownContacts(onChanged: (newVal) {
|
child: DropdownContacts(filter: (contact) {
|
||||||
|
return contact.onion != Provider.of<ContactInfoState>(context).onion;
|
||||||
|
}, onChanged: (newVal) {
|
||||||
setState(() {
|
setState(() {
|
||||||
this.selectedContact = newVal;
|
this.selectedContact = newVal;
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,6 +3,10 @@ import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../model.dart';
|
import '../model.dart';
|
||||||
|
|
||||||
|
bool noFilter(ContactInfoState peer) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Dropdown menu populated from Provider.of<ProfileInfoState>'s contact list
|
// Dropdown menu populated from Provider.of<ProfileInfoState>'s contact list
|
||||||
// Includes both peers and groups; begins empty/nothing selected
|
// Includes both peers and groups; begins empty/nothing selected
|
||||||
// Displays nicknames to UI but uses handles as values
|
// Displays nicknames to UI but uses handles as values
|
||||||
|
@ -10,8 +14,10 @@ import '../model.dart';
|
||||||
class DropdownContacts extends StatefulWidget {
|
class DropdownContacts extends StatefulWidget {
|
||||||
DropdownContacts({
|
DropdownContacts({
|
||||||
required this.onChanged,
|
required this.onChanged,
|
||||||
|
this.filter = noFilter,
|
||||||
});
|
});
|
||||||
final Function(dynamic) onChanged;
|
final Function(dynamic) onChanged;
|
||||||
|
final bool Function(ContactInfoState) filter;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_DropdownContactsState createState() => _DropdownContactsState();
|
_DropdownContactsState createState() => _DropdownContactsState();
|
||||||
|
@ -24,7 +30,7 @@ class _DropdownContactsState extends State<DropdownContacts> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return DropdownButton(
|
return DropdownButton(
|
||||||
value: this.selected,
|
value: this.selected,
|
||||||
items: Provider.of<ProfileInfoState>(context, listen: false).contactList.contacts.map<DropdownMenuItem<String>>((ContactInfoState contact) {
|
items: Provider.of<ProfileInfoState>(context, listen: false).contactList.contacts.where(widget.filter).map<DropdownMenuItem<String>>((ContactInfoState contact) {
|
||||||
return DropdownMenuItem<String>(value: contact.onion, child: Text(contact.nickname));
|
return DropdownMenuItem<String>(value: contact.onion, child: Text(contact.nickname));
|
||||||
}).toList(),
|
}).toList(),
|
||||||
onChanged: (String? newVal) {
|
onChanged: (String? newVal) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:cwtch/cwtch_icons_icons.dart';
|
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||||
|
import 'package:cwtch/widgets/malformedbubble.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import '../main.dart';
|
import '../main.dart';
|
||||||
|
@ -54,24 +55,33 @@ class InvitationBubbleState extends State<InvitationBubble> {
|
||||||
style: TextStyle(fontSize: 9.0, color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor() : Provider.of<Settings>(context).theme.messageFromOtherTextColor())));
|
style: TextStyle(fontSize: 9.0, color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor() : Provider.of<Settings>(context).theme.messageFromOtherTextColor())));
|
||||||
|
|
||||||
// todo: translations
|
// todo: translations
|
||||||
|
|
||||||
|
// If we receive an invite for ourselves, treat it as a bug. The UI no longer allows this so it could have only come from
|
||||||
|
// some kind of malfeasance.
|
||||||
|
var selfInvite = Provider.of<MessageState>(context).inviteNick == Provider.of<ProfileInfoState>(context).onion;
|
||||||
|
if (selfInvite) {
|
||||||
|
return MalformedBubble();
|
||||||
|
}
|
||||||
|
|
||||||
var wdgMessage = fromMe
|
var wdgMessage = fromMe
|
||||||
? senderInviteChrome("You sent an invitation for", isGroup ? "a group" : Provider.of<MessageState>(context).message, myKey)
|
? senderInviteChrome(AppLocalizations.of(context)!.sendAnInvitation,
|
||||||
: inviteChrome(isGroup ? AppLocalizations.of(context)!.inviteToGroup : "This is a contact suggestion for:", Provider.of<MessageState>(context).inviteNick,
|
isGroup ? Provider.of<ProfileInfoState>(context).contactList.getContact(Provider.of<MessageState>(context).inviteTarget)!.nickname : Provider.of<MessageState>(context).message, myKey)
|
||||||
Provider.of<MessageState>(context).inviteTarget, myKey);
|
: (inviteChrome(isGroup ? AppLocalizations.of(context)!.inviteToGroup : AppLocalizations.of(context)!.contactSuggestion, Provider.of<MessageState>(context).inviteNick,
|
||||||
|
Provider.of<MessageState>(context).inviteTarget, myKey));
|
||||||
|
|
||||||
Widget wdgDecorations;
|
Widget wdgDecorations;
|
||||||
if (fromMe) {
|
if (fromMe) {
|
||||||
wdgDecorations = MessageBubbleDecoration(ackd: Provider.of<MessageState>(context).ackd, errored: Provider.of<MessageState>(context).error, fromMe: fromMe, prettyDate: prettyDate);
|
wdgDecorations = MessageBubbleDecoration(ackd: Provider.of<MessageState>(context).ackd, errored: Provider.of<MessageState>(context).error, fromMe: fromMe, prettyDate: prettyDate);
|
||||||
} else if (isAccepted) {
|
} else if (isAccepted) {
|
||||||
wdgDecorations = Text("Accepted!");
|
wdgDecorations = Text(AppLocalizations.of(context)!.accepted + '\u202F');
|
||||||
} else if (this.rejected) {
|
} else if (this.rejected) {
|
||||||
wdgDecorations = Text("Rejected.");
|
wdgDecorations = Text(AppLocalizations.of(context)!.rejected + '\u202F');
|
||||||
} else {
|
} else {
|
||||||
wdgDecorations = Center(
|
wdgDecorations = Center(
|
||||||
widthFactor: 1,
|
widthFactor: 1,
|
||||||
child: Row(children: [
|
child: Wrap(children: [
|
||||||
Padding(padding: EdgeInsets.all(5), child: TextButton(child: Text("Reject"), onPressed: _btnReject)),
|
Padding(padding: EdgeInsets.all(5), child: TextButton(child: Text(AppLocalizations.of(context)!.rejectGroupBtn + '\u202F'), onPressed: _btnReject)),
|
||||||
Padding(padding: EdgeInsets.all(5), child: TextButton(child: Text("Accept"), onPressed: _btnAccept)),
|
Padding(padding: EdgeInsets.all(5), child: TextButton(child: Text(AppLocalizations.of(context)!.acceptGroupBtn + '\u202F'), onPressed: _btnAccept)),
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,15 +105,16 @@ class InvitationBubbleState extends State<InvitationBubble> {
|
||||||
widthFactor: 1.0,
|
widthFactor: 1.0,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.all(9.0),
|
padding: EdgeInsets.all(9.0),
|
||||||
child: Row(mainAxisSize: MainAxisSize.min, children: [
|
child: Wrap(runAlignment: WrapAlignment.spaceEvenly, alignment: WrapAlignment.spaceEvenly, runSpacing: 1.0, crossAxisAlignment: WrapCrossAlignment.center, children: [
|
||||||
Center(widthFactor: 1, child: Padding(padding: EdgeInsets.all(4), child: Icon(CwtchIcons.send_invite, size: 32))),
|
Center(widthFactor: 1, child: Padding(padding: EdgeInsets.all(10.0), child: Icon(CwtchIcons.send_invite, size: 32))),
|
||||||
Center(
|
Center(
|
||||||
widthFactor: 1.0,
|
widthFactor: 1.0,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start,
|
crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start,
|
||||||
mainAxisAlignment: fromMe ? MainAxisAlignment.end : MainAxisAlignment.start,
|
mainAxisAlignment: fromMe ? MainAxisAlignment.end : MainAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: fromMe ? [wdgMessage, wdgDecorations] : [wdgSender, wdgMessage, wdgDecorations])),
|
children: fromMe ? [wdgMessage, wdgDecorations] : [wdgSender, wdgMessage, wdgDecorations]),
|
||||||
|
)
|
||||||
])))));
|
])))));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -129,53 +140,49 @@ class InvitationBubbleState extends State<InvitationBubble> {
|
||||||
|
|
||||||
// Construct an invite chrome for the sender
|
// Construct an invite chrome for the sender
|
||||||
Widget senderInviteChrome(String chrome, String targetName, String myKey) {
|
Widget senderInviteChrome(String chrome, String targetName, String myKey) {
|
||||||
return Center(
|
return Wrap(children: [
|
||||||
widthFactor: 1,
|
SelectableText(
|
||||||
child: Row(children: [
|
chrome + '\u202F',
|
||||||
SelectableText(
|
style: TextStyle(
|
||||||
chrome,
|
color: Provider.of<Settings>(context).theme.messageFromMeTextColor(),
|
||||||
focusNode: _focus,
|
),
|
||||||
style: TextStyle(
|
textAlign: TextAlign.left,
|
||||||
color: Provider.of<Settings>(context).theme.messageFromMeTextColor(),
|
maxLines: 2,
|
||||||
),
|
textWidthBasis: TextWidthBasis.longestLine,
|
||||||
textAlign: TextAlign.left,
|
),
|
||||||
textWidthBasis: TextWidthBasis.longestLine,
|
SelectableText(
|
||||||
),
|
targetName + '\u202F',
|
||||||
SelectableText(
|
key: Key(myKey),
|
||||||
targetName + '\u202F',
|
style: TextStyle(
|
||||||
key: Key(myKey),
|
color: Provider.of<Settings>(context).theme.messageFromMeTextColor(),
|
||||||
focusNode: _focus,
|
),
|
||||||
style: TextStyle(
|
textAlign: TextAlign.left,
|
||||||
color: Provider.of<Settings>(context).theme.messageFromMeTextColor(),
|
maxLines: 2,
|
||||||
),
|
textWidthBasis: TextWidthBasis.longestLine,
|
||||||
textAlign: TextAlign.left,
|
)
|
||||||
textWidthBasis: TextWidthBasis.longestLine,
|
]);
|
||||||
)
|
|
||||||
]));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct an invite chrome
|
// Construct an invite chrome
|
||||||
Widget inviteChrome(String chrome, String targetName, String targetId, String myKey) {
|
Widget inviteChrome(String chrome, String targetName, String targetId, String myKey) {
|
||||||
return Center(
|
return Wrap(children: [
|
||||||
widthFactor: 1,
|
SelectableText(
|
||||||
child: Row(children: [
|
chrome + '\u202F',
|
||||||
SelectableText(
|
style: TextStyle(
|
||||||
chrome,
|
color: Provider.of<Settings>(context).theme.messageFromOtherTextColor(),
|
||||||
focusNode: _focus,
|
),
|
||||||
style: TextStyle(
|
textAlign: TextAlign.left,
|
||||||
color: Provider.of<Settings>(context).theme.messageFromOtherTextColor(),
|
textWidthBasis: TextWidthBasis.longestLine,
|
||||||
),
|
maxLines: 2,
|
||||||
textAlign: TextAlign.left,
|
),
|
||||||
textWidthBasis: TextWidthBasis.longestLine,
|
SelectableText(
|
||||||
),
|
targetName + '\u202F',
|
||||||
SelectableText(
|
key: Key(myKey),
|
||||||
targetName,
|
style: TextStyle(color: Provider.of<Settings>(context).theme.messageFromOtherTextColor()),
|
||||||
key: Key(myKey),
|
textAlign: TextAlign.left,
|
||||||
focusNode: _focus,
|
maxLines: 2,
|
||||||
style: TextStyle(color: Provider.of<Settings>(context).theme.messageFromOtherTextColor()),
|
textWidthBasis: TextWidthBasis.longestLine,
|
||||||
textAlign: TextAlign.left,
|
)
|
||||||
textWidthBasis: TextWidthBasis.longestLine,
|
]);
|
||||||
)
|
|
||||||
]));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,6 @@ class _MessageListState extends State<MessageList> {
|
||||||
)),
|
)),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Scrollbar(
|
child: Scrollbar(
|
||||||
isAlwaysShown: true,
|
|
||||||
controller: ctrlr1,
|
controller: ctrlr1,
|
||||||
child: Container(
|
child: Container(
|
||||||
// Only show broken heart is the contact is offline...
|
// Only show broken heart is the contact is offline...
|
||||||
|
@ -54,7 +53,7 @@ class _MessageListState extends State<MessageList> {
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
controller: ctrlr1,
|
controller: ctrlr1,
|
||||||
itemCount: Provider.of<ContactInfoState>(outerContext).totalMessages,
|
itemCount: Provider.of<ContactInfoState>(outerContext).totalMessages,
|
||||||
reverse: true,
|
reverse: true, // NOTE: There seems to be a bug in flutter that corrects the mouse wheel scroll, but not the drag direction...
|
||||||
itemBuilder: (itemBuilderContext, index) {
|
itemBuilder: (itemBuilderContext, index) {
|
||||||
var trueIndex = Provider.of<ContactInfoState>(outerContext).totalMessages - index - 1;
|
var trueIndex = Provider.of<ContactInfoState>(outerContext).totalMessages - index - 1;
|
||||||
return ChangeNotifierProvider(
|
return ChangeNotifierProvider(
|
||||||
|
|
|
@ -94,7 +94,10 @@ class _MessageRowState extends State<MessageRow> {
|
||||||
final setPeerAttributeJson = jsonEncode(setPeerAttribute);
|
final setPeerAttributeJson = jsonEncode(setPeerAttribute);
|
||||||
Provider.of<FlwtchState>(context, listen: false).cwtch.SendProfileEvent(profileOnion, setPeerAttributeJson);
|
Provider.of<FlwtchState>(context, listen: false).cwtch.SendProfileEvent(profileOnion, setPeerAttributeJson);
|
||||||
|
|
||||||
final snackBar = SnackBar(content: Text(AppLocalizations.of(context)!.successfullAddedContact));
|
final snackBar = SnackBar(
|
||||||
|
content: Text(AppLocalizations.of(context)!.successfullAddedContact),
|
||||||
|
duration: Duration(seconds: 2),
|
||||||
|
);
|
||||||
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Generated file. Do not edit.
|
// Generated file. Do not edit.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <window_size/window_size_plugin.h>
|
#include <window_size/window_size_plugin.h>
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Generated file. Do not edit.
|
// Generated file. Do not edit.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
#ifndef GENERATED_PLUGIN_REGISTRANT_
|
#ifndef GENERATED_PLUGIN_REGISTRANT_
|
||||||
#define GENERATED_PLUGIN_REGISTRANT_
|
#define GENERATED_PLUGIN_REGISTRANT_
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ packages:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.6.1"
|
version: "2.7.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -191,7 +191,7 @@ packages:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.4.0"
|
||||||
nested:
|
nested:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -392,7 +392,7 @@ packages:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.4.0"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -450,7 +450,7 @@ packages:
|
||||||
name: xml
|
name: xml
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.1.1"
|
version: "5.1.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.13.0 <3.0.0"
|
dart: ">=2.13.0 <3.0.0"
|
||||||
flutter: ">=1.20.0"
|
flutter: ">=1.20.0"
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Generated file. Do not edit.
|
// Generated file. Do not edit.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <window_size/window_size_plugin.h>
|
#include <window_size/window_size_plugin.h>
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Generated file. Do not edit.
|
// Generated file. Do not edit.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
#ifndef GENERATED_PLUGIN_REGISTRANT_
|
#ifndef GENERATED_PLUGIN_REGISTRANT_
|
||||||
#define GENERATED_PLUGIN_REGISTRANT_
|
#define GENERATED_PLUGIN_REGISTRANT_
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue