Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
81f1f8ee60
commit
0406fbe14d
@ -2,5 +2,7 @@
|
|||||||
|
|
||||||
- [x] Display todos as todos
|
- [x] Display todos as todos
|
||||||
- [ ] Create sections
|
- [ ] Create sections
|
||||||
|
- [ ] Edit todos
|
||||||
|
- [ ] Move items
|
||||||
- [ ] Display summaries and limit todos
|
- [ ] Display summaries and limit todos
|
||||||
- [ ] Implement scroll
|
- [ ] Implement scroll
|
||||||
|
@ -285,8 +285,17 @@ impl StatefulWidget for &mut CreateItem {
|
|||||||
type State = CreateItemState;
|
type State = CreateItemState;
|
||||||
|
|
||||||
fn render(self, area: Rect, buf: &mut Buffer, state: &mut Self::State) {
|
fn render(self, area: Rect, buf: &mut Buffer, state: &mut Self::State) {
|
||||||
let chunks =
|
let chunks = Layout::vertical(vec![
|
||||||
Layout::vertical(vec![Constraint::Length(3), Constraint::Length(3)]).split(area);
|
Constraint::Length(2),
|
||||||
|
Constraint::Length(3),
|
||||||
|
Constraint::Length(3),
|
||||||
|
])
|
||||||
|
.split(area);
|
||||||
|
|
||||||
|
let path = format!("path: {}.{}", state.root, state.path.join("."));
|
||||||
|
let path_header = Paragraph::new(path).dark_gray();
|
||||||
|
path_header.render(chunks[0], buf);
|
||||||
|
|
||||||
let mut title_input = InputField::new("title");
|
let mut title_input = InputField::new("title");
|
||||||
let mut description_input = InputField::new("description");
|
let mut description_input = InputField::new("description");
|
||||||
|
|
||||||
@ -295,8 +304,8 @@ impl StatefulWidget for &mut CreateItem {
|
|||||||
CreateItemFocused::Description => description_input.focused = true,
|
CreateItemFocused::Description => description_input.focused = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
title_input.render(chunks[0], buf, &mut state.title);
|
title_input.render(chunks[1], buf, &mut state.title);
|
||||||
description_input.render(chunks[1], buf, &mut state.description);
|
description_input.render(chunks[2], buf, &mut state.description);
|
||||||
|
|
||||||
// let title = Paragraph::new("something"); //.block(block);
|
// let title = Paragraph::new("something"); //.block(block);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user