git ssb

2+

mixmix / ticktack



Commit b4bb2278fc6720ae4aa5470a30a66da315b74f00

add warning translations

mix irving committed on 2/13/2018, 7:00:19 AM
Parent: 30807fa44b8b7b127a6118a555fc4f259245efe3

Files changed

app/html/warning.jschanged
app/obs/pluginWarnings.jschanged
translations/en.jschanged
app/html/warning.jsView
@@ -4,28 +4,31 @@
44 exports.gives = nest('app.html.warning')
55
66 exports.needs = nest({
77 'app.html.lightbox': 'first',
8- 'app.obs.pluginWarnings': 'first'
8 + 'app.obs.pluginWarnings': 'first',
9 + 'translations.sync.strings': 'first'
910 })
1011
1112 exports.create = (api) => {
1213 var seenWarning = false
1314
1415 return nest('app.html.warning', function warning () {
1516 if (seenWarning) return
1617
18 + const t = api.translations.sync.strings().pluginWarnings
19 +
1720 const lightbox = api.app.html.lightbox(
1821 h('div', [
19- h('h1', 'Ticktack running in limited mode'),
20- h('p', 'Another scuttlebutt app is managing your shared database. Core functionality will work, but you may find there are some features that do not work.'),
21- h('p', 'If you are running Patchwork, close Patchwork before running Ticktack to get the full set of features'),
22 + h('h1', t.heading),
23 + h('p', t.description),
24 + h('p', t.advice),
2225 h('Button', {
2326 'ev-click': () => {
2427 lightbox.close()
2528 seenWarning = true
2629 }},
27- 'okay'
30 + t.action.ok
2831 )
2932 ])
3033 )
3134
app/obs/pluginWarnings.jsView
@@ -19,9 +19,8 @@
1919 function checkForTrouble () {
2020 onceTrue(
2121 api.sbot.obs.connection,
2222 sbot => {
23- console.log('nope', sbot.channel)
2423 if (!sbot.channel) warnings.set(true) // TODO could build a list of missing plugins + effects
2524 else warnings.set(false)
2625 }
2726 )
translations/en.jsView
@@ -4,8 +4,16 @@
44 slogan: `Connecting the Unconnected
55 Reconstructing a trusty social network
66 `
77 },
8 + pluginWarnings: {
9 + heading: 'Ticktack running in limited mode',
10 + description: 'Another scuttlebutt app is managing your shared database. Core functionality will work, but you may find there are some features that do not work.',
11 + advice: 'If you are running Patchwork, close Patchwork before running Ticktack to get the full set of features',
12 + action: {
13 + ok: 'Okay'
14 + }
15 + },
816 blogIndex: {
917 title: 'Discover',
1018 },
1119 topNav: {
@@ -148,6 +156,5 @@
148156 languages: {
149157 en: 'English',
150158 zh: '中文'
151159 }
152-
153160 }

Built with git-ssb-web