2025-01-18 22:06:25 +00:00
|
|
|
package app
|
|
|
|
|
|
|
|
import (
|
|
|
|
"git.sr.ht/~rockorager/vaxis"
|
|
|
|
"git.tilde.town/nbsp/welcome/ui"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Introduction struct{}
|
|
|
|
|
|
|
|
func (view *Introduction) Event(state *ui.State, event vaxis.Event) (processed bool) {
|
|
|
|
if key, ok := event.(vaxis.Key); ok && key.EventType == vaxis.EventPress {
|
|
|
|
switch key.String() {
|
|
|
|
case "Ctrl+c", "Ctrl+d":
|
|
|
|
close(ui.Quit)
|
|
|
|
case "Enter":
|
|
|
|
ui.ViewChange <- &Settings{}
|
|
|
|
}
|
|
|
|
processed = true
|
|
|
|
}
|
2025-02-06 19:50:25 +00:00
|
|
|
win := state.Window().New(0, 0, 80, state.Window().Height)
|
|
|
|
win.Wrap(vaxis.Segment{Text: `──── welcome to tilde town ────
|
2025-01-18 22:06:25 +00:00
|
|
|
|
2025-02-06 19:50:25 +00:00
|
|
|
`, Style: vaxis.Style{Foreground: vaxis.IndexColor(5)}}, vaxis.Segment{Text: `welcome to tilde town! we're glad you're here.
|
2025-01-18 22:06:25 +00:00
|
|
|
|
2025-02-06 19:50:25 +00:00
|
|
|
this short tutorial will help you get accustomed to the terminal — the text-based user interface that you will do most of your interacting with town on. if you're here, this means you've successfully connected to town over ssh — good job! you can handle the rest. i believe in you <3
|
2025-01-18 22:06:25 +00:00
|
|
|
|
2025-02-06 19:50:25 +00:00
|
|
|
press ↲ to continue to the next page. if you know what you're doing, you can press C-c or C-d at any point to exit to a shell.`})
|
2025-01-18 22:06:25 +00:00
|
|
|
return
|
|
|
|
}
|