{-# LANGUAGE OverloadedStrings #-}
module UI.Utils
( titleize
, Titleize
) where
import Data.Text (Text, pack)
import Types
class Titleize a where
titleize :: a -> Text
instance Titleize Name where
titleize ListOfMails = "List of Mails"
titleize ListOfThreads = "List of Threads"
titleize ManageThreadTagsEditor = "Edit Labels of Threads"
titleize ManageMailTagsEditor = "Edit Labels of Mails"
titleize SearchThreadsEditor = "Search Editor"
titleize ScrollingMailView = "Mail Viewer"
titleize ComposeTo = "Editor to Compose a new Mail"
titleize ComposeFrom = "Editor to Compose a new Mail"
titleize ComposeSubject = "Editor to Compose a new Mail"
titleize ListOfFiles = "Directory Listing"
titleize ComposeListOfAttachments = "Attachments"
titleize ManageFileBrowserSearchPath = "Filepath for Directory Listing"
titleize MailAttachmentOpenWithEditor = "Open With Editor"
titleize MailAttachmentPipeToEditor = "Pipe to Editor"
titleize m = pack $ show m
instance Titleize ViewName where
titleize a = pack $ show a