diff --git a/.roadsignrc b/.roadsignrc index 6bbddce..cf21b4d 100644 --- a/.roadsignrc +++ b/.roadsignrc @@ -1,6 +1,6 @@ { "sync": { - "region": "solian-next", + "region": "solian", "configPath": "roadsign.toml" }, "deployments": [ diff --git a/lib/widgets/attachment/attachment_list.dart b/lib/widgets/attachment/attachment_list.dart index 13966f6..0d3a9bd 100644 --- a/lib/widgets/attachment/attachment_list.dart +++ b/lib/widgets/attachment/attachment_list.dart @@ -106,6 +106,44 @@ class _AttachmentListState extends State { } if (widget.gridded) { + final fullOfImage = + widget.data.where((ele) => ele?.mediaType == SnMediaType.image).length == widget.data.length; + if(!fullOfImage) { + return Container( + margin: widget.padding ?? EdgeInsets.zero, + decoration: BoxDecoration( + color: backgroundColor, + border: Border( + top: borderSide, + bottom: borderSide, + ), + borderRadius: AttachmentList.kDefaultRadius, + ), + child: ClipRRect( + borderRadius: AttachmentList.kDefaultRadius, + child: Column( + spacing: 4, + children: widget.data + .mapIndexed( + (idx, ele) => GestureDetector( + child: AspectRatio( + aspectRatio: ele?.data['ratio']?.toDouble() ?? 1, + child: Container( + constraints: constraints, + child: AttachmentItem( + data: ele, + heroTag: heroTags[idx], + fit: BoxFit.cover, + ), + ), + ), + ), + ) + .toList(), + ), + ), + ); + } return Container( margin: widget.padding ?? EdgeInsets.zero, decoration: BoxDecoration( diff --git a/roadsign.toml b/roadsign.toml index 62a71c1..22a5d3f 100644 --- a/roadsign.toml +++ b/roadsign.toml @@ -1,9 +1,9 @@ -id = "solian-next" +id = "solian" [[locations]] -id = "solian-next" -host = ["sn-next.solsynth.dev"] +id = "solian" +host = ["sn.solsynth.dev"] path = ["/"] [[locations.destinations]] -id = "solian-next-web" -uri = "files:///workdir/solian-next?fallback=index.html&index=index.html" +id = "solian-web" +uri = "files:///workdir/solian?fallback=index.html&index=index.html"