@@ -97,7 +97,7 @@ class ZeroHello extends ZeroFrame
9797 $ (" .title" , elem).html (site .content .title ).removeClass (" long" )
9898 $ (" .description" , elem).html (site .content .description )
9999 modified = if site .settings .modified then site .settings .modified else site .content .modified
100- $ (" .modified-date" , elem). html @ formatSince ( modified)
100+ new DateSince ( $ (" .modified-date" , elem)[ 0 ], modified)
101101
102102 # Add href
103103 if @server_info .plugins ? and (" Zeroname" in @server_info .plugins or " Dnschain" in @server_info .plugins or " Zeroname-local" in @server_info .plugins ) and site .content ? .domain # Domain
@@ -214,9 +214,10 @@ class ZeroHello extends ZeroFrame
214214
215215 # Append sample sites
216216 sample_sites = [
217- {" content" : {" title" : " ZeroBoard" , " description" : " Messaging board demo" , " domain" : " Board.ZeroNetwork.bit" }, " address" : " 1Gfey7wVXXg1rxk751TBTxLJwhddDNfcdp" , " settings" : {" serving" : false }}
218217 {" content" : {" title" : " ZeroBlog" , " description" : " Blogging platform Demo" , " domain" : " Blog.ZeroNetwork.bit" }, " address" : " 1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8" , " settings" : {" serving" : false }}
219218 {" content" : {" title" : " ZeroTalk" , " description" : " Decentralized forum demo" , " domain" : " Talk.ZeroNetwork.bit" }, " address" : " 1TaLkFrMwvbNsooF4ioKAY9EuxTBTjipT" , " settings" : {" serving" : false }}
219+ {" content" : {" title" : " ZeroMail" , " description" : " End-to-end encrypted messaging" , " domain" : " Mail.ZeroNetwork.bit" }, " address" : " 1MaiL5gfBM1cyb4a8e3iiL8L5gXmoAJu27" , " settings" : {" serving" : false }}
220+ {" content" : {" title" : " ZeroBoard" , " description" : " Messaging board demo" , " domain" : " Board.ZeroNetwork.bit" }, " address" : " 1Gfey7wVXXg1rxk751TBTxLJwhddDNfcdp" , " settings" : {" serving" : false }}
220221 {" content" : {" title" : " ZeroID" , " description" : " Sample trusted authorization provider" , " domain" : " ZeroID.bit" }, " address" : " 1iD5ZQJMNXu43w1qLB8sfdHVKppVMduGz" , " settings" : {" serving" : false }}
221222 {" content" : {" title" : " ZeroMarket" , " description" : " Simple market demo (coming soon)" }, " address" : " ZeroMarket" , " disabled" : true , " settings" : {" serving" : false }}
222223 ]
@@ -261,6 +262,22 @@ class ZeroHello extends ZeroFrame
261262
262263 $ (" .topright" ).css (" opacity" , 1 )
263264
265+ # Port info
266+ if server_info .ip_external
267+ $ (" .port" ).removeClass (" closed" ).addClass (" opened" )
268+ $ (" .port a" ).text (" opened" )
269+ else
270+ $ (" .port" ).removeClass (" opened" ).addClass (" closed" ).css (" display" , " block" )
271+ $ (" .port a" ).text (" closed" )
272+ $ (" .port a" ).off (" click" ).on " click" , =>
273+ $ (" .port" ).addClass (" loading" )
274+ @ cmd " serverPortcheck" , [], (res ) =>
275+ if @server_info .rev < 600
276+ @ cmd " wrapperNotification" , [" info" , " Please restart your ZeroNet client to re-check opened port." ]
277+ $ (" .port" ).removeClass (" loading" )
278+ @ log " Port open result:" , res
279+ @ reloadServerInfo ()
280+
264281 # Multiuser info
265282 if server_info .multiuser
266283 $ (" .plugin-multiuser" ).css (" display" , " block" )
0 commit comments