This commit is contained in:
@@ -2,8 +2,10 @@ package steps
|
||||
|
||||
import (
|
||||
"miasma-installer/tui/styles"
|
||||
"strings"
|
||||
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
)
|
||||
|
||||
type WelcomeModel struct {
|
||||
@@ -34,13 +36,42 @@ func (m WelcomeModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
}
|
||||
|
||||
func (m WelcomeModel) View() string {
|
||||
s := styles.TitleStyle.Render("Welcome to the Miasma OS Installer")
|
||||
s += "\n\n"
|
||||
s += "This program will guide you through installing Miasma OS. \n"
|
||||
s += "Please ensure that you have backed up any important data before proceding"
|
||||
s += "\n\n"
|
||||
s += styles.HelpStyle.Render("Press [Enter] to continue")
|
||||
s += styles.HelpStyle.Render("Press [Ctrl+C] to exit")
|
||||
logo := `
|
||||
███╗ ███╗██╗ █████╗ ███████╗███╗ ███╗ █████╗
|
||||
████╗ ████║██║██╔══██╗██╔════╝████╗ ████║██╔══██╗
|
||||
██╔████╔██║██║███████║███████╗██╔████╔██║███████║
|
||||
██║╚██╔╝██║██║██╔══██║╚════██║██║╚██╔╝██║██╔══██║
|
||||
██║ ╚═╝ ██║██║██║ ██║███████║██║ ╚═╝ ██║██║ ██║
|
||||
╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝
|
||||
`
|
||||
|
||||
return styles.MainStyle.Render(s)
|
||||
var content strings.Builder
|
||||
|
||||
content.WriteString(styles.LogoStyle.Render(logo))
|
||||
content.WriteString("\n\n")
|
||||
content.WriteString(styles.TitleStyle.Render("Welcome to Miasma OS Installer"))
|
||||
content.WriteString("\n")
|
||||
content.WriteString(styles.SubtitleStyle.Render("An opinionated Arch Linux installation"))
|
||||
content.WriteString("\n\n")
|
||||
|
||||
features := []string{
|
||||
"🔒 LUKS2 encryption by default",
|
||||
"🗂️ Btrfs filesystem with snapshots",
|
||||
"🛡️ Hardened Linux kernel",
|
||||
"🚀 Cosmic Desktop environment",
|
||||
"⚡ UEFI boot with systemd-boot",
|
||||
}
|
||||
|
||||
featureBox := styles.InfoBoxStyle.Render(strings.Join(features, "\n"))
|
||||
content.WriteString(featureBox)
|
||||
content.WriteString("\n\n")
|
||||
|
||||
warning := styles.WarningBoxStyle.Render("⚠️ WARNING: This will erase all data on the selected disk!")
|
||||
content.WriteString(warning)
|
||||
content.WriteString("\n\n")
|
||||
|
||||
help := styles.RenderHelp("Enter", "Continue", "Ctrl+C", "Exit")
|
||||
content.WriteString(help)
|
||||
|
||||
return styles.AppStyle.Render(content.String())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user