Add "about" field to person table, display in person page
This commit is contained in:
parent
e9ac361f27
commit
577df6ddcf
4 changed files with 18 additions and 2 deletions
|
@ -33,6 +33,7 @@ Person
|
||||||
verifiedKeyCreated UTCTime
|
verifiedKeyCreated UTCTime
|
||||||
resetPassKey Text
|
resetPassKey Text
|
||||||
resetPassKeyCreated UTCTime
|
resetPassKeyCreated UTCTime
|
||||||
|
about Text
|
||||||
|
|
||||||
UniquePersonIdent ident
|
UniquePersonIdent ident
|
||||||
UniquePersonLogin login
|
UniquePersonLogin login
|
||||||
|
|
|
@ -487,7 +487,18 @@ instance AccountDB AccountPersistDB' where
|
||||||
return $ Left $ mr $ MsgUsernameExists name
|
return $ Left $ mr $ MsgUsernameExists name
|
||||||
Right sid -> do
|
Right sid -> do
|
||||||
let defTime = UTCTime (ModifiedJulianDay 0) 0
|
let defTime = UTCTime (ModifiedJulianDay 0) 0
|
||||||
person = Person sid name pwd email False key now "" defTime
|
person = Person
|
||||||
|
{ personIdent = sid
|
||||||
|
, personLogin = name
|
||||||
|
, personPassphraseHash = pwd
|
||||||
|
, personEmail = email
|
||||||
|
, personVerified = False
|
||||||
|
, personVerifiedKey = key
|
||||||
|
, personVerifiedKeyCreated = now
|
||||||
|
, personResetPassKey = ""
|
||||||
|
, personResetPassKeyCreated = defTime
|
||||||
|
, personAbout = ""
|
||||||
|
}
|
||||||
pid <- insert person
|
pid <- insert person
|
||||||
return $ Right $ Entity pid person
|
return $ Right $ Entity pid person
|
||||||
|
|
||||||
|
|
|
@ -132,6 +132,8 @@ changes =
|
||||||
, renameField "ProjectCollabAnon" "repo" "project"
|
, renameField "ProjectCollabAnon" "repo" "project"
|
||||||
-- 24
|
-- 24
|
||||||
, renameField "ProjectCollabUser" "repo" "project"
|
, renameField "ProjectCollabUser" "repo" "project"
|
||||||
|
-- 25
|
||||||
|
, addFieldPrimRequired "Person" ("" :: Text) "about"
|
||||||
]
|
]
|
||||||
|
|
||||||
migrateDB :: MonadIO m => ReaderT SqlBackend m (Either Text (Int, Int))
|
migrateDB :: MonadIO m => ReaderT SqlBackend m (Either Text (Int, Int))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
$# This file is part of Vervis.
|
$# This file is part of Vervis.
|
||||||
$#
|
$#
|
||||||
$# Written in 2016, 2018 by fr33domlover <fr33domlover@riseup.net>.
|
$# Written in 2016, 2018, 2019 by fr33domlover <fr33domlover@riseup.net>.
|
||||||
$#
|
$#
|
||||||
$# ♡ Copying is an act of love. Please copy, reuse and share.
|
$# ♡ Copying is an act of love. Please copy, reuse and share.
|
||||||
$#
|
$#
|
||||||
|
@ -14,6 +14,8 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||||
|
|
||||||
^{avatarW secure $ emailText $ personEmail person}
|
^{avatarW secure $ emailText $ personEmail person}
|
||||||
|
|
||||||
|
<p>#{personAbout person}
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href=@{ProjectsR shr}>Projects
|
<a href=@{ProjectsR shr}>Projects
|
||||||
|
|
Loading…
Reference in a new issue