Commit 26d61ca780b49f14cec3dc071c03f71b4b3da905
Merge branch 'master' of github.com:ticktackim/ticktack-workplan into dark-beta
mix irving committed on 5/15/2018, 11:50:46 PMParent: ae6f77f69dca59cc49c1bff30752c7b54b8f8e3c
Parent: 9f5c802ae0f19a653aa744af250402e6fb042fda
Files changed
README.md | changed |
app/html/header.js | changed |
app/html/header.mcss | changed |
app/html/sideNav/sideNav.mcss | changed |
app/obs/pluginsOk.js | changed |
README.md | |||
---|---|---|---|
@@ -1,7 +1,7 @@ | |||
1 | 1 … | # Ticktack | |
2 | 2 … | ||
3 | -A decentralized social platform enable people to share knowledge and exchange value, with p2p messaging encrypted feature. | ||
3 … | +A decentralized social platform enables people to share knowledge and exchange value, with an end to end encrypted messaging feature. | ||
4 | 4 … | ||
5 | 5 … | You can find [installers for Linux, Mac, and Windows on the Releases page](https://github.com/ticktackim/ticktack-workplan/releases). | |
6 | 6 … | ||
7 | 7 … | #### Please read the [Code of Conduct](https://github.com/ticktackim/ticktack-network/wiki/Code-of-Conduct) and [Reminder](https://github.com/ticktackim/ticktack-network/wiki/REMINDER) before your installation. |
app/html/header.js | ||
---|---|---|
@@ -3,8 +3,11 @@ | ||
3 | 3 … | const path = require('path') |
4 | 4 … | const { remote } = require('electron') |
5 | 5 … | |
6 | 6 … | exports.gives = nest('app.html.header') |
7 … | +exports.needs = nest({ | |
8 … | + 'app.obs.pluginsOk': 'first' | |
9 … | +}) | |
7 | 10 … | |
8 | 11 … | const SETTINGS_PAGES = [ |
9 | 12 … | 'settings', |
10 | 13 … | 'userEdit' |
@@ -46,11 +49,19 @@ | ||
46 | 49 … | src: when(isSettings, assetPath('settings_on.png'), assetPath('settings.png')), |
47 | 50 … | 'ev-click': () => push({page: 'settings'}) |
48 | 51 … | }) |
49 | 52 … | ]), |
50 | - h('i.notifications.fa', { | |
51 | - className: when(isNotifications, 'fa-bell', 'fa-bell-o'), | |
52 | - 'ev-click': () => push({page: 'statsShow'}) | |
53 … | + computed(api.app.obs.pluginsOk(), ok => { | |
54 … | + return h('i.notifications.fa', { | |
55 … | + classList: [ | |
56 … | + when(isNotifications, 'fa-bell', 'fa-bell-o'), | |
57 … | + when(!ok, '-disabled') | |
58 … | + ], | |
59 … | + 'ev-click': () => { | |
60 … | + if (!ok) return | |
61 … | + push({page: 'statsShow'}) | |
62 … | + } | |
63 … | + }) | |
53 | 64 … | }) |
54 | 65 … | ]) |
55 | 66 … | ]) |
56 | 67 … | }) |
app/html/header.mcss | ||
---|---|---|
@@ -37,10 +37,16 @@ | ||
37 | 37 … | display: flex |
38 | 38 … | margin: 0 2rem |
39 | 39 … | } |
40 | 40 … | |
41 … | + i { font-size: 1.4rem } | |
41 | 42 … | i.notifications { color: #7da9ea } |
42 | 43 … | i.fa-bell.notifications { color: #fff } |
44 … | + i.fa-bell-o { color: #7da9ea } | |
45 … | + i.-disabled { | |
46 … | + filter: opacity(.4) | |
47 … | + cursor: not-allowed | |
48 … | + } | |
43 | 49 … | |
44 | 50 … | (a) { |
45 | 51 … | color: #222 |
46 | 52 … | margin-right: 1rem |
app/html/sideNav/sideNav.mcss | ||
---|---|---|
@@ -53,8 +53,9 @@ | ||
53 | 53 … | filter: saturate(0) |
54 | 54 … | opacity: .5 |
55 | 55 … | :hover { |
56 | 56 … | cursor: not-allowed |
57 … | + background: initial | |
57 | 58 … | } |
58 | 59 … | } |
59 | 60 … | |
60 | 61 … | div.spacer { |
app/obs/pluginsOk.js | ||
---|---|---|
@@ -1,29 +1,32 @@ | ||
1 | 1 … | const nest = require('depnest') |
2 | -const { h, onceTrue, Value } = require('mutant') | |
2 … | +const { onceTrue, Value } = require('mutant') | |
3 | 3 … | |
4 | 4 … | exports.gives = nest('app.obs.pluginsOk') |
5 | 5 … | |
6 | 6 … | exports.needs = nest({ |
7 | 7 … | 'sbot.obs.connection': 'first' |
8 | 8 … | }) |
9 | 9 … | |
10 | 10 … | exports.create = (api) => { |
11 … | + // TODO - differentiate and enable / disable based on channel || ticktack plugin missing | |
11 | 12 … | var ok = Value() |
12 | 13 … | |
13 | 14 … | return nest('app.obs.pluginsOk', function pluginsOk () { |
14 | - if (ok() == undefined) checkForTrouble() | |
15 … | + if (ok() === null) checkForTrouble() | |
15 | 16 … | |
16 | 17 … | return ok |
17 | 18 … | }) |
18 | 19 … | |
19 | 20 … | function checkForTrouble () { |
20 | 21 … | onceTrue( |
21 | 22 … | api.sbot.obs.connection, |
22 | 23 … | sbot => { |
23 | - if (!sbot.channel) ok.set(false) // TODO could build a list of missing plugins + effects | |
24 … | + if (!sbot.channel) console.log('> channel plugin missing!') | |
25 … | + if (!sbot.tickack) console.log('> ticktack plugin missing!') | |
26 … | + | |
27 … | + if (!sbot.channel || !sbot.ticktack) ok.set(false) // TODO could build a list of missing plugins + effects | |
24 | 28 … | else ok.set(true) |
25 | 29 … | } |
26 | 30 … | ) |
27 | 31 … | } |
28 | 32 … | } |
29 | - |
Built with git-ssb-web