git.s-ol.nu mmm / b897f77
fix inspector s-ol 2 years ago
2 changed file(s) with 13 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
212212 @inspect_err = ReactiveVar!
213213
214214 with div class: 'view inspector'
215 -- nav
215216 \append nav {
216217 span 'inspector'
218
217219 @inspect_prop\map (current) ->
218220 current = current and current\tostring!
219221 fileder = @fileder\get!
223225 return if facet == ''
224226 @inspect_prop\set Key facet
225227
226 with select :onchange \append option '(none)', value: '', disabled: true, selected: not value
228 with select :onchange
229 \append option '(none)', value: '', disabled: true, selected: not value
227230 if fileder
228231 for value in pairs fileder.facet_keys
229232 \append option value, :value, selected: value == current
244247
245248 button 'close', onclick: (_, e) -> @inspect\set false
246249 }
250
251 -- error / content
247252 \append with div class: @inspect_err\map (e) -> if e then 'error-wrap' else 'error-wrap empty'
248253 \append span "an error occured while rendering this view:"
249254 \append @inspect_err
257262 assert conversions, "cannot cast '#{key.type}'"
258263 apply_conversions conversions, value, @, prop
259264
265 -- children
260266 \append nav {
267 class: 'thing'
268
261269 span 'children'
262270 button 'add', onclick: (_, e) ->
263271 name = window\prompt "please enter the name of the child fileder:", 'unnamed_fileder'
7676 white-space: nowrap;
7777 }
7878
79 &.thin > * {
80 margin: 0.5em 1em;
81 }
82
7983 > .inspect-btn {
8084 @include media-small() { display: none; }
8185 }