File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
frontend/app_flowy/lib/workspace
presentation/settings/widgets Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,22 @@ const String kSettingsLocationDefaultLocation =
1212
1313class SettingsLocation {
1414 SettingsLocation ({
15- this . path,
16- });
15+ String ? path,
16+ }) : _path = path ;
1717
18- String ? path;
18+ String ? _path;
19+
20+ set path (String ? path) {
21+ _path = path;
22+ }
23+
24+ String ? get path {
25+ if (Platform .isMacOS) {
26+ // remove the prefix `/Volumes/Macintosh HD/Users/`
27+ return _path? .replaceFirst ('/Volumes/Macintosh HD/Users' , '' );
28+ }
29+ return _path;
30+ }
1931
2032 SettingsLocation copyWith ({String ? path}) {
2133 return SettingsLocation (
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ class SettingsFileLocationCustomzierState
4141 title: FlowyText .regular (
4242 LocaleKeys .settings_files_defaultLocation.tr (),
4343 fontSize: 15.0 ,
44+ overflow: TextOverflow .ellipsis,
4445 ),
4546 subtitle: Tooltip (
4647 message: LocaleKeys .settings_files_doubleTapToCopy.tr (),
@@ -53,6 +54,7 @@ class SettingsFileLocationCustomzierState
5354 child: FlowyText .regular (
5455 state.path ?? '' ,
5556 fontSize: 10.0 ,
57+ overflow: TextOverflow .ellipsis,
5658 ),
5759 ),
5860 ),
You can’t perform that action at this time.
0 commit comments