mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: the settings view of path configuration is not displayed completely
This commit is contained in:
parent
515cd50ac4
commit
2006d35a50
@ -12,10 +12,22 @@ const String kSettingsLocationDefaultLocation =
|
||||
|
||||
class SettingsLocation {
|
||||
SettingsLocation({
|
||||
this.path,
|
||||
});
|
||||
String? path,
|
||||
}) : _path = path;
|
||||
|
||||
String? path;
|
||||
String? _path;
|
||||
|
||||
set path(String? path) {
|
||||
_path = path;
|
||||
}
|
||||
|
||||
String? get path {
|
||||
if (Platform.isMacOS) {
|
||||
// remove the prefix `/Volumes/Macintosh HD/Users/`
|
||||
return _path?.replaceFirst('/Volumes/Macintosh HD/Users', '');
|
||||
}
|
||||
return _path;
|
||||
}
|
||||
|
||||
SettingsLocation copyWith({String? path}) {
|
||||
return SettingsLocation(
|
||||
|
@ -40,6 +40,7 @@ class SettingsFileLocationCustomzierState
|
||||
title: FlowyText.regular(
|
||||
LocaleKeys.settings_files_defaultLocation.tr(),
|
||||
fontSize: 15.0,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
subtitle: Tooltip(
|
||||
message: LocaleKeys.settings_files_doubleTapToCopy.tr(),
|
||||
@ -52,6 +53,7 @@ class SettingsFileLocationCustomzierState
|
||||
child: FlowyText.regular(
|
||||
state.path ?? '',
|
||||
fontSize: 10.0,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user