mirror of
https://github.com/immich-app/immich.git
synced 2025-12-26 09:14:58 +03:00
feat(web): Add to Multiple Albums (#20072)
* Multi add to album picker: - update modal for multi select - Update add-to-album and add-to-album-action to work with new array return from AlbumPickerModal - Add asset-utils.addAssetsToAlbums (incomplete) * initial addToAlbums endpoint * - fix endpoint - add test * - update return type - make open-api * - simplify return dto - handle notification * - fix returns - clean up * - update i18n - format & check * - checks * - correct successId count - fix assets_cannot_be_added language call * tests * foromat * refactor * - update successful add message to included total attempted * - fix web test - format i18n * - fix open-api * - fix imports to resolve checks * - PR suggestions * open-api * refactor addAssetsToAlbums * refactor it again * - fix error returns and tests * - swap icon for IconButton - don't nest the buttons * open-api * - Cleanup multi-select button to match Thumbnail * merge and openapi * - remove onclick from icon element * - fix double onClose call with keyboard shortcuts * - spelling and formatting - apply new api permission * - open-api * chore: styling * translation --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
@@ -940,6 +940,67 @@
|
||||
"description": "This endpoint requires the `album.create` permission."
|
||||
}
|
||||
},
|
||||
"/albums/assets": {
|
||||
"put": {
|
||||
"operationId": "addAssetsToAlbums",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "key",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "slug",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AlbumsAddAssetsDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AlbumsAddAssetsResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Albums"
|
||||
],
|
||||
"x-immich-permission": "albumAsset.create",
|
||||
"description": "This endpoint requires the `albumAsset.create` permission."
|
||||
}
|
||||
},
|
||||
"/albums/statistics": {
|
||||
"get": {
|
||||
"operationId": "getAlbumStatistics",
|
||||
@@ -9921,6 +9982,55 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"AlbumsAddAssetsDto": {
|
||||
"properties": {
|
||||
"albumIds": {
|
||||
"items": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"assetIds": {
|
||||
"items": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"albumIds",
|
||||
"assetIds"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AlbumsAddAssetsResponseDto": {
|
||||
"properties": {
|
||||
"albumSuccessCount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"assetSuccessCount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"error": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/BulkIdErrorReason"
|
||||
}
|
||||
]
|
||||
},
|
||||
"success": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"albumSuccessCount",
|
||||
"assetSuccessCount",
|
||||
"success"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AlbumsResponse": {
|
||||
"properties": {
|
||||
"defaultAssetOrder": {
|
||||
@@ -10877,6 +10987,15 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"BulkIdErrorReason": {
|
||||
"enum": [
|
||||
"duplicate",
|
||||
"no_permission",
|
||||
"not_found",
|
||||
"unknown"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"BulkIdResponseDto": {
|
||||
"properties": {
|
||||
"error": {
|
||||
|
||||
Reference in New Issue
Block a user