Modify task model, create some UI...

This commit is contained in:
maciejrusek
2026-05-04 21:01:01 +02:00
parent 49b3239148
commit 9098f0a634
9 changed files with 130 additions and 14 deletions

View File

@@ -4,6 +4,7 @@ import models.User;
import util.Session;
import javax.swing.*;
import java.awt.*;
import java.util.function.Consumer;
public class HomePanel extends BasePanel {
@@ -23,6 +24,11 @@ public class HomePanel extends BasePanel {
changePanel.accept("auth");
});
JButton addTodoButton = new JButton("Create Todo");
addTodoButton.addActionListener(e -> {
Session.getInstance().logout();
changePanel.accept("create_todo");
});
@@ -37,6 +43,7 @@ public class HomePanel extends BasePanel {
add(logoutButton);
add(addTodoButton, BorderLayout.NORTH);
}
}