stripped out frontend

This commit is contained in:
2024-09-07 14:26:15 -04:00
parent 85920c26a0
commit f65a478fb5
8 changed files with 7 additions and 504 deletions

View File

@@ -20,36 +20,9 @@ License along with this program. If not, see
-}
module Main where
import Control.Monad.Trans.State as S
import System.Console.HCL (Request, reqIO, runRequest)
import System.EasyFile
( createDirectoryIfMissing
, getAppUserDataDirectory
, (</>)
)
import System.Random (getStdGen)
import Types
import UI
import Util
module Main (main) where
main :: IO ()
main = runRequest setup >>= mapM_ (S.evalStateT mainMenu)
setup :: Request Status
setup = do
g <- reqIO getStdGen
p <- getDBPath
db <- loadFrom p
pw <- getMasterPass
return $ Status g pw p db
getDBPath :: Request FilePath
getDBPath = reqIO $ do
path <- getAppUserDataDirectory "passman"
createDirectoryIfMissing True path
return $ path </> "database.json"
main = return ()
--jl