admin
login
back
clay editor
edit clay files
view clay directories
optional vim keybindings
!: :- %shed |^ =/ m (strand ,vase) ?: =((pib:c /) "write") =/ file=cord q:(rib:c /file) =/ info [%info dek %& [pax %ins %hoon !>(file)]~] =/ card [%pass /clay-editor %arvo %c info] ;< ~ bind:m (send-raw-card card) %- pure:m !> (print `file ~) %- pure:m !> (print ~ ~) ++ print |= [fil=(unit cord) err=(unit tang)] ^- manx ;div.mono.scroll-none.fc.hf ;+ (error err) ;+ form-path ;+ (editor fil) == :: ++ error |= err=(unit tang) ;div.error ;+ ?~ err ;/("") ;div.p3.b-1.f-1.mono.fc.g2 ;div.mono.pre.scroll-x.scroll-y(style "max-height: 200px") ;* %+ turn u.err |= =tank ^- manx ;/ (of-wall:format (~(win re tank) 0 55)) == ;form.fr(method "post") ;button.p-1.br1.bd1.b1.f2.hover.loader ;span.loaded: revert ;span.loading: ====== == == == == ++ peek |= pax=path ^- (unit dime) ?^ a=(reb:c pax) a =, mq %+ mong 0 %- dimes %+ attributes %value %^ first-attribute %name (spud pax) ~[dat:f] :: ++ form-path ^- manx ;form.fr =method "post" ;select.p1.bd1 =name "/desk" =value (scow (fall (peek /desk) tas+%base)) ;* =/ pax=path :~ (scot (rib:c /sys/our)) %$ (scot (rib:c /sys/now)) == %+ turn %- sort :_ aor ~(tap in .^((set @tas) %cd pax)) |= =term =; =manx ?. =(tas+term tas+dek) manx manx(a.g [[%selected ""] a.g.manx]) ;option: {(trip term)} == ;spine-input-atom.p1.bd1.grow =aura "t" =placeholder "path" =name "/path" =value (scow (fall (peek /path) t+'/')) ; == ;button.hover.loader.p-1.bd1.b1.wfc ;span.loaded: go ;span.loading: == == == ++ dek (scot (fall (peek /desk) tas+%base)) ++ bek :~ (scot (rib:c /sys/our)) dek (scot (rib:c /sys/now)) == ++ pax %- fall :_ / %- mole |. (stab +:(fall (peek /path) t+'/')) ++ loc (welp bek pax) ++ editor |= fil=(unit cord) ?. .^(? %cu loc) ;div.p4.fc.g4.grow.scroll-y ;div.bold: /=/{(trip dek)}/={<`path`pax>} ;div.f-1: no file here ;div: directory: ;div.fc.g1 ;* =; =marl ?^ marl marl ;= ;div.f4: no files == %+ turn .^((list path) %ct loc) |= =path ;form.fc(method "post") ;input.hidden(name "/path", value (spud path)); ;button.b1.bd1.hover.loader.tl ;span.loaded: {(spud path)} ;span.loading: === == == == == =/ mark (rear loc) ?^ fil (print-form mark u.fil) ?. ?| =(mark %hoon) =(mark %txt) == ;div.p4.fc.ac.jc.g2 ;div.f-1: \%{(trip mark)} file type is not supported == =/ tube .^(tube:clay %cc (welp bek /[(scot %tas mark)]/txt)) =/ wain !<(wain (tube .^(vase %cr loc))) (print-form mark (of-wain:format wain)) ++ print-form |= [=mark file=cord] ^- manx ;form.grow.fc.scroll-none =method "post" =hx-on-htmx-response-error "alert('crud! check dojo.')" =hx-swap "none" ;input.hidden(name "/", value "write"); ;spine-code-editor.grow(name "/file") =mite "/text/{(trip mark)}" ;- (trip file) == ;button.loader.p1.b3.hover.tc.o8 ;span.loaded: write ;span.loading: ===== == == --