Erweiterungen

This commit is contained in:
2025-09-25 21:06:42 +02:00
parent 6afd982f80
commit 4208e5d86f
5 changed files with 32 additions and 4 deletions

View File

@@ -6,7 +6,7 @@
<groupId>de.assecutor.votianlt</groupId>
<artifactId>votianlt</artifactId>
<version>0.5.1</version>
<version>0.5.2</version>
<packaging>jar</packaging>

View File

@@ -1238,7 +1238,6 @@ public class AddJobView extends Main {
qty.setMax(9999); // Set reasonable maximum
qty.setWidth("10%");
qty.setRequiredIndicatorVisible(true);
qty.setPlaceholder("1");
// Add validation on blur
qty.addBlurListener(e -> {
if (qty.getValue() == null || qty.getValue() <= 0) {

View File

@@ -27,6 +27,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.context.HttpSessionSecurityContextRepository;
import com.vaadin.flow.server.VaadinSession;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
import jakarta.annotation.PostConstruct;
@Route("login")
@@ -45,6 +46,9 @@ public class LoginView extends VerticalLayout implements BeforeEnterObserver, Af
@Autowired
private AuthenticationManager authenticationManager;
@Autowired
private Environment environment;
@Value("${app.security.two-factor.enabled:false}")
private boolean twoFactorEnabled;
@@ -108,7 +112,19 @@ public class LoginView extends VerticalLayout implements BeforeEnterObserver, Af
@PostConstruct
private void init() {
// Set version after Spring injection
versionSpan.setText("Version " + appVersion);
String[] activeProfiles = environment.getActiveProfiles();
String[] defaultProfiles = environment.getDefaultProfiles();
String profileInfo = "";
if (activeProfiles.length > 0) {
profileInfo = " (" + String.join(", ", activeProfiles) + ")";
} else if (defaultProfiles.length > 0) {
profileInfo = " (" + String.join(", ", defaultProfiles) + ")";
} else {
profileInfo = " (default)";
}
versionSpan.setText("Version " + appVersion + profileInfo);
}
private void handlePasswordLogin(String username, String password) {

View File

@@ -0,0 +1,10 @@
# Development-specific configuration
# MongoDB - Development database
spring.data.mongodb.uri=mongodb://192.168.180.25:27017/votianlt_dev
# Enable browser launch in development
vaadin.launch-browser=true
# Development logging levels
logging.level.de.assecutor.votianlt=DEBUG

View File

@@ -1,5 +1,8 @@
server.port=${PORT:8080}
server.address=0.0.0.0
# Default active profile
spring.profiles.active=dev
logging.level.org.atmosphere=warn
logging.level.de.assecutor.votianlt=INFO
logging.level.de.assecutor.votianlt.controller.MessageController=DEBUG
@@ -15,7 +18,7 @@ vaadin.allowed-packages=com.vaadin,org.vaadin,de.assecutor.votianlt
# Open-in-view is only needed if you use lazy-loaded entities in your Flow views.
spring.jpa.open-in-view=false
# MongoDB - Development database by default
# MongoDB - Default configuration (override in profile-specific files)
spring.data.mongodb.uri=mongodb://192.168.180.25:27017/votianlt_dev
spring.data.mongodb.auto-index-creation=true
spring.data.mongodb.socket-timeout=30000