Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit f7bf001

Browse files
committed
Merge branch 'master' into re-enable-ssb-ebt
2 parents 19466e9 + c330dbf commit f7bf001

File tree

174 files changed

+4766
-2777
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+4766
-2777
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ matrix:
33
- os: osx
44
osx_image: xcode9.4
55
language: node_js
6-
node_js: 10
6+
node_js: lts/*
77
env:
88
- ELECTRON_CACHE=$HOME/.cache/electron
99
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
1010

1111
- os: linux
1212
language: node_js
13-
node_js: 10
13+
node_js: lts/*
1414

1515
- os: windows
1616
language: node_js
17-
node_js: 10
17+
node_js: lts/*
1818
filter_secrets: false
1919

2020
cache:
@@ -43,3 +43,4 @@ script: npm test && npm run dist
4343
branches:
4444
only:
4545
- master
46+
- "/^v\\d+\\.\\d+\\.\\d+$/"

docs/CHANGELOG.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,70 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
### Security
1515
-->
1616

17-
## [Unreleased]
17+
## v3.16.2 - 2019-08-21
18+
19+
### Fixed
20+
- Infinite indexing bug related to ssb-legacy-conn upgrade (#1172)
21+
- Message click not working related to URI component decoding (#1171)
22+
23+
## v3.16.0 - 2019-08-20
24+
25+
### Added
26+
- Content warning support (#1159)
27+
- Recent changes from changelog to release notes (#1155)
28+
- Unicode hashtag support with ssb-markdown upgrade (#1168)
29+
30+
### Changed
31+
- Refactor to remove unused code (#1153)
32+
- Refactor to remove bulk-require module (#1158)
33+
- Switch from ssb-gossip to ssb-legacy-conn
34+
35+
### Fixed
36+
- "Could not get message" bug on gatherings (#1166)
37+
- Your gatherings not showing in gathering feed (#1167)
38+
- Encoded URI bug when previewing profile with hover (#1169)
39+
40+
## v3.15.0 - 2019-08-08
41+
42+
### Added
43+
- Developer script to output release notes (#1095)
44+
- Documentation for which versions of Node we can support (#1115)
45+
- Esperanto translation (#1126)
46+
- Option to delete feeds from blocked authors (#1026)
47+
- Traditional Chinese translation (#1130)
48+
49+
### Changed
50+
- Encode emoji as unicode character instead of `:shortcode` (#1105)
51+
- Switch input textarea font from monospace to sans-serif (#1120)
52+
- Refactor to remove unused code (#1122)
53+
- Increase size of emoji in helper (#1139)
54+
- Upgrade JavaScript dependencies (#1141)
55+
56+
### Fixed
57+
- Fixed corners of avatar images in private messages not matching up (#1075)
58+
- Spanish typo for public messages (#1113)
59+
- Bug where gathering was showing as "private" in preview (#1131)
60+
- Mistranslations in Simplified Chinese (#1137)
61+
62+
## v3.14.1 - 2019-06-17
63+
64+
### Fixed
65+
- Resolved inconsistent emoji rendering from `:shortcode:` inconsistencies.
66+
67+
## v3.14.0 - 2019-06-17
68+
69+
### Added
70+
- Improved emoji support, Patchwork now has more emoji in a better font.
71+
- Developer warning when trying to start Patchwork twice.
72+
73+
### Changed
74+
- Reorganized directory structure,, improved readme and contributor guide.
75+
- Update check on startup now happens every 24 hours.
76+
- Switched to system font instead of using Arial everywhere.
1877

1978
### Fixed
2079
- Stopped automatically turning ascii emoji like ":)" into their respective image emoji.
80+
- Liberated code in posts from its tiny box with a scroll bar.
2181

2282
## v3.13.0 - 2019-06-10
2383

docs/INSTALL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
The readme contains some information on the simplest installation methods, but
44
you can also install Patchwork by fetching from Git and building from source.
55

6-
76
## Dependencies
87

98
- Git
10-
- Node.js (>= 6)
9+
- Node.js ([Active LTS][node-active-lts])
1110
- npm or Yarn
1211

1312
### Debian / Ubuntu
@@ -63,3 +62,5 @@ With yarn:
6362
```shell
6463
yarn
6564
```
65+
66+
[node-active-lts]: https://github.com/nodejs/Release#release-schedule

docs/release-notes-template.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
:tada: **Thanks for downloading Patchwork!** :tada:
2+
3+
## Install
4+
5+
- **Windows:** [`ssb-patchwork-setup-$$VERSION.exe`][exe]
6+
- **macOS:** [`Patchwork-$$VERSION.dmg`][dmg] (you may need to [allow apps from "unidentified" developers](https://support.apple.com/kb/PH25088))
7+
- **Linux:** [`ssb-patchwork-$$VERSION-x86_64.AppImage`][appimage] (you will need to [make it executable](https://docs.appimage.org/user-guide/run-appimages.html))
8+
9+
## Getting started
10+
11+
If this is your first time on Scuttlebutt you may need an invite to get connected. After installing Patchwork and choosing your name you should select the **Join Pub** button. You'll need to [get a pub invite](https://github.com/ssbc/ssb-server/wiki/Pub-Servers#public-pubs), paste it into the prompt, and select **Redeem invite**.
12+
13+
You can find more information in the [Getting Started Guide](https://www.scuttlebutt.nz/getting-started).
14+
15+
## Changes
16+
$$CHANGES
17+
## Support
18+
19+
:thinking: [Any questions? Check out the Scuttlebutt FAQ!](https://www.scuttlebutt.nz/faq/)
20+
21+
:sos: [Need help? Please create an issue!](https://github.com/ssbc/patchwork/issues/new)
22+
23+
[dmg]: https://github.com/ssbc/patchwork/releases/download/v$$VERSION/Patchwork-$$VERSION.dmg
24+
[exe]: https://github.com/ssbc/patchwork/releases/download/v$$VERSION/ssb-patchwork-setup-$$VERSION.exe
25+
[appimage]: https://github.com/ssbc/patchwork/releases/download/v$$VERSION/ssb-patchwork-$$VERSION-x86_64.AppImage

index.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ process.on('uncaughtException', function (err) {
33
process.exit()
44
})
55

6-
var electron = require('electron')
7-
var openWindow = require('./lib/window')
6+
const electron = require('electron')
7+
const openWindow = require('./lib/window')
88

9-
var Path = require('path')
10-
var defaultMenu = require('electron-default-menu')
11-
var WindowState = require('electron-window-state')
12-
var Menu = electron.Menu
13-
var extend = require('xtend')
14-
var ssbKeys = require('ssb-keys')
9+
const Path = require('path')
10+
const defaultMenu = require('electron-default-menu')
11+
const WindowState = require('electron-window-state')
12+
const Menu = electron.Menu
13+
const extend = require('xtend')
14+
const ssbKeys = require('ssb-keys')
1515

16-
var windows = {
16+
const windows = {
1717
dialogs: new Set()
1818
}
19-
var ssbConfig = null
20-
var quitting = false
19+
let ssbConfig = null
20+
let quitting = false
2121

2222
/**
2323
* It's not possible to run two instances of patchwork as it would create two
@@ -31,7 +31,7 @@ function quitIfAlreadyRunning () {
3131
console.log('Please close the existing instance before starting a new one.')
3232
return electron.app.quit()
3333
}
34-
electron.app.on('second-instance', (event, commandLine, workingDirectory) => {
34+
electron.app.on('second-instance', () => {
3535
// Someone tried to run a second instance, we should focus our window.
3636
if (windows.main) {
3737
if (windows.main.isMinimized()) windows.main.restore()
@@ -40,7 +40,7 @@ function quitIfAlreadyRunning () {
4040
})
4141
}
4242

43-
var config = {
43+
const config = {
4444
server: !(process.argv.includes('-g') || process.argv.includes('--use-global-ssb'))
4545
}
4646
// a flag so we don't start git-ssb-web if a custom path is passed in
@@ -54,8 +54,8 @@ electron.app.on('ready', () => {
5454
setupContext(process.env.ssb_appname || 'ssb', {
5555
server: !(process.argv.includes('-g') || process.argv.includes('--use-global-ssb'))
5656
}, () => {
57-
var browserWindow = openMainWindow()
58-
var menu = defaultMenu(electron.app, electron.shell)
57+
const browserWindow = openMainWindow()
58+
const menu = defaultMenu(electron.app, electron.shell)
5959

6060
menu.splice(4, 0, {
6161
label: 'Navigation',
@@ -84,7 +84,7 @@ electron.app.on('ready', () => {
8484
]
8585
})
8686

87-
var view = menu.find(x => x.label === 'View')
87+
const view = menu.find(x => x.label === 'View')
8888
view.submenu = [
8989
{ role: 'reload' },
9090
{ role: 'toggledevtools' },
@@ -95,15 +95,15 @@ electron.app.on('ready', () => {
9595
{ type: 'separator' },
9696
{ role: 'togglefullscreen' }
9797
]
98-
var help = menu.find(x => x.label === 'Help')
98+
const help = menu.find(x => x.label === 'Help')
9999
help.submenu = [
100100
{
101101
label: 'Learn More',
102102
click () { require('electron').shell.openExternal('https://scuttlebutt.nz') }
103103
}
104104
]
105105
if (process.platform === 'darwin') {
106-
var win = menu.find(x => x.label === 'Window')
106+
const win = menu.find(x => x.label === 'Window')
107107
win.submenu = [
108108
{ role: 'minimize' },
109109
{ role: 'zoom' },
@@ -116,7 +116,7 @@ electron.app.on('ready', () => {
116116
Menu.setApplicationMenu(Menu.buildFromTemplate(menu))
117117
})
118118

119-
electron.app.on('activate', function (e) {
119+
electron.app.on('activate', function () {
120120
if (windows.main) {
121121
windows.main.show()
122122
}
@@ -126,7 +126,7 @@ electron.app.on('ready', () => {
126126
quitting = true
127127
})
128128

129-
electron.ipcMain.on('open-background-devtools', function (ev, config) {
129+
electron.ipcMain.on('open-background-devtools', function () {
130130
if (windows.background) {
131131
windows.background.webContents.openDevTools({ mode: 'detach' })
132132
}
@@ -135,7 +135,7 @@ electron.app.on('ready', () => {
135135

136136
function openMainWindow () {
137137
if (!windows.main) {
138-
var windowState = WindowState({
138+
const windowState = WindowState({
139139
defaultWidth: 1024,
140140
defaultHeight: 768
141141
})
@@ -200,7 +200,7 @@ function setupContext (appName, opts, cb) {
200200
ssbConfig.remote = `net:127.0.0.1:${ssbConfig.port}~shs:${pubkey}`
201201
} else {
202202
const socketPath = Path.join(ssbConfig.path, 'socket')
203-
ssbConfig.connections.incoming.unix = [{ 'scope': 'device', 'transform': 'noauth' }]
203+
ssbConfig.connections.incoming.unix = [{ scope: 'device', transform: 'noauth' }]
204204
ssbConfig.remote = `unix:${socketPath}:~noauth:${pubkey}`
205205
}
206206

lib/anchor-hook.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var watch = require('mutant/watch')
1+
const watch = require('mutant/watch')
22

33
module.exports = AnchorHook
44

@@ -13,7 +13,7 @@ function AnchorHook (name, current, cb) {
1313

1414
// HACK: due to a browser bug, sometimes the window scrolls down below the top bar
1515
// Why not just hack it!!!
16-
var topBar = document.querySelector('.MainWindow > div.top')
16+
const topBar = document.querySelector('.MainWindow > div.top')
1717
if (topBar) {
1818
topBar.scrollIntoViewIfNeeded()
1919
}

lib/catch-links.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,31 @@ module.exports = function (root, cb) {
55
return true
66
}
77

8-
var anchor = null
9-
for (var n = ev.target; n.parentNode; n = n.parentNode) {
8+
let anchor = null
9+
for (let n = ev.target; n.parentNode; n = n.parentNode) {
1010
if (n.nodeName === 'A') {
1111
anchor = n
1212
break
1313
}
1414
}
1515
if (!anchor) return true
1616

17-
var href = anchor.getAttribute('href')
17+
let href = anchor.getAttribute('href')
18+
19+
if (href.startsWith('#')) {
20+
try {
21+
href = decodeURIComponent(href)
22+
} catch (e) {
23+
// Safely ignore error because href isn't URI-encoded.
24+
}
25+
}
1826

1927
if (href) {
20-
var isUrl
28+
let isUrl
29+
let url
2130

2231
try {
23-
var url = new URL(href)
32+
url = new URL(href)
2433
isUrl = true
2534
} catch (e) {
2635
isUrl = false

0 commit comments

Comments
 (0)