Skip to content

Commit

Permalink
Show IHP edition in navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
mpscholten committed Oct 18, 2021
1 parent 5960edb commit a5e62c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion IHP/IDE/ToolServer/Layout.hs
Expand Up @@ -47,7 +47,7 @@ toolServerLayout inner = H.docTypeHtml ! A.lang "en" $ [hsx|
<body class="d-flex h-100 flex-row">
<div id="nav">
<img id="nav-logo" src="/ihp-icon.svg" alt="IHP: Integrated Haskell Platform">
<div id="ihp-plan">IHP</div>
<div id="ihp-plan">{ihpEditionTitle}</div>
{apps}
{schema}
{data_}
Expand Down Expand Up @@ -131,6 +131,12 @@ toolServerLayout inner = H.docTypeHtml ! A.lang "en" $ [hsx|
</a>
|]

ihpEditionTitle = case Version.ihpEdition of
Version.Basic -> [hsx|IHP|]
Version.Pro -> [hsx|IHP Pro|]
Version.Business -> [hsx|IHP <br />Business|]
Version.Enterprise -> [hsx|IHP <br />Enterprise|]

appNavItem :: Text -> Html
appNavItem "Web" = navItem "APP" fileIcon (appUrl <> "/") False
appNavItem name = navItem (toUpper name) fileIcon (appUrl <> "/" <> (toLower name) <> "/") False
Expand Down
2 changes: 1 addition & 1 deletion IHP/Version.hs
Expand Up @@ -9,7 +9,7 @@ import IHP.Prelude
import qualified Paths_ihp
import Data.Version (showVersion)

data Edition = Basic | Pro | Business
data Edition = Basic | Pro | Business | Enterprise
deriving (Eq, Show)

-- | Returns the git commit hash of https://github.com/digitallyinduced/ihp at which this IHP version was built
Expand Down

0 comments on commit a5e62c9

Please sign in to comment.