mirror of
https://github.com/immich-app/immich.git
synced 2025-11-29 08:30:03 +09:00
chore(mobile): thumbnail image ui improvements (#13655)
Some checks are pending
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
Docker / pre-job (push) Waiting to run
Docker / Re-Tag ML () (push) Blocked by required conditions
Docker / Re-Tag ML (-armnn) (push) Blocked by required conditions
Docker / Re-Tag ML (-cuda) (push) Blocked by required conditions
Docker / Re-Tag ML (-openvino) (push) Blocked by required conditions
Docker / Re-Tag Server () (push) Blocked by required conditions
Docker / Build and Push ML (armnn, linux/arm64, -armnn) (push) Blocked by required conditions
Docker / Build and Push ML (cpu, linux/amd64,linux/arm64) (push) Blocked by required conditions
Docker / Build and Push ML (cuda, linux/amd64, -cuda) (push) Blocked by required conditions
Docker / Build and Push ML (openvino, linux/amd64, -openvino) (push) Blocked by required conditions
Docker / Build and Push Server (cpu, linux/amd64,linux/arm64) (push) Blocked by required conditions
Docker / Docker Build & Push Server Success (push) Blocked by required conditions
Docker / Docker Build & Push ML Success (push) Blocked by required conditions
Docs build / pre-job (push) Waiting to run
Docs build / Docs Build (push) Blocked by required conditions
Static Code Analysis / pre-job (push) Waiting to run
Static Code Analysis / Run Dart Code Analysis (push) Blocked by required conditions
Test / pre-job (push) Waiting to run
Test / Test & Lint Server (push) Blocked by required conditions
Test / Unit Test CLI (push) Blocked by required conditions
Test / Unit Test CLI (Windows) (push) Blocked by required conditions
Test / Test & Lint Web (push) Blocked by required conditions
Test / End-to-End Lint (push) Blocked by required conditions
Test / Medium Tests (Server) (push) Blocked by required conditions
Test / End-to-End Tests (Server & CLI) (push) Blocked by required conditions
Test / End-to-End Tests (Web) (push) Blocked by required conditions
Test / Unit Test Mobile (push) Blocked by required conditions
Test / Unit Test ML (push) Blocked by required conditions
Test / ShellCheck (push) Waiting to run
Test / OpenAPI Clients (push) Waiting to run
Test / TypeORM Checks (push) Waiting to run
Some checks are pending
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
Docker / pre-job (push) Waiting to run
Docker / Re-Tag ML () (push) Blocked by required conditions
Docker / Re-Tag ML (-armnn) (push) Blocked by required conditions
Docker / Re-Tag ML (-cuda) (push) Blocked by required conditions
Docker / Re-Tag ML (-openvino) (push) Blocked by required conditions
Docker / Re-Tag Server () (push) Blocked by required conditions
Docker / Build and Push ML (armnn, linux/arm64, -armnn) (push) Blocked by required conditions
Docker / Build and Push ML (cpu, linux/amd64,linux/arm64) (push) Blocked by required conditions
Docker / Build and Push ML (cuda, linux/amd64, -cuda) (push) Blocked by required conditions
Docker / Build and Push ML (openvino, linux/amd64, -openvino) (push) Blocked by required conditions
Docker / Build and Push Server (cpu, linux/amd64,linux/arm64) (push) Blocked by required conditions
Docker / Docker Build & Push Server Success (push) Blocked by required conditions
Docker / Docker Build & Push ML Success (push) Blocked by required conditions
Docs build / pre-job (push) Waiting to run
Docs build / Docs Build (push) Blocked by required conditions
Static Code Analysis / pre-job (push) Waiting to run
Static Code Analysis / Run Dart Code Analysis (push) Blocked by required conditions
Test / pre-job (push) Waiting to run
Test / Test & Lint Server (push) Blocked by required conditions
Test / Unit Test CLI (push) Blocked by required conditions
Test / Unit Test CLI (Windows) (push) Blocked by required conditions
Test / Test & Lint Web (push) Blocked by required conditions
Test / End-to-End Lint (push) Blocked by required conditions
Test / Medium Tests (Server) (push) Blocked by required conditions
Test / End-to-End Tests (Server & CLI) (push) Blocked by required conditions
Test / End-to-End Tests (Web) (push) Blocked by required conditions
Test / Unit Test Mobile (push) Blocked by required conditions
Test / Unit Test ML (push) Blocked by required conditions
Test / ShellCheck (push) Waiting to run
Test / OpenAPI Clients (push) Waiting to run
Test / TypeORM Checks (push) Waiting to run
improve ui for thumbnail image Co-authored-by: dvbthien <dvbthien@gmail.com>
This commit is contained in:
@@ -138,10 +138,31 @@ class ThumbnailImage extends ConsumerWidget {
|
|||||||
tag: isFromDto
|
tag: isFromDto
|
||||||
? '${asset.remoteId}-$heroOffset'
|
? '${asset.remoteId}-$heroOffset'
|
||||||
: asset.id + heroOffset,
|
: asset.id + heroOffset,
|
||||||
child: ImmichThumbnail(
|
child: Stack(
|
||||||
asset: asset,
|
children: [
|
||||||
height: 250,
|
ImmichThumbnail(
|
||||||
width: 250,
|
asset: asset,
|
||||||
|
height: 250,
|
||||||
|
width: 250,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 250,
|
||||||
|
width: 250,
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color.fromRGBO(0, 0, 0, 0.1),
|
||||||
|
Colors.transparent,
|
||||||
|
Colors.transparent,
|
||||||
|
Color.fromRGBO(0, 0, 0, 0.1),
|
||||||
|
],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
stops: [0, 0.3, 0.6, 1],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -153,11 +174,8 @@ class ThumbnailImage extends ConsumerWidget {
|
|||||||
color: canDeselect ? assetContainerColor : Colors.grey,
|
color: canDeselect ? assetContainerColor : Colors.grey,
|
||||||
),
|
),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.all(
|
||||||
topRight: Radius.circular(15.0),
|
Radius.circular(15.0),
|
||||||
bottomRight: Radius.circular(15.0),
|
|
||||||
bottomLeft: Radius.circular(15.0),
|
|
||||||
topLeft: Radius.zero,
|
|
||||||
),
|
),
|
||||||
child: image,
|
child: image,
|
||||||
),
|
),
|
||||||
@@ -177,7 +195,33 @@ class ThumbnailImage extends ConsumerWidget {
|
|||||||
)
|
)
|
||||||
: const Border(),
|
: const Border(),
|
||||||
),
|
),
|
||||||
child: buildImage(),
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
buildImage(),
|
||||||
|
if (showStorageIndicator)
|
||||||
|
Positioned(
|
||||||
|
right: 8,
|
||||||
|
bottom: 5,
|
||||||
|
child: Icon(
|
||||||
|
storageIcon(asset),
|
||||||
|
color: Colors.white.withOpacity(.8),
|
||||||
|
size: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (asset.isFavorite)
|
||||||
|
const Positioned(
|
||||||
|
left: 8,
|
||||||
|
bottom: 5,
|
||||||
|
child: Icon(
|
||||||
|
Icons.favorite,
|
||||||
|
color: Colors.white,
|
||||||
|
size: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (!asset.isImage) buildVideoIcon(),
|
||||||
|
if (asset.stackCount > 0) buildStackIcon(),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
if (multiselectEnabled)
|
if (multiselectEnabled)
|
||||||
Padding(
|
Padding(
|
||||||
@@ -187,28 +231,6 @@ class ThumbnailImage extends ConsumerWidget {
|
|||||||
child: buildSelectionIcon(asset),
|
child: buildSelectionIcon(asset),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (showStorageIndicator)
|
|
||||||
Positioned(
|
|
||||||
right: 8,
|
|
||||||
bottom: 5,
|
|
||||||
child: Icon(
|
|
||||||
storageIcon(asset),
|
|
||||||
color: Colors.white.withOpacity(.8),
|
|
||||||
size: 16,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (asset.isFavorite)
|
|
||||||
const Positioned(
|
|
||||||
left: 8,
|
|
||||||
bottom: 5,
|
|
||||||
child: Icon(
|
|
||||||
Icons.favorite,
|
|
||||||
color: Colors.white,
|
|
||||||
size: 18,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (!asset.isImage) buildVideoIcon(),
|
|
||||||
if (asset.stackCount > 0) buildStackIcon(),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user