讨论功能初步完成,可以测试啦!owo

Author: Eiko

Time: 2025-03-15 12:52:57 - 2025-03-15 12:52:57 (UTC)

本次经过我大肝网站,我们增加了如下新功能:

  • 增加了用户管理和用户组,网站可以给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(-)

大家可以用markdownLaTeX公式哦!

\[ \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

Author: Eiko

Time: 2025-03-15 13:15:56 - 2025-03-15 13:15:56 (UTC)

Planned Future functionalities:

  • 提供 Group 列表和 User 列表切换(当前只能在link中切换,比如/g/1/notes/g/1/discussion)

  • 提供Group admin和group加入的管理功能

  • User Profile

  • Reply message提示(in site, no email)

暂时想不到更多,大家可以来想想owo

Author: Eiko

Time: 2025-03-15 13:16:55 - 2025-03-15 13:16:55 (UTC)

哦还有 discussion 提供编辑(edit)功能,这是计划内的owo

Author: Eiko

Time: 2025-03-15 16:53:08 - 2025-03-15 16:53:08 (UTC)

还有就是proper handling of header file

以及notes这边最麻烦的部分:让notes同时兼容数据库和文件系统编辑(this will enable better searching and data management)

Author: Tensorera

Time: 2025-03-15 13:56:55 - 2025-03-15 13:56:55 (UTC)

eiko牛逼 \(\cdot \underline{smile}\cdot\)

Author: Eiko

Time: 2025-03-15 14:08:29 - 2025-03-15 14:08:29 (UTC)

谢谢聪明黑猫酱owo

Author: GrassCarp_

Time: 2025-03-15 15:24:03 - 2025-03-15 15:24:03 (UTC)

好耶!有聊天功能了qwq