diff --git a/src/main/java/asd_morning_9/note/ui/MainView.java b/src/main/java/asd_morning_9/note/ui/MainView.java index a7e4c70..82fb1c5 100644 --- a/src/main/java/asd_morning_9/note/ui/MainView.java +++ b/src/main/java/asd_morning_9/note/ui/MainView.java @@ -38,7 +38,6 @@ @CssImport("./styles/MainView.css") public class MainView extends VerticalLayout { - private JsonParser parser; public int language = 0; //0 = Englisch, 1 = Deutsch, 2 = Französisch public MainView() { @@ -82,7 +81,6 @@ public MainView() { Notification.Position.MIDDLE); notification.open(); })); - } else if(language == 2) { @@ -98,7 +96,6 @@ else if(language == 2) title.setLabel("Titre"); title.setClassName("newNoteTitle"); - TextField tags = new TextField(); tags.setLabel("Tags"); diff --git a/src/main/java/asd_morning_9/note/ui/SortAndFilter.java b/src/main/java/asd_morning_9/note/ui/SortAndFilter.java index 8d87d95..0af3453 100644 --- a/src/main/java/asd_morning_9/note/ui/SortAndFilter.java +++ b/src/main/java/asd_morning_9/note/ui/SortAndFilter.java @@ -13,16 +13,12 @@ @Route(value = "SortAndFilter", layout = MainLayout.class) @CssImport("./styles/SortAndFilter.css") public class SortAndFilter extends VerticalLayout { - private JsonParser parser; - public int language = 0; //0 = Englisch, 1 = Deutsch, 2 = Französisch public SortAndFilter() { parser = new JsonParser(); parser.ReadNotes(); - //Note new_note = new Note(2, "new Title", "new Content"); - //parser.AddNote(new_note); parser.SaveNotes(); if(language == 1) { @@ -39,7 +35,6 @@ public SortAndFilter() { Header head = new Header(); head.add(item.getTitle()); - //li.addClassName(Integer.toString(item.getId())); cont.add(head); cont.add("Text: " + item.getContent()); cont.add(br); @@ -51,7 +46,6 @@ public SortAndFilter() { //Sort by title add(new Button("Sortieren mit Titel", event -> { - //TextField id = new TextField("id"); parser.SortNoteByTitel(); remove(ui); @@ -65,7 +59,6 @@ public SortAndFilter() { Header head = new Header(); head.add(item.getTitle()); - //li.addClassName(Integer.toString(item.getId())); cont.add(head); cont.add("Text: " + item.getContent()); cont.add(br); @@ -82,7 +75,6 @@ public SortAndFilter() { })); //Filter by tag - TextField tag = new TextField(); tag.setLabel("Tags"); tag.setPlaceholder("Filtern mit tag ..."); @@ -109,7 +101,6 @@ public SortAndFilter() { Header head = new Header(); head.add(item.getTitle()); - //li.addClassName(Integer.toString(item.getId())); cont.add(head); cont.add("Text: " + item.getContent()); cont.add(br); @@ -139,7 +130,6 @@ else if(language == 2) for (Note item : parser.getNotesList()) { Div cont = new Div(); - Header head = new Header(); head.add(item.getTitle()); cont.add(head); @@ -163,7 +153,6 @@ else if(language == 2) { Div cont = new Div(); Div footer = new Div(); - Header head = new Header(); head.add(item.getTitle()); cont.add(head); @@ -323,6 +312,5 @@ else if(language == 2) })); add(ui); } - } } diff --git a/src/test/java/asd_morning_9/note/NoteTest.java b/src/test/java/asd_morning_9/note/NoteTest.java index 8ab1b81..8675bc8 100644 --- a/src/test/java/asd_morning_9/note/NoteTest.java +++ b/src/test/java/asd_morning_9/note/NoteTest.java @@ -6,7 +6,6 @@ public class NoteTest { - private int id = 0; private String title = "title"; private String content = "content";