You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-09 23:17:29 +02:00
feat(web): improve alt text (#7596)
* alt text * memory lane alt text * revert sql generator change * use getAltText * oops * handle large number of people in asset * nit * add aria-label to search button * update api * fixed tests * fixed typing * fixed spacing * fix displaying null
This commit is contained in:
@@ -13,38 +13,68 @@ part of openapi.api;
|
||||
class MapMarkerResponseDto {
|
||||
/// Returns a new [MapMarkerResponseDto] instance.
|
||||
MapMarkerResponseDto({
|
||||
required this.city,
|
||||
required this.country,
|
||||
required this.id,
|
||||
required this.lat,
|
||||
required this.lon,
|
||||
required this.state,
|
||||
});
|
||||
|
||||
String? city;
|
||||
|
||||
String? country;
|
||||
|
||||
String id;
|
||||
|
||||
double lat;
|
||||
|
||||
double lon;
|
||||
|
||||
String? state;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is MapMarkerResponseDto &&
|
||||
other.city == city &&
|
||||
other.country == country &&
|
||||
other.id == id &&
|
||||
other.lat == lat &&
|
||||
other.lon == lon;
|
||||
other.lon == lon &&
|
||||
other.state == state;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(city == null ? 0 : city!.hashCode) +
|
||||
(country == null ? 0 : country!.hashCode) +
|
||||
(id.hashCode) +
|
||||
(lat.hashCode) +
|
||||
(lon.hashCode);
|
||||
(lon.hashCode) +
|
||||
(state == null ? 0 : state!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'MapMarkerResponseDto[id=$id, lat=$lat, lon=$lon]';
|
||||
String toString() => 'MapMarkerResponseDto[city=$city, country=$country, id=$id, lat=$lat, lon=$lon, state=$state]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.city != null) {
|
||||
json[r'city'] = this.city;
|
||||
} else {
|
||||
// json[r'city'] = null;
|
||||
}
|
||||
if (this.country != null) {
|
||||
json[r'country'] = this.country;
|
||||
} else {
|
||||
// json[r'country'] = null;
|
||||
}
|
||||
json[r'id'] = this.id;
|
||||
json[r'lat'] = this.lat;
|
||||
json[r'lon'] = this.lon;
|
||||
if (this.state != null) {
|
||||
json[r'state'] = this.state;
|
||||
} else {
|
||||
// json[r'state'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -56,9 +86,12 @@ class MapMarkerResponseDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return MapMarkerResponseDto(
|
||||
city: mapValueOfType<String>(json, r'city'),
|
||||
country: mapValueOfType<String>(json, r'country'),
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
lat: (mapValueOfType<num>(json, r'lat')!).toDouble(),
|
||||
lon: (mapValueOfType<num>(json, r'lon')!).toDouble(),
|
||||
state: mapValueOfType<String>(json, r'state'),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
@@ -106,9 +139,12 @@ class MapMarkerResponseDto {
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'city',
|
||||
'country',
|
||||
'id',
|
||||
'lat',
|
||||
'lon',
|
||||
'state',
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user