Skip to content
Permalink
Browse files

Merge branch 'master' into re-enable-ssb-ebt

  • Loading branch information...
mmckegg committed Aug 22, 2019
2 parents 19466e9 + c330dbf commit f7bf00137f80613350984b22d6db274054346520
Showing with 4,766 additions and 2,777 deletions.
  1. +4 −3 .travis.yml
  2. +61 −1 docs/CHANGELOG.md
  3. +3 −2 docs/INSTALL.md
  4. +25 −0 docs/release-notes-template.md
  5. +22 −22 index.js
  6. +2 −2 lib/anchor-hook.js
  7. +14 −5 lib/catch-links.js
  8. +25 −25 lib/context-menu-and-spellcheck.js
  9. +2 −2 lib/depject/about/async/latest-values.js
  10. +2 −2 lib/depject/about/html/image.js
  11. +2 −2 lib/depject/about/html/link.js
  12. +12 −12 lib/depject/about/obs.js
  13. +2 −2 lib/depject/about/sync.js
  14. +2 −2 lib/depject/about/sync/short-feed-id.js
  15. +5 −5 lib/depject/app/fullscreen.js
  16. +19 −19 lib/depject/app/html/progress-notifier.js
  17. +10 −10 lib/depject/app/html/search.js
  18. +20 −20 lib/depject/app/link-preview.js
  19. +7 −7 lib/depject/app/sync/external-handler/git.js
  20. +17 −17 lib/depject/app/views.js
  21. +24 −26 lib/depject/backlinks/obs.js
  22. +8 −8 lib/depject/blob/obs/has.js
  23. +5 −5 lib/depject/blob/sync/url.js
  24. +2 −2 lib/depject/channel/async/suggest.js
  25. +3 −3 lib/depject/channel/html/link.js
  26. +17 −12 lib/depject/channel/html/preview.js
  27. +9 −9 lib/depject/channel/html/subscribe-toggle.js
  28. +2 −2 lib/depject/channel/obs/recent.js
  29. +14 −14 lib/depject/channel/obs/subscribed.js
  30. +4 −4 lib/depject/channel/obs/subscribers.js
  31. +3 −3 lib/depject/channel/sync/normalize.js
  32. +2 −2 lib/depject/contact/async.js
  33. +45 −40 lib/depject/contact/html/follow-toggle.js
  34. +10 −16 lib/depject/contact/obs.js
  35. +3 −3 lib/depject/feed/html/follow-warning.js
  36. +33 −33 lib/depject/feed/html/meta-summary.js
  37. +55 −61 lib/depject/feed/html/rollup.js
  38. +10 −10 lib/depject/feed/obs/recent.js
  39. +17 −17 lib/depject/gathering/sheet/edit.js
  40. +212 −1 lib/depject/index.js
  41. +9 −9 lib/depject/intl/sync/i18n.js
  42. +7 −7 lib/depject/invite/dhtAcceptSheet.js
  43. +6 −6 lib/depject/invite/dhtCreateSheet.js
  44. +12 −12 lib/depject/invite/invite.js
  45. +8 −8 lib/depject/invite/sheet.js
  46. +2 −2 lib/depject/keys.js
  47. +2 −2 lib/depject/lib/timeAgo.js
  48. +3 −3 lib/depject/message/async/name.js
  49. +8 −6 lib/depject/message/async/publish.js
  50. +6 −6 lib/depject/message/html/actions.js
  51. +41 −41 lib/depject/message/html/compose.js
  52. +1 −1 lib/depject/message/html/decorate/context-menu.js
  53. +6 −6 lib/depject/message/html/forks.js
  54. +33 −15 lib/depject/message/html/layout/default.js
  55. +14 −14 lib/depject/message/html/layout/mini.js
  56. +4 −4 lib/depject/message/html/link.js
  57. +16 −16 lib/depject/message/html/markdown.js
  58. +6 −6 lib/depject/message/html/metas.js
  59. +8 −8 lib/depject/message/html/missing.js
  60. +4 −4 lib/depject/message/html/references.js
  61. +15 −15 lib/depject/message/html/render/about.js
  62. +8 −8 lib/depject/message/html/render/attending.js
  63. +2 −2 lib/depject/message/html/render/blog.js
  64. +6 −6 lib/depject/message/html/render/channel.js
  65. +6 −6 lib/depject/message/html/render/following.js
  66. +24 −24 lib/depject/message/html/render/gathering.js
  67. +4 −4 lib/depject/message/html/render/issue.js
  68. +8 −8 lib/depject/message/html/render/made-changes.js
  69. +6 −6 lib/depject/message/html/render/post.js
  70. +7 −7 lib/depject/message/html/render/vote.js
  71. +2 −2 lib/depject/message/html/render/zzz-fallback.js
  72. +4 −4 lib/depject/message/obs/author.js
  73. +5 −5 lib/depject/message/obs/get.js
  74. +6 −6 lib/depject/message/obs/likes.js
  75. +4 −4 lib/depject/message/obs/name.js
  76. +8 −8 lib/depject/message/sheet/preview.js
  77. +5 −5 lib/depject/message/sync/root.js
  78. +3 −3 lib/depject/message/sync/timestamp.js
  79. +4 −4 lib/depject/message/sync/unbox.js
  80. +6 −6 lib/depject/page/html/render/all.js
  81. +8 −8 lib/depject/page/html/render/channel.js
  82. +8 −8 lib/depject/page/html/render/channels.js
  83. +4 −4 lib/depject/page/html/render/gatherings.js
  84. +3 −3 lib/depject/page/html/render/mentions.js
  85. +37 −37 lib/depject/page/html/render/message.js
  86. +8 −8 lib/depject/page/html/render/participating.js
  87. +7 −7 lib/depject/page/html/render/private.js
  88. +36 −36 lib/depject/page/html/render/profile.js
  89. +24 −24 lib/depject/page/html/render/public.js
  90. +33 −33 lib/depject/page/html/render/search.js
  91. +16 −7 lib/depject/page/html/render/settings.js
  92. +1 −1 lib/depject/page/html/render/tag.js
  93. +7 −7 lib/depject/page/html/render/your-posts.js
  94. +2 −2 lib/depject/profile/async/avatar.js
  95. +3 −3 lib/depject/profile/async/suggest.js
  96. +2 −2 lib/depject/profile/html/person.js
  97. +10 −10 lib/depject/profile/html/preview.js
  98. +25 −25 lib/depject/profile/obs/contact.js
  99. +5 −5 lib/depject/profile/obs/rank.js
  100. +11 −11 lib/depject/profile/obs/recently-updated.js
  101. +20 −20 lib/depject/profile/sheet/edit.js
  102. +5 −5 lib/depject/progress/html/peer.js
  103. +11 −11 lib/depject/progress/html/render.js
  104. +8 −8 lib/depject/progress/obs.js
  105. +24 −24 lib/depject/sbot.js
  106. +4 −4 lib/depject/sheet/display.js
  107. +2 −2 lib/depject/sheet/editTags.js
  108. +11 −11 lib/depject/sheet/profiles.js
  109. +9 −9 lib/depject/sheet/tags/renderTaggers.js
  110. +9 −9 lib/depject/sheet/tags/renderTags.js
  111. +3 −3 lib/depject/sheet/tags/tags.js
  112. +9 −9 lib/depject/suggest.js
  113. +1 −1 lib/depject/tag/async/suggest.js
  114. +22 −20 lib/depject/tag/html/tag.js
  115. +3 −3 lib/expander-hook.js
  116. +1 −1 lib/filter-blocked.js
  117. +2 −2 lib/get-bump.js
  118. +3 −3 lib/get-root.js
  119. +6 −6 lib/group-summaries.js
  120. +11 −11 lib/latest-update.js
  121. +3 −3 lib/lookup-roots.js
  122. +117 −54 lib/main-window.js
  123. +1 −1 lib/many.js
  124. +6 −6 lib/mutant-pull-collection.js
  125. +9 −9 lib/mutant-pull-dict.js
  126. +16 −9 lib/mutant-pull-value.js
  127. +0 −20 lib/mutant-to-pull.js
  128. +7 −7 lib/observe-link-hover.js
  129. +9 −7 lib/plugins/backlinks.js
  130. +26 −13 lib/plugins/channel-feed.js
  131. +31 −31 lib/plugins/channels.js
  132. +61 −55 lib/plugins/contacts.js
  133. +13 −11 lib/plugins/gatherings.js
  134. +4 −4 lib/plugins/heartbeat.js
  135. +34 −33 lib/plugins/index.js
  136. +33 −24 lib/plugins/likes.js
  137. +4 −4 lib/plugins/live-backlinks.js
  138. +10 −8 lib/plugins/mentions-feed.js
  139. +5 −5 lib/plugins/network-feed.js
  140. +8 −8 lib/plugins/participating-feed.js
  141. +14 −11 lib/plugins/private-feed.js
  142. +13 −13 lib/plugins/profile.js
  143. +8 −8 lib/plugins/progress.js
  144. +19 −19 lib/plugins/public-feed.js
  145. +4 −4 lib/plugins/recent-feeds.js
  146. +16 −16 lib/plugins/search.js
  147. +13 −13 lib/plugins/subscriptions.js
  148. +16 −14 lib/plugins/subscriptions2.js
  149. +9 −9 lib/plugins/thread.js
  150. +4 −4 lib/pull-group-until.js
  151. +2 −2 lib/pull-push-abort.js
  152. +4 −4 lib/pull-resume.js
  153. +2 −2 lib/resolve-abouts.js
  154. +19 −21 lib/scroller.js
  155. +12 −12 lib/server-process.js
  156. +8 −8 lib/sustained.js
  157. +13 −6 lib/thread-summary.js
  158. +1 −1 lib/unique-roots.js
  159. +4 −4 lib/window.js
  160. +6 −2 locales/en.json
  161. +281 −0 locales/eo.json
  162. +34 −2 locales/es.json
  163. +97 −81 locales/zh-CN.json
  164. +289 −0 locales/zh-TW.json
  165. +1,886 −1,015 package-lock.json
  166. +29 −29 package.json
  167. +3 −3 scripts/check-locales.js
  168. +40 −0 scripts/release-notes.js
  169. +5 −0 styles/base/base.mcss
  170. +1 −0 styles/base/compose.mcss
  171. +30 −1 styles/base/message.mcss
  172. +3 −14 styles/dark/message.mcss
  173. +4 −4 styles/index.js
  174. +3 −0 styles/light/message.mcss
