mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(web/server) Add more options to public shared link (#1348)
* Added migration files * Added logic for shared album level * Added permission for EXIF * Update shared link response dto * Added condition to show download button * Create and edit link with new parameter: * Remove deadcode * PR feedback * More refactor * Move logic of allow original file to service * Simplify * Wording
This commit is contained in:
36
mobile/openapi/lib/model/edit_shared_link_dto.dart
generated
36
mobile/openapi/lib/model/edit_shared_link_dto.dart
generated
@@ -16,6 +16,8 @@ class EditSharedLinkDto {
|
||||
this.description,
|
||||
this.expiredAt,
|
||||
this.allowUpload,
|
||||
this.allowDownload,
|
||||
this.showExif,
|
||||
this.isEditExpireTime,
|
||||
});
|
||||
|
||||
@@ -43,6 +45,22 @@ class EditSharedLinkDto {
|
||||
///
|
||||
bool? allowUpload;
|
||||
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
bool? allowDownload;
|
||||
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
bool? showExif;
|
||||
|
||||
///
|
||||
/// 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
|
||||
@@ -56,6 +74,8 @@ class EditSharedLinkDto {
|
||||
other.description == description &&
|
||||
other.expiredAt == expiredAt &&
|
||||
other.allowUpload == allowUpload &&
|
||||
other.allowDownload == allowDownload &&
|
||||
other.showExif == showExif &&
|
||||
other.isEditExpireTime == isEditExpireTime;
|
||||
|
||||
@override
|
||||
@@ -64,10 +84,12 @@ class EditSharedLinkDto {
|
||||
(description == null ? 0 : description!.hashCode) +
|
||||
(expiredAt == null ? 0 : expiredAt!.hashCode) +
|
||||
(allowUpload == null ? 0 : allowUpload!.hashCode) +
|
||||
(allowDownload == null ? 0 : allowDownload!.hashCode) +
|
||||
(showExif == null ? 0 : showExif!.hashCode) +
|
||||
(isEditExpireTime == null ? 0 : isEditExpireTime!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'EditSharedLinkDto[description=$description, expiredAt=$expiredAt, allowUpload=$allowUpload, isEditExpireTime=$isEditExpireTime]';
|
||||
String toString() => 'EditSharedLinkDto[description=$description, expiredAt=$expiredAt, allowUpload=$allowUpload, allowDownload=$allowDownload, showExif=$showExif, isEditExpireTime=$isEditExpireTime]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@@ -86,6 +108,16 @@ class EditSharedLinkDto {
|
||||
} else {
|
||||
// json[r'allowUpload'] = null;
|
||||
}
|
||||
if (this.allowDownload != null) {
|
||||
json[r'allowDownload'] = this.allowDownload;
|
||||
} else {
|
||||
// json[r'allowDownload'] = null;
|
||||
}
|
||||
if (this.showExif != null) {
|
||||
json[r'showExif'] = this.showExif;
|
||||
} else {
|
||||
// json[r'showExif'] = null;
|
||||
}
|
||||
if (this.isEditExpireTime != null) {
|
||||
json[r'isEditExpireTime'] = this.isEditExpireTime;
|
||||
} else {
|
||||
@@ -116,6 +148,8 @@ class EditSharedLinkDto {
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
expiredAt: mapValueOfType<String>(json, r'expiredAt'),
|
||||
allowUpload: mapValueOfType<bool>(json, r'allowUpload'),
|
||||
allowDownload: mapValueOfType<bool>(json, r'allowDownload'),
|
||||
showExif: mapValueOfType<bool>(json, r'showExif'),
|
||||
isEditExpireTime: mapValueOfType<bool>(json, r'isEditExpireTime'),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user