Merge branch 'trunk' into winnameicon
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
commit
70a049e6fe
Binary file not shown.
|
@ -3,4 +3,4 @@ const dev_version = "development";
|
|||
class EnvironmentConfig {
|
||||
static const BUILD_VER = String.fromEnvironment('BUILD_VER', defaultValue: dev_version);
|
||||
static const BUILD_DATE = String.fromEnvironment('BUILD_DATE', defaultValue: "now");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/// Flutter icons MyFlutterApp
|
||||
/// Copyright (C) 2021 by original authors @ fluttericon.com, fontello.com
|
||||
/// This font was generated by FlutterIcon.com, which is derived from Fontello.
|
||||
///
|
||||
/// To use this font, place it in your fonts/ directory and include the
|
||||
/// following in your pubspec.yaml
|
||||
///
|
||||
/// flutter:
|
||||
/// fonts:
|
||||
/// - family: CwtchIcons
|
||||
/// fonts:
|
||||
/// - asset: assets/fonts/CwtchIcons.ttf
|
||||
///
|
||||
///
|
||||
///
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class CwtchIcons {
|
||||
CwtchIcons._();
|
||||
|
||||
static const _kFontFam = 'CwtchIcons';
|
||||
static const String? _kFontPkg = null;
|
||||
|
||||
static const IconData arrow_back_24px = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData attach_file_24px = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData block_peer = IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData block_unknown = IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData block_24px = IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData brightness_5_24px = IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData camera_alt_24px = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData change_language = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData change_theme = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData chat_bubble_empty_24px = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData chat_bubble_24px = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData chat_seetings_24px = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData check_24px = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData chevron_left_24px = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData clear_24px = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData content_copy_24px = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData create_group = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData cwtch_knott = IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData dark_mode_24px = IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData delete_24px = IconData(0xe813, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData dns_24px = IconData(0xe814, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData drag_indicator_24px = IconData(0xe815, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData edit_24px = IconData(0xe816, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData enable_experiments = IconData(0xe817, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData enable_groups = IconData(0xe818, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData eye_closed = IconData(0xe819, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData eye_open = IconData(0xe81a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData favorite_24dp = IconData(0xe81b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData favorite_black_24dp_broken = IconData(0xe81c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData favorite_black_24dp_brokenhalf = IconData(0xe81d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData favorite_black_24dp_malformed = IconData(0xe81e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData favorite_black_24dp_sad = IconData(0xe81f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData group_add_24px = IconData(0xe820, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData group_settings_24px = IconData(0xe821, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData groups_24px = IconData(0xe822, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData info_24px = IconData(0xe823, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData join_group = IconData(0xe824, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData list_black_24dp = IconData(0xe825, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData lock_open_24px = IconData(0xe826, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData lock_24px = IconData(0xe827, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData maps_ugc_24px = IconData(0xe828, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData menu_24px = IconData(0xe829, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData message_24px = IconData(0xe82a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData mood_24px = IconData(0xe82b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData more_vert_24px = IconData(0xe82c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData negative_heart_24px = IconData(0xe82d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData onion_off = IconData(0xe82e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData onion_on = IconData(0xe82f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData onion_waiting = IconData(0xe830, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData peer_history = IconData(0xe831, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData peer_settings_24px = IconData(0xe832, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData person_add_alt_1_24px = IconData(0xe833, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData person_add_24px = IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData person_24px = IconData(0xe835, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData push_pin_black_24dp = IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData push_pin_24px = IconData(0xe837, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData search_24px = IconData(0xe838, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData send_24px = IconData(0xe839, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData settings_24px = IconData(0xe83a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData signal_cellular_4_bar_24px = IconData(0xe83b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData signal_cellular_alt_24px = IconData(0xe83c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData signal_cellular_connected_no_internet_4_bar_24px = IconData(0xe83d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData signal_cellular_off_24px = IconData(0xe83e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData swap_horiz_24px = IconData(0xe83f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData sync_disabled_24px = IconData(0xe840, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData sync_problem_24px = IconData(0xe841, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData sync_24px = IconData(0xe842, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData syncing_01 = IconData(0xe843, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData syncing_02 = IconData(0xe844, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData syncing_03 = IconData(0xe845, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData toggle_on_24px = IconData(0xe846, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData vpn_key_24px = IconData(0xe847, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData account_blocked = IconData(0xe848, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData account_circle_24px = IconData(0xe849, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData account_circle_24px_lines = IconData(0xe84a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData account_circle_24px_lines_thin___blocked = IconData(0xe84b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData account_circle_24px_user = IconData(0xe84c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData add_circle_24px = IconData(0xe84d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData add_group = IconData(0xe84e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData add_peer = IconData(0xe84f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData add_24px = IconData(0xe850, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
}
|
|
@ -382,7 +382,7 @@ class MessageState extends ChangeNotifier {
|
|||
late String _inviteNick;
|
||||
late DateTime _timestamp;
|
||||
late String _senderOnion;
|
||||
late String _senderImage;
|
||||
String? _senderImage;
|
||||
late String _signature = "";
|
||||
late bool _ackd = false;
|
||||
late bool _error = false;
|
||||
|
@ -404,10 +404,10 @@ class MessageState extends ChangeNotifier {
|
|||
get timestamp => this._timestamp;
|
||||
bool get ackd => this._ackd;
|
||||
bool get error => this._error;
|
||||
get malformed => this._malformed;
|
||||
bool get malformed => this._malformed;
|
||||
bool get loaded => this._loaded;
|
||||
get senderOnion => this._senderOnion;
|
||||
get senderImage => this._senderImage;
|
||||
get loaded => this._loaded;
|
||||
get signature => this._signature;
|
||||
get isInvite => this.overlay == 100 || this.overlay == 101;
|
||||
get inviteTarget => this._inviteTarget;
|
||||
|
@ -423,13 +423,22 @@ class MessageState extends ChangeNotifier {
|
|||
notifyListeners();
|
||||
}
|
||||
|
||||
set malformed(bool newVal) {
|
||||
this._malformed = newVal;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
set loaded(bool newVal) {
|
||||
this._loaded = newVal;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void tryLoad(BuildContext context) {
|
||||
Provider.of<FlwtchState>(context, listen: false).cwtch.GetMessage(profileOnion, contactHandle, messageIndex).then((jsonMessage) {
|
||||
try {
|
||||
dynamic messageWrapper = jsonDecode(jsonMessage);
|
||||
if (messageWrapper['Message'] == null || messageWrapper['Message'] == '' || messageWrapper['Message'] == '{}') {
|
||||
this._senderOnion = profileOnion;
|
||||
//todo: remove once sent group messages are prestored
|
||||
Future.delayed(const Duration(milliseconds: 2), () {
|
||||
tryLoad(context);
|
||||
});
|
||||
|
@ -463,7 +472,7 @@ class MessageState extends ChangeNotifier {
|
|||
}
|
||||
}
|
||||
|
||||
this._loaded = true;
|
||||
this.loaded = true;
|
||||
|
||||
//update ackd and error last as they are changenotified
|
||||
this.ackd = messageWrapper['Acknowledged'];
|
||||
|
@ -471,7 +480,9 @@ class MessageState extends ChangeNotifier {
|
|||
this.error = true;
|
||||
}
|
||||
} catch (e) {
|
||||
this._malformed = true;
|
||||
this._overlay = -1;
|
||||
this.loaded = true;
|
||||
this.malformed = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:cwtch/errorHandler.dart';
|
||||
|
@ -80,7 +81,7 @@ class _AddContactViewState extends State<AddContactView> {
|
|||
return TabBar(
|
||||
tabs: [
|
||||
Tab(
|
||||
icon: Icon(Icons.person_add_rounded),
|
||||
icon: Icon(CwtchIcons.add_peer),
|
||||
text: AppLocalizations.of(context)!.addPeer,
|
||||
),
|
||||
],
|
||||
|
@ -92,11 +93,11 @@ class _AddContactViewState extends State<AddContactView> {
|
|||
return TabBar(
|
||||
tabs: [
|
||||
Tab(
|
||||
icon: Icon(Icons.person_add_rounded),
|
||||
icon: Icon(CwtchIcons.add_peer),
|
||||
text: AppLocalizations.of(context)!.tooltipAddContact,
|
||||
),
|
||||
//Tab(icon: Icon(Icons.backup), text: AppLocalizations.of(context)!.titleManageServers),
|
||||
Tab(icon: Icon(Icons.group), text: AppLocalizations.of(context)!.createGroup),
|
||||
Tab(icon: Icon(CwtchIcons.add_group), text: AppLocalizations.of(context)!.createGroup),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
@ -99,6 +99,7 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
|
|||
),
|
||||
CwtchTextField(
|
||||
controller: ctrlrNick,
|
||||
autofocus: true,
|
||||
labelText: AppLocalizations.of(context)!.yourDisplayName,
|
||||
validator: (value) {
|
||||
if (value.isEmpty) {
|
||||
|
@ -167,7 +168,7 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
|
|||
height: 20,
|
||||
),
|
||||
])),
|
||||
CwtchLabel(label: AppLocalizations.of(context)!.password1Label),
|
||||
CwtchLabel(label: AppLocalizations.of(context)!.newPassword),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cwtch/views/torstatusview.dart';
|
||||
import 'package:cwtch/widgets/contactrow.dart';
|
||||
|
@ -66,7 +67,7 @@ class _ContactsViewState extends State<ContactsView> {
|
|||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: _pushAddContact,
|
||||
tooltip: AppLocalizations.of(context)!.tooltipAddContact,
|
||||
child: const Icon(Icons.person_add_sharp),
|
||||
child: const Icon(CwtchIcons.person_add_alt_1_24px),
|
||||
),
|
||||
body: showSearchBar || Provider.of<ContactListState>(context).isFiltered ? _buildFilterable() : _buildContactList());
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cwtch/opaque.dart';
|
||||
|
@ -46,7 +47,7 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
child: Column(children: [
|
||||
ListTile(
|
||||
title: Text(AppLocalizations.of(context)!.settingLanguage, style: TextStyle(color: settings.current().mainTextColor())),
|
||||
leading: Icon(Icons.language, color: settings.current().mainTextColor()),
|
||||
leading: Icon(CwtchIcons.change_language, color: settings.current().mainTextColor()),
|
||||
trailing: DropdownButton(
|
||||
value: Provider.of<Settings>(context).locale.languageCode,
|
||||
onChanged: (String? newValue) {
|
||||
|
@ -74,7 +75,9 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
// Save Settings...
|
||||
saveSettings(context);
|
||||
},
|
||||
secondary: Icon(Icons.lightbulb_outline, color: settings.current().mainTextColor()),
|
||||
activeTrackColor: settings.theme.defaultButtonActiveColor(),
|
||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
|
||||
secondary: Icon(CwtchIcons.change_theme, color: settings.current().mainTextColor()),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(/*AppLocalizations.of(context)!.settingLanguage*/ "UI Columns", style: TextStyle(color: settings.current().mainTextColor())),
|
||||
|
@ -111,7 +114,9 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
// Save Settings...
|
||||
saveSettings(context);
|
||||
},
|
||||
secondary: Icon(Icons.app_blocking, color: settings.current().mainTextColor()),
|
||||
activeTrackColor: settings.theme.defaultButtonActiveColor(),
|
||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
|
||||
secondary: Icon(CwtchIcons.block_unknown, color: settings.current().mainTextColor()),
|
||||
),
|
||||
SwitchListTile(
|
||||
title: Text(AppLocalizations.of(context)!.experimentsEnabled, style: TextStyle(color: settings.current().mainTextColor())),
|
||||
|
@ -126,7 +131,9 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
// Save Settings...
|
||||
saveSettings(context);
|
||||
},
|
||||
secondary: Icon(Icons.science, color: settings.current().mainTextColor()),
|
||||
activeTrackColor: settings.theme.defaultButtonActiveColor(),
|
||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
|
||||
secondary: Icon(CwtchIcons.enable_experiments, color: settings.current().mainTextColor()),
|
||||
),
|
||||
Visibility(
|
||||
visible: settings.experimentsEnabled,
|
||||
|
@ -145,7 +152,9 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
// Save Settings...
|
||||
saveSettings(context);
|
||||
},
|
||||
secondary: Icon(Icons.group_sharp, color: settings.current().mainTextColor()),
|
||||
activeTrackColor: settings.theme.defaultButtonActiveColor(),
|
||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
|
||||
secondary: Icon(CwtchIcons.enable_groups, color: settings.current().mainTextColor()),
|
||||
),
|
||||
],
|
||||
)),
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:cwtch/model.dart';
|
||||
import 'package:cwtch/widgets/buttontextfield.dart';
|
||||
|
@ -135,12 +136,12 @@ class _GroupSettingsViewState extends State<GroupSettingsView> {
|
|||
height: 20,
|
||||
),
|
||||
Tooltip(
|
||||
message: AppLocalizations.of(context)!.rejectGroupBtn,
|
||||
message: AppLocalizations.of(context)!.leaveGroup,
|
||||
child: ElevatedButton.icon(
|
||||
onPressed: () {
|
||||
showAlertDialog(context);
|
||||
},
|
||||
icon: Icon(Icons.delete),
|
||||
icon: Icon(CwtchIcons.delete_24px),
|
||||
label: Text(AppLocalizations.of(context)!.leaveGroup),
|
||||
))
|
||||
])
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cwtch/views/peersettingsview.dart';
|
||||
|
@ -49,7 +50,7 @@ class _MessageViewState extends State<MessageView> {
|
|||
//IconButton(icon: Icon(Icons.chat), onPressed: _pushContactSettings),
|
||||
//IconButton(icon: Icon(Icons.list), onPressed: _pushContactSettings),
|
||||
//IconButton(icon: Icon(Icons.push_pin), onPressed: _pushContactSettings),
|
||||
IconButton(icon: Icon(Icons.settings), tooltip: AppLocalizations.of(context)!.conversationSettings, onPressed: _pushContactSettings),
|
||||
IconButton(icon: Provider.of<ContactInfoState>(context, listen: false).isGroup == true ? Icon(CwtchIcons.group_settings_24px) : Icon(CwtchIcons.peer_settings_24px), tooltip: AppLocalizations.of(context)!.conversationSettings, onPressed: _pushContactSettings),
|
||||
],
|
||||
),
|
||||
body: Padding(padding: EdgeInsets.fromLTRB(8.0, 8.0, 8.0, 108.0), child: MessageList()),
|
||||
|
@ -138,7 +139,7 @@ class _MessageViewState extends State<MessageView> {
|
|||
tooltip: "Send a contact or group invite",
|
||||
onPressed: () => _modalSendInvitation(context)),
|
||||
suffixIcon: IconButton(
|
||||
icon: Icon(Icons.send, size: 24, color: Provider.of<Settings>(context).theme.mainTextColor()),
|
||||
icon: Icon(CwtchIcons.send_24px, size: 24, color: Provider.of<Settings>(context).theme.mainTextColor()),
|
||||
tooltip: "Send Message",
|
||||
onPressed: _sendMessage,
|
||||
),
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import 'dart:convert';
|
||||
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:cwtch/model.dart';
|
||||
import 'package:cwtch/widgets/buttontextfield.dart';
|
||||
|
@ -138,12 +139,14 @@ class _PeerSettingsViewState extends State<PeerSettingsView> {
|
|||
Provider.of<FlwtchState>(context, listen: false).cwtch.SendProfileEvent(profileOnion, setPeerAttributeJson);
|
||||
}
|
||||
},
|
||||
secondary: Icon(Icons.block, color: settings.current().mainTextColor()),
|
||||
activeTrackColor: settings.theme.defaultButtonActiveColor(),
|
||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
|
||||
secondary: Icon(CwtchIcons.block_peer, color: settings.current().mainTextColor()),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(AppLocalizations.of(context)!.savePeerHistory, style: TextStyle(color: settings.current().mainTextColor())),
|
||||
subtitle: Text(AppLocalizations.of(context)!.savePeerHistoryDescription),
|
||||
leading: Icon(Icons.history_sharp, color: settings.current().mainTextColor()),
|
||||
leading: Icon(CwtchIcons.peer_history, color: settings.current().mainTextColor()),
|
||||
trailing: DropdownButton(
|
||||
value: Provider.of<ContactInfoState>(context).savePeerHistory == "DefaultDeleteHistory"
|
||||
? AppLocalizations.of(context)!.dontSavePeerHistory
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cwtch/settings.dart';
|
||||
import 'package:cwtch/views/torstatusview.dart';
|
||||
|
@ -11,6 +12,7 @@ import 'package:provider/provider.dart';
|
|||
import '../main.dart';
|
||||
import '../model.dart';
|
||||
import '../opaque.dart';
|
||||
import '../torstatus.dart';
|
||||
import 'addeditprofileview.dart';
|
||||
import 'globalsettingsview.dart';
|
||||
|
||||
|
@ -57,10 +59,13 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
|
|||
Expanded(child: Text(AppLocalizations.of(context)!.titleManageProfiles, style: TextStyle(color: settings.current().mainTextColor())))
|
||||
]),
|
||||
actions: [
|
||||
IconButton(icon: TorIcon(), onPressed: _pushTorStatus),
|
||||
IconButton(icon: TorIcon(), onPressed: _pushTorStatus, tooltip: Provider.of<TorStatus>(context).progress == 100
|
||||
? AppLocalizations.of(context)!.networkStatusOnline
|
||||
: (Provider.of<TorStatus>(context).progress == 0 ? AppLocalizations.of(context)!.networkStatusDisconnected : AppLocalizations.of(context)!.networkStatusAttemptingTor),
|
||||
),
|
||||
IconButton(icon: Icon(Icons.bug_report_outlined), onPressed: _setLoggingLevelDebug),
|
||||
IconButton(
|
||||
icon: Icon(Icons.lock_open),
|
||||
icon: Icon(CwtchIcons.lock_open_24px),
|
||||
tooltip: AppLocalizations.of(context)!.tooltipUnlockProfiles,
|
||||
onPressed: _modalUnlockProfiles,
|
||||
),
|
||||
|
|
|
@ -133,7 +133,6 @@ class InvitationBubbleState extends State<InvitationBubble> {
|
|||
child: Row(children: [
|
||||
SelectableText(
|
||||
chrome,
|
||||
key: Key(myKey),
|
||||
focusNode: _focus,
|
||||
style: TextStyle(
|
||||
color: Provider.of<Settings>(context).theme.messageFromMeTextColor(),
|
||||
|
@ -161,7 +160,6 @@ class InvitationBubbleState extends State<InvitationBubble> {
|
|||
child: Row(children: [
|
||||
SelectableText(
|
||||
chrome,
|
||||
key: Key(myKey),
|
||||
focusNode: _focus,
|
||||
style: TextStyle(
|
||||
color: Provider.of<Settings>(context).theme.messageFromOtherTextColor(),
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:ffi';
|
||||
|
||||
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../settings.dart';
|
||||
|
||||
final Color malformedColor = Color(0xFFE85DA1);
|
||||
|
||||
|
@ -40,15 +36,10 @@ class MalformedBubbleState extends State<MalformedBubble> {
|
|||
widthFactor: 1,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(4),
|
||||
child: Image(
|
||||
image: AssetImage("assets/core/broken_heart_24.png"),
|
||||
filterQuality: FilterQuality.medium,
|
||||
// We need some theme specific blending here...we might want to consider making this a theme level attribute
|
||||
colorBlendMode: BlendMode.srcIn,
|
||||
color: Provider.of<Settings>(context).theme.mainTextColor(),
|
||||
isAntiAlias: false,
|
||||
width: 32,
|
||||
height: 32))),
|
||||
child: Icon(
|
||||
CwtchIcons.favorite_black_24dp_broken,
|
||||
size: 24,
|
||||
))),
|
||||
Center(
|
||||
widthFactor: 1.0,
|
||||
child: Column(
|
||||
|
|
|
@ -34,7 +34,7 @@ class _MessageRowState extends State<MessageRow> {
|
|||
Widget wdgBubble = Flexible(
|
||||
flex: 3,
|
||||
fit: FlexFit.loose,
|
||||
child: malformed ? MalformedBubble() : (Provider.of<MessageState>(context).loaded == true ? widgetForOverlay(Provider.of<MessageState>(context).overlay) : MessageLoadingBubble()));
|
||||
child: Provider.of<MessageState>(context).loaded == true ? widgetForOverlay(Provider.of<MessageState>(context).overlay) : MessageLoadingBubble());
|
||||
Widget wdgIcons = Icon(Icons.delete_forever_outlined, color: Provider.of<Settings>(context).theme.dropShadowColor());
|
||||
Widget wdgSpacer = Expanded(child: SizedBox(width: 60, height: 10));
|
||||
var widgetRow = <Widget>[];
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../settings.dart';
|
||||
|
@ -5,7 +6,7 @@ import '../settings.dart';
|
|||
// Provides a styled Password Input Field for use in Form Widgets.
|
||||
// Callers must provide a text controller, label helper text and a validator.
|
||||
class CwtchPasswordField extends StatefulWidget {
|
||||
CwtchPasswordField({required this.controller, required this.validator, this.action, this.autofocus = true});
|
||||
CwtchPasswordField({required this.controller, required this.validator, this.action, this.autofocus = false});
|
||||
final TextEditingController controller;
|
||||
final FormFieldValidator validator;
|
||||
final Function(String)? action;
|
||||
|
@ -43,7 +44,7 @@ class _CwtchTextFieldState extends State<CwtchPasswordField> {
|
|||
obscureText = !obscureText;
|
||||
});
|
||||
},
|
||||
icon: Icon((obscureText ? Icons.remove_red_eye : Icons.remove_red_eye_outlined), semanticLabel: label),
|
||||
icon: Icon((obscureText ? CwtchIcons.eye_closed : CwtchIcons.eye_open), semanticLabel: label),
|
||||
tooltip: label,
|
||||
color: theme.current().mainTextColor(),
|
||||
highlightColor: theme.current().defaultButtonColor(),
|
||||
|
|
|
@ -7,11 +7,12 @@ doNothing(String x) {}
|
|||
// Provides a styled Text Field for use in Form Widgets.
|
||||
// Callers must provide a text controller, label helper text and a validator.
|
||||
class CwtchTextField extends StatefulWidget {
|
||||
CwtchTextField({required this.controller, required this.labelText, this.validator = null, this.onChanged = doNothing});
|
||||
CwtchTextField({required this.controller, required this.labelText, this.validator = null, this.autofocus=false, this.onChanged = doNothing});
|
||||
final TextEditingController controller;
|
||||
final String labelText;
|
||||
final FormFieldValidator? validator;
|
||||
final Function(String) onChanged;
|
||||
final bool autofocus;
|
||||
|
||||
@override
|
||||
_CwtchTextFieldState createState() => _CwtchTextFieldState();
|
||||
|
@ -25,6 +26,7 @@ class _CwtchTextFieldState extends State<CwtchTextField> {
|
|||
controller: widget.controller,
|
||||
validator: widget.validator,
|
||||
onChanged: widget.onChanged,
|
||||
autofocus: widget.autofocus,
|
||||
decoration: InputDecoration(
|
||||
labelText: widget.labelText,
|
||||
labelStyle: TextStyle(color: theme.current().mainTextColor(), backgroundColor: theme.current().textfieldBackgroundColor()),
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
@ -16,14 +17,9 @@ class _TorIconState extends State<TorIcon> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return RepaintBoundary(
|
||||
child: Image(
|
||||
image: AssetImage(Provider.of<TorStatus>(context).progress == 0
|
||||
? "assets/core/Tor_OFF.png"
|
||||
: (Provider.of<TorStatus>(context).progress == 100 ? "assets/core/Tor_icon.png" : "assets/core/Tor_Booting_up.png")),
|
||||
// Color the onion per the text color...
|
||||
child: Icon(Provider.of<TorStatus>(context).progress == 0 ? CwtchIcons.onion_off : (Provider.of<TorStatus>(context).progress == 100 ? CwtchIcons.onion_on: CwtchIcons.onion_waiting),
|
||||
color: Provider.of<Settings>(context).theme.mainTextColor(),
|
||||
colorBlendMode: BlendMode.srcIn,
|
||||
semanticLabel: Provider.of<TorStatus>(context).progress == 100
|
||||
semanticLabel: Provider.of<TorStatus>(context).progress == 100
|
||||
? AppLocalizations.of(context)!.networkStatusOnline
|
||||
: (Provider.of<TorStatus>(context).progress == 0 ? AppLocalizations.of(context)!.networkStatusDisconnected : AppLocalizations.of(context)!.networkStatusAttemptingTor),
|
||||
));
|
||||
|
|
|
@ -95,6 +95,11 @@ flutter:
|
|||
- assets/profiles/
|
||||
- assets/servers/
|
||||
|
||||
fonts:
|
||||
- family: CwtchIcons
|
||||
fonts:
|
||||
- asset: assets/fonts/CwtchIcons.ttf
|
||||
|
||||
# To add custom fonts to your application, add a fonts section here,
|
||||
# in this "flutter" section. Each entry in this list should have a
|
||||
# "family" key with the font family name, and a "fonts" key with a
|
||||
|
|
Loading…
Reference in New Issue