@@ -3,18 +3,18 @@ matrix:
- os: osx
osx_image: xcode9.4
language: node_js
node_js: 10
node_js: lts/*
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder

- os: linux
language: node_js
node_js: 10
node_js: lts/*

- os: windows
language: node_js
node_js: 10
node_js: lts/*
filter_secrets: false

cache:
@@ -43,3 +43,4 @@ script: npm test && npm run dist
branches:
only:
- master
- "/^v\\d+\\.\\d+\\.\\d+$/"
@@ -14,10 +14,70 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security
-->

## [Unreleased]
## v3.16.2 - 2019-08-21

### Fixed
- Infinite indexing bug related to ssb-legacy-conn upgrade (#1172)
- Message click not working related to URI component decoding (#1171)

## v3.16.0 - 2019-08-20

### Added
- Content warning support (#1159)
- Recent changes from changelog to release notes (#1155)
- Unicode hashtag support with ssb-markdown upgrade (#1168)

### Changed
- Refactor to remove unused code (#1153)
- Refactor to remove bulk-require module (#1158)
- Switch from ssb-gossip to ssb-legacy-conn

### Fixed
- "Could not get message" bug on gatherings (#1166)
- Your gatherings not showing in gathering feed (#1167)
- Encoded URI bug when previewing profile with hover (#1169)

## v3.15.0 - 2019-08-08

### Added
- Developer script to output release notes (#1095)
- Documentation for which versions of Node we can support (#1115)
- Esperanto translation (#1126)
- Option to delete feeds from blocked authors (#1026)
- Traditional Chinese translation (#1130)

### Changed
- Encode emoji as unicode character instead of `:shortcode` (#1105)
- Switch input textarea font from monospace to sans-serif (#1120)
- Refactor to remove unused code (#1122)
- Increase size of emoji in helper (#1139)
- Upgrade JavaScript dependencies (#1141)

### Fixed
- Fixed corners of avatar images in private messages not matching up (#1075)
- Spanish typo for public messages (#1113)
- Bug where gathering was showing as "private" in preview (#1131)
- Mistranslations in Simplified Chinese (#1137)

## v3.14.1 - 2019-06-17

### Fixed
- Resolved inconsistent emoji rendering from `:shortcode:` inconsistencies.

## v3.14.0 - 2019-06-17

### Added
- Improved emoji support, Patchwork now has more emoji in a better font.
- Developer warning when trying to start Patchwork twice.

### Changed
- Reorganized directory structure,, improved readme and contributor guide.
- Update check on startup now happens every 24 hours.
- Switched to system font instead of using Arial everywhere.

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

## v3.13.0 - 2019-06-10

@@ -3,11 +3,10 @@
The readme contains some information on the simplest installation methods, but
you can also install Patchwork by fetching from Git and building from source.


## Dependencies

- Git
- Node.js (>= 6)
- Node.js ([Active LTS][node-active-lts])
- npm or Yarn

### Debian / Ubuntu
@@ -63,3 +62,5 @@ With yarn:
```shell
yarn
```

[node-active-lts]: https://github.com/nodejs/Release#release-schedule
@@ -0,0 +1,25 @@
:tada: **Thanks for downloading Patchwork!** :tada:

## Install

- **Windows:** [`ssb-patchwork-setup-$$VERSION.exe`][exe]
- **macOS:** [`Patchwork-$$VERSION.dmg`][dmg] (you may need to [allow apps from "unidentified" developers](https://support.apple.com/kb/PH25088))
- **Linux:** [`ssb-patchwork-$$VERSION-x86_64.AppImage`][appimage] (you will need to [make it executable](https://docs.appimage.org/user-guide/run-appimages.html))

## Getting started

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**.

You can find more information in the [Getting Started Guide](https://www.scuttlebutt.nz/getting-started).

## Changes
$$CHANGES
## Support

:thinking: [Any questions? Check out the Scuttlebutt FAQ!](https://www.scuttlebutt.nz/faq/)

:sos: [Need help? Please create an issue!](https://github.com/ssbc/patchwork/issues/new)

[dmg]: https://github.com/ssbc/patchwork/releases/download/v$$VERSION/Patchwork-$$VERSION.dmg
[exe]: https://github.com/ssbc/patchwork/releases/download/v$$VERSION/ssb-patchwork-setup-$$VERSION.exe
[appimage]: https://github.com/ssbc/patchwork/releases/download/v$$VERSION/ssb-patchwork-$$VERSION-x86_64.AppImage
@@ -3,21 +3,21 @@ process.on('uncaughtException', function (err) {
process.exit()
})

var electron = require('electron')
var openWindow = require('./lib/window')
const electron = require('electron')
const openWindow = require('./lib/window')

var Path = require('path')
var defaultMenu = require('electron-default-menu')
var WindowState = require('electron-window-state')
var Menu = electron.Menu
var extend = require('xtend')
var ssbKeys = require('ssb-keys')
const Path = require('path')
const defaultMenu = require('electron-default-menu')
const WindowState = require('electron-window-state')
const Menu = electron.Menu
const extend = require('xtend')
const ssbKeys = require('ssb-keys')

var windows = {
const windows = {
dialogs: new Set()
}
var ssbConfig = null
var quitting = false
let ssbConfig = null
let quitting = false

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

var config = {
const config = {
server: !(process.argv.includes('-g') || process.argv.includes('--use-global-ssb'))
}
// 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', () => {
setupContext(process.env.ssb_appname || 'ssb', {
server: !(process.argv.includes('-g') || process.argv.includes('--use-global-ssb'))
}, () => {
var browserWindow = openMainWindow()
var menu = defaultMenu(electron.app, electron.shell)
const browserWindow = openMainWindow()
const menu = defaultMenu(electron.app, electron.shell)

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

var view = menu.find(x => x.label === 'View')
const view = menu.find(x => x.label === 'View')
view.submenu = [
{ role: 'reload' },
{ role: 'toggledevtools' },
@@ -95,15 +95,15 @@ electron.app.on('ready', () => {
{ type: 'separator' },
{ role: 'togglefullscreen' }
]
var help = menu.find(x => x.label === 'Help')
const help = menu.find(x => x.label === 'Help')
help.submenu = [
{
label: 'Learn More',
click () { require('electron').shell.openExternal('https://scuttlebutt.nz') }
}
]
if (process.platform === 'darwin') {
var win = menu.find(x => x.label === 'Window')
const win = menu.find(x => x.label === 'Window')
win.submenu = [
{ role: 'minimize' },
{ role: 'zoom' },
@@ -116,7 +116,7 @@ electron.app.on('ready', () => {
Menu.setApplicationMenu(Menu.buildFromTemplate(menu))
})

electron.app.on('activate', function (e) {
electron.app.on('activate', function () {
if (windows.main) {
windows.main.show()
}
@@ -126,7 +126,7 @@ electron.app.on('ready', () => {
quitting = true
})

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

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

@@ -1,4 +1,4 @@
var watch = require('mutant/watch')
const watch = require('mutant/watch')

module.exports = AnchorHook

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

// HACK: due to a browser bug, sometimes the window scrolls down below the top bar
// Why not just hack it!!!
var topBar = document.querySelector('.MainWindow > div.top')
const topBar = document.querySelector('.MainWindow > div.top')
if (topBar) {
topBar.scrollIntoViewIfNeeded()
}
@@ -5,22 +5,31 @@ module.exports = function (root, cb) {
return true
}

var anchor = null
for (var n = ev.target; n.parentNode; n = n.parentNode) {
let anchor = null
for (let n = ev.target; n.parentNode; n = n.parentNode) {
if (n.nodeName === 'A') {
anchor = n
break
}
}
if (!anchor) return true

var href = anchor.getAttribute('href')
let href = anchor.getAttribute('href')

if (href.startsWith('#')) {
try {
href = decodeURIComponent(href)
} catch (e) {
// Safely ignore error because href isn't URI-encoded.
}
}

if (href) {
var isUrl
let isUrl
let url

try {
var url = new URL(href)
url = new URL(href)
isUrl = true
} catch (e) {
isUrl = false

0 comments on commit f7bf001

Please sign in to comment.
You can’t perform that action at this time.