2021-11-13 06:38:12 +02:00
|
|
|
// gorc project
|
2022-01-24 04:24:58 +02:00
|
|
|
// Copyright (C) 2022 IllusionMan1212
|
2021-11-13 06:38:12 +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 login
|
|
|
|
|
|
2022-01-25 00:05:34 +02:00
|
|
|
import (
|
|
|
|
|
"github.com/charmbracelet/lipgloss"
|
2022-01-25 01:41:25 +02:00
|
|
|
"github.com/illusionman1212/gorc/ui"
|
2022-01-25 00:05:34 +02:00
|
|
|
)
|
2021-11-13 06:38:12 +02:00
|
|
|
|
|
|
|
|
const WelcomeMsg = `
|
|
|
|
|
|
|
|
|
|
/$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$
|
|
|
|
|
/$$__ $$ /$$__ $$ /$$__ $$ /$$_____/
|
|
|
|
|
| $$ \ $$| $$ \ $$| $$ \__/| $$
|
|
|
|
|
| $$ | $$| $$ | $$| $$ | $$
|
|
|
|
|
| $$$$$$$| $$$$$$/| $$ | $$$$$$$
|
|
|
|
|
\____ $$ \______/ |__/ \_______/
|
|
|
|
|
/$$ \ $$
|
|
|
|
|
| $$$$$$/
|
|
|
|
|
\______/
|
|
|
|
|
|
|
|
|
|
`
|
|
|
|
|
|
|
|
|
|
var (
|
2022-01-29 00:45:32 +02:00
|
|
|
BlurredDisabledButton = lipgloss.NewStyle().
|
|
|
|
|
Border(lipgloss.NormalBorder()).
|
|
|
|
|
BorderForeground(ui.DisabledColor).
|
|
|
|
|
Foreground(ui.DisabledColor).
|
|
|
|
|
MarginTop(1).
|
|
|
|
|
Padding(0, 2).
|
|
|
|
|
Align(lipgloss.Center).
|
|
|
|
|
Render("Connect")
|
|
|
|
|
FocusedDisabledButton = lipgloss.NewStyle().
|
|
|
|
|
Border(lipgloss.NormalBorder()).
|
|
|
|
|
BorderForeground(ui.DisabledColorFocus).
|
|
|
|
|
Foreground(ui.DisabledColorFocus).
|
|
|
|
|
MarginTop(1).
|
|
|
|
|
Padding(0, 2).
|
|
|
|
|
Align(lipgloss.Center).
|
|
|
|
|
Render("Connect")
|
2021-12-31 00:04:58 +02:00
|
|
|
FocusedButton = lipgloss.NewStyle().
|
2022-01-25 01:41:25 +02:00
|
|
|
Border(lipgloss.NormalBorder()).
|
|
|
|
|
BorderForeground(ui.AccentColor).
|
|
|
|
|
Foreground(ui.AccentColor).
|
2021-11-13 06:38:12 +02:00
|
|
|
MarginTop(1).
|
|
|
|
|
Padding(0, 2).
|
|
|
|
|
Align(lipgloss.Center).
|
2022-01-25 01:41:25 +02:00
|
|
|
Bold(true).
|
2021-11-13 06:38:12 +02:00
|
|
|
Render("Connect")
|
2021-12-31 00:04:58 +02:00
|
|
|
BlurredButton = lipgloss.NewStyle().
|
2022-01-25 01:41:25 +02:00
|
|
|
Border(lipgloss.NormalBorder()).
|
|
|
|
|
BorderForeground(ui.PrimaryColor).
|
|
|
|
|
Foreground(ui.PrimaryColor).
|
2021-11-13 06:38:12 +02:00
|
|
|
MarginTop(1).
|
|
|
|
|
Padding(0, 2).
|
|
|
|
|
Align(lipgloss.Center).
|
|
|
|
|
Render("Connect")
|
2021-12-31 00:04:58 +02:00
|
|
|
FocusedCheckbox = lipgloss.NewStyle().
|
2022-01-25 01:41:25 +02:00
|
|
|
Foreground(ui.AccentColor).
|
2021-11-13 06:38:12 +02:00
|
|
|
MarginTop(1).
|
2025-08-11 22:51:50 +02:00
|
|
|
Render("TLS Enabled [☓]")
|
2021-11-13 06:38:12 +02:00
|
|
|
|
2021-12-31 00:04:58 +02:00
|
|
|
BlurredCheckbox = lipgloss.NewStyle().
|
2022-01-25 01:41:25 +02:00
|
|
|
Foreground(ui.PrimaryColor).
|
2021-11-13 06:38:12 +02:00
|
|
|
MarginTop(1).
|
2025-08-11 22:51:50 +02:00
|
|
|
Render("TLS Enabled [☓]")
|
2021-11-13 06:38:12 +02:00
|
|
|
|
2021-12-31 00:04:58 +02:00
|
|
|
FocusedCheckboxChecked = lipgloss.NewStyle().
|
2022-01-25 01:41:25 +02:00
|
|
|
Foreground(ui.AccentColor).
|
2021-11-13 06:38:12 +02:00
|
|
|
MarginTop(1).
|
2025-08-11 22:51:50 +02:00
|
|
|
Render("TLS Enabled [✔]")
|
2021-11-13 06:38:12 +02:00
|
|
|
|
2021-12-31 00:04:58 +02:00
|
|
|
BlurredCheckboxChecked = lipgloss.NewStyle().
|
2022-01-25 01:41:25 +02:00
|
|
|
Foreground(ui.PrimaryColor).
|
2021-11-13 06:38:12 +02:00
|
|
|
MarginTop(1).
|
2025-08-11 22:51:50 +02:00
|
|
|
Render("TLS Enabled [✔]")
|
2022-01-25 00:05:34 +02:00
|
|
|
|
|
|
|
|
DialogStyle = lipgloss.NewStyle().
|
|
|
|
|
Align(lipgloss.Center)
|
|
|
|
|
|
|
|
|
|
WelcomeMsgStyle = lipgloss.NewStyle().
|
2022-01-25 01:41:25 +02:00
|
|
|
Align(lipgloss.Center).
|
|
|
|
|
Foreground(ui.PrimaryColor)
|
|
|
|
|
|
|
|
|
|
CursorStyle = lipgloss.NewStyle().
|
|
|
|
|
Foreground(ui.AccentColor)
|
|
|
|
|
FocusedStyle = lipgloss.NewStyle().
|
|
|
|
|
Foreground(ui.AccentColor)
|
2021-11-13 06:38:12 +02:00
|
|
|
)
|