Padding / Margin Changes + Tor Circuit Info
continuous-integration/drone/pr Build is pending
Details
continuous-integration/drone/pr Build is pending
Details
This commit is contained in:
parent
7b5a18577a
commit
78eee62b3c
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "de",
|
"@@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",
|
"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.",
|
"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)",
|
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "en",
|
"@@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",
|
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||||
"settingTheme": "Use Light Themes",
|
"settingTheme": "Use Light Themes",
|
||||||
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "es",
|
"@@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",
|
"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.",
|
"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)",
|
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "fr",
|
"@@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",
|
"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.",
|
"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)",
|
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "it",
|
"@@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",
|
"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.",
|
"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)",
|
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pl",
|
"@@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",
|
"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.",
|
"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)",
|
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pt",
|
"@@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",
|
"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.",
|
"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)",
|
"torSettingsUseCustomTorServiceConfiguration": "Use a Custom Tor Service Configuration (torrc)",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "ru",
|
"@@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",
|
"torSettingsErrorSettingPort": "Port Number must be between 1 and 65535",
|
||||||
"msgAddToAccept": "Добавьте учетную запись в контакты, чтобы принять этот файл.",
|
"msgAddToAccept": "Добавьте учетную запись в контакты, чтобы принять этот файл.",
|
||||||
"btnSendFile": "Отправить файл",
|
"btnSendFile": "Отправить файл",
|
||||||
|
|
|
@ -176,7 +176,7 @@ ThemeData mkThemeData(Settings opaque) {
|
||||||
splashFactory: InkRipple.splashFactory,
|
splashFactory: InkRipple.splashFactory,
|
||||||
padding: MaterialStateProperty.all(EdgeInsets.all(20)),
|
padding: MaterialStateProperty.all(EdgeInsets.all(20)),
|
||||||
shape: MaterialStateProperty.all(RoundedRectangleBorder(
|
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(
|
actions.add(IconButton(
|
||||||
icon: Icon(CwtchIcons.address_copy_2),
|
icon: Icon(CwtchIcons.address_copy_2),
|
||||||
tooltip: AppLocalizations.of(context)!.copyAddress,
|
tooltip: AppLocalizations.of(context)!.copyAddress,
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Clipboard.setData(new ClipboardData(text: Provider.of<ProfileInfoState>(context, listen: false).onion));
|
Clipboard.setData(new ClipboardData(text: Provider.of<ProfileInfoState>(context, listen: false).onion));
|
||||||
}));
|
}));
|
||||||
|
@ -118,6 +119,7 @@ class _ContactsViewState extends State<ContactsView> {
|
||||||
actions.add(IconButton(
|
actions.add(IconButton(
|
||||||
icon: Icon(CwtchIcons.dns_24px),
|
icon: Icon(CwtchIcons.dns_24px),
|
||||||
tooltip: AppLocalizations.of(context)!.manageKnownServersButton,
|
tooltip: AppLocalizations.of(context)!.manageKnownServersButton,
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_pushServers();
|
_pushServers();
|
||||||
}));
|
}));
|
||||||
|
@ -127,6 +129,7 @@ class _ContactsViewState extends State<ContactsView> {
|
||||||
actions.add(IconButton(
|
actions.add(IconButton(
|
||||||
// need both conditions for displaying initial empty textfield and also allowing filters to be cleared if this widget gets lost/reset
|
// 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),
|
icon: Icon(showSearchBar || Provider.of<ContactListState>(context).isFiltered ? Icons.search_off : Icons.search),
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Provider.of<ContactListState>(context, listen: false).filter = "";
|
Provider.of<ContactListState>(context, listen: false).filter = "";
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
|
@ -280,32 +280,36 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
||||||
child: CwtchFolderPicker(
|
child: CwtchFolderPicker(
|
||||||
label: AppLocalizations.of(context)!.settingDownloadFolder,
|
label: AppLocalizations.of(context)!.settingDownloadFolder,
|
||||||
initialValue: settings.downloadPath,
|
initialValue: settings.downloadPath,
|
||||||
|
description: AppLocalizations.of(context)!.fileSharingSettingsDownloadFolderDescription,
|
||||||
|
tooltip: AppLocalizations.of(context)!.fileSharingSettingsDownloadFolderTooltip,
|
||||||
onSave: (newVal) {
|
onSave: (newVal) {
|
||||||
settings.downloadPath = newVal;
|
settings.downloadPath = newVal;
|
||||||
saveSettings(context);
|
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(
|
AboutListTile(
|
||||||
icon: appIcon,
|
icon: appIcon,
|
||||||
applicationIcon: Padding(padding: EdgeInsets.all(5), child: Icon(CwtchIcons.cwtch_knott)),
|
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 (Provider.of<ContactInfoState>(context).isOnline()) {
|
||||||
if (showFileSharing) {
|
if (showFileSharing) {
|
||||||
appBarButtons.add(IconButton(
|
appBarButtons.add(IconButton(
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
icon: Icon(Icons.attach_file, size: 24),
|
icon: Icon(Icons.attach_file, size: 24),
|
||||||
tooltip: AppLocalizations.of(context)!.tooltipSendFile,
|
tooltip: AppLocalizations.of(context)!.tooltipSendFile,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
@ -93,6 +94,7 @@ class _MessageViewState extends State<MessageView> {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
appBarButtons.add(IconButton(
|
appBarButtons.add(IconButton(
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
icon: Icon(CwtchIcons.send_invite, size: 24),
|
icon: Icon(CwtchIcons.send_invite, size: 24),
|
||||||
tooltip: AppLocalizations.of(context)!.sendInvite,
|
tooltip: AppLocalizations.of(context)!.sendInvite,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
@ -100,6 +102,7 @@ class _MessageViewState extends State<MessageView> {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
appBarButtons.add(IconButton(
|
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),
|
icon: Provider.of<ContactInfoState>(context, listen: false).isGroup == true ? Icon(CwtchIcons.group_settings_24px) : Icon(CwtchIcons.peer_settings_24px),
|
||||||
tooltip: AppLocalizations.of(context)!.conversationSettings,
|
tooltip: AppLocalizations.of(context)!.conversationSettings,
|
||||||
onPressed: _pushContactSettings));
|
onPressed: _pushContactSettings));
|
||||||
|
@ -263,6 +266,7 @@ class _MessageViewState extends State<MessageView> {
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
suffixIcon: ElevatedButton(
|
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),
|
child: Icon(CwtchIcons.send_24px, size: 24, color: Provider.of<Settings>(context).theme.defaultButtonTextColor),
|
||||||
onPressed: isOffline ? null : _sendMessage,
|
onPressed: isOffline ? null : _sendMessage,
|
||||||
))),
|
))),
|
||||||
|
@ -291,6 +295,7 @@ class _MessageViewState extends State<MessageView> {
|
||||||
alignment: Alignment.topRight,
|
alignment: Alignment.topRight,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: Icon(Icons.highlight_remove),
|
icon: Icon(Icons.highlight_remove),
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
tooltip: AppLocalizations.of(context)!.tooltipRemoveThisQuotedMessage,
|
tooltip: AppLocalizations.of(context)!.tooltipRemoveThisQuotedMessage,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Provider.of<AppState>(context, listen: false).selectedIndex = null;
|
Provider.of<AppState>(context, listen: false).selectedIndex = null;
|
||||||
|
|
|
@ -83,6 +83,7 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
|
||||||
actions.add(IconButton(
|
actions.add(IconButton(
|
||||||
icon: TorIcon(),
|
icon: TorIcon(),
|
||||||
onPressed: _pushTorStatus,
|
onPressed: _pushTorStatus,
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
tooltip: Provider.of<TorStatus>(context).progress == 100
|
tooltip: Provider.of<TorStatus>(context).progress == 100
|
||||||
? AppLocalizations.of(context)!.networkStatusOnline
|
? AppLocalizations.of(context)!.networkStatusOnline
|
||||||
: (Provider.of<TorStatus>(context).progress == 0 ? AppLocalizations.of(context)!.networkStatusDisconnected : AppLocalizations.of(context)!.networkStatusAttemptingTor),
|
: (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
|
// Unlock Profiles
|
||||||
actions.add(IconButton(
|
actions.add(IconButton(
|
||||||
icon: Icon(CwtchIcons.lock_open_24px),
|
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,
|
color: Provider.of<ProfileListState>(context).profiles.isEmpty ? Provider.of<Settings>(context).theme.defaultButtonColor : Provider.of<Settings>(context).theme.mainTextColor,
|
||||||
tooltip: AppLocalizations.of(context)!.tooltipUnlockProfiles,
|
tooltip: AppLocalizations.of(context)!.tooltipUnlockProfiles,
|
||||||
onPressed: _modalUnlockProfiles,
|
onPressed: _modalUnlockProfiles,
|
||||||
|
@ -100,14 +102,15 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
|
||||||
|
|
||||||
// Servers
|
// Servers
|
||||||
if (Provider.of<Settings>(context).isExperimentEnabled(ServerManagementExperiment) && !Platform.isAndroid && !Platform.isIOS) {
|
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
|
// 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
|
// 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;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ class _CwtchButtonTextFieldState extends State<CwtchButtonTextField> {
|
||||||
suffixIcon: IconButton(
|
suffixIcon: IconButton(
|
||||||
onPressed: widget.onPressed,
|
onPressed: widget.onPressed,
|
||||||
icon: widget.icon,
|
icon: widget.icon,
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
padding: EdgeInsets.fromLTRB(0.0, 4.0, 2.0, 2.0),
|
padding: EdgeInsets.fromLTRB(0.0, 4.0, 2.0, 2.0),
|
||||||
tooltip: widget.tooltip,
|
tooltip: widget.tooltip,
|
||||||
enableFeedback: true,
|
enableFeedback: true,
|
||||||
|
@ -56,15 +57,15 @@ class _CwtchButtonTextFieldState extends State<CwtchButtonTextField> {
|
||||||
floatingLabelBehavior: FloatingLabelBehavior.never,
|
floatingLabelBehavior: FloatingLabelBehavior.never,
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: theme.current().textfieldBackgroundColor,
|
fillColor: theme.current().textfieldBackgroundColor,
|
||||||
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0)),
|
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 1.0)),
|
||||||
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 1.0)),
|
||||||
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 1.0)),
|
||||||
errorStyle: TextStyle(
|
errorStyle: TextStyle(
|
||||||
color: theme.current().textfieldErrorColor,
|
color: theme.current().textfieldErrorColor,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
|
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>[
|
? Wrap(direction: Axis.vertical, children: <Widget>[
|
||||||
IconButton(
|
IconButton(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
iconSize: 16,
|
iconSize: 16,
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.favorite,
|
Icons.favorite,
|
||||||
|
@ -88,6 +89,7 @@ class _ContactRowState extends State<ContactRow> {
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
iconSize: 16,
|
iconSize: 16,
|
||||||
icon: Icon(Icons.delete, color: Provider.of<Settings>(context).theme.mainTextColor),
|
icon: Icon(Icons.delete, color: Provider.of<Settings>(context).theme.mainTextColor),
|
||||||
tooltip: AppLocalizations.of(context)!.tooltipRejectContactRequest,
|
tooltip: AppLocalizations.of(context)!.tooltipRejectContactRequest,
|
||||||
|
@ -97,6 +99,7 @@ class _ContactRowState extends State<ContactRow> {
|
||||||
: (contact.isBlocked != null && contact.isBlocked
|
: (contact.isBlocked != null && contact.isBlocked
|
||||||
? IconButton(
|
? IconButton(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
iconSize: 16,
|
iconSize: 16,
|
||||||
icon: Icon(Icons.block, color: Provider.of<Settings>(context).theme.mainTextColor),
|
icon: Icon(Icons.block, color: Provider.of<Settings>(context).theme.mainTextColor),
|
||||||
onPressed: () {},
|
onPressed: () {},
|
||||||
|
|
|
@ -1,16 +1,21 @@
|
||||||
|
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:file_picker_desktop/file_picker_desktop.dart';
|
import 'package:file_picker_desktop/file_picker_desktop.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
import '../settings.dart';
|
||||||
import 'buttontextfield.dart';
|
import 'buttontextfield.dart';
|
||||||
import 'cwtchlabel.dart';
|
import 'cwtchlabel.dart';
|
||||||
|
|
||||||
class CwtchFolderPicker extends StatefulWidget {
|
class CwtchFolderPicker extends StatefulWidget {
|
||||||
final String label;
|
final String label;
|
||||||
final String initialValue;
|
final String initialValue;
|
||||||
|
final String tooltip;
|
||||||
|
final String description;
|
||||||
final Function(String)? onSave;
|
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
|
@override
|
||||||
_CwtchFolderPickerState createState() => _CwtchFolderPickerState();
|
_CwtchFolderPickerState createState() => _CwtchFolderPickerState();
|
||||||
|
@ -27,41 +32,38 @@ class _CwtchFolderPickerState extends State<CwtchFolderPicker> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return ListTile(
|
||||||
margin: EdgeInsets.all(10),
|
leading: Icon(Icons.file_download, color: Provider.of<Settings>(context).theme.messageFromMeTextColor, size: 16),
|
||||||
padding: EdgeInsets.all(2),
|
title: Text(widget.label),
|
||||||
child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [
|
subtitle: Text(widget.description),
|
||||||
CwtchLabel(label: widget.label),
|
trailing: Container(
|
||||||
SizedBox(
|
width: 200,
|
||||||
height: 20,
|
child: CwtchButtonTextField(
|
||||||
),
|
controller: ctrlrVal,
|
||||||
CwtchButtonTextField(
|
readonly: Platform.isAndroid,
|
||||||
controller: ctrlrVal,
|
onPressed: () async {
|
||||||
readonly: Platform.isAndroid,
|
if (Platform.isAndroid) {
|
||||||
onPressed: () async {
|
return;
|
||||||
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
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
|
||||||
print(e);
|
try {
|
||||||
}
|
var selectedDirectory = await getDirectoryPath();
|
||||||
},
|
if (selectedDirectory != null) {
|
||||||
icon: Icon(Icons.folder),
|
//File directory = File(selectedDirectory);
|
||||||
tooltip: "Browse", //todo: l18n
|
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,
|
maintainInteractivity: false,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
tooltip: AppLocalizations.of(context)!.tooltipReplyToThisMessage,
|
tooltip: AppLocalizations.of(context)!.tooltipReplyToThisMessage,
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Provider.of<AppState>(context, listen: false).selectedIndex = Provider.of<MessageMetadata>(context, listen: false).messageID;
|
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,
|
controller: widget.controller,
|
||||||
validator: widget.validator,
|
validator: widget.validator,
|
||||||
obscureText: obscureText,
|
obscureText: obscureText,
|
||||||
|
obscuringCharacter: '*',
|
||||||
enableIMEPersonalizedLearning: false,
|
enableIMEPersonalizedLearning: false,
|
||||||
autofillHints: widget.autoFillHints,
|
autofillHints: widget.autoFillHints,
|
||||||
autovalidateMode: AutovalidateMode.always,
|
autovalidateMode: AutovalidateMode.always,
|
||||||
|
@ -57,17 +58,18 @@ class _CwtchTextFieldState extends State<CwtchPasswordField> {
|
||||||
highlightColor: theme.current().defaultButtonColor,
|
highlightColor: theme.current().defaultButtonColor,
|
||||||
focusColor: theme.current().defaultButtonActiveColor,
|
focusColor: theme.current().defaultButtonActiveColor,
|
||||||
splashColor: theme.current().defaultButtonActiveColor,
|
splashColor: theme.current().defaultButtonActiveColor,
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
),
|
),
|
||||||
errorStyle: TextStyle(
|
errorStyle: TextStyle(
|
||||||
color: theme.current().textfieldErrorColor,
|
color: theme.current().textfieldErrorColor,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0)),
|
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 1.0)),
|
||||||
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 1.0)),
|
||||||
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 1.0)),
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: theme.current().textfieldBackgroundColor,
|
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(
|
IconButton(
|
||||||
enableFeedback: true,
|
enableFeedback: true,
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
tooltip: AppLocalizations.of(context)!.editProfile + " " + profile.nickname,
|
tooltip: AppLocalizations.of(context)!.editProfile + " " + profile.nickname,
|
||||||
icon: Icon(Icons.create, color: Provider.of<Settings>(context).current().mainTextColor),
|
icon: Icon(Icons.create, color: Provider.of<Settings>(context).current().mainTextColor),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|
|
@ -57,6 +57,7 @@ class _ServerRowState extends State<ServerRow> {
|
||||||
// Copy server button
|
// Copy server button
|
||||||
IconButton(
|
IconButton(
|
||||||
enableFeedback: true,
|
enableFeedback: true,
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
tooltip: AppLocalizations.of(context)!.copyServerKeys,
|
tooltip: AppLocalizations.of(context)!.copyServerKeys,
|
||||||
icon: Icon(CwtchIcons.address_copy_2, color: Provider.of<Settings>(context).current().mainTextColor),
|
icon: Icon(CwtchIcons.address_copy_2, color: Provider.of<Settings>(context).current().mainTextColor),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
@ -67,6 +68,7 @@ class _ServerRowState extends State<ServerRow> {
|
||||||
// Edit button
|
// Edit button
|
||||||
IconButton(
|
IconButton(
|
||||||
enableFeedback: true,
|
enableFeedback: true,
|
||||||
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
tooltip: AppLocalizations.of(context)!.editServerTitle,
|
tooltip: AppLocalizations.of(context)!.editServerTitle,
|
||||||
icon: Icon(Icons.create, color: Provider.of<Settings>(context).current().mainTextColor),
|
icon: Icon(Icons.create, color: Provider.of<Settings>(context).current().mainTextColor),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|
|
@ -61,13 +61,13 @@ class _CwtchTextFieldState extends State<CwtchTextField> {
|
||||||
hintText: widget.hintText,
|
hintText: widget.hintText,
|
||||||
floatingLabelBehavior: FloatingLabelBehavior.never,
|
floatingLabelBehavior: FloatingLabelBehavior.never,
|
||||||
filled: true,
|
filled: true,
|
||||||
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0)),
|
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 1.0)),
|
||||||
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(6.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 1.0)),
|
||||||
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.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),
|
errorStyle: TextStyle(color: theme.current().textfieldErrorColor, fontWeight: FontWeight.bold, overflow: TextOverflow.visible),
|
||||||
fillColor: theme.current().textfieldBackgroundColor,
|
fillColor: theme.current().textfieldBackgroundColor,
|
||||||
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
|
contentPadding: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.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))),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue