diff --git a/lib/apis/record_api.dart b/lib/apis/record_api.dart index dbb1761..210d18c 100644 --- a/lib/apis/record_api.dart +++ b/lib/apis/record_api.dart @@ -25,7 +25,7 @@ class RecordApi { } static Future> getUserRecordsAt(ApiClient client, {required String path, String? user}) async { - final response = await client.get("/users/${user ?? client.userId}/records?path=$path"); + final response = await client.get(Uri.encodeFull("/users/${user ?? client.userId}/records?path=$path")); client.checkResponse(response); final body = jsonDecode(response.body) as List; return body.map((e) => Record.fromMap(e)).toList(); diff --git a/lib/clients/inventory_client.dart b/lib/clients/inventory_client.dart index eede68e..dcf7528 100644 --- a/lib/clients/inventory_client.dart +++ b/lib/clients/inventory_client.dart @@ -116,7 +116,7 @@ class InventoryClient extends ChangeNotifier { final linkRecord = await RecordApi.getUserRecord(apiClient, recordId: record.linkRecordId, user: record.linkOwnerId); records = await RecordApi.getUserRecordsAt(apiClient, - path: "${linkRecord.path}\\${record.name}", user: linkRecord.ownerId); + path: "${linkRecord.path}\\${linkRecord.name}", user: linkRecord.ownerId); } else { records = await RecordApi.getUserRecordsAt(apiClient, path: "${record.path}\\${record.name}", user: record.ownerId); diff --git a/lib/models/inventory/resonite_directory.dart b/lib/models/inventory/resonite_directory.dart index 3cdda97..202ab0d 100644 --- a/lib/models/inventory/resonite_directory.dart +++ b/lib/models/inventory/resonite_directory.dart @@ -16,14 +16,14 @@ class ResoniteDirectory { @override String toString() { - return record.name; + return record.formattedName.toString(); } bool get isRoot => record.isRoot; String get absolutePath => "${parent?.absolutePath ?? ""}/${(record.name)}"; - List get absolutePathSegments => (parent?.absolutePathSegments ?? []) + [record.name]; + List get absolutePathSegments => (parent?.absolutePathSegments ?? []) + [record.formattedName.toString()]; bool containsRecord(Record record) => children.where((element) => element.record.id == record.id).isNotEmpty; diff --git a/lib/widgets/inventory/inventory_browser.dart b/lib/widgets/inventory/inventory_browser.dart index b567519..7b03575 100644 --- a/lib/widgets/inventory/inventory_browser.dart +++ b/lib/widgets/inventory/inventory_browser.dart @@ -113,7 +113,17 @@ class _InventoryBrowserState extends State with AutomaticKeepA onPressed: () { iClient.navigateUp(times: pathSegments.length - 1 - idx); }, - child: Text(segment), + child: ConstrainedBox( + constraints: BoxConstraints( + maxWidth: MediaQuery.of(context).size.width * 0.8, + ), + child: Text( + segment, + maxLines: 2, + overflow: TextOverflow.ellipsis, + softWrap: true, + ), + ), ), ), ], diff --git a/pubspec.yaml b/pubspec.yaml index 849c519..2a1c52f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.10.1-beta+1 +version: 0.10.2-beta+1 environment: sdk: '>=3.0.1'