Commit 1b50f4bc87538743de7931301f3b00f1ff1466d1
Fix formatting.
Gordon Martin committed on 2/14/2018, 12:06:04 AMParent: 6e47bd5db740207b5ec4d5f46bc07a5c92db134d
Files changed
index.js | changed |
locales/en.json | changed |
modules/feed/html/follow-warning.js | changed |
modules/page/html/render/public.js | changed |
index.js | ||
---|---|---|
@@ -24,24 +24,23 @@ | ||
24 | 24 | * scuttlebot instances that conflict on the same port. Before opening patchwork, |
25 | 25 | * we check if it's already running and if it is we focus the existing window |
26 | 26 | * rather than opening a new instance. |
27 | 27 | */ |
28 | -function quitIfAlreadyRunning() { | |
29 | - var shouldQuit = electron.app.makeSingleInstance(function(commandLine, workingDirectory) { | |
28 | +function quitIfAlreadyRunning () { | |
29 | + var shouldQuit = electron.app.makeSingleInstance(function (commandLine, workingDirectory) { | |
30 | 30 | // Someone tried to run a second instance, we should focus our window. |
31 | 31 | if (windows.main) { |
32 | - if (windows.main.isMinimized()) windows.main.restore(); | |
33 | - windows.main.focus(); | |
32 | + if (windows.main.isMinimized()) windows.main.restore() | |
33 | + windows.main.focus() | |
34 | 34 | } |
35 | - }); | |
35 | + }) | |
36 | 36 | |
37 | 37 | if (shouldQuit) { |
38 | - electron.app.quit(); | |
39 | - return; | |
38 | + electron.app.quit() | |
40 | 39 | } |
41 | 40 | } |
42 | 41 | |
43 | -quitIfAlreadyRunning(); | |
42 | +quitIfAlreadyRunning() | |
44 | 43 | |
45 | 44 | electron.app.on('ready', () => { |
46 | 45 | setupContext('ssb', { |
47 | 46 | server: !(process.argv.includes('-g') || process.argv.includes('--use-global-ssb')) |
locales/en.json | ||
---|---|---|
@@ -99,6 +99,19 @@ | ||
99 | 99 | "likes": "likes", |
100 | 100 | " others": " others", |
101 | 101 | "like": "like", |
102 | 102 | "subscribed to ": "subscribed to ", |
103 | - "liked this message": "liked this message" | |
103 | + "liked this message": "liked this message", | |
104 | + "Click to unblock": "Click to unblock", | |
105 | + "Blocked": "Blocked", | |
106 | + "Click to unfollow": "Click to unfollow", | |
107 | + "Follow Back": "Follow Back", | |
108 | + "Follow": "Follow", | |
109 | + "Click to block syncing with this person and hide their posts": "Click to block syncing with this person and hide their posts", | |
110 | + "Block": "Block", | |
111 | + "This is you.": "This is you.", | |
112 | + "unsubscribed from ": "unsubscribed from ", | |
113 | + "mentioned in your network": "mentioned in your network", | |
114 | + "on ": "on ", | |
115 | + "assigned a display image to ": "assigned a display image to ", | |
116 | + "Close": "Close" | |
104 | 117 | } |
modules/feed/html/follow-warning.js | ||
---|---|---|
@@ -12,20 +12,20 @@ | ||
12 | 12 | 'feed.html.followWarning': true, |
13 | 13 | 'feed.html.followerWarning': true |
14 | 14 | }) |
15 | 15 | |
16 | -exports.create = function(api) { | |
16 | +exports.create = function (api) { | |
17 | 17 | const i18n = api.intl.sync.i18n |
18 | 18 | return nest('feed.html', { |
19 | - followWarning: function followWarning(condition, explanation) { | |
20 | - return renderWarningBox(condition, i18n("You are not following anyone"), explanation) | |
19 | + followWarning: function followWarning (condition, explanation) { | |
20 | + return renderWarningBox(condition, i18n('You are not following anyone'), explanation) | |
21 | 21 | }, |
22 | - followerWarning: function followerWarning(condition, explanation) { | |
23 | - return renderWarningBox(condition, i18n("You have no followers"), explanation) | |
22 | + followerWarning: function followerWarning (condition, explanation) { | |
23 | + return renderWarningBox(condition, i18n('You have no followers'), explanation) | |
24 | 24 | } |
25 | 25 | }) |
26 | 26 | |
27 | - function renderWarningBox(condition, header, explanation) { | |
27 | + function renderWarningBox (condition, header, explanation) { | |
28 | 28 | var content = h('div', { |
29 | 29 | classList: 'NotFollowingAnyoneWarning' |
30 | 30 | }, h('section', [ |
31 | 31 | h('h1', header), |
@@ -38,7 +38,5 @@ | ||
38 | 38 | ])) |
39 | 39 | |
40 | 40 | return when(condition, content) |
41 | 41 | } |
42 | - | |
43 | - | |
44 | 42 | } |
modules/page/html/render/public.js | ||
---|---|---|
@@ -274,9 +274,8 @@ | ||
274 | 274 | return api.feed.html.followWarning(shownWhen, explanation) |
275 | 275 | } |
276 | 276 | |
277 | 277 | function noFollowersWarning () { |
278 | - | |
279 | 278 | var explanation = i18n( |
280 | 279 | 'Nobody will be able to see your posts until you have a follower. The easiest way to get a follower is to use a pub invite as the pub will follow you back. If you have already redeemed a pub invite and you see it has not followed you back on your profile, try another pub.' |
281 | 280 | ) |
282 | 281 | |
@@ -288,9 +287,9 @@ | ||
288 | 287 | (isLoading, hasNoFollowers, isNotFollowingAnybody) => |
289 | 288 | !isLoading && (hasNoFollowers && !isNotFollowingAnybody) |
290 | 289 | ) |
291 | 290 | |
292 | - return api.feed.html.followerWarning(shownWhen, explanation); | |
291 | + return api.feed.html.followerWarning(shownWhen, explanation) | |
293 | 292 | } |
294 | 293 | |
295 | 294 | function subscribe (id) { |
296 | 295 | api.message.async.publish({ |
Built with git-ssb-web