forked from cwtch.im/cwtch-ui
Padding / Margin Changes + Tor Circuit Info
This commit is contained in:
parent
7b5a18577a
commit
78eee62b3c
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "de",
|
||||
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||
"@@last_modified": "2022-01-14T22:08:34+01:00",
|
||||
"fileSharingSettingsDownloadFolderTooltip": "Browse to select a different default folder for downloaded files.",
|
||||
"fileSharingSettingsDownloadFolderDescription": "When files are downloaded automatically (e.g. image files, when image previews are enabled) a default location to download the files to is needed.",
|
||||
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "en",
|
||||
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||
"@@last_modified": "2022-01-14T22:08:34+01:00",
|
||||
"fileSharingSettingsDownloadFolderTooltip": "Browse to select a different default folder for downloaded files.",
|
||||
"fileSharingSettingsDownloadFolderDescription": "When files are downloaded automatically (e.g. image files, when image previews are enabled) a default location to download the files to is needed.",
|
||||
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||
"settingTheme": "Use Light Themes",
|
||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "es",
|
||||
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||
"@@last_modified": "2022-01-14T22:08:34+01:00",
|
||||
"fileSharingSettingsDownloadFolderTooltip": "Browse to select a different default folder for downloaded files.",
|
||||
"fileSharingSettingsDownloadFolderDescription": "When files are downloaded automatically (e.g. image files, when image previews are enabled) a default location to download the files to is needed.",
|
||||
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "fr",
|
||||
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||
"@@last_modified": "2022-01-14T22:08:34+01:00",
|
||||
"fileSharingSettingsDownloadFolderTooltip": "Browse to select a different default folder for downloaded files.",
|
||||
"fileSharingSettingsDownloadFolderDescription": "When files are downloaded automatically (e.g. image files, when image previews are enabled) a default location to download the files to is needed.",
|
||||
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "it",
|
||||
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||
"@@last_modified": "2022-01-14T22:08:34+01:00",
|
||||
"fileSharingSettingsDownloadFolderTooltip": "Browse to select a different default folder for downloaded files.",
|
||||
"fileSharingSettingsDownloadFolderDescription": "When files are downloaded automatically (e.g. image files, when image previews are enabled) a default location to download the files to is needed.",
|
||||
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "pl",
|
||||
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||
"@@last_modified": "2022-01-14T22:08:34+01:00",
|
||||
"fileSharingSettingsDownloadFolderTooltip": "Browse to select a different default folder for downloaded files.",
|
||||
"fileSharingSettingsDownloadFolderDescription": "When files are downloaded automatically (e.g. image files, when image previews are enabled) a default location to download the files to is needed.",
|
||||
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "pt",
|
||||
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||
"@@last_modified": "2022-01-14T22:08:34+01:00",
|
||||
"fileSharingSettingsDownloadFolderTooltip": "Browse to select a different default folder for downloaded files.",
|
||||
"fileSharingSettingsDownloadFolderDescription": "When files are downloaded automatically (e.g. image files, when image previews are enabled) a default location to download the files to is needed.",
|
||||
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||
"torSettingsUseCustomTorServiceConfigurastionDescription": "Override the default tor configuration. Warning: This could be dangerous. Only turn this on if you know what you are doing.",
|
||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "ru",
|
||||
"@@last_modified": "2022-01-12T23:54:51+01:00",
|
||||
"@@last_modified": "2022-01-14T22:08:34+01:00",
|
||||
"fileSharingSettingsDownloadFolderTooltip": "Browse to select a different default folder for downloaded files.",
|
||||
"fileSharingSettingsDownloadFolderDescription": "When files are downloaded automatically (e.g. image files, when image previews are enabled) a default location to download the files to is needed.",
|
||||
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||
"msgAddToAccept": "Добавьте учетную запись в контакты, чтобы принять этот файл.",
|
||||
"btnSendFile": "Отправить файл",
|
||||
|
|
|
@ -176,7 +176,7 @@ ThemeData mkThemeData(Settings opaque) {
|
|||
splashFactory: InkRipple.splashFactory,
|
||||
padding: MaterialStateProperty.all(EdgeInsets.all(20)),
|
||||
shape: MaterialStateProperty.all(RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(18.0),
|
||||
borderRadius: BorderRadius.circular(6.0),
|
||||
)),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -109,6 +109,7 @@ class _ContactsViewState extends State<ContactsView> {
|
|||
actions.add(IconButton(
|
||||
icon: Icon(CwtchIcons.address_copy_2),
|
||||
tooltip: AppLocalizations.of(context)!.copyAddress,
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
onPressed: () {
|
||||
Clipboard.setData(new ClipboardData(text: Provider.of<ProfileInfoState>(context, listen: false).onion));
|
||||
}));
|
||||
|
@ -118,6 +119,7 @@ class _ContactsViewState extends State<ContactsView> {
|
|||
actions.add(IconButton(
|
||||
icon: Icon(CwtchIcons.dns_24px),
|
||||
tooltip: AppLocalizations.of(context)!.manageKnownServersButton,
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
onPressed: () {
|
||||
_pushServers();
|
||||
}));
|
||||
|
@ -127,6 +129,7 @@ class _ContactsViewState extends State<ContactsView> {
|
|||
actions.add(IconButton(
|
||||
// need both conditions for displaying initial empty textfield and also allowing filters to be cleared if this widget gets lost/reset
|
||||
icon: Icon(showSearchBar || Provider.of<ContactListState>(context).isFiltered ? Icons.search_off : Icons.search),
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
onPressed: () {
|
||||
Provider.of<ContactListState>(context, listen: false).filter = "";
|
||||
setState(() {
|
||||
|
|
|
@ -280,32 +280,36 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
child: CwtchFolderPicker(
|
||||
label: AppLocalizations.of(context)!.settingDownloadFolder,
|
||||
initialValue: settings.downloadPath,
|
||||
description: AppLocalizations.of(context)!.fileSharingSettingsDownloadFolderDescription,
|
||||
tooltip: AppLocalizations.of(context)!.fileSharingSettingsDownloadFolderTooltip,
|
||||
onSave: (newVal) {
|
||||
settings.downloadPath = newVal;
|
||||
saveSettings(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
SwitchListTile(
|
||||
title: Text(AppLocalizations.of(context)!.enableExperimentClickableLinks, style: TextStyle(color: settings.current().mainTextColor)),
|
||||
subtitle: Text(AppLocalizations.of(context)!.experimentClickableLinksDescription),
|
||||
value: settings.isExperimentEnabled(ClickableLinksExperiment),
|
||||
onChanged: (bool value) {
|
||||
if (value) {
|
||||
settings.enableExperiment(ClickableLinksExperiment);
|
||||
} else {
|
||||
settings.disableExperiment(ClickableLinksExperiment);
|
||||
}
|
||||
saveSettings(context);
|
||||
},
|
||||
activeTrackColor: settings.theme.defaultButtonActiveColor,
|
||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
|
||||
secondary: Icon(Icons.link, color: settings.current().mainTextColor),
|
||||
),
|
||||
]),
|
||||
),
|
||||
],
|
||||
)),
|
||||
Visibility(
|
||||
visible: settings.experimentsEnabled,
|
||||
child: SwitchListTile(
|
||||
title: Text(AppLocalizations.of(context)!.enableExperimentClickableLinks, style: TextStyle(color: settings.current().mainTextColor)),
|
||||
subtitle: Text(AppLocalizations.of(context)!.experimentClickableLinksDescription),
|
||||
value: settings.isExperimentEnabled(ClickableLinksExperiment),
|
||||
onChanged: (bool value) {
|
||||
if (value) {
|
||||
settings.enableExperiment(ClickableLinksExperiment);
|
||||
} else {
|
||||
settings.disableExperiment(ClickableLinksExperiment);
|
||||
}
|
||||
saveSettings(context);
|
||||
},
|
||||
activeTrackColor: settings.theme.defaultButtonActiveColor,
|
||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
|
||||
secondary: Icon(Icons.link, color: settings.current().mainTextColor),
|
||||
)),
|
||||
AboutListTile(
|
||||
icon: appIcon,
|
||||
applicationIcon: Padding(padding: EdgeInsets.all(5), child: Icon(CwtchIcons.cwtch_knott)),
|
||||
|
|
|
@ -85,6 +85,7 @@ class _MessageViewState extends State<MessageView> {
|
|||
if (Provider.of<ContactInfoState>(context).isOnline()) {
|
||||
if (showFileSharing) {
|
||||
appBarButtons.add(IconButton(
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
icon: Icon(Icons.attach_file, size: 24),
|
||||
tooltip: AppLocalizations.of(context)!.tooltipSendFile,
|
||||
onPressed: () {
|
||||
|
@ -93,6 +94,7 @@ class _MessageViewState extends State<MessageView> {
|
|||
));
|
||||
}
|
||||
appBarButtons.add(IconButton(
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
icon: Icon(CwtchIcons.send_invite, size: 24),
|
||||
tooltip: AppLocalizations.of(context)!.sendInvite,
|
||||
onPressed: () {
|
||||
|
@ -100,6 +102,7 @@ class _MessageViewState extends State<MessageView> {
|
|||
}));
|
||||
}
|
||||
appBarButtons.add(IconButton(
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
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));
|
||||
|
@ -263,6 +266,7 @@ class _MessageViewState extends State<MessageView> {
|
|||
focusedBorder: InputBorder.none,
|
||||
enabled: true,
|
||||
suffixIcon: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(padding: EdgeInsets.all(0.0), shape: new RoundedRectangleBorder(borderRadius: new BorderRadius.circular(45.0))),
|
||||
child: Icon(CwtchIcons.send_24px, size: 24, color: Provider.of<Settings>(context).theme.defaultButtonTextColor),
|
||||
onPressed: isOffline ? null : _sendMessage,
|
||||
))),
|
||||
|
@ -291,6 +295,7 @@ class _MessageViewState extends State<MessageView> {
|
|||
alignment: Alignment.topRight,
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.highlight_remove),
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
tooltip: AppLocalizations.of(context)!.tooltipRemoveThisQuotedMessage,
|
||||
onPressed: () {
|
||||
Provider.of<AppState>(context, listen: false).selectedIndex = null;
|
||||
|
|
|
@ -83,6 +83,7 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
|
|||
actions.add(IconButton(
|
||||
icon: TorIcon(),
|
||||
onPressed: _pushTorStatus,
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
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),
|
||||
|
@ -93,6 +94,7 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
|
|||
// Unlock Profiles
|
||||
actions.add(IconButton(
|
||||
icon: Icon(CwtchIcons.lock_open_24px),
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
color: Provider.of<ProfileListState>(context).profiles.isEmpty ? Provider.of<Settings>(context).theme.defaultButtonColor : Provider.of<Settings>(context).theme.mainTextColor,
|
||||
tooltip: AppLocalizations.of(context)!.tooltipUnlockProfiles,
|
||||
onPressed: _modalUnlockProfiles,
|
||||
|
@ -100,14 +102,15 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
|
|||
|
||||
// Servers
|
||||
if (Provider.of<Settings>(context).isExperimentEnabled(ServerManagementExperiment) && !Platform.isAndroid && !Platform.isIOS) {
|
||||
actions.add(IconButton(icon: Icon(CwtchIcons.dns_black_24dp), tooltip: AppLocalizations.of(context)!.serversManagerTitleShort, onPressed: _pushServers));
|
||||
actions.add(
|
||||
IconButton(icon: Icon(CwtchIcons.dns_black_24dp), splashRadius: Material.defaultSplashRadius / 2, tooltip: AppLocalizations.of(context)!.serversManagerTitleShort, onPressed: _pushServers));
|
||||
}
|
||||
|
||||
// Global Settings
|
||||
actions.add(IconButton(icon: Icon(Icons.settings), tooltip: AppLocalizations.of(context)!.tooltipOpenSettings, onPressed: _pushGlobalSettings));
|
||||
actions.add(IconButton(icon: Icon(Icons.settings), tooltip: AppLocalizations.of(context)!.tooltipOpenSettings, splashRadius: Material.defaultSplashRadius / 2, onPressed: _pushGlobalSettings));
|
||||
|
||||
// shutdown cwtch
|
||||
actions.add(IconButton(icon: Icon(Icons.close), tooltip: AppLocalizations.of(context)!.shutdownCwtchTooltip, onPressed: _modalShutdown));
|
||||
actions.add(IconButton(icon: Icon(Icons.close), tooltip: AppLocalizations.of(context)!.shutdownCwtchTooltip, splashRadius: Material.defaultSplashRadius / 2, onPressed: _modalShutdown));
|
||||
|
||||
return actions;
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ class _CwtchButtonTextFieldState extends State<CwtchButtonTextField> {
|
|||
suffixIcon: IconButton(
|
||||
onPressed: widget.onPressed,
|
||||
icon: widget.icon,
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
padding: EdgeInsets.fromLTRB(0.0, 4.0, 2.0, 2.0),
|
||||
tooltip: widget.tooltip,
|
||||
enableFeedback: true,
|
||||
|
@ -56,15 +57,15 @@ class _CwtchButtonTextFieldState extends State<CwtchButtonTextField> {
|
|||
floatingLabelBehavior: FloatingLabelBehavior.never,
|
||||
filled: true,
|
||||
fillColor: theme.current().textfieldBackgroundColor,
|
||||
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0)),
|
||||
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
||||
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
||||
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 1.0)),
|
||||
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 1.0)),
|
||||
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 1.0)),
|
||||
errorStyle: TextStyle(
|
||||
color: theme.current().textfieldErrorColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
|
||||
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0))),
|
||||
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 1.0))),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ class _ContactRowState extends State<ContactRow> {
|
|||
? Wrap(direction: Axis.vertical, children: <Widget>[
|
||||
IconButton(
|
||||
padding: EdgeInsets.zero,
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
iconSize: 16,
|
||||
icon: Icon(
|
||||
Icons.favorite,
|
||||
|
@ -88,6 +89,7 @@ class _ContactRowState extends State<ContactRow> {
|
|||
),
|
||||
IconButton(
|
||||
padding: EdgeInsets.zero,
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
iconSize: 16,
|
||||
icon: Icon(Icons.delete, color: Provider.of<Settings>(context).theme.mainTextColor),
|
||||
tooltip: AppLocalizations.of(context)!.tooltipRejectContactRequest,
|
||||
|
@ -97,6 +99,7 @@ class _ContactRowState extends State<ContactRow> {
|
|||
: (contact.isBlocked != null && contact.isBlocked
|
||||
? IconButton(
|
||||
padding: EdgeInsets.zero,
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
iconSize: 16,
|
||||
icon: Icon(Icons.block, color: Provider.of<Settings>(context).theme.mainTextColor),
|
||||
onPressed: () {},
|
||||
|
|
|
@ -1,16 +1,21 @@
|
|||
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:file_picker_desktop/file_picker_desktop.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../settings.dart';
|
||||
import 'buttontextfield.dart';
|
||||
import 'cwtchlabel.dart';
|
||||
|
||||
class CwtchFolderPicker extends StatefulWidget {
|
||||
final String label;
|
||||
final String initialValue;
|
||||
final String tooltip;
|
||||
final String description;
|
||||
final Function(String)? onSave;
|
||||
const CwtchFolderPicker({Key? key, this.label = "", this.initialValue = "", this.onSave}) : super(key: key);
|
||||
const CwtchFolderPicker({Key? key, this.label = "", this.tooltip = "", this.initialValue = "", this.onSave, this.description = ""}) : super(key: key);
|
||||
|
||||
@override
|
||||
_CwtchFolderPickerState createState() => _CwtchFolderPickerState();
|
||||
|
@ -27,41 +32,38 @@ class _CwtchFolderPickerState extends State<CwtchFolderPicker> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: EdgeInsets.all(10),
|
||||
padding: EdgeInsets.all(2),
|
||||
child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
CwtchLabel(label: widget.label),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
CwtchButtonTextField(
|
||||
controller: ctrlrVal,
|
||||
readonly: Platform.isAndroid,
|
||||
onPressed: () async {
|
||||
if (Platform.isAndroid) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
var selectedDirectory = await getDirectoryPath();
|
||||
if (selectedDirectory != null) {
|
||||
//File directory = File(selectedDirectory);
|
||||
selectedDirectory += "/";
|
||||
ctrlrVal.text = selectedDirectory;
|
||||
if (widget.onSave != null) {
|
||||
widget.onSave!(selectedDirectory);
|
||||
}
|
||||
} else {
|
||||
// User canceled the picker
|
||||
return ListTile(
|
||||
leading: Icon(Icons.file_download, color: Provider.of<Settings>(context).theme.messageFromMeTextColor, size: 16),
|
||||
title: Text(widget.label),
|
||||
subtitle: Text(widget.description),
|
||||
trailing: Container(
|
||||
width: 200,
|
||||
child: CwtchButtonTextField(
|
||||
controller: ctrlrVal,
|
||||
readonly: Platform.isAndroid,
|
||||
onPressed: () async {
|
||||
if (Platform.isAndroid) {
|
||||
return;
|
||||
}
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
},
|
||||
icon: Icon(Icons.folder),
|
||||
tooltip: "Browse", //todo: l18n
|
||||
)
|
||||
]));
|
||||
|
||||
try {
|
||||
var selectedDirectory = await getDirectoryPath();
|
||||
if (selectedDirectory != null) {
|
||||
//File directory = File(selectedDirectory);
|
||||
selectedDirectory += "/";
|
||||
ctrlrVal.text = selectedDirectory;
|
||||
if (widget.onSave != null) {
|
||||
widget.onSave!(selectedDirectory);
|
||||
}
|
||||
} else {
|
||||
// User canceled the picker
|
||||
}
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
},
|
||||
icon: Icon(Icons.folder),
|
||||
tooltip: widget.tooltip, //todo: l18n
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,6 +85,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
|
|||
maintainInteractivity: false,
|
||||
child: IconButton(
|
||||
tooltip: AppLocalizations.of(context)!.tooltipReplyToThisMessage,
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
onPressed: () {
|
||||
Provider.of<AppState>(context, listen: false).selectedIndex = Provider.of<MessageMetadata>(context, listen: false).messageID;
|
||||
},
|
||||
|
|
|
@ -37,6 +37,7 @@ class _CwtchTextFieldState extends State<CwtchPasswordField> {
|
|||
controller: widget.controller,
|
||||
validator: widget.validator,
|
||||
obscureText: obscureText,
|
||||
obscuringCharacter: '*',
|
||||
enableIMEPersonalizedLearning: false,
|
||||
autofillHints: widget.autoFillHints,
|
||||
autovalidateMode: AutovalidateMode.always,
|
||||
|
@ -57,17 +58,18 @@ class _CwtchTextFieldState extends State<CwtchPasswordField> {
|
|||
highlightColor: theme.current().defaultButtonColor,
|
||||
focusColor: theme.current().defaultButtonActiveColor,
|
||||
splashColor: theme.current().defaultButtonActiveColor,
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
color: theme.current().textfieldErrorColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0)),
|
||||
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
||||
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
||||
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 1.0)),
|
||||
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 1.0)),
|
||||
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 1.0)),
|
||||
filled: true,
|
||||
fillColor: theme.current().textfieldBackgroundColor,
|
||||
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0)),
|
||||
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 1.0)),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
|
|
@ -59,6 +59,7 @@ class _ProfileRowState extends State<ProfileRow> {
|
|||
)),
|
||||
IconButton(
|
||||
enableFeedback: true,
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
tooltip: AppLocalizations.of(context)!.editProfile + " " + profile.nickname,
|
||||
icon: Icon(Icons.create, color: Provider.of<Settings>(context).current().mainTextColor),
|
||||
onPressed: () {
|
||||
|
|
|
@ -57,6 +57,7 @@ class _ServerRowState extends State<ServerRow> {
|
|||
// Copy server button
|
||||
IconButton(
|
||||
enableFeedback: true,
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
tooltip: AppLocalizations.of(context)!.copyServerKeys,
|
||||
icon: Icon(CwtchIcons.address_copy_2, color: Provider.of<Settings>(context).current().mainTextColor),
|
||||
onPressed: () {
|
||||
|
@ -67,6 +68,7 @@ class _ServerRowState extends State<ServerRow> {
|
|||
// Edit button
|
||||
IconButton(
|
||||
enableFeedback: true,
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
tooltip: AppLocalizations.of(context)!.editServerTitle,
|
||||
icon: Icon(Icons.create, color: Provider.of<Settings>(context).current().mainTextColor),
|
||||
onPressed: () {
|
||||
|
|
|
@ -61,13 +61,13 @@ class _CwtchTextFieldState extends State<CwtchTextField> {
|
|||
hintText: widget.hintText,
|
||||
floatingLabelBehavior: FloatingLabelBehavior.never,
|
||||
filled: true,
|
||||
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0)),
|
||||
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
||||
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
||||
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 1.0)),
|
||||
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 1.0)),
|
||||
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 1.0)),
|
||||
errorStyle: TextStyle(color: theme.current().textfieldErrorColor, fontWeight: FontWeight.bold, overflow: TextOverflow.visible),
|
||||
fillColor: theme.current().textfieldBackgroundColor,
|
||||
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
|
||||
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0))),
|
||||
contentPadding: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
|
||||
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 1.0))),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue