2021-12-13 09:38:07 +02:00
|
|
|
// gorc project
|
2022-01-24 04:24:58 +02:00
|
|
|
// Copyright (C) 2022 IllusionMan1212
|
2021-12-13 09:38:07 +02:00
|
|
|
//
|
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation; either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU General Public License along
|
|
|
|
|
// with this program; if not, see https://www.gnu.org/licenses.
|
|
|
|
|
|
|
|
|
|
package mainscreen
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/charmbracelet/lipgloss"
|
|
|
|
|
"github.com/illusionman1212/gorc/ui"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var (
|
2025-08-11 22:51:50 +02:00
|
|
|
InputboxStyle = ui.DefaultStyle.
|
2021-12-13 09:38:07 +02:00
|
|
|
Border(lipgloss.NormalBorder(), true).
|
|
|
|
|
Padding(0, 1).
|
|
|
|
|
Width(ui.MainStyle.GetWidth()).
|
2022-01-25 01:41:25 +02:00
|
|
|
BorderForeground(ui.AccentColor)
|
2025-08-11 22:51:50 +02:00
|
|
|
MessagesStyle = ui.DefaultStyle.
|
2022-01-20 05:08:39 +02:00
|
|
|
Border(lipgloss.NormalBorder(), false, true, true, true).
|
2022-01-09 04:30:22 +02:00
|
|
|
Width(ui.MainStyle.GetWidth() * 8 / 10).
|
2022-01-25 01:41:25 +02:00
|
|
|
BorderForeground(ui.PrimaryColor)
|
2025-08-11 22:51:50 +02:00
|
|
|
SidePanelStyle = ui.DefaultStyle.
|
2022-01-09 04:30:22 +02:00
|
|
|
Border(lipgloss.NormalBorder(), true).
|
|
|
|
|
Width(ui.MainStyle.GetWidth() * 2 / 10).
|
2022-01-25 01:41:25 +02:00
|
|
|
BorderForeground(ui.PrimaryColor)
|
2022-01-20 05:08:39 +02:00
|
|
|
|
|
|
|
|
activeTabBorder = lipgloss.Border{
|
|
|
|
|
Top: "─",
|
|
|
|
|
Bottom: " ",
|
|
|
|
|
Left: "│",
|
|
|
|
|
Right: "│",
|
|
|
|
|
TopLeft: "╭",
|
|
|
|
|
TopRight: "╮",
|
|
|
|
|
BottomLeft: "┘",
|
|
|
|
|
BottomRight: "└",
|
|
|
|
|
}
|
2022-01-25 01:41:25 +02:00
|
|
|
|
2022-01-20 05:08:39 +02:00
|
|
|
tabBorder = lipgloss.Border{
|
|
|
|
|
Top: "─",
|
|
|
|
|
Bottom: "─",
|
|
|
|
|
Left: "│",
|
|
|
|
|
Right: "│",
|
|
|
|
|
TopLeft: "╭",
|
|
|
|
|
TopRight: "╮",
|
|
|
|
|
BottomLeft: "┴",
|
|
|
|
|
BottomRight: "┴",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
leftArrowBorder = lipgloss.Border{
|
|
|
|
|
Top: "─",
|
|
|
|
|
Bottom: " ",
|
|
|
|
|
Left: "│",
|
|
|
|
|
Right: "│",
|
|
|
|
|
TopLeft: "╭",
|
|
|
|
|
TopRight: "┐",
|
|
|
|
|
BottomLeft: "│",
|
|
|
|
|
BottomRight: "└",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rightArrowBorder = lipgloss.Border{
|
|
|
|
|
Top: "─",
|
|
|
|
|
Bottom: " ",
|
|
|
|
|
Left: "│",
|
|
|
|
|
Right: "│",
|
|
|
|
|
TopLeft: "┌",
|
|
|
|
|
TopRight: "╮",
|
|
|
|
|
BottomLeft: "┘",
|
|
|
|
|
BottomRight: "│",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tab = lipgloss.NewStyle().
|
|
|
|
|
Border(tabBorder, true).
|
2022-01-25 01:41:25 +02:00
|
|
|
Foreground(ui.PrimaryColor).
|
2022-01-20 05:08:39 +02:00
|
|
|
Padding(0, 1)
|
|
|
|
|
|
2025-08-11 22:51:50 +02:00
|
|
|
activeTab = tab.
|
2022-01-20 05:08:39 +02:00
|
|
|
Border(activeTabBorder, true).
|
2022-01-25 01:41:25 +02:00
|
|
|
BorderForeground(ui.AccentColor).
|
|
|
|
|
Foreground(ui.AccentColor).
|
2022-01-20 05:08:39 +02:00
|
|
|
Italic(true).
|
|
|
|
|
Bold(true)
|
|
|
|
|
|
2025-08-11 22:51:50 +02:00
|
|
|
leftArrowDim = tab.
|
2022-01-20 05:08:39 +02:00
|
|
|
Border(leftArrowBorder, true).
|
2022-01-25 01:41:25 +02:00
|
|
|
BorderForeground(ui.PrimaryColor).
|
2022-01-29 00:45:32 +02:00
|
|
|
Foreground(ui.DisabledColor)
|
2025-08-11 22:51:50 +02:00
|
|
|
rightArrowDim = tab.
|
2022-01-20 05:08:39 +02:00
|
|
|
Border(rightArrowBorder, true).
|
2022-01-25 01:41:25 +02:00
|
|
|
BorderForeground(ui.PrimaryColor).
|
2022-01-29 00:45:32 +02:00
|
|
|
Foreground(ui.DisabledColor)
|
2022-01-20 05:08:39 +02:00
|
|
|
|
2025-08-11 22:51:50 +02:00
|
|
|
leftArrowLit = tab.
|
2022-01-20 05:08:39 +02:00
|
|
|
Border(leftArrowBorder, true).
|
2022-01-25 01:41:25 +02:00
|
|
|
Foreground(ui.PrimaryColor)
|
2025-08-11 22:51:50 +02:00
|
|
|
rightArrowLit = tab.
|
2022-01-20 05:08:39 +02:00
|
|
|
Border(rightArrowBorder, true).
|
2022-01-25 01:41:25 +02:00
|
|
|
Foreground(ui.PrimaryColor)
|
2022-01-20 05:08:39 +02:00
|
|
|
|
2022-01-25 01:41:25 +02:00
|
|
|
tabLine = lipgloss.NewStyle().
|
|
|
|
|
Foreground(ui.PrimaryColor)
|
2021-12-13 09:38:07 +02:00
|
|
|
)
|