mirror of
https://github.com/urbit/shrub.git
synced 2024-12-23 02:41:35 +03:00
31 lines
621 B
Plaintext
31 lines
621 B
Plaintext
|
:: Helm: query or reset login code for web
|
||
|
::
|
||
|
:::: /hoon/code/hood/gen
|
||
|
::
|
||
|
/? 310
|
||
|
::
|
||
|
::::
|
||
|
::
|
||
|
:- %say
|
||
|
|= $: [now=@da eny=@uvJ bec=beak]
|
||
|
[arg=?(~ [%reset ~]) ~]
|
||
|
==
|
||
|
=* our p.bec
|
||
|
:- %helm-code
|
||
|
?~ arg
|
||
|
=/ code=tape
|
||
|
%+ slag 1
|
||
|
%+ scow %p
|
||
|
.^(@p %j /(scot %p our)/code/(scot %da now)/(scot %p our))
|
||
|
=/ step=tape
|
||
|
%+ scow %ud
|
||
|
.^(@ud %j /(scot %p our)/step/(scot %da now)/(scot %p our))
|
||
|
%- %- slog
|
||
|
:~ [%leaf code]
|
||
|
[%leaf (weld "current step=" step)]
|
||
|
[%leaf "use |code %reset to invalidate this and generate a new code"]
|
||
|
==
|
||
|
~
|
||
|
?> =(%reset -.arg)
|
||
|
%reset
|