Files: 6071577daff8cc01e7241b5799fb112902aec545 / plugs / app / page / scry-show.js
811 bytesRaw
1 | const nest = require('depnest') |
2 | const { h } = require('mutant') |
3 | const Scuttle = require('scuttle-poll') |
4 | |
5 | const Show = require('../../../views/show') |
6 | |
7 | exports.gives = nest({ |
8 | 'app.page.scryShow': true |
9 | }) |
10 | |
11 | exports.needs = nest({ |
12 | 'about.html.avatar': 'first', |
13 | 'about.obs.name': 'first', |
14 | 'keys.sync.id': 'first', |
15 | 'sbot.obs.connection': 'first' |
16 | }) |
17 | |
18 | exports.create = function (api) { |
19 | return nest({ |
20 | 'app.page.scryShow': scryShowPage |
21 | }) |
22 | |
23 | function scryShowPage (poll) { |
24 | const page = h('Scry -show', [ |
25 | Show({ |
26 | poll, |
27 | myFeedId: api.keys.sync.id(), |
28 | scuttle: Scuttle(api.sbot.obs.connection), |
29 | name: api.about.obs.name, |
30 | avatar: api.about.html.avatar |
31 | }) |
32 | ]) |
33 | |
34 | page.scroll = () => {} // stops keyboard shortcuts from breaking |
35 | return page |
36 | } |
37 | } |
38 |
Built with git-ssb-web