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