build with just, upd. todo

This commit is contained in:
mtgmonkey 2025-04-25 20:56:10 -04:00
parent deef7c5839
commit 9dede341e8
6 changed files with 84 additions and 9767 deletions

View file

@ -262,30 +262,33 @@ runCommand : Model -> Result String Input -> ( Model, Cmd Msg )
runCommand model input =
case input of
Ok { command, args } ->
case command of
(case command of
Help ->
( runHelp model args, Cmd.none )
runHelp
Clear ->
( runClear model args, Cmd.none )
runClear
Cookies ->
runCookies model args
runCookies
FontCommand ->
runFont model args
runFont
Hello ->
runHello model args
runHello
PromptCommand ->
runPrompt model args
runPrompt
Theme ->
runTheme model args
runTheme
Todo ->
( runTodo model args, Cmd.none )
runTodo
)
model
args
Err "" ->
( model, Cmd.none )
@ -302,9 +305,13 @@ runCommand model input =
-- COMMANDS
runHelp : Model -> List String -> Model
type alias CommandRunner =
Model -> List String -> ( Model, Cmd Msg )
runHelp : CommandRunner
runHelp model args =
{ model
( { model
| content =
model.content
++ (if List.length args < 2 then
@ -383,20 +390,24 @@ runHelp model args =
else
wrongArgs Help 1 args
)
}
}
, Cmd.none
)
runClear : Model -> List String -> Model
runClear : CommandRunner
runClear model args =
case List.head args of
( case List.head args of
Nothing ->
{ model | content = [] }
Just string ->
{ model | content = model.content ++ wrongArgs Clear 0 args }
, Cmd.none
)
runCookies : Model -> List String -> ( Model, Cmd Msg )
runCookies : CommandRunner
runCookies model args =
case List.head args of
Nothing ->
@ -482,7 +493,7 @@ runCookies model args =
( { model | content = model.content ++ wrongArgs Cookies 1 args }, Cmd.none )
runHello : Model -> List String -> ( Model, Cmd Msg )
runHello : CommandRunner
runHello model args =
case List.head args of
Nothing ->
@ -492,7 +503,7 @@ runHello model args =
( { model | content = model.content ++ wrongArgs Hello 0 args }, Cmd.none )
runFont : Model -> List String -> ( Model, Cmd Msg )
runFont : CommandRunner
runFont model args =
case List.head args of
Nothing ->
@ -588,7 +599,7 @@ runFont model args =
( { model | content = model.content ++ wrongArgs FontCommand 1 args }, Cmd.none )
runPrompt : Model -> List String -> ( Model, Cmd Msg )
runPrompt : CommandRunner
runPrompt model args =
case List.head args of
Nothing ->
@ -602,7 +613,7 @@ runPrompt model args =
saveModel { model | prompt = { oldPrompt | prompt = string } }
runTheme : Model -> List String -> ( Model, Cmd Msg )
runTheme : CommandRunner
runTheme model args =
case List.head args of
Nothing ->
@ -645,27 +656,34 @@ runTheme model args =
( { model | content = model.content ++ wrongArgs Theme 1 args }, Cmd.none )
runTodo : Model -> List String -> Model
runTodo : CommandRunner
runTodo model args =
case List.head args of
( case List.head args of
Nothing ->
{ model
| content =
model.content
++ [ text <|
"\n--Frontend"
"\nIn no particular order:"
++ "\n- Implement colors throughout existing methods"
++ "\n- Implement something like neofetch"
++ "\n--Glue"
++ "\n--Backend"
++ "\n- Something like Neofetch"
++ "\n- Collect and store feedback in a database"
++ "\n- Get an SSL certificate"
++ "\n- Support https"
++ "\n- Create a style guide for programs involving console colors"
++ "\n"
++ "\nUpcoming commands to look forward to:"
++ "\nfunfetch"
++ "\ncolors test"
++ "\ncolors set <color> <value>"
++ "\ntheme save <name>"
++ "\ntheme load <name>"
++ "\nfeedback <bug|request|good> <content>"
]
}
Just _ ->
{ model | content = model.content ++ wrongArgs Todo 0 args }
, Cmd.none
)