# HG changeset patch # User Adam Chlipala # Date 1303406695 14400 # Node ID 90b8ce9be9f5aaea3af68857005bd3674e4b549a # Parent 1be573ac8e2b55e1079923c4ccdc92ab6e5b36bf Change some field names and update utest diff -r 1be573ac8e2b -r 90b8ce9be9f5 src/ur/openidUser.ur --- a/src/ur/openidUser.ur Mon Apr 18 01:20:39 2011 -0430 +++ b/src/ur/openidUser.ur Thu Apr 21 13:24:55 2011 -0400 @@ -29,8 +29,8 @@ val formClass : css_class val fakeId : option string - val ctlDisplay : {User : {Status : xbody, Other : xbody}, - Guest : {Status : xbody, Other : xbody}} + val ctlDisplay : {User : {Status : xbody, Logout : xbody}, + Guest : {Status : xbody, Signup : xbody}} end) = struct type user = string @@ -300,9 +300,9 @@ here <- currentUrl; case cur of Some cur => return {Status = {M.ctlDisplay.User.Status}{[cur]}, - Other = {M.ctlDisplay.User.Other}} + Other = {M.ctlDisplay.User.Logout}} | None => return {Status = {M.ctlDisplay.Guest.Status}
, - Other = {M.ctlDisplay.Guest.Other}} + Other = {M.ctlDisplay.Guest.Signup}} end task periodic 60 = fn () => dml (DELETE FROM session diff -r 1be573ac8e2b -r 90b8ce9be9f5 src/ur/openidUser.urs --- a/src/ur/openidUser.urs Mon Apr 18 01:20:39 2011 -0430 +++ b/src/ur/openidUser.urs Thu Apr 21 13:24:55 2011 -0400 @@ -67,9 +67,14 @@ * identifier, which can be useful during development (say, * when you're off-network). *) - val ctlDisplay : {User : {Status : xbody, Other : xbody}, - Guest : {Status : xbody, Other : xbody}} - (* These help formatting the user status controls *) + val ctlDisplay : {User : {Status : xbody, + (* Anything extra to display to represent the logged-in user's status *) + Logout : xbody + (* Text for link to log out *)}, + Guest : {Status : xbody, + (* What to show in the place where a logged-in user's status would be *) + Signup : xbody + (* Text for link to sign up *)}} end) : sig type user diff -r 1be573ac8e2b -r 90b8ce9be9f5 tests/utest.ur --- a/tests/utest.ur Mon Apr 18 01:20:39 2011 -0430 +++ b/tests/utest.ur Thu Apr 21 13:24:55 2011 -0400 @@ -29,6 +29,9 @@ val formClass = inputs val fakeId = None + + val ctlDisplay = {User = {Status = Status, Logout = Log Out}, + Guest = {Status = Status, Signup = Sign Up}} end) fun wrap title body =