git ssb

0+

ev / microbay



forked from Dominic / patchbay

Commit 918b8891edad601629ecd6444a989ea6b04d9e3f

implement split view. had to use regretable hack to all recursive plugins

Dominic Tarr committed on 7/20/2016, 12:27:00 PM
Parent: f954b2a3a7a0b07b66dd67f0b56ee1d6a9214e85

Files changed

modules/index.jschanged
modules/_screen_view.jsadded
modules/split.jsadded
modules/index.jsView
@@ -1,5 +1,6 @@
11 module.exports = {
2+ "_screen_view.js": require('./_screen_view.js'),
23 "about.js": require('./about.js'),
34 "avatar-image.js": require('./avatar-image.js'),
45 "avatar-profile.js": require('./avatar-profile.js'),
56 "avatar.js": require('./avatar.js'),
@@ -22,8 +23,9 @@
2223 "private.js": require('./private.js'),
2324 "public.js": require('./public.js'),
2425 "search-box.js": require('./search-box.js'),
2526 "search.js": require('./search.js'),
27+ "split.js": require('./split.js'),
2628 "suggest-mentions.js": require('./suggest-mentions.js'),
2729 "suggest.js": require('./suggest.js'),
2830 "tabs.js": require('./tabs.js'),
2931 "thread.js": require('./thread.js'),
modules/_screen_view.jsView
@@ -1,0 +1,8 @@
1+
2+//this is just an UGLY HACK, because depject does not
3+//support recursion...
4+
5+var sv = require('../plugs').first(exports.screen_view = [])
6+exports._screen_view = function (value) {
7+ return sv(value)
8+}
modules/split.jsView
@@ -1,0 +1,17 @@
1+var h = require('hyperscript')
2+
3+var screen_view =
4+ require('../plugs').first(exports._screen_view = [])
5+
6+exports.screen_view = function (path) {
7+ var m = /^split\s*\((.*)\)$/.exec(path)
8+ if(!m)
9+ return
10+
11+ return h('div.row',
12+ m[1].split(',').map(function (e) {
13+ return screen_view(e)
14+ }).filter(Boolean)
15+ )
16+}
17+

Built with git-ssb-web