parsav  Diff

Differences From Artifact [19457b4b7c]:

To Artifact [ae13f6f2b7]:


     3      3   local terra cs(s: rawstring)
     4      4   	return pstr { ptr = s, ct = lib.str.sz(s) }
     5      5   end
     6      6   
     7      7   local terra 
     8      8   render_profile(co: &lib.srv.convo, actor: &lib.store.actor)
     9      9   	var aux: lib.str.acc
           10  +	var followed = true -- FIXME
    10     11   	if co.aid ~= 0 and co.who.id == actor.id then
    11         -		aux:compose('<a href="/conf/profile?go=/',actor.xid,'">alter</a>')
           12  +		aux:compose('<a class="button" href="/conf/profile?go=/',actor.xid,'">alter</a>')
    12     13   	elseif co.aid ~= 0 then
    13         -		aux:compose('<a href="/', actor.xid, '/follow">follow</a><a href="/',
    14         -			actor.xid, '/chat">chat</a>')
           14  +		if not followed then
           15  +			aux:compose('<button method="post" name="act" value="follow">follow</a>')
           16  +		elseif not followed then
           17  +			aux:compose('<button method="post" name="act" value="unfollow">unfollow</a>')
           18  +		end
           19  +		aux:lpush('<a href="/'):push(actor.xid,0):lpush('/chat">chat</a>')
    15     20   		if co.who.rights.powers:affect_users() then
    16         -			aux:lpush('<a href="/'):push(actor.xid,0):lpush('/ctl">control</a>')
           21  +			aux:lpush('<a class="button" href="/'):push(actor.xid,0):lpush('/ctl">control</a>')
    17     22   		end
    18     23   	else
    19         -		aux:compose('<a href="/', actor.xid, '/follow">remote follow</a>')
           24  +		aux:compose('<a class="button" href="/', actor.xid, '/follow">remote follow</a>')
    20     25   	end
    21     26   	var auxp = aux:finalize()
    22     27   	var avistr: lib.str.acc if actor.origin == 0 then
    23     28   		avistr:compose('/avi/',actor.handle)
    24     29   	end
    25     30   	var timestr: int8[26] lib.osclock.ctime_r(&actor.knownsince, &timestr[0])
    26     31