Skip to content

Commit

Permalink
Improve aspect ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Dec 19, 2024
1 parent 646588c commit 7e67cf0
Show file tree
Hide file tree
Showing 9 changed files with 669 additions and 130 deletions.
20 changes: 18 additions & 2 deletions api/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ packages:
dependency: "direct main"
description:
name: archive
sha256: "08064924cbf0ab88280a0c3f60db9dd24fec693927e725ecb176f16c629d1cb8"
sha256: "6199c74e3db4fbfbd04f66d739e72fe11c8a8957d5f219f1f4482dbde6420b5a"
url: "https://pub.dev"
source: hosted
version: "4.0.1"
version: "4.0.2"
args:
dependency: transitive
description:
Expand Down Expand Up @@ -174,6 +174,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.6"
dart_mappable:
dependency: transitive
description:
name: dart_mappable
sha256: f69a961ae8589724ebb542e588f228ae844c5f78028899cbe2cc718977c1b382
url: "https://pub.dev"
source: hosted
version: "4.3.0"
dart_style:
dependency: transitive
description:
Expand Down Expand Up @@ -583,6 +591,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.2"
type_plus:
dependency: transitive
description:
name: type_plus
sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9
url: "https://pub.dev"
source: hosted
version: "2.1.1"
typed_data:
dependency: transitive
description:
Expand Down
6 changes: 3 additions & 3 deletions app/android/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.1024.0)
aws-partitions (1.1025.0)
aws-sdk-core (3.214.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
Expand Down Expand Up @@ -141,7 +141,7 @@ GEM
googleauth (~> 1.9)
mini_mime (~> 1.0)
google-logging-utils (0.1.0)
googleauth (1.12.0)
googleauth (1.12.1)
faraday (>= 1.0, < 3.a)
google-cloud-env (~> 2.2)
google-logging-utils (~> 0.1)
Expand All @@ -154,7 +154,7 @@ GEM
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.9.0)
json (2.9.1)
jwt (2.9.3)
base64
mini_magick (4.13.2)
Expand Down
2 changes: 1 addition & 1 deletion app/lib/dialogs/template.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class _TemplateDialogState extends State<TemplateDialog> {
),
],
actions: [
if (widget.bloc == null)
if (widget.bloc != null)
ElevatedButton.icon(
onPressed: () => _showCreateDialog(widget.bloc!),
label: Text(AppLocalizations.of(context).create),
Expand Down
28 changes: 19 additions & 9 deletions app/lib/views/files/grid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,26 @@ class FileEntityGridItem extends StatelessWidget {
Center(
child: Container(
height: 96,
width: 96,
padding: const EdgeInsets.only(top: 8),
padding: const EdgeInsets.only(
left: 8,
right: 8,
top: 16,
bottom: 8,
),
child: thumbnail != null
? Image.memory(
thumbnail!,
fit: BoxFit.contain,
cacheWidth: 96,
cacheHeight: 96,
errorBuilder: (context, error, stackTrace) =>
leading,
? AspectRatio(
aspectRatio: kThumbnailRatio,
child: ClipRRect(
borderRadius: BorderRadius.circular(8),
child: Image.memory(
thumbnail!,
fit: BoxFit.cover,
cacheHeight: kThumbnailWidth,
cacheWidth: kThumbnailHeight,
errorBuilder:
(context, error, stackTrace) =>
leading,
)),
)
: leading,
),
Expand Down
22 changes: 12 additions & 10 deletions app/lib/views/files/list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,19 @@ class FileEntityListTile extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 32,
height: 32,
width: 64,
child: thumbnail != null
? Image.memory(
thumbnail!,
fit: BoxFit.cover,
cacheHeight: 32,
cacheWidth: 32,
errorBuilder:
(context, error, stackTrace) =>
leading,
? AspectRatio(
aspectRatio: kThumbnailRatio,
child: ClipRRect(
borderRadius:
BorderRadius.circular(8),
child: Image.memory(
thumbnail!,
fit: BoxFit.cover,
cacheHeight: kThumbnailWidth,
cacheWidth: kThumbnailHeight,
)),
)
: leading,
),
Expand Down
8 changes: 4 additions & 4 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ packages:
dependency: "direct main"
description:
name: archive
sha256: "08064924cbf0ab88280a0c3f60db9dd24fec693927e725ecb176f16c629d1cb8"
sha256: "6199c74e3db4fbfbd04f66d739e72fe11c8a8957d5f219f1f4482dbde6420b5a"
url: "https://pub.dev"
source: hosted
version: "4.0.1"
version: "4.0.2"
args:
dependency: "direct main"
description:
Expand Down Expand Up @@ -673,10 +673,10 @@ packages:
dependency: "direct main"
description:
name: image
sha256: "20842a5ad1555be624c314b0c0cc0566e8ece412f61e859a42efeb6d4101a26c"
sha256: "8346ad4b5173924b5ddddab782fc7d8a6300178c8b1dc427775405a01701c4a6"
url: "https://pub.dev"
source: hosted
version: "4.5.0"
version: "4.5.2"
integration_test:
dependency: "direct main"
description: flutter
Expand Down
8 changes: 4 additions & 4 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/react": "^4.1.1",
"@astrojs/starlight": "^0.30.2",
"@astrojs/starlight": "^0.30.3",
"@phosphor-icons/react": "^2.1.7",
"@types/react": "^19.0.1",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
"astro": "^5.0.9",
"astro": "^5.1.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"remark-gemoji": "^8.0.0",
"remark-heading-id": "^1.0.1",
"sharp": "^0.33.5",
"typescript": "^5.7.2"
},
"packageManager": "pnpm@9.14.4",
"packageManager": "pnpm@9.15.0",
"devDependencies": {
"sass": "^1.83.0"
}
Expand Down
Loading

0 comments on commit 7e67cf0

Please sign in to comment.