This commit is contained in:
Dmitry Zuikov 2024-09-29 05:54:01 +03:00
parent f8a461406c
commit 50b1c89b81
2 changed files with 27 additions and 36 deletions

View File

@ -43,7 +43,11 @@ instance Exception RunInFixmeError
-- --
-- Хорошо бы как-то абстрагировать, изолировать и т.п. -- Хорошо бы как-то абстрагировать, изолировать и т.п.
-- --
runInFixme :: (DashBoardPerks m, MonadReader DashBoardEnv m) => RepoLww -> FixmeM m a -> m a runInFixme :: (DashBoardPerks m, MonadReader DashBoardEnv m)
=> RepoLww
-> FixmeM m a
-> m a
runInFixme repo m = do runInFixme repo m = do
denv <- ask denv <- ask
@ -53,6 +57,8 @@ runInFixme repo m = do
p <- fixmeDataPath fixmeRChan p <- fixmeDataPath fixmeRChan
-- TODO: check-if-database-exists
fenv <- fixmeEnvBare fenv <- fixmeEnvBare
fo <- newTVarIO (FixmeOpts True) fo <- newTVarIO (FixmeOpts True)

View File

@ -917,12 +917,14 @@ instance ToHtml (H FixmeTitle) where
toHtmlRaw (H k) = toHtmlRaw $ coerce @_ @Text k toHtmlRaw (H k) = toHtmlRaw $ coerce @_ @Text k
toHtml (H k) = toHtml $ coerce @_ @Text k toHtml (H k) = toHtml $ coerce @_ @Text k
repoFixme :: (MonadReader DashBoardEnv m, DashBoardPerks m) => LWWRefKey HBS2Basic -> HtmlT m () repoFixme :: (MonadReader DashBoardEnv m, DashBoardPerks m)
=> LWWRefKey HBS2Basic
-> HtmlT m ()
repoFixme lww = do repoFixme lww = do
fme <- lift $ listFixme (RepoLww lww) () fme <- lift $ listFixme (RepoLww lww) ()
table_ [] do
for_ fme $ \fixme -> do for_ fme $ \fixme -> do
tr_ [class_ "commit-brief-title"] $ do tr_ [class_ "commit-brief-title"] $ do
td_ [class_ "mono", width_ "10"] do td_ [class_ "mono", width_ "10"] do
@ -1078,34 +1080,17 @@ repoPage IssuesTab lww _ = rootPage do
div_ [class_ "content"] $ do div_ [class_ "content"] $ do
-- article_ [class_ "py-0"] $ nav_ [ariaLabel_ "breadcrumb", class_ "repo-menu"] $ ul_ do
-- let menuTabClasses isActive = if isActive then "tab contrast" else "tab"
-- menuTab t misc name = li_ do
-- a_ ([class_ $ menuTabClasses $ isActiveTab tab t] <> misc <> [tabClick]) do
-- name
-- menuTab (CommitsTab Nothing)
-- [ href_ "#"
-- , hxGet_ (toURL (RepoCommits lww))
-- , hxTarget_ "#repo-tab-data"
-- ] "commits"
-- menuTab (TreeTab Nothing)
-- [ href_ "#"
-- , hxGet_ (toURL (RepoRefs lww))
-- , hxTarget_ "#repo-tab-data"
-- ] "tree"
section_ do section_ do
strong_ $ toHtml (show $ "Issues ::" <+> pretty repoName) strong_ $ toHtml (show $ "Issues ::" <+> pretty repoName)
table_ [] do
tbody_ [id_ "fixme-tab-data"] mempty
div_ [ id_ "repo-tab-data" div_ [ id_ "repo-tab-data"
, hxTrigger_ "load" , hxTrigger_ "load"
, hxTarget_ "#repo-tab-data" , hxTarget_ "#fixme-tab-data"
, hxGet_ (toURL (RepoFixmeHtmx (RepoLww lww))) , hxGet_ (toURL (RepoFixmeHtmx (RepoLww lww)))
] do ] mempty
pure ()
div_ [id_ "repo-tab-data-embedded"] mempty div_ [id_ "repo-tab-data-embedded"] mempty