Styling tweaking
This commit is contained in:
@@ -38,6 +38,11 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.pdfbox</groupId>
|
||||
<artifactId>pdfbox</artifactId>
|
||||
<version>3.0.5</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Elytron secrity used for username/password login -->
|
||||
<dependency>
|
||||
|
||||
@@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import jakarta.ejb.EJB;
|
||||
import jakarta.enterprise.context.RequestScoped;
|
||||
import jakarta.ws.rs.*;
|
||||
import jakarta.ws.rs.core.CacheControl;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
import jakarta.ws.rs.core.Response.ResponseBuilder;
|
||||
import jakarta.ws.rs.core.Response.Status;
|
||||
@@ -64,9 +65,9 @@ public class PictureResource {
|
||||
@GZIP
|
||||
@GET
|
||||
@Path("image/{id}")
|
||||
@Produces(JSON_OUT)
|
||||
@Operation(summary = "Get customer value")
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved picture value")
|
||||
@Produces({ "image/png", "image/jpg" })
|
||||
@Operation(summary = "Get picture")
|
||||
@ApiResponse(responseCode = "200", description = "Successfully retrieved picture")
|
||||
public Response doGetPictureImage(@PathParam("id") Long id, @QueryParam("size") int size) {
|
||||
LOG.debug("Get Picture for id " + id + " with size " + size);
|
||||
byte[] retVal = pictureService.getImage(id, size);
|
||||
|
||||
@@ -145,6 +145,7 @@ class _CustomerWidgetState extends State<CustomerWidget> {
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 8.0,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
@@ -209,6 +210,7 @@ class _CustomerWidgetState extends State<CustomerWidget> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
spacing: 8.0,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
|
||||
@@ -111,15 +111,15 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final isNarrow = constraints.maxWidth < 800;
|
||||
final maxImageWidth = constraints.maxWidth * 0.5;
|
||||
final imageWidth = isNarrow ? constraints.maxWidth : constraints.maxWidth * 0.5;
|
||||
return SingleChildScrollView(
|
||||
child: isNarrow
|
||||
? Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: maxImageWidth),
|
||||
SizedBox(
|
||||
width: imageWidth,
|
||||
child: _imageWidget(selectedPicture),
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
@@ -130,8 +130,8 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: maxImageWidth),
|
||||
SizedBox(
|
||||
width: imageWidth,
|
||||
child: _imageWidget(selectedPicture),
|
||||
),
|
||||
const SizedBox(width: 32),
|
||||
@@ -259,7 +259,6 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
thumbVisibility: true,
|
||||
child: SingleChildScrollView(
|
||||
controller: _commentScrollController,
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
dto.comment ?? "",
|
||||
style: contentStyle,
|
||||
@@ -424,14 +423,11 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
}
|
||||
|
||||
void _actionNavigateToPicture(int index) {
|
||||
print("navigate. too $index");
|
||||
final pictures = _customerDto.pictures;
|
||||
if (index >= 0 && index < pictures.length) {
|
||||
setState(() {
|
||||
_selectedPicture = pictures[index];
|
||||
});
|
||||
} else {
|
||||
print("empty");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user