14 lines
542 B
Swift
14 lines
542 B
Swift
import Foundation
|
|
|
|
/// The welcome text: the one line the page holds at the first startup.
|
|
public enum WelcomeText {
|
|
public static let text = "Welcome to plak. For the docs, the tricks and the shortcuts, choose Plak Help in the menu bar icon."
|
|
|
|
/// The welcome text as a page of one block created at `now`.
|
|
public static func page(createdAt now: Date) -> PageFile {
|
|
var page = PageFile(text: text)
|
|
page.dates = Dictionary(uniqueKeysWithValues: page.blocks.map { ($0.lowerBound, now) })
|
|
return page
|
|
}
|
|
}
|