From 2176e55bf6e79356417f28713265b2c709c077e5 Mon Sep 17 00:00:00 2001 From: towards-a-new-leftypol Date: Tue, 20 Feb 2024 13:04:09 -0500 Subject: [PATCH] TODO in separate text file --- TODO.txt | 19 +++++++++++++++++++ src/Component/TimeControl.hs | 9 ++++----- src/Main.hs | 15 --------------- 3 files changed, 23 insertions(+), 20 deletions(-) create mode 100644 TODO.txt diff --git a/TODO.txt b/TODO.txt new file mode 100644 index 0000000..a55c4af --- /dev/null +++ b/TODO.txt @@ -0,0 +1,19 @@ +- need to display the current time you are at (or Latest) +- Need to add server-side rendering +- need to implement search +- need a control to manually put in the datetime instead of using the slider + for fine-grained control +- need to change urls / history when time-travelling +- need to be able to view board, board should support timetravel + - need toolbar to navigate and select which boards to view +- need to scrape other websites and add them in + - i think this is more useful than the archival property, which is really + just there to preserve links. the time travel thing is a bit of a gimmick +- need to have some process respond to http calls from the board to inform + the db of new posts +- "infinite" scrolling + - just load more! +- need to get embeds working +- need to support flags +- need to support mod actions like saging a thread or deleting a post +- fix thumbnails for older posts diff --git a/src/Component/TimeControl.hs b/src/Component/TimeControl.hs index f858a38..bc25bb6 100644 --- a/src/Component/TimeControl.hs +++ b/src/Component/TimeControl.hs @@ -28,6 +28,7 @@ import Data.Time.Clock , getCurrentTime , diffUTCTime , addUTCTime + , secondsToDiffTime ) import Data.Time.Calendar (fromGregorian, Day) @@ -95,8 +96,8 @@ update iface (SlideChange nstr) m = m { whereAt = n } <# do update _ _ m = noEff m -earliestDate :: Day -earliestDate = fromGregorian 2020 12 1 +earliest :: UTCTime +earliest = UTCTime (fromGregorian 2020 12 21) (secondsToDiffTime 19955) -- Linear interpolation function using hours @@ -106,10 +107,8 @@ interpolateTimeHours n currentTime | otherwise = addUTCTime (fromIntegral hoursToAdjust * secondsInHour) currentTime where - targetDate = UTCTime earliestDate 0 - -- Calculate the total number of hours between the current time and the target date - totalHours = diffUTCTime currentTime targetDate / secondsInHour + totalHours = diffUTCTime currentTime earliest / secondsInHour -- Calculate the number of hours to adjust based on linear interpolation hoursToAdjust :: Integer diff --git a/src/Main.hs b/src/Main.hs index 93e7908..f40d3d8 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -269,18 +269,3 @@ iTime = TC.Interface { TC.passAction = TimeAction , TC.goTo = GoToTime } - -{- - - TODO: - - - Create the thread view - - - add routing so when you click in the catalog it goes to the thread - - - register onClick ✓ - - - pevent default and consoleLog the event ✓ - - - display page - - - history api / navigation for browser history ✓ - - - create component ✓ - - - - - - - make it isomorphic - - - move everything before or during this part into common lib - -}