本次经过我大肝网站,我们增加了如下新功能:
增加了用户管理和用户组,网站可以给AsukaCircle以外的人使用owo
除每个用户组有一个note repo (比如
/g/1/notes)以外,每个用户还有单独的repo (/u/1/notes)论坛讨论功能owo
整理了代码,去掉了一些奇怪的写法,并且让部分组件更加模块化owo
[eiko@EikoMagic14 ~/asukachan]$ git log --stat
commit 71f43e505cf50c58a7a1f923bc75d5934ccddf55 (HEAD -> master)
Author: Eiko <eikochanowo@outlook.com>
Date: Sat Mar 15 12:49:28 2025 +0000
Discussion functionality basic complete
config/models.persistentmodels | 6 ++-
config/routes.yesodroutes | 30 ++++++------
site.cabal | 21 +++++----
src/Application.hs | 11 +++--
src/Data/Document.hs | 15 +++---
src/Form/LambdaForm.hs | 4 +-
src/Foundation.hs | 22 ++++++++-
src/Handler/Notes/Editor.hs | 4 +-
src/Util/User.hs | 6 +++
src/Widget/DocumentWidget.hs | 60 ++++++++++++++++--------
src/Widget/EditorWidget.hs | 144 ++++++++++++++--------------------------------------------
src/Widget/LambdaScript.hs | 7 +--
12 files changed, 160 insertions(+), 170 deletions(-)
commit ff2e6597f1fad24d74040a38c74f15f045af23d1
Author: Eiko <eikochanowo@outlook.com>
Date: Fri Mar 14 17:09:06 2025 +0000
Fixing authentication, and adding getNotesR (basic, replace later)
config/models.persistentmodels | 48 +++++++++++++
config/settings.yml | 2 +-
src/Handler/Notes.hs | 28 ++++++--
src/Handler/Wiki.hs | 9 +--
src/Model.hs | 6 ++
src/Resource/LambdaWorld/Worlds/LambdaAdventureCN.hs | 12 ++--
src/Resource/Notes.hs | 140 ------------------------------------
src/Util/User.hs | 10 +++
src/Widget/DocumentWidget.hs | 15 ++--
9 files changed, 107 insertions(+), 163 deletions(-)
commit 71c953f882c7675e9879e9200ea9df05d654cf0b
Author: Eiko <eikochanowo@outlook.com>
Date: Fri Mar 14 04:10:20 2025 +0000
Complete first stage of change, allowing user and user groups to use
website servide. getNotesR needs to be implemented.
config/models.persistentmodels | 32 +++++++-
config/routes.yesodroutes | 16 ++--
site.cabal | 38 +++++++++-
src/Application.hs | 1 -
src/Data/Document.hs | 17 ++++-
src/Data/Functor/RepeatedFMap.hs | 33 ++++++++
src/Form/MetaDocForm.hs | 6 +-
src/Foundation.hs | 67 +++++++++++++----
src/Handler/Editor.hs | 156 --------------------------------------
src/Handler/Notes.hs | 76 +++++++++++--------
src/Handler/Notes/Editor.hs | 169 +++++++++++++++++++++++++++++++++++++++++
src/Model.hs | 99 +++++++++++++++++++++++-
src/Resource/Notes.hs | 227 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/Resource/Notes/FileSystem.hs | 35 +++++++++
src/Util/User.hs | 84 +++++++++++++++++++++
src/Widget/EditorWidget.hs | 28 +++----
src/Yesod/Auth/EmailPasscode.hs | 28 ++++---
todo.md | 17 +++++
18 files changed, 879 insertions(+), 250 deletions(-)
大家可以用markdown和LaTeX公式哦!
\[ \zeta(s) = \sum_{n=1}^\infty \frac{1}{n^s} \]
测试代码块,这个代码是从本次更新的代码里面挑出来的,非常漂亮的monadic-tree! 这个函数用来递归的渲染post,超简洁的owo
module Data.Tree where
data Tree a = Tree a [Tree a]
deriving (Show, Eq, Ord, Functor)
monadicFoldTree :: Monad m => (m a -> [m a] -> m a) -> Tree (m a) -> m a
monadicFoldTree folder (Tree ma subTrees) = folder ma (monadicFoldTree folder <$> subTrees)大家可以来测试回复功能哦~ 一起来玩和学习吧!ovo