Commit 5ed0ef75a42972670b29aada99be810a8bde7b80
Merge branch 'master' of ssb://%s9mSFATE4RGyJx9wgH22lBrvD4CgUQW4yeguSWWjtqc=.sha256 into styles
Ev Bogue committed on 9/12/2016, 4:11:49 PMParent: 35987c36856c834b19bef0d4375537ef0aa487f3
Parent: 18587bcb2aa7e5dd708e8a2dfef6e56ef56ca83e
Files changed
index.js | changed |
modules/search-box.js | changed |
modules/tabs.js | changed |
package.json | changed |
index.js | ||
---|---|---|
@@ -1,7 +1,7 @@ | ||
1 | 1 … | var h = require('hyperscript') |
2 | 2 … | |
3 | -window.addEventListener('error', function onError(e) { | |
3 … | +window.addEventListener('error', window.onError = function (e) { | |
4 | 4 … | document.body.appendChild(h('div.error', |
5 | 5 … | h('h1', e.message), |
6 | 6 … | h('big', h('code', e.filename + ':' + e.lineno)), |
7 | 7 … | h('pre', e.error ? (e.error.stack || e.error.toString()) : e.toString()))) |
modules/search-box.js | |||
---|---|---|---|
@@ -8,8 +8,17 @@ | |||
8 | 8 … | var channels = [] | |
9 | 9 … | ||
10 | 10 … | var signified = require('../plugs').first(exports.signified = []) | |
11 | 11 … | ||
12 … | +var builtinTabs = [ | ||
13 … | + '/public', '/private', '/notifications', | ||
14 … | + '/network', '/query', '/theme', '/versions' | ||
15 … | +].map(function (name) { | ||
16 … | + return { | ||
17 … | + title: name, | ||
18 … | + value: name, | ||
19 … | + } | ||
20 … | +}) | ||
12 | 21 … | ||
13 | 22 … | exports.search_box = function (go) { | |
14 | 23 … | ||
15 | 24 … | var suggestBox | |
@@ -71,8 +80,12 @@ | |||
71 | 80 … | subtitle: e.rank | |
72 | 81 … | } | |
73 | 82 … | })) | |
74 | 83 … | }) | |
84 … | + } else if(/^\//.test(word)) { | ||
85 … | + cb(null, builtinTabs.filter(function (name) { | ||
86 … | + return name.value.substr(0, word.length) === word | ||
87 … | + })) | ||
75 | 88 … | } | |
76 | 89 … | }, {}) | |
77 | 90 … | }, 10) | |
78 | 91 … |
modules/tabs.js | ||
---|---|---|
@@ -160,8 +160,15 @@ | ||
160 | 160 … | errorsContent |
161 | 161 … | ) |
162 | 162 … | ) |
163 | 163 … | |
164 … | + // remove loader error handler | |
165 … | + if (window.onError) { | |
166 … | + window.removeEventListener('error', window.onError) | |
167 … | + delete window.onError | |
168 … | + } | |
169 … | + | |
170 … | + // put errors in a tab | |
164 | 171 … | window.addEventListener('error', function (ev) { |
165 | 172 … | var err = ev.error || ev |
166 | 173 … | if(!tabs.has('errors')) |
167 | 174 … | tabs.add('errors', errors, false) |
package.json | ||
---|---|---|
@@ -1,8 +1,8 @@ | ||
1 | 1 … | { |
2 | 2 … | "name": "patchbay", |
3 | 3 … | "description": "a pluggable patchwork", |
4 | - "version": "3.0.1", | |
4 … | + "version": "3.1.0", | |
5 | 5 … | "homepage": "https://github.com/dominictarr/patchbay", |
6 | 6 … | "repository": { |
7 | 7 … | "type": "git", |
8 | 8 … | "url": "git://github.com/dominictarr/patchbay.git" |
Built with git-ssb-web