Commit 28a3d608c0985435c995a7262ed21dfc3d965caf
add scry to menu and auto-complete
mixmix committed on 9/26/2018, 2:05:18 AMParent: 5149067cc270bfcbf301fd7c1db66cd15659a53f
Files changed
app/html/scroller.js | changed |
app/html/search-bar.js | changed |
package-lock.json | changed |
package.json | changed |
app/html/scroller.js | ||
---|---|---|
@@ -46,13 +46,14 @@ | ||
46 | 46 … | } |
47 | 47 … | } |
48 | 48 … | |
49 | 49 … | return function scroll (d) { |
50 | - selectChild((!curMsgEl || d === 'first') ? content.firstChild | |
50 … | + const child = (!curMsgEl || d === 'first') ? content.firstChild | |
51 | 51 … | : (!curMsgEl || d === 'last') ? content.lastChild |
52 | 52 … | : d < 0 ? curMsgEl.previousElementSibling || content.firstChild |
53 | 53 … | : d > 0 ? curMsgEl.nextElementSibling || content.lastChild |
54 | - : curMsgEl) | |
54 … | + : curMsgEl | |
55 … | + selectChild(child) | |
55 | 56 … | |
56 | 57 … | return curMsgEl |
57 | 58 … | } |
58 | 59 … |
app/html/search-bar.js | ||
---|---|---|
@@ -67,15 +67,15 @@ | ||
67 | 67 … | |
68 | 68 … | if (char === '@') api.about.async.suggest(word, cb) |
69 | 69 … | if (char === '#') api.channel.async.suggest(word, cb) |
70 | 70 … | if (char === '/') cb(null, getPagesSuggestions(word)) |
71 | - }, {cls: 'PatchSuggest'}) | |
71 … | + }, { cls: 'PatchSuggest' }) | |
72 | 72 … | |
73 | 73 … | // TODO extract |
74 | 74 … | function getPagesSuggestions (word) { |
75 | 75 … | const pages = [ |
76 | 76 … | 'blogs', 'calendar', 'posts', 'public', 'private', 'inbox', 'profile', 'notifications', 'settings', |
77 | - 'gatherings', 'chess', 'books', 'imageSearch', 'polls', 'query', 'dark-crystal', 'postRank' | |
77 … | + 'gatherings', 'chess', 'books', 'imageSearch', 'polls', 'query', 'dark-crystal', 'postRank', 'scry/new' | |
78 | 78 … | ] |
79 | 79 … | |
80 | 80 … | return pages |
81 | 81 … | .filter(page => ~page.indexOf(word)) |
package-lock.json | ||
---|---|---|
The diff is too large to show. Use a local git client to view these changes. Old file size: 315116 bytes New file size: 315117 bytes |
package.json | ||
---|---|---|
@@ -72,9 +72,9 @@ | ||
72 | 72 … | "patchbay-book": "^1.0.8", |
73 | 73 … | "patchbay-dark-crystal": "^1.0.3", |
74 | 74 … | "patchbay-gatherings": "^2.0.2", |
75 | 75 … | "patchbay-poll": "^1.0.9", |
76 | - "patchbay-scry": "^1.1.1", | |
76 … | + "patchbay-scry": "^1.1.2", | |
77 | 77 … | "patchcore": "^1.28.1", |
78 | 78 … | "pull-abortable": "^4.1.1", |
79 | 79 … | "pull-next-query": "^1.0.0", |
80 | 80 … | "pull-scroll": "^1.0.9", |
Built with git-ssb-web