feat(web): show original uploader in shared album photo details (#3977)

* feat(web): show original uploader in shared album photo details

* feat: send owner in asset by id response

* chore: open api

* fix: linting

* fix: change to Shared By

* openapi

* openapi

* api

* styling

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Maarten Rijke
2023-09-06 05:14:44 +02:00
committed by GitHub
parent b1467bd1da
commit b4fa60d4fd
11 changed files with 87 additions and 43 deletions

View File

@@ -21,6 +21,7 @@ Name | Type | Description | Notes
**livePhotoVideoId** | **String** | | [optional]
**originalFileName** | **String** | |
**originalPath** | **String** | |
**owner** | [**UserResponseDto**](UserResponseDto.md) | | [optional]
**ownerId** | **String** | |
**people** | [**List<PersonResponseDto>**](PersonResponseDto.md) | | [optional] [default to const []]
**resized** | **bool** | |

View File

@@ -26,6 +26,7 @@ class AssetResponseDto {
this.livePhotoVideoId,
required this.originalFileName,
required this.originalPath,
this.owner,
required this.ownerId,
this.people = const [],
required this.resized,
@@ -69,6 +70,14 @@ class AssetResponseDto {
String originalPath;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
UserResponseDto? owner;
String ownerId;
List<PersonResponseDto> people;
@@ -107,6 +116,7 @@ class AssetResponseDto {
other.livePhotoVideoId == livePhotoVideoId &&
other.originalFileName == originalFileName &&
other.originalPath == originalPath &&
other.owner == owner &&
other.ownerId == ownerId &&
other.people == people &&
other.resized == resized &&
@@ -132,6 +142,7 @@ class AssetResponseDto {
(livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) +
(originalFileName.hashCode) +
(originalPath.hashCode) +
(owner == null ? 0 : owner!.hashCode) +
(ownerId.hashCode) +
(people.hashCode) +
(resized.hashCode) +
@@ -142,7 +153,7 @@ class AssetResponseDto {
(updatedAt.hashCode);
@override
String toString() => 'AssetResponseDto[checksum=$checksum, deviceAssetId=$deviceAssetId, deviceId=$deviceId, duration=$duration, exifInfo=$exifInfo, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, id=$id, isArchived=$isArchived, isFavorite=$isFavorite, livePhotoVideoId=$livePhotoVideoId, originalFileName=$originalFileName, originalPath=$originalPath, ownerId=$ownerId, people=$people, resized=$resized, smartInfo=$smartInfo, tags=$tags, thumbhash=$thumbhash, type=$type, updatedAt=$updatedAt]';
String toString() => 'AssetResponseDto[checksum=$checksum, deviceAssetId=$deviceAssetId, deviceId=$deviceId, duration=$duration, exifInfo=$exifInfo, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, id=$id, isArchived=$isArchived, isFavorite=$isFavorite, livePhotoVideoId=$livePhotoVideoId, originalFileName=$originalFileName, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, people=$people, resized=$resized, smartInfo=$smartInfo, tags=$tags, thumbhash=$thumbhash, type=$type, updatedAt=$updatedAt]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -167,6 +178,11 @@ class AssetResponseDto {
}
json[r'originalFileName'] = this.originalFileName;
json[r'originalPath'] = this.originalPath;
if (this.owner != null) {
json[r'owner'] = this.owner;
} else {
// json[r'owner'] = null;
}
json[r'ownerId'] = this.ownerId;
json[r'people'] = this.people;
json[r'resized'] = this.resized;
@@ -207,6 +223,7 @@ class AssetResponseDto {
livePhotoVideoId: mapValueOfType<String>(json, r'livePhotoVideoId'),
originalFileName: mapValueOfType<String>(json, r'originalFileName')!,
originalPath: mapValueOfType<String>(json, r'originalPath')!,
owner: UserResponseDto.fromJson(json[r'owner']),
ownerId: mapValueOfType<String>(json, r'ownerId')!,
people: PersonResponseDto.listFromJson(json[r'people']),
resized: mapValueOfType<bool>(json, r'resized')!,

View File

@@ -82,6 +82,11 @@ void main() {
// TODO
});
// UserResponseDto owner
test('to test the property `owner`', () async {
// TODO
});
// String ownerId
test('to test the property `ownerId`', () async {
// TODO