mirror of
https://github.com/AppFlowy-IO/AppFlowy
synced 2026-05-22 16:49:04 +00:00
fix: the settings view of path configuration is not displayed completely (#1647)
This commit is contained in:
parent
d8958e82c8
commit
340f27cf87
2 changed files with 17 additions and 3 deletions
|
|
@ -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 a new issue