add ignore
This commit is contained in:
1
src/main/frontend/chart-helper.js
Normal file
1
src/main/frontend/chart-helper.js
Normal file
@@ -0,0 +1 @@
|
||||
src/main/frontend/chart-helper.js
|
||||
0
src/main/frontend/src/chart-js.js
Normal file
0
src/main/frontend/src/chart-js.js
Normal file
32
src/main/frontend/themes/myTheme/styles.css
Normal file
32
src/main/frontend/themes/myTheme/styles.css
Normal file
@@ -0,0 +1,32 @@
|
||||
:root {
|
||||
/* Hintergrund- und Textfarben */
|
||||
--lumo-base-color: hsl(0, 0%, 8%); /* Sehr dunkles Grau (fast schwarz) */
|
||||
--lumo-body-text-color: hsl(150, 30%, 90%); /* Hellgrünliches Weiß für Text */
|
||||
|
||||
/* Primärfarbe in grün */
|
||||
--lumo-primary-color: hsl(145, 80%, 40%);
|
||||
--lumo-primary-color-50pct: hsla(145, 80%, 40%, 0.5);
|
||||
--lumo-primary-color-10pct: hsla(145, 80%, 40%, 0.1);
|
||||
|
||||
/* Sekundärfarben / Akzente */
|
||||
--lumo-success-color: hsl(145, 80%, 35%);
|
||||
--lumo-error-color: hsl(0, 80%, 60%);
|
||||
--lumo-border-radius: 6px;
|
||||
}
|
||||
|
||||
/* Hintergrundfarbe für Schaltflächen */
|
||||
[theme~="primary"] {
|
||||
background-color: var(--lumo-primary-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
vaadin-button {
|
||||
border-radius: var(--lumo-border-radius);
|
||||
}
|
||||
|
||||
/* Grid-Styling */
|
||||
vaadin-grid {
|
||||
border-radius: var(--lumo-border-radius);
|
||||
background-color: var(--lumo-base-color);
|
||||
color: var(--lumo-body-text-color);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package de.nilzbu.mytimetracker;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class MyTimeTrackerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MyTimeTrackerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package de.nilzbu.mytimetracker.config;
|
||||
|
||||
import com.vaadin.flow.component.page.AppShellConfigurator;
|
||||
import com.vaadin.flow.theme.Theme;
|
||||
|
||||
@Theme(value = "my-theme") // oder dein tatsächlicher Theme-Name
|
||||
public class AppShellConfig implements AppShellConfigurator {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package de.nilzbu.mytimetracker.config;
|
||||
|
||||
public class DataInitializer {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package de.nilzbu.mytimetracker.config;
|
||||
|
||||
public class SeedDataGenerator {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package de.nilzbu.mytimetracker.model;
|
||||
|
||||
public class DayStatus {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package de.nilzbu.mytimetracker.model;
|
||||
|
||||
public class TimeEntry {
|
||||
}
|
||||
4
src/main/java/de/nilzbu/mytimetracker/model/User.java
Normal file
4
src/main/java/de/nilzbu/mytimetracker/model/User.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package de.nilzbu.mytimetracker.model;
|
||||
|
||||
public class User {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package de.nilzbu.mytimetracker.repository;
|
||||
|
||||
public class TimeEntryRepository {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package de.nilzbu.mytimetracker.repository;
|
||||
|
||||
public class UserRepository {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package de.nilzbu.mytimetracker.security;
|
||||
|
||||
public class SecurityConfig {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package de.nilzbu.mytimetracker.security;
|
||||
|
||||
public class UserDetailsServiceImpl {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package de.nilzbu.mytimetracker.service;
|
||||
|
||||
public class TimeEntryService {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package de.nilzbu.mytimetracker.service;
|
||||
|
||||
public class UserService {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package de.nilzbu.mytimetracker.ui.component;
|
||||
|
||||
public class ChartJsComponent {
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package de.nilzbu.mytimetracker.ui;
|
||||
|
||||
import com.vaadin.flow.component.applayout.AppLayout;
|
||||
import com.vaadin.flow.component.html.H1;
|
||||
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
||||
import com.vaadin.flow.router.RouterLink;
|
||||
import com.vaadin.flow.component.button.Button;
|
||||
import com.vaadin.flow.server.auth.AccessAnnotationChecker;
|
||||
import com.vaadin.flow.component.orderedlayout.FlexComponent;
|
||||
import com.vaadin.flow.component.html.Span;
|
||||
import com.vaadin.flow.router.PageTitle;
|
||||
import jakarta.annotation.security.PermitAll;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;
|
||||
|
||||
@PermitAll
|
||||
public class MainLayout extends AppLayout {
|
||||
|
||||
public MainLayout() {
|
||||
createHeader();
|
||||
}
|
||||
|
||||
private void createHeader() {
|
||||
H1 logo = new H1("My Time Tracker");
|
||||
logo.getStyle().set("font-size", "var(--lumo-font-size-l)").set("margin", "0");
|
||||
|
||||
RouterLink homeLink = new RouterLink("Startseite", MainView.class);
|
||||
homeLink.getStyle().set("margin-left", "2em");
|
||||
|
||||
Button logout = new Button("Logout", e -> {
|
||||
SecurityContextLogoutHandler logoutHandler = new SecurityContextLogoutHandler();
|
||||
logoutHandler.logout(
|
||||
null,
|
||||
SecurityContextHolder.getContext().getAuthentication(),
|
||||
null
|
||||
);
|
||||
getUI().ifPresent(ui -> ui.getPage().setLocation("/login"));
|
||||
});
|
||||
|
||||
HorizontalLayout header = new HorizontalLayout(logo, homeLink, logout);
|
||||
header.setDefaultVerticalComponentAlignment(FlexComponent.Alignment.CENTER);
|
||||
header.setWidthFull();
|
||||
header.setPadding(true);
|
||||
header.setSpacing(true);
|
||||
|
||||
addToNavbar(header);
|
||||
}
|
||||
}
|
||||
22
src/main/java/de/nilzbu/mytimetracker/ui/view/LoginView.java
Normal file
22
src/main/java/de/nilzbu/mytimetracker/ui/view/LoginView.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package de.nilzbu.mytimetracker.ui;
|
||||
|
||||
import com.vaadin.flow.component.html.H2;
|
||||
import com.vaadin.flow.component.login.LoginForm;
|
||||
import com.vaadin.flow.component.login.LoginI18n;
|
||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||
import com.vaadin.flow.router.Route;
|
||||
|
||||
@Route("login")
|
||||
public class LoginView extends VerticalLayout {
|
||||
|
||||
public LoginView() {
|
||||
setSizeFull();
|
||||
setAlignItems(Alignment.CENTER);
|
||||
setJustifyContentMode(JustifyContentMode.CENTER);
|
||||
|
||||
LoginForm login = new LoginForm();
|
||||
login.setAction("login"); // wichtig für Spring Security
|
||||
|
||||
add(new H2("My Time Tracker – Anmeldung"), login);
|
||||
}
|
||||
}
|
||||
29
src/main/java/de/nilzbu/mytimetracker/ui/view/MainView.java
Normal file
29
src/main/java/de/nilzbu/mytimetracker/ui/view/MainView.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package de.nilzbu.mytimetracker.ui;
|
||||
|
||||
import com.vaadin.flow.component.html.H1;
|
||||
import com.vaadin.flow.component.html.Paragraph;
|
||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||
import com.vaadin.flow.router.Route;
|
||||
import jakarta.annotation.security.PermitAll;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
|
||||
@Route("")
|
||||
@PermitAll
|
||||
public class MainView extends VerticalLayout {
|
||||
|
||||
public MainView() {
|
||||
setSizeFull();
|
||||
setPadding(true);
|
||||
setSpacing(true);
|
||||
|
||||
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||
String username = (auth != null) ? auth.getName() : "unbekannt";
|
||||
|
||||
add(
|
||||
new H1("Willkommen, " + username + "!"),
|
||||
new Paragraph("Dies ist Ihr Arbeitszeit-Dashboard."),
|
||||
new Paragraph("Fügen Sie hier später Navigation, Statistiken oder Schnellzugriffe hinzu.")
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package de.nilzbu.mytimetracker.ui.view;
|
||||
|
||||
public class TimeEntryView {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package de.nilzbu.mytimetracker.ui.view;
|
||||
|
||||
public class UserAdminView {
|
||||
}
|
||||
0
src/main/resources/application-docker.properties
Normal file
0
src/main/resources/application-docker.properties
Normal file
2
src/main/resources/application.properties
Normal file
2
src/main/resources/application.properties
Normal file
@@ -0,0 +1,2 @@
|
||||
vaadin.launch-browser=true
|
||||
spring.application.name=MyTimeTracker
|
||||
Reference in New Issue
Block a user