diff options
| author | Jeff Carr <[email protected]> | 2019-05-29 07:24:40 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-05-29 07:24:40 -0700 |
| commit | 8049b087e9148e331208d2dd1e1af4f7d47e5edb (patch) | |
| tree | 36227dd649edf85cde99695a9a3995e4a5ea3aac /splash.go | |
| parent | 001ecda358e3aa3ef8ccbe917b118200a02a2699 (diff) | |
start to refactor the splash area code
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'splash.go')
| -rw-r--r-- | splash.go | 30 |
1 files changed, 27 insertions, 3 deletions
@@ -14,10 +14,11 @@ func ShowSplashBox() *ui.Box { newbox := ui.NewVerticalBox() newbox.SetPadded(true) - makeAttributedString() - Data.MyArea = makeSplashArea() + newText := makeAttributedString() + myAH.Attrstr = newText + newAH := makeSplashArea() - newbox.Append(Data.MyArea, true) + newbox.Append(newAH.Area, true) if runtime.GOOS == "linux" { newbox.Append(ui.NewLabel("OS: Linux"), false) @@ -50,3 +51,26 @@ func ShowSplashBox() *ui.Box { return newbox } + +func makeAttributedString() *ui.AttributedString { + newText := ui.NewAttributedString("") + + appendWithAttributes(newText, "Welcome to the Cloud Control Panel\n", ui.TextSize(16), ui.TextColor{0.0, 0.0, 0.8, .8}) // "RGBT" + + appendWithAttributes(newText, "(alpha)\n\n", ui.TextSize(10)) + + appendWithAttributes(newText, "This control panel was designed to be an interface to your 'private' cloud. ", ui.TextWeightBold) + appendWithAttributes(newText, "The concept of a private cloud means that you can use a providers system, or, seemlessly, use your own hardware in your own datacenter. ", ui.TextWeightBold) + + newText.AppendUnattributed("\n") + newText.AppendUnattributed("\n") + appendWithAttributes(newText, "This control panel requires:\n") + newText.AppendUnattributed("\n") + appendWithAttributes(newText, "IPv6\n") + appendWithAttributes(newText, "newText, Your hostname in DNS\n") + newText.AppendUnattributed("\n\n\n\n\n") + + appendWithAttributes(newText, "<click or press any key>\n", ui.TextSize(10)) + + return newText +} |
