Add Calendar Events widget, integrate ICS calendar parsing, and refine related UI components
This commit is contained in:
@@ -35,6 +35,7 @@ func initWidgets(ctx context.Context, term *tcell.Terminal) {
|
||||
widgets.New("Clock", widgets.Clock()),
|
||||
widgets.New("Date", widgets.Date()),
|
||||
widgets.New("Calendar", widgets.Calendar()),
|
||||
widgets.New("CalendarEvents", widgets.CalendarEvents()),
|
||||
widgets.New("Weather", widgets.Weather()),
|
||||
widgets.New("ChangeTitle", widgets.TextInput(titleUpdate, textinput.Label("Update Title: "), textinput.PlaceHolder("New Title"))),
|
||||
widgets.New("Wifi", widgets.WifiQRCode()),
|
||||
@@ -63,10 +64,10 @@ func layout() []container.Option {
|
||||
grid.Widget(widgets.Get["NetworkDevices"],
|
||||
container.BorderTitle("Network Devices"),
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorWhite)),
|
||||
),
|
||||
grid.RowHeightFixed(1,
|
||||
grid.Widget(widgets.Get["empty"]),
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
container.PaddingLeft(1),
|
||||
container.PaddingTop(1),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -86,6 +87,8 @@ func layout() []container.Option {
|
||||
container.BorderTitle("pi-hole"),
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
container.PaddingLeft(1),
|
||||
container.PaddingTop(1),
|
||||
),
|
||||
),
|
||||
grid.RowHeightFixed(40,
|
||||
@@ -95,9 +98,6 @@ func layout() []container.Option {
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
),
|
||||
),
|
||||
grid.RowHeightFixed(85,
|
||||
grid.Widget(widgets.Get["empty"]),
|
||||
),
|
||||
),
|
||||
|
||||
grid.ColWidthFixed(26,
|
||||
@@ -105,23 +105,42 @@ func layout() []container.Option {
|
||||
grid.Widget(widgets.Get["Calendar"],
|
||||
container.BorderTitle("Calendar"),
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorWhite)),
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
container.PaddingLeft(1),
|
||||
container.PaddingTop(1),
|
||||
),
|
||||
),
|
||||
grid.RowHeightFixed(25,
|
||||
grid.Widget(widgets.Get["empty"]),
|
||||
grid.Widget(widgets.Get["empty"],
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorGreen),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
grid.ColWidthFixed(25,
|
||||
grid.RowHeightFixed(20,
|
||||
grid.Widget(widgets.Get["CalendarEvents"],
|
||||
container.BorderTitle("Events"),
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
container.PaddingLeft(1),
|
||||
container.PaddingTop(1),
|
||||
),
|
||||
),
|
||||
grid.RowHeightFixed(13,
|
||||
grid.Widget(widgets.Get["Weather"],
|
||||
container.BorderTitle("Weather"),
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
container.PaddingLeft(1),
|
||||
),
|
||||
),
|
||||
grid.RowHeightFixed(85,
|
||||
grid.Widget(widgets.Get["empty"]),
|
||||
grid.Widget(widgets.Get["empty"],
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -131,6 +150,8 @@ func layout() []container.Option {
|
||||
container.BorderTitle("News"),
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
container.PaddingLeft(1),
|
||||
container.PaddingTop(1),
|
||||
),
|
||||
),
|
||||
grid.RowHeightFixed(20,
|
||||
@@ -138,6 +159,8 @@ func layout() []container.Option {
|
||||
container.BorderTitle("BBK Warnings"),
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
container.PaddingLeft(1),
|
||||
container.PaddingTop(1),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -145,17 +168,27 @@ func layout() []container.Option {
|
||||
|
||||
grid.ColWidthPerc(35,
|
||||
grid.RowHeightFixed(20,
|
||||
grid.Widget(widgets.Get["HTTPProber"],
|
||||
container.BorderTitle("Website Status"),
|
||||
grid.Widget(widgets.Get["empty"],
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
),
|
||||
),
|
||||
grid.RowHeightPerc(25,
|
||||
grid.RowHeightFixed(24,
|
||||
grid.Widget(widgets.Get["HTTPProber"],
|
||||
container.BorderTitle("Website Status"),
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
container.PaddingLeft(1),
|
||||
container.PaddingTop(1),
|
||||
),
|
||||
),
|
||||
grid.RowHeightFixed(40,
|
||||
grid.Widget(widgets.Get["Docker"],
|
||||
container.BorderTitle("Docker"),
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
container.PaddingLeft(1),
|
||||
container.PaddingTop(1),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user