mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-11 16:09:31 +03:00
File browser browses files
This commit is contained in:
parent
f7f359fa6c
commit
69d64fe590
@ -9,7 +9,7 @@
|
||||
:::: ~pittyp-pittyp
|
||||
::
|
||||
=+ pax=`path`(flop but.gas)
|
||||
=+ cot=(trip ;;(,@ (fall (file (welp p.rut pax)) 'No such file')))
|
||||
=+ cot=(trip ;;(,@ (fall (file (welp p.rut pax)) '')))
|
||||
=+ js="""
|
||||
window.location = "/gen/main{<q.rut>}/" + pax.value
|
||||
"""
|
||||
@ -17,6 +17,25 @@
|
||||
;head:title:"{<pax>}"
|
||||
;body
|
||||
;input#pax(onchange js, value (slag 1 <pax>));
|
||||
;+ =+ ups="%"
|
||||
|-
|
||||
?: =(~ pax) ;div:a/"/gen/main{<q.rut>}":"/==="
|
||||
=: ups "%{ups}"
|
||||
pax (scag (dec (lent pax)) pax)
|
||||
==
|
||||
=+ sul=;;(arch .^(%cy (welp p.rut pax)))
|
||||
?: (gte 2 ~(wyt by r.sul)) $
|
||||
;div:a/"/gen/main{<q.rut>}{<pax>}":"{ups}"
|
||||
::
|
||||
;* =+ sub=;;(arch .^(%cy (welp p.rut pax)))
|
||||
=| don=tape
|
||||
%+ turn (~(tap by r.sub)) |= [a=span ~]
|
||||
=: don "{don}/{(trip a)}"
|
||||
pax (welp pax /[a])
|
||||
==
|
||||
=+ sus=;;(arch .^(%cy (welp p.rut pax)))
|
||||
?: =(2 ~(wyt by r.sus)) $(a p.n.-.r.sus)
|
||||
;div:a/"/gen/main{<q.rut>}{<pax>}":"{(slag 1 don)}"
|
||||
;pre:"{cot}"
|
||||
==
|
||||
==
|
||||
|
Loading…
Reference in New Issue
Block a user