kino/src/AppTypes.hs

28 lines
537 B
Haskell

{-# LANGUAGE TemplateHaskell #-}
module AppTypes where
import JSONTypes
import Lens.Micro.TH
data Ident = Listing | Input | ListItem Int
deriving (Eq, Ord, Show)
data Mode = Search | Browse | Error
deriving (Eq, Ord, Show)
data ScrollDirection = Up | Down
deriving (Eq, Show)
data AppS = AppS
{ _appMode :: Mode
, _appCursor :: Int
, _appExpanded :: Bool
, _appPage :: Int
, _appListing :: Maybe JSONListMovies
, _appDetails :: Maybe JSONMovie
, _appError :: Maybe String
} deriving (Show)
makeLenses ''AppS