Compare commits

...

1798 Commits

Author SHA1 Message Date
Tom Moor d4c594423f More email styling 2021-07-08 22:38:42 -04:00
Tom Moor 2bf237d54b Merge branch 'main' into email-diff 2021-07-08 21:20:18 -04:00
Tom Moor 9a1c8f07d1 feat: Add documentId filter to events.list (#2287) 2021-07-08 10:12:06 -07:00
Tom Moor 241cb11493 chore: Automate running yarn-deduplicate, see comment:
https://github.com/outline/outline/pull/2283\#discussion_r665301770
2021-07-07 22:26:56 -04:00
Saumya Pandey 8195791bb2 fix: Make search query string user friendly (#2283)
* Upgrade query-string package and skip empty string

* Run yarn-deduplicate command
2021-07-07 18:45:40 -07:00
Saumya Pandey b037ae5dc1 fix: Improve isChildDocument performance (#2284) 2021-07-07 04:53:40 -07:00
Tom Moor aeba8ce4eb fix: Empty context menu when user does not have permission to update collection 2021-07-06 22:02:31 -04:00
Tom Moor 3565e68725 Merge branch 'main' into email-diff 2021-07-06 20:43:51 -04:00
Tom Moor 429c5fba85 0.57.0 2021-07-06 09:12:54 -04:00
Tom Moor 9495ddba25 fix: Restore previous WSS CORS behavior 2021-07-05 23:01:25 -04:00
dependabot[bot] 486a60e97c chore(deps): bump socket.io from 2.3.0 to 2.4.0 (#1831)
Bumps [socket.io](https://github.com/socketio/socket.io) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/2.4.0/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/2.3.0...2.4.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-05 17:11:40 -07:00
Tom Moor c687745263 fix: E-mail signin on incorrect subdomain should allow the process to continue instead of error
closes #2276
2021-07-05 19:25:21 -04:00
Translate-O-Tron 1b92993b90 fix: New Portuguese, Brazilian translations from Crowdin (#2271) 2021-07-05 13:37:09 -07:00
Tom Moor 181a20a268 fix: More context menu fixes 2021-07-05 16:35:46 -04:00
Tom Moor f8ffa4e25a tweak sidebar item background 2021-07-04 18:44:09 -04:00
Farzad 7e139ca8f7 fix: nested link positions for RTL titles in sidebar (#2272) 2021-07-04 12:08:05 -07:00
Tom Moor bb58db507d fix: ew-resize -> col-resize cursor 2021-07-04 11:54:29 -04:00
Translate-O-Tron 49bf86d6d9 New Crowdin updates (#2268) 2021-07-04 06:54:52 -07:00
Tom Moor 286a15cf10 fix: Clicking dropdown menu items in FF (#2269)
* fix: Clicking dropdown menu items in FF
closes #2264

* fix: Anchor items, add comment

* fix: CI test memory issues
2021-07-04 06:54:40 -07:00
Tom Moor f65469b777 lockfile 2021-07-03 21:22:52 -04:00
Translate-O-Tron fe65a79d66 New Crowdin updates (#2267) 2021-07-03 07:02:01 -07:00
Tom Moor a1d5ac0907 RTL document support (#2263)
* Basic RTL support in documents

* fix: DocumentListItem and ReferenceListItem for RTL content
2021-07-03 07:00:10 -07:00
Tom Moor 04eabe68a7 feat: Enable traditional Chinese translations (#2266) 2021-07-02 12:08:08 -07:00
Tom Moor 1c0c694c22 fix: Email auth should allow same guest user on multiple subdomains (#2252)
* test: Add email auth tests to establish current state of system

* fix: Update logic to account for dupe emails used between subdomains

* test

* test
2021-07-02 12:07:43 -07:00
Translate-O-Tron 2ae74f2834 New Crowdin updates (#2262) 2021-07-02 11:23:02 -07:00
Tom Moor 0f01fc5faa test: Reduce memory usage by not requiring stores into all (#2265) 2021-07-02 11:16:07 -07:00
Tom Moor 7f1322b7ba fix: Down arrow in search input should move focus to results (#2257)
closes #2253
2021-07-01 15:01:30 -07:00
dependabot[bot] 3c98133e24 chore(deps): bump socket.io-parser from 3.3.1 to 3.3.2 (#2258)
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/3.3.2/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/3.3.1...3.3.2)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-01 12:08:57 -07:00
Tom Moor 088353d61f fix: Data loading state not reset when props change to PaginatedList (#2254)
* fix: Data loading state not reset when significant props change to PaginatedList

closes #2251

* test: Add enzyme and component test
2021-06-26 21:49:25 -07:00
Translate-O-Tron 31180619e1 New Crowdin updates (#2182) 2021-06-26 13:43:54 -07:00
Saumya Pandey 9fccc280d7 fix: Add ability to permanently delete documents in trash (#2192)
* Align false conditions before true

* Update documents.delete endpoint for permanent delete

* Add permanent delete to events table and integrate with socket.io

* Add permanent delete to document menu

* Update parentDocumentId of direct child to null

* Add translation

* Add test for permanent delete

* Add space

* Update app/scenes/DocumentPermanentDelete.js

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* Update app/stores/DocumentsStore.js

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* Update server/commands/documentPermanentDeleter.js

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/DocumentPermanentDelete.js

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* Change socket room from team to collection

* Add translation

* Create log func for commands

* Move tests from utils to permanentDeleter command

* Add additional tests

* Set redirect to trash

* Return promise from beforeEach

* Add undeleted documents validation

* Include deleteAt attribute in db query

* Update server/commands/documentPermanentDeleter.js

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* tweak language

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2021-06-25 16:14:40 -07:00
Tom Moor c69b4efc34 fix: Aligned images do not load in publicly shared documents (#2248) 2021-06-25 10:09:44 -07:00
Tom Moor 61039e9d0d Allow images in email diff 2021-06-25 09:41:34 -07:00
Tom Moor 6d09122d56 test: Deletion 2021-06-24 20:10:42 -07:00
Tom Moor 5fb6097153 Improved diff 2021-06-23 23:58:32 -07:00
Tom Moor ec17874568 Remove test harness 2021-06-22 07:35:38 -07:00
Tom Moor 40c3e9e85f test 2021-06-22 07:27:55 -07:00
Tom Moor 9f739f3788 Merge main 2021-06-22 07:26:45 -07:00
Tom Moor 3cec6b4903 fix: Allow for offline development 2021-06-21 21:40:28 -07:00
Tom Moor ede7f2e3e6 fix: Bump RME (table and image fixes) 2021-06-21 17:39:14 -07:00
Tom Moor f6837b4742 wip 2021-06-20 23:15:04 -07:00
Tom Moor 1560e3c9f7 refactor 2021-06-20 12:49:15 -07:00
Tom Moor ca74908dc5 test 2021-06-20 00:20:37 -07:00
Tom Moor de7ec1119b Integrate into mailer, basic styling 2021-06-19 23:50:36 -07:00
Tom Moor 2093b4297f Merge main 2021-06-19 17:05:19 -07:00
Tom Moor cf8fa5ffa3 fix: Bump RME (checkbox list fixes) 2021-06-18 16:28:27 -07:00
Tom Moor 1a2a0f4264 fix: Long search term causes server error writing query to db (#2237)
closes #2234
2021-06-17 23:23:35 -07:00
Tom Moor 5f3a38bf87 fix: todo list checkbox consistency issue
closes #2179
2021-06-17 22:57:55 -07:00
Tom Moor afff3a6f25 fix: Server error when user cancels OAuth process with Azure (#2231) 2021-06-16 21:45:20 -07:00
Tom Moor b5824879a3 Merge branch 'fix/concat-tags' 2021-06-16 18:36:28 -07:00
Tom Moor 1c82e292e0 fix: Allow embed of private mindmeister embeds
fix: Missing right and bottom border of some embeds
2021-06-16 18:36:21 -07:00
Tom Moor 317289ac2a fix: Error in Datadog tracking, if only we had TS :( 2021-06-16 08:52:54 -07:00
Tom Moor 8331026cb3 fix: No search results from link editor search due to error parsing date (date-fns upgrade) 2021-06-16 07:54:56 -07:00
Tom Moor de285f2b63 feat: Add TLS ciphers option (#2217)
closes #2175
2021-06-15 21:37:41 -07:00
G. Santos d205c48296 docs: Fix SECRET_KEY variable description (#2229)
Updated the description of the SECRET_KEY variable in the .env.sample
file to clarify that the key needs to be 32 bytes long and hex-encoded.
The previous description of "32 character hexadecimal" was confusing
as it left open the possibility of a hex-encoded 16-byte key.
2021-06-15 21:37:19 -07:00
Tom Moor 277c37dae6 fix: Metrics lib to account for multiple server instances 2021-06-15 20:34:46 -07:00
Tom Moor 2c39cd6496 chore: Normalize "new" actions in settings (#2226)
* fix: Unauthorized request to views.list from shared documents

* Bump dep styled-components

* chore: Normalize 'new' actions in settings area to top right
chore: Add translation hooks to API tokens screen
chore: Move API tokens loading to paginated list
2021-06-15 19:10:50 -07:00
Tom Moor d85592b5f3 feat: DataDog metrics (#2228)
* wip

* chore: Change event names, add additional events

* fix: Not counting connect events
2021-06-15 19:10:38 -07:00
Tom Moor cdf0df0faa Bump dep styled-components 2021-06-13 18:26:25 -07:00
Tom Moor 48f54b5aa2 fix: Unauthorized request to views.list from shared documents 2021-06-13 18:24:02 -07:00
Tom Moor 2ca57fc7cf fix: 3 locations with return undefined (not compatible with React 17) 2021-06-13 17:47:17 -07:00
Tom Moor 470920e2c3 feat: Allow templates from any collection to be used
fix: Hover state of context menu items with icons
2021-06-13 17:43:50 -07:00
Tom Moor beee8ebee7 fix: Sidebar flash when moving between collection/document due to mobx-react upgrade 2021-06-13 17:22:35 -07:00
Tom Moor 9f05c9bd43 chore: Upgrade React to v17 (#2045)
* chore: Upgrade React v17

* chore: Upgrade additional deps to reduce warnings

* fix: Restore react-table dep

* Bump react-avatar-editor, mobx-react

* Remove unmaintained @rehooks/window-scroll-position dep

* Bump react-waypoint dep for React 17 support

* fix: Syntax error in autotrack chunk name comment
2021-06-13 15:23:53 -07:00
Tom Moor 65be808556 fix: Cause of sporadic test failures in CI, promise not returned for flushdb 2021-06-13 14:52:24 -07:00
Tom Moor 89f8df619c fix: Remove export permission for read-only users (#2220) 2021-06-13 14:41:29 -07:00
Tom Moor 756ec92cdb fix: Link copied to clipboard takes dark mode styles (#2218)
Upgrade copy-to-clipboard
closes #2207
2021-06-12 15:44:58 -07:00
Dave a8e2e349e9 fix: change metaDisplay key to Alt for "Table of contents" (#2187)
* change `metaDisplay` key to Alt for "Table of contents"

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2021-06-12 15:37:35 -07:00
Tom Moor 25f745e7e5 fix: Text alignment in templates menu
closes #2204
2021-06-12 13:31:22 -07:00
Nainterceptor 07b1811993 feat: Use SMTP_SECURE environment variable to force secure parameter of smtp configuration (#2214) 2021-06-12 11:01:48 -07:00
Saumya Pandey d71f0ae6bd fix: Two restore options when an archived document is deleted (#2194)
* Merge two menu items

* Add deletedAt guard condition in document unarchive policy

* Make the parentDocumentId null

* Update test
2021-06-10 22:52:32 -07:00
Tom Moor f58032d305 fix: Flash of sidebar when first loading Document chunk 2021-06-09 18:01:35 -07:00
Saumya Pandey 6beb6febc4 fix: Use friendly urls for collections (#2162)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2021-06-09 17:48:48 -07:00
Saumya Pandey a6d4d4ea36 fix: Add Portugese, Brazil to language options (#2164)
* Add Portugese, Brazil to language options

* Upgrade date-fns package

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2021-06-09 17:42:14 -07:00
Tom Moor a99f6bed42 feat: Return publicly shared document title in SSR HTML (#2191)
* feat: Return publicly shared document title in SSR HTML
closes #2146

* tests
2021-06-09 17:41:39 -07:00
Tom Moor 4cd61db1ea fix: Move views loading to avoid duplicate request 2021-06-08 21:13:56 -07:00
Tom Moor 0db7bb7f3e Bump editor
closes #2156
closes #2067
2021-06-07 20:32:41 -07:00
Tom Moor d8ca9c6111 fix: Server error if non-array passed to users.invite 2021-06-07 20:28:28 -07:00
Dave 4a8d357084 style: add option background for InputSelect (#2188) 2021-06-07 18:34:01 -07:00
Yao Wang e0fb76cb63 documentation: Instructions for local development (#2180)
* Fix the instruction for local development

* update readme for Slack OAuth in local development

* Fix the callback URL setting instruction
2021-06-07 18:11:45 -07:00
Saumya Pandey ffed38bf71 fix: Prevent API request for views (#2193) 2021-06-07 18:10:54 -07:00
Tom Moor b4c08a027b fix: Remove hover state css on sidebar items on mobile
closes #2043
2021-06-06 19:56:31 -07:00
Tom Moor 74e0f4dfb3 fix: Parallelize loading attachments in document presenter (#2184)
closes #2157
2021-06-05 18:40:55 -07:00
Tom Moor 5c7f2cf164 feat: Add optional http logging in production (#2183)
* feat: Add optional http logging in production
closes #2174

* Update app.js
2021-06-05 15:19:54 -07:00
Tom Moor f517a2cecb chore: Add React.StrictMode
closes #2177
2021-06-05 14:59:14 -07:00
Saumya Pandey a19ac6aa5f fix: Failure loading collections on frontend results in loading loop (#2176)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2021-06-05 09:52:49 -07:00
Saumya Pandey ddbbb963b6 fix: Add guard condition for matchMedia usage (#2178) 2021-06-05 09:51:42 -07:00
Viorel Cojocaru ba24a3318e Fix chunks setup (#2181)
* build: Webpack config - use named chunk ids

prevent invalidation across builds by using a deterministic chunkId algorithm

* fix: Autotrack chunk name syntax
2021-06-05 09:50:38 -07:00
Viorel Cojocaru 7a6491cf0d build: Webpack config - allow package.json module field usage (#2173)
- revert resolve.alias to default
- revert bundless-* package aliases to commonjs folder to avoid transpiling
2021-06-04 18:18:17 -07:00
Tom Moor 0c8d4428fc Update stale.yml 2021-06-04 09:11:09 -07:00
Viorel Cojocaru b19fd799ef chore: Update @relative-ci/agent to v2 (#2171) 2021-06-03 22:02:38 -07:00
Viorel Cojocaru 082ced3072 build: Add async chunk names (#2170) 2021-06-03 22:01:23 -07:00
Tom Moor 1f49b35c89 documentation: Improve notes around SECRET_KEY generation 2021-06-03 08:30:53 -07:00
Tom Moor 9817e2f3bf 0.56.0 2021-06-02 12:52:19 -07:00
Translate-O-Tron 04d7c7ac0e New Crowdin updates (#2143) 2021-06-02 12:51:14 -07:00
Tom Moor e625e77a56 fix: Data loading loop on old browsers 2021-06-02 12:45:07 -07:00
Tom Moor 636023aceb fix: Bump RME, improved image download behavior in editor 2021-05-24 20:56:58 -07:00
dependabot[bot] f2dfed4c72 chore(deps): bump browserslist from 4.14.7 to 4.16.6 (#2149)
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.14.7 to 4.16.6.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.14.7...4.16.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-24 18:35:53 -07:00
Tom Moor 8cfa724200 feat: Animate disclosure when toggling sidebar items 2021-05-22 21:22:28 -07:00
Tom Moor 6c011eb9b5 fix: Guard empty documentStructure 2021-05-22 21:12:47 -07:00
Tom Moor 7dc11e5b86 fix: Local cache for shared link share trees to reduce render flashing 2021-05-22 20:03:50 -07:00
Tom Moor 44920a25f4 feat: Nested document sharing (#2075)
* migration

* frontend routing, api permissioning

* feat: apiVersion=2

* feat: re-writing document links to point to share

* poc nested documents on share links

* fix: nested shareId permissions

* ui and language tweaks, comments

* breadcrumbs

* Add icons to reference list items

* refactor: Breadcrumb component

* tweaks

* Add shared parent note
2021-05-22 19:34:05 -07:00
Tom Moor dc4b5588b7 feat: Add 'Descript' embed (#2144) 2021-05-22 19:21:56 -07:00
Tom Moor 635910195b i18n 2021-05-22 17:18:10 -07:00
Tom Moor eaf2e50af8 feat: Add 'download image' button
feat: Enable Enter+Shift shortcut in blockquotes
fix: Improve behavior of caret around inline code marks
fix: Disallow pasting embeds in table cells
2021-05-22 17:17:46 -07:00
Tom Moor 505ed3403a fix: Bump RME, improves behavior typing words with underscores 2021-05-20 19:29:59 -07:00
Tom Moor b93d15e967 fix: PaginatedList loading loop 2021-05-20 19:21:30 -07:00
Tom Moor 028eb72f9c fix: Restore behavior of displaying document collaborators in facepile 2021-05-19 22:05:17 -07:00
Tom Moor b0196f0cf0 feat: Rebuilt member admin (#2139) 2021-05-19 21:36:10 -07:00
Translate-O-Tron 833bd51f4c New Crowdin updates (#2120) 2021-05-18 20:00:18 -07:00
Tom Moor 14d9adefe7 test 2021-05-15 18:22:42 -07:00
Tom Moor ec3ea09b2d fix: Return lastActiveAt 2021-05-15 18:14:44 -07:00
Tom Moor 2c0f14f07b fix: Explicit import of fetch-with-proxy 2021-05-13 17:20:24 -07:00
Tom Moor a93d034091 fix: Moving documents between collections does not update attachment permissions (#2136)
* fix: Copy attachments when neccessary and moving between collections

* test: regression
2021-05-12 22:38:24 -07:00
Tom Moor 447371f35a fix: Add server-side proxy support via fetch-with-proxy (#2044)
* fix: Add server-side proxy support via fetch-with-proxy

closes #1893

For some fun discussion on why this is required, see this issue: https://github.com/nodejs/node/issues/8381

* lint
2021-05-12 22:37:32 -07:00
Tom Moor 3bd56fff9e fix: Search query backslash replacement only touched first instance
closes #2111
2021-05-12 20:27:14 -07:00
Tom Moor 9d03c89c02 chore: Return new permissions-policy header on app pages
closes #2040
2021-05-12 20:16:55 -07:00
Tom Moor 9f226cf3b4 fix: Extra space on lhs when printing in Firefox, closes #2128 2021-05-12 20:06:58 -07:00
Tom Moor d01e3f7c72 fix: Print styles in dark mode when OS is light mode
closes #2124
2021-05-12 20:00:10 -07:00
Tom Moor 2cb0bab82a fix: Welcome emails should not be sent when inviting a user (#2132)
* chore: Bump nodemailer

* fix: Welcome email sent to invites

* test: Add regression test for emails from accountProvisioner
2021-05-11 18:59:31 -07:00
dependabot[bot] 456a7e497b chore(deps): bump nodemailer from 4.7.0 to 6.4.16 (#2131)
Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 4.7.0 to 6.4.16.
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodemailer/nodemailer/compare/v4.7.0...v6.4.16)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 18:11:36 -07:00
Saumya Pandey a39f7a4e55 fix: Remove application/octet-stream as valid frontend mimetype (#2126)
* Remove application/octet-stream and add explicit extensions

* Modify the condition to check for extensions too
2021-05-11 08:07:41 -07:00
Tom Moor fed3774cee chore: Bump RME 2021-05-09 22:36:20 -07:00
Saumya Pandey 985f0da674 fix: Move collection index validation logic to a context assert function (#2116)
* Abstract validation logic for readability

* Add index validation in collections.move

* Add tests
2021-05-09 22:30:37 -07:00
dependabot[bot] 721e7466e6 chore(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#2127)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-09 19:28:51 -07:00
Tom Moor 8e1d9f0a7d fix: Welcome collection should be visible to all by default 2021-05-05 21:12:49 -07:00
Tom Moor 71de0c7e5f fix: Currently viewing users should be ordered to top 2021-05-05 21:11:09 -07:00
Tom Moor 4f4067c449 fix: Upgrade RME, fixes image flicked post-upload in editor 2021-05-05 20:09:37 -07:00
Tom Moor b945b614f8 fix: Layout of Keyboard Shortcuts guide for languages where definition wraps onto two lines 2021-05-05 20:05:49 -07:00
Tom Moor 896ee5c20d feat: Improved viewers popover (#2106)
* refactoring popover

* feat: DocumentViews popover

* i18n

* fix: tab focus warnings

* test: Add tests around users.info changes

* snapshots
2021-05-05 19:35:23 -07:00
Translate-O-Tron e984a3dcdb New Crowdin updates (#2100)
* fix: New Polish translations from Crowdin [ci skip]

* fix: New Polish translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]
2021-05-05 19:35:04 -07:00
Tom Moor 69802cc985 fix: Add application/octet-stream as a valid mimetype for docx uploads (#2105)
* fix: Add application/octet-stream as a valid mimetype for docx uploads

* fix: Include application/octet-stream in frontend filter
fix: Add file size and file type guards

* Validate .docx extension in files with application/octet-stream mimetype

* refactor: Move MAXIMUM_IMPORT_SIZE to an optional environment config
fix: Add file size check on server too

Co-authored-by: Saumya Pandey <sp160899@gmail.com>
2021-05-05 18:48:37 -07:00
Saumya Pandey 6ef8d9ddb3 fix: Handle null case (#2118) 2021-05-05 18:47:23 -07:00
John Viscel M. Sangkal d21594a6f4 fix: Add onClick event listener to show Appearance Menu options in mobile (#2119) 2021-05-05 18:46:57 -07:00
Tom Moor 974d6b2cbe fix: Submenu overflow broken 2021-05-05 09:13:44 -07:00
Tom Moor aa3cb22703 test: Fix tests around utils.gc 2021-05-03 21:39:01 -07:00
Tom Moor 49ffcda8e0 fix: 'Post to channel' functionality does not work unless Slack SSO used (#2099)
* fix: 'Post to channel' functionality does not work unless Slack SSO used

* test: And this is why we have tests
2021-05-01 16:35:00 -07:00
Tom Moor 77d6adb73b feat: Signup query params tracking (#2098)
* feat: Add tracking of signup query params

* fix: Headers already sent to client

* fix: OAuth error wipes previously written query params cookie
2021-05-01 13:46:08 -07:00
Tom Moor 4d68a34897 fix: ReDoS attack vulnerability when searching documents that contain many space characters
see: https://github.com/outline/outline/pull/2097
see: https://snyk.io/vuln/SNYK-JS-REMOVEMARKDOWN-73635
2021-04-28 22:44:05 -07:00
Tom Moor 61b2e63a44 Merge branch 'main' of github.com:outline/outline 2021-04-28 22:40:53 -07:00
Translate-O-Tron ae940dd255 New Crowdin updates (#2048) 2021-04-27 20:30:31 -07:00
Tom Moor b13626631c fix: Space for overflow menu on sidebar items 2021-04-27 18:58:37 -07:00
Tom Moor 7221e51b96 chore: Move settings screens to Scene component (#2092)
* chore: Convert groups and people settings screens to Scene/functional

* chore: ImportExport to Scene component

* Remaining settings scenes
2021-04-27 18:46:58 -07:00
Tom Moor b89f4c36f4 chore: Rename Authentication -> IntegrationAuthentication (#2091) 2021-04-27 18:42:45 -07:00
Tom Moor 829cc14d36 build:i18n 2021-04-27 18:07:11 -07:00
Tom Moor 8009e8f691 fix: Missing bg blur, closes #2082 2021-04-27 17:29:22 -07:00
Tom Moor ab2aaf7b7b feat: Upgrade RME – includes new page break functionality 2021-04-27 17:21:45 -07:00
dependabot[bot] 65b4480e93 chore(deps): bump redis from 3.0.2 to 3.1.2 (#2090)
Bumps [redis](https://github.com/NodeRedis/node-redis) from 3.0.2 to 3.1.2.
- [Release notes](https://github.com/NodeRedis/node-redis/releases)
- [Changelog](https://github.com/NodeRedis/node-redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NodeRedis/node-redis/compare/v3.0.2...v3.1.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-27 17:05:32 -07:00
Tom Moor 6de793e94e fix: uuid import broken by dep bump 🤦‍♂️ 2021-04-25 12:54:06 -07:00
Tom Moor 2d22399bbc fix: Correctly guard against last admin deleting their account (#2069)
* fix: Correctly guard against last admin deleting their account

* test
2021-04-24 20:52:46 -07:00
Tom Moor 3fbb3a2403 fix: Continued undefined error in serverWorker registration 2021-04-24 12:50:30 -07:00
Tom Moor d45178cb44 chore: Remove dependency on twemoji 2021-04-23 23:24:54 -07:00
Tom Moor 5786a03f33 chore: Update uuid package, removes dupe dependency 2021-04-23 18:48:47 -07:00
Tom Moor 011a1383ec chore: Upgrade tmp dependency 2021-04-23 18:44:24 -07:00
Tom Moor 72d7b5734d chore: Upgrade slug dependency 2021-04-23 18:40:25 -07:00
Tom Moor b6fe3cb556 chore: Upgrade mammoth for html import fixes 2021-04-23 18:35:54 -07:00
Tom Moor 1e2224cb0d chore: Upgrade dd-trace 2021-04-23 18:32:49 -07:00
Tom Moor 0477060b35 chore: Upgrade relative-ci/agent 2021-04-23 18:31:43 -07:00
Tom Moor a261abcdef Merge branch 'main' of github.com:outline/outline 2021-04-23 18:25:43 -07:00
Tom Moor f64d0ce660 feat: Share flyover (#2065)
* feat: Implement share as flyover instead of modal

* refactor

* i18n
2021-04-23 17:31:27 -07:00
Tom Moor f27072d06e feat: More space for content on larger screens 2021-04-23 16:41:40 -07:00
Tom Moor c8055e40bb fix: Content appearing behind status bar in iOS PWA on some models of phone 🤷 2021-04-23 14:57:38 -07:00
Tom Moor cfae180093 chore: Upgrade Sentry 6.1.0 -> 6.3.1 2021-04-23 12:50:40 -07:00
Tom Moor 094c6418c9 Update LICENSE 2021-04-23 12:50:19 -07:00
Tom Moor 99b1bf0ecb fix: Avoid rare 'undefined is not a function' when attempting to register a server worker on Windows Chrome 2021-04-23 12:31:27 -07:00
Tom Moor 3b696cfa9a fix: Page reloads in Firefox when clicking some menu items (#2060)
* fix: Some context menu items result in page reload in Firefox

closes #1877

* fix: Display of sidebar link actions on hover
2021-04-23 12:25:15 -07:00
Tom Moor eb6acdae20 fix: CMD+F not working on screens with keyboard shortcut guide (#2066) 2021-04-23 12:10:02 -07:00
Tom Moor a818c7a924 fix: Hover card behind subheadings, previously it relied on being a portal without any explicit depth
closes #2062
2021-04-23 12:09:30 -07:00
Tom Moor d157e9bfcd 0.55.0 2021-04-22 20:23:24 -07:00
Tom Moor f2052c2a05 fix: Escape key in keyboard shortcut guide should clear search input if search term 2021-04-22 19:37:40 -07:00
Tom Moor 40b4270e35 chore: Faster source map in dev 2021-04-22 18:59:59 -07:00
Tom Moor 16c60a0d59 fix: URLSearchParams polyfill via core-js upgrade (#2059)
* fix: URLSearchParams polyfill via core-js upgrade

* deduplicate

* testing, remove manual imports

* chore: bump rme
2021-04-22 18:21:27 -07:00
Mark Steve Samson 1a183ba0fc Document and include PGSSLMODE in sample env file (#2052) 2021-04-21 18:15:23 -07:00
Tom Moor 2ffc0ae81c feat: New keyboard shortcuts guide (#2051)
* feat: Add search

* feat: New design for keyboard shortcuts guide
feat: Include quick search
fix: Add missing shortcuts

* tweaks

* fix: Two other spots that should trigger guide-style instead of modal

* sink,lift -> indent,outdent

* fix: Animation should slide out as well as in
2021-04-21 18:15:07 -07:00
Tom Moor 50fdd73610 fix: Remove HMR in test env (#2054) 2021-04-21 17:53:53 -07:00
dependabot[bot] a134773d4e chore(deps): bump ssri from 6.0.1 to 6.0.2 (#2050)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-20 17:37:39 -07:00
Tom Moor 317c52df62 fix: Improve error handling for Azure-specific errors not captured in OAuth2 strategy 2021-04-18 22:41:27 -07:00
Tom Moor 04b8d7ae7b Normalize sidebar style 2021-04-18 21:52:54 -07:00
Tom Moor 3569d2fee7 chore: Update caniuse 2021-04-18 19:52:47 -07:00
Tom Moor ab267ce38d fix: Disable polling on custom domain, closes #2041 2021-04-18 18:58:26 -07:00
Tom Moor fa52bc5afd chore: Slack integration screen improvements (#2049)
* feat: Add collection iconography and colors to Slack settings page
fix: Use standardized list components
fix: Slack icon size
chore: Convert to translation strings

* fix: Missing translation, convert to Scene
2021-04-18 18:34:49 -07:00
Tom Moor bf668d6347 fix: Double documents.info request loading public share links 2021-04-18 11:34:11 -07:00
Tom Moor 7f9cba9819 feat: Record share link last accessed time (#2047)
* chore: Migrations

* chore: Add recording of share link views

* feat: Add display of share link accessed date in admin

* translations

* test

* translations, admin pagination
2021-04-18 09:38:13 -07:00
Tom Moor e9f083feb8 fix: Document title with slashes produces folders in exported zip file
closes #2036
2021-04-17 19:30:31 -07:00
Tom Moor 03d90b3f15 fix: Hide secondary actions in document header on mobile
closes #2042
2021-04-17 18:14:24 -07:00
Tom Moor 2432b4dcbd fix: Editor lightbox stacked below sidebar 2021-04-17 18:08:09 -07:00
Translate-O-Tron 2c2c1341f7 fix: New Spanish translations from Crowdin [ci skip] (#2035) 2021-04-17 13:24:17 -07:00
Tom Moor 7a8ccdb229 feat: Microsoft authentication (#1953)
closes #755
2021-04-17 13:22:18 -07:00
Tom Moor b2d703bee4 fix: Improved mobile styling
fix: Severla context menus miss-positioned
fix: Search filters not large enough on mobile
fix: Deep black background on mobile to match native apps
fix: Sticky document header allowing horizontal scrolling on mobile
2021-04-17 10:40:39 -07:00
Tom Moor c46a032f0b fix: CSS stacking context issue with behind menu backdrops on mobile
Moving the animation to the same element that has position: fixed resolves
2021-04-16 19:02:43 -07:00
Tom Moor 940ad8479e perf: Remove collaborators from documents.list response (#2039)
* fix: Remove unused, unperformant query

* lint

* collaborators -> collaboratorIds
2021-04-15 22:49:16 -07:00
Tom Moor c5401a467d fix: Overlapping header, closes #2038 2021-04-15 20:30:05 -07:00
Tom Moor 1dd97c1ddd feat: Show mobile-style (slide from bottom) menus on mobile (#2025)
* feat: Show mobile-style (slide from bottom) menus at responsive viewport sizes

* More mobile improvements

* fix: Safari compatability
2021-04-13 21:43:24 -07:00
Translate-O-Tron f37371c16e New Crowdin updates (#2027) 2021-04-13 21:31:35 -07:00
Tom Moor 62f9262b2c fix: Improved handling of authentication edge-cases (#2023)
* fix: authentication records not cleaned up for deleted user
closes #2022

* fix: Improve debugging for duplicate providerId sign-in requests
2021-04-11 19:39:31 -07:00
Saumya Pandey bc4fe05147 feat: Read-only users (#1955)
* Introduce isViewer field

* Update policies

* Make users read-only feature

* Remove not demoting current user validation

* Update tests

* Catch the unhandled promise rejection

* Hide unnecessary ui elements for read-only user

* Update app/scenes/Settings/People.js

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* Remove redundant logic for admin only policies

* Use can logic

* Update snapshot

* Remove lint error

* Update snapshot

* Minor fix

* Update app/menus/UserMenu.js

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* Update server/api/users.js

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* Update app/components/DocumentListItem.js

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* Update app/stores/UsersStore.js

Co-authored-by: Tom Moor <tom.moor@gmail.com>

* Use useCurrentTeam hook in functional component

* Update translation

* Update ternary

* Remove punctuation

* Move the functions to User model

* Update share policy and shareMenu

* Rename makeAdmin to promote

* Create updateCounts function and Rank enum

* Update tests

* Remove enum

* Use async await, remove enum and create computed accessor

* Remove unused variable

* Fix lint issues

* Hide templates

* Create shared/types and use rank type from it

* Delete shared/utils/rank type file

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2021-04-11 19:39:17 -07:00
Tom Moor cdc7f61fa1 chore: Enable HMR for frontend code (#2024)
* chore: Enable HMR for frontend code
closes #2021

* revert
2021-04-11 15:09:00 -07:00
Tom Moor 2a6dfdea5d fix: Highlight states and dropzones when user does not have permission to import 2021-04-10 13:54:05 -07:00
Translate-O-Tron de25ea0ed9 fix: New Chinese Simplified translations from Crowdin [ci skip] (#2020) 2021-04-09 08:43:23 -07:00
Tom Moor d2227a2488 Update stale.yml 2021-04-08 22:56:22 -07:00
Translate-O-Tron 3e050727cb fix: New Chinese Simplified translations from Crowdin [ci skip] (#2019) 2021-04-08 21:20:10 -07:00
Tom Moor 326518873e fix: Logout suspended users immediately 2021-04-08 21:04:34 -07:00
Translate-O-Tron ed779a250f New Crowdin updates (#2011) 2021-04-08 20:40:34 -07:00
Tom Moor 190f0b6dc5 fix: Improve handling of suspended users signing in with email (#2012)
* chore: Separate signin/auth middleware
fix: Email signin token parsed by JWT middleware
fix: Email signin marked as active when logging in as suspended
fix: Suspended email signin correctly redirected to login screen
closes #1740

* refactor middleware -> lib

* lint
2021-04-08 20:40:04 -07:00
Tom Moor 1a889e9913 fix: Add embed support for lucid.app domain
closes #2017
2021-04-07 21:48:45 -07:00
Tom Moor b3203857d7 Create FUNDING.yml 2021-04-06 19:32:07 -07:00
Tom Moor 5762fb33d9 chore: Improve display of configuration errors (#2014)
* chore: Show all configuration errors at once
fix: Remove requirement for deprecated Slack key
fix: Add requirement for UTILS_SECRET

* chore: Add funding/sponsorship message
2021-04-06 19:29:59 -07:00
Tom Moor 1101ea428b feat: Drop to import onto collection scene (#2005)
* Refactor to functional component

* feat: Basic drag and drop into collection
2021-04-05 19:05:27 -07:00
Translate-O-Tron b4213e498c New Crowdin updates (#1951) 2021-04-05 18:28:27 -07:00
Saumya Pandey f9f76d4438 Format local development instructions (#2007) 2021-04-05 17:19:44 -07:00
Tom Moor 4a9571a174 fix: Alignment of backlinks and references (#2006)
closes #1998
2021-04-05 17:19:31 -07:00
Tom Moor bf856dbafa Merge branch 'main' of github.com:outline/outline 2021-04-04 11:04:46 -07:00
Nilay Sharma 0e54302d75 stretch email login input (#2004)
* stretch email login input

* Update InputLarge.js

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2021-04-04 09:57:44 -07:00
Tom Moor 4777176d84 fix: User afterCreate hook using deprecated column 2021-04-03 18:37:39 -07:00
Tom Moor 3ffa21b07f fix: Unneeded object keys in API response 2021-04-03 17:18:26 -07:00
Tom Moor 8cbc873451 chore: Clarify flow on /create page 2021-04-03 14:29:08 -07:00
Tom Moor d2e8311b39 chore: Add tracking ref to branding on share links 2021-03-31 21:52:49 -07:00
Tom Moor 810257bcf5 fix: Improve dark mode styling
fix: Improve user and group list styling
fix: Member list reload when changing permissions, closes #1999
2021-03-31 20:57:30 -07:00
Tom Moor 2ef0caba88 fix: Server error when invalid 'sort' field is passed from an API client (#2000) 2021-03-31 18:54:02 -07:00
Tom Moor 2e64972574 fix: Error in shares.info endpoint when user originally creating share has been deleted 2021-03-31 18:04:40 -07:00
Tom Moor 7e1b07ef98 feat: Add read-only collections (#1991)
closes #1017
2021-03-30 21:02:08 -07:00
Tom Moor d7acf616cf chore: Bump rich-markdown-editor 2021-03-30 20:39:41 -07:00
Tom Moor c5569bd365 feat: Add /logout route for SLO support 2021-03-30 20:10:52 -07:00
Tom Moor 25023fb086 chore: Fix modal nesting, remove react-modal (#1996)
* chore: Fix modal nesting, remove react-modal

* tweak

* fix: Janky route jump when accessing Document -> Move from non-document scene
2021-03-30 18:46:14 -07:00
Tom Moor 07425f4243 Minor context menu visual updates 2021-03-29 22:28:40 -07:00
Tom Moor b5dcb1b3fe fix: JS error from #1962 refactor when Google or Slack auth credentials are missing 2021-03-29 22:03:40 -07:00
Tom Moor ae57cdea2a fix: GA should load on public share pages, closes #1992 2021-03-29 22:02:38 -07:00
Tom Moor 8599b60a6c fix: group -> createGroup 2021-03-26 20:17:46 -07:00
Tom Moor e00a437f2f feat: authenticationProviders API endpoints (#1962) 2021-03-26 11:31:07 -07:00
Tom Moor 626c94ecea fix: Bump react-dropzone for eroneous 'green plus' cursor fix
https://github.com/react-dropzone/react-dropzone/issues/1042
2021-03-26 11:17:50 -07:00
Tom Moor 889186e510 fix: Close appearance menu when selecting a theme
fix: Position disclosure correctly when menu has submenu
fix: More reliably close context menus
2021-03-26 11:15:58 -07:00
Tom Moor 4166257283 chore: Improved context menu behavior 2021-03-24 19:23:16 -07:00
Tom Moor 6a7d7af767 fix: Sticky archive header 2021-03-24 18:42:12 -07:00
Tom Moor 46912f8ddb fix: Single share record per document (#1984) 2021-03-24 18:28:38 -07:00
Tom Moor 877c01f723 feat: Show 'Edit' button when visiting share link as signed in user with permission (#1980) 2021-03-23 19:22:15 -07:00
Tom Moor 97158b1337 fix: Invisible list bullets in Firefox 2021-03-23 19:02:19 -07:00
Tom Moor 8d8bde4b8b closes #1784 2021-03-22 22:23:03 -07:00
Tom Moor 059fca27b3 buildUser -> buildAdmin 2021-03-22 20:59:11 -07:00
Tom Moor 9f6ba798c8 Merge branch 'main' of github.com:outline/outline 2021-03-22 20:51:45 -07:00
Tom Moor 349e971a8a chore: Serialize domain policies on team (#1970)
* domain policies exposed on team, consistency

* fix: Remove usage of isAdmin in frontend

* test
2021-03-22 20:50:12 -07:00
Tom Moor 9af9d3a008 chore: Bump ioredis for fixes
chore: Remove sequelize language from user-facing db migrations
2021-03-22 18:41:54 -07:00
Tom Moor bb5443452b flow 2021-03-21 18:52:42 -07:00
Tom Moor b3353f20d5 chore: Move error logging in passport 2021-03-21 18:36:10 -07:00
Tom Moor 200f25c4b2 0.54.0 2021-03-21 10:27:27 -07:00
Saumya Pandey f1296cc8e3 Add import document menuitem (#1966) 2021-03-20 23:20:49 -07:00
Tom Moor ad8c08497c fix: Moving document in private collection returns incorrect policies (#1969)
* fix: Return no policies when collection doesn't change
fix: Return correct policies when it does change

* test
2021-03-19 08:01:51 -07:00
Tom Moor 7891a8ee8b fix: Cannot create collection if all collections deleted 2021-03-19 08:01:13 -07:00
Tom Moor 56c4acc18f fix: Background on error details not correct in dark theme 2021-03-18 23:56:05 -07:00
Tom Moor 1b972070d7 feat: Enforce single team when self-hosted (#1954)
* fix: Enforce single team when self hosting

* test: positive case

* refactor

* fix: Visible error message on login screen for max teams scenario

* Update Notices.js

* lint
2021-03-18 21:56:24 -07:00
Nan Yu 138336639d fix: touch up UI for compact breadcrumbs (#1961) 2021-03-18 19:44:28 -07:00
Tom Moor 8ea746dbe8 Bump RME
fixes: Code does not highlight until editor is focused
fixes: Improved pasting behavior
fixes: Error when pasting iframes from elsewhere
2021-03-18 18:01:07 -07:00
Saumya Pandey 46bcc2e2ae feat: Allow sorting collections in sidebar (#1870)
closes #1759

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2021-03-18 17:27:33 -07:00
Tom Moor b93002ad93 fix: JS error when pasting gist link, closes #1963 2021-03-16 22:53:32 -07:00
Tom Moor a427d77076 fix #1964 – error when selecting no files to import after previously selecting files 2021-03-16 22:09:19 -07:00
Nan Yu eff56b758c feat: use flexbox to center the floating title (#1959)
* use flexbox to center the floating title

* simplify breadcumb alignment

* small adjustments

* fix alignment on actions
2021-03-15 19:24:14 -07:00
Tom Moor ffc270b567 fix: Incorrect calculation of subdomain when previously used more than once 2021-03-15 18:04:41 -07:00
Saleh Yusefnejad d86b7babb9 fix: correct GoogleSheets component class name (#1960) 2021-03-15 15:36:10 -07:00
Tom Moor ec57951087 feat: Upgrade editor - move list items with keyboard 2021-03-14 15:58:50 -07:00
Tom Moor 2385f41a98 chore: Show 'private' badge on private collections (#1952)
* chore: Show 'private' badge on private collections

* lint

* fix: Missing translation mapping
2021-03-12 16:41:26 -08:00
Translate-O-Tron bdb684a4be New Crowdin updates (#1950)
* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]
2021-03-11 16:54:24 -08:00
Tom Moor 5d6f68d399 feat: Move to passport for authentication (#1934)
- Added `accountProvisioner`
- Move authentication to use passport strategies
- Make authentication more pluggable
- Change language of services -> providers

closes #1120
2021-03-11 10:02:22 -08:00
Tom Moor dc967be4fc chore: Syncs changes that were erroneously made in enterprise repo (#1949) 2021-03-10 14:56:34 -08:00
Saumya Pandey d530edcc2f fix: Remove double separator in collection menu (#1948)
* Hide separator

* Remove visible logic
2021-03-10 14:56:16 -08:00
Tom Moor 1393d1950e chore: Test performance and warnings (#1946)
* test: Do not request mailer account in test environment

* test: Dupe migrations
2021-03-10 12:04:42 -08:00
Tom Moor 0aa72036d7 fix: Templates should not be visible in collection structure 2021-03-10 09:39:42 -08:00
Tom Moor f50b88716b fix: Handle document Id in document structure does not exist in db
closes #1938
2021-03-09 22:45:40 -08:00
Tom Moor e90c02bec7 feat: Hide less popular services by default in block menu 2021-03-09 22:32:28 -08:00
Tom Moor 504b11576a bump 2021-03-09 22:04:47 -08:00
Tom Moor bac7a364d0 fix: Drag and drop images in editor, conflict with sidebar react-dnd (#1918)
* fix: Drag and drop images in editor, conflict with sidebar react-dnd
see: https://github.com/react-dnd/react-dnd/pull/3052

* Bump to non-canary

* Upgrade react-dnd

* react-dnd api changes

* lint

* fix: dnd doesn't work on first render

* remove unneccessary async

* chore: Update react-dnd (API changed again)

* restore fade
2021-03-09 18:41:30 -08:00
Tom Moor ed2a42ac27 chore: Migrate authentication to new tables (#1929)
This work provides a foundation for a more pluggable authentication system such as the one outlined in #1317.

closes #1317
2021-03-09 12:22:08 -08:00
Saumya Pandey ab7b16bbb9 fix: Centered document title moves when saving (#1943)
closes #1939
2021-03-09 12:21:29 -08:00
Translate-O-Tron d8eefc1972 New Crowdin updates (#1920) 2021-03-08 17:17:13 -08:00
dependabot[bot] b188a8ff30 chore(deps): bump elliptic from 6.5.3 to 6.5.4 (#1941)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-08 17:16:33 -08:00
Tom Moor e1c7b07af9 fix: Image in README was removed on Github's servers 2021-03-08 09:19:42 -08:00
Tom Moor eaadeb26e5 fix: Upgrade reakit for better context menu behavior 2021-03-01 19:17:24 -08:00
Tom Moor 0c301fcf0c fix: Enlarge scrollable area in sidebar for improved UX on small screens 2021-02-26 10:51:14 -08:00
Tom Moor a3e95023dc fix: Temporary fix for outline-icons build issue 2021-02-23 22:53:55 -08:00
Tom Moor e08b17561e fix: Capitalize Pусский 2021-02-23 10:35:50 -08:00
Tom Moor ac79a4c4cc fix: Update PWA macOS icon 2021-02-23 08:36:59 -08:00
Tom Moor e085553306 feat: Add tracking of PWA installs 2021-02-22 22:30:47 -08:00
Tom Moor 38bd1d5585 translate: Search filter dropdowns, modal 2021-02-22 22:18:00 -08:00
Tom Moor cd7cbab5ac fixes #1879 – race condition in websockets service 2021-02-22 21:53:20 -08:00
Tom Moor 2195787e7d logistics -> exporter, remove cutesy naming of lib 2021-02-22 21:51:01 -08:00
Tom Moor 04f942141f fix: Tone-down separator for PWA titlebar in dark mode 2021-02-21 22:42:22 -08:00
Tom Moor d0f1fd533a feat: Add Russian language support
closes #1916
2021-02-21 20:42:01 -08:00
Translate-O-Tron a1e885f057 New Crowdin updates (#1913) 2021-02-21 20:35:39 -08:00
Tom Moor 2ad9f69f7f fix: Scrollbars should match theme, closes #1917 2021-02-21 19:59:57 -08:00
Tom Moor 65bca35bbf Merge branch 'main' of github.com:outline/outline 2021-02-21 13:33:17 -08:00
Tom Moor a96993fda9 feat: Add PWA support to subdomains (#1915)
* fix: Remove overscroll
* Remove title from fixed header in PWA as it's displayed immediately above in application title
2021-02-21 13:32:49 -08:00
Nan Yu 3df82c500b wip 2021-02-21 11:52:00 -08:00
Tom Moor 9fc03b6ece fix: Cannot upload images into collection description (authentication failure) 2021-02-20 22:38:28 -08:00
Tom Moor 100360adb3 fix: Drop cursor not visible in dark theme 2021-02-20 22:35:07 -08:00
Tom Moor d277d80323 Merge pull request #1914 from outline/fix/issue-1896
fix: Documents in trash should still load their attachments
2021-02-20 13:35:41 -08:00
Tom Moor c79cfbd30d fix: Documents in trash should still load their attachments
closes #1896
2021-02-20 13:22:02 -08:00
Tom Moor e66611e771 fix: Error with search term including %, closes #1891 2021-02-20 13:03:41 -08:00
Tom Moor 903e83a618 feat: Batch Import (#1747)
closes #1846
closes #914
2021-02-20 12:36:05 -08:00
Tom Moor 4ef4ef963a i18n 2021-02-20 12:31:54 -08:00
Translate-O-Tron 51c6a19dc3 New Crowdin updates (#1906) 2021-02-19 09:28:47 -08:00
Tom Moor bbf434e2f4 fix: Disable 'Invite people…' control for non-admins (#1903)
closes #1902
2021-02-18 23:35:55 -08:00
Tom Moor 5b7018058d i18n 2021-02-18 23:30:48 -08:00
Tom Moor fae54c7957 fix: Mispositioned sticky headers in modals 2021-02-18 23:20:12 -08:00
Tom Moor fabfa6a491 Tweak language, remove original attachment once complete 2021-02-18 23:08:48 -08:00
Tom Moor c5f9412ac0 fix: Collection creator not written (bad merge from refactor while this branch has been open)
refactor: Move processing to async queue now that file can be loaded from external storage
2021-02-18 22:55:29 -08:00
Tom Moor f4c871bb62 i18n 2021-02-18 22:36:18 -08:00
Tom Moor df233c95a9 refactor: Upload file to storage, and then pass attachmentId to collections.import
This avoids having large file uploads going directly to the server and allows us to fetch it async into a worker process
2021-02-18 22:36:07 -08:00
Tom Moor 568e271738 lint 2021-02-18 21:05:21 -08:00
Tom Moor 9efed11a3e Merge branch 'main' of github.com:outline/outline into feat/mass-import 2021-02-18 20:57:01 -08:00
PedroSeda c30132e558 feat: Embed Cawemo (#1890) 2021-02-18 18:48:40 -08:00
Tom Moor b152a5595e Merge branch 'main' into feat/mass-import 2021-02-17 23:57:45 -08:00
Tom Moor 887e341e48 Add NODE_ENV to app.json 2021-02-17 19:38:44 -08:00
Tom Moor ae2f1b47e7 0.53.1 2021-02-17 00:08:04 -08:00
Tom Moor 86d9a14c5c fix: is virtual host 2021-02-16 23:52:25 -08:00
Tom Moor 6a8a83610f fix: Input data is not a String when clicking on new collection description 2021-02-16 23:42:31 -08:00
Tom Moor 54bf7a9dea fix: Restore specifying AWS endpoint for non-S3 support 2021-02-16 23:41:39 -08:00
Tom Moor 43ed7d0343 0.53.0 2021-02-16 21:18:06 -08:00
Tom Moor a81a18b173 fix: Remove hard-coded ServerSideEncryption on AWS, configure on AWS or storage provider 2021-02-16 00:16:23 -08:00
Tom Moor f18a2a048d fix: Sticky heading stacking 2021-02-16 00:15:04 -08:00
Tom Moor 7e922d8716 feat: Installable PWA (#1882) 2021-02-15 15:19:51 -08:00
Tom Moor 4b603460cb chore: Standardized headers (#1883)
* feat: Collection to standard header
feat: Sticky tabs

* chore: Document to standard header

* chore: Dashboard -> Home
chore: Scene component

* chore: Trash, Templates, Drafts

* fix: Mobile improvements

* fix: Content showing at sides and occassionally ontop of sticky headers
2021-02-14 13:18:33 -08:00
Tom Moor 32a298054d Bump RME – Editor fixes and improvements 2021-02-13 12:47:44 -08:00
Tom Moor ca2459361e chore: de-dupe lockfile 2021-02-13 09:25:04 -08:00
Tom Moor e49f3ab9fb ResizeObserver loop completed with undelivered notifications 2021-02-13 08:43:22 -08:00
Tom Moor e9338df057 Update README screenshot 2021-02-12 20:29:43 -08:00
Tom Moor 2629d6db23 fix: 'Suspended' badge misaligned on user profiles
closes #1880
2021-02-12 17:34:40 -08:00
Tom Moor b017590033 fix: 'bake' release env variables at build time 2021-02-12 17:18:55 -08:00
Tom Moor 7d244dfa1f 'bake' release env variables at build time 2021-02-12 16:53:16 -08:00
Tom Moor 2a225d81d2 chore: Update Sentry to avoid duplicate packages
chore: Pass current release version to Sentry and Datadog
2021-02-12 16:39:02 -08:00
Tom Moor 41df5c74be Add description -> Add a description 2021-02-12 16:24:31 -08:00
Tom Moor ef026b34fa Return to App -> Back to App 2021-02-12 16:21:32 -08:00
Tom Moor 1dbcc12648 feat: Inline collection editing (#1865) 2021-02-12 16:20:49 -08:00
Tom Moor 2611376b21 chore: Add optional DD tracer 2021-02-11 18:58:56 -08:00
Tom Moor a1b3cfc7de Yarn.lock 2021-02-10 20:25:26 -08:00
Tom Moor 5a478ec127 fix: Incorrect policy returned after document create/import 2021-02-09 21:29:24 -08:00
Tom Moor c0325fcaf3 Merge branch 'main' into feat/mass-import 2021-02-09 20:46:57 -08:00
Tom Moor df472ac391 feat: add total users to people management screen (#1878)
* feat: add total users to pagination

* move this.total in runInAction callback

* add total counts + counts to people tabs

* progress: use raw pg query

* progress: add test

* fix: SQL interpolation

* Styling and translation of People page

Co-authored-by: Tim <timothychang94@gmail.com>
2021-02-09 20:13:09 -08:00
Tom Moor 097359bf7c feat: Added ability to disable sharing at collection (#1875)
* feat: Added ability to disable sharing at collection

* fix: Disable all previous share links when disabling collection share
Language

* fix: Disable document sharing for read-only collection members

* wip

* test

* fix: Clear policies after updating sharing settings

* chore: Less ambiguous language

* feat: Allow setting sharing choice on collection creation
2021-02-09 19:04:03 -08:00
Tom Moor 3739bb7c55 Update translation.json 2021-02-08 21:50:34 -08:00
Tom Moor cc90c8de1c feat: Sidebar Improvements (#1862)
* wip

* refactor behaviorg

* stash

* simplify
2021-02-07 21:51:56 -08:00
Tom Moor ac6c48817c fix: Unable to select .md files by default on some machines depending on installed software 2021-02-07 16:14:03 -08:00
Tom Moor 8e3534dcbc fix: File import via collection menu regression 2021-02-07 16:13:44 -08:00
Tom Moor cada91a135 Merge main 2021-02-07 12:58:17 -08:00
Yaroslav Zhavoronkov e2d7d34f30 fix: Pass credentials with API requests when required to work with Cloudflare Access (#1867) 2021-02-06 22:49:49 -08:00
Tom Moor 0d88a1dfda Update README.md 2021-02-06 21:49:07 -08:00
Tom Moor df5a2e45c5 chore: Improved deployment documentation (#1868) 2021-02-06 21:33:56 -08:00
Tom Moor 1a7a48674b fix: link in README, add ARCHITECTURE document 2021-02-06 17:46:54 -08:00
Tom Moor e23474fa1c feat: Add parameters for filtering events (#1863)
* feat: Add parameters for filtering events

* test
2021-02-04 20:20:56 -08:00
Tom Moor 37fa13d841 fix: flash of 'Deleted Collection' when loading app on doc page 2021-02-02 22:03:02 -08:00
Tom Moor 6d88c02869 chore: Remove unused Popover component 2021-02-02 21:17:17 -08:00
Tom Moor a2fb3bb9f8 fix: Favicon should load from domain root, not current path 2021-02-02 21:13:11 -08:00
Tom Moor fb0b38fb71 fix: Mobile menu toggle button appearing in print media, closes #377 2021-02-02 20:57:08 -08:00
Tom Moor 8ff2f41068 Merge branch 'develop' of github.com:outline/outline into develop 2021-02-01 21:13:51 -08:00
Tom Moor 334dce7984 chore: Add Timing-Allow-Origin header (#1860) 2021-02-01 21:13:44 -08:00
Tom Moor 61b303831f fix: Document history sidebar layout issue 2021-02-01 21:13:31 -08:00
Tom Moor a9d60d288e feat: Automatically scroll to active item in sidebar (#1858) 2021-02-01 19:29:54 -08:00
Translate-O-Tron 3f267d7745 New Crowdin updates (#1848) 2021-01-31 23:24:10 -08:00
Tom Moor e845652cb8 flow: Convert to different <Trans> component syntax for flow compatability 2021-01-31 21:14:14 -08:00
Tom Moor 7066a45323 feat: Improve star/unstarred iconography 2021-01-31 20:53:27 -08:00
Tom Moor 654fdf1c7e fix: Guard unset language 2021-01-31 15:41:33 -08:00
Tom Moor 2a5fd0b332 test 2021-01-31 14:47:28 -08:00
Tom Moor 9ba63c6054 feat: Show nested document count on document list items on collection home 2021-01-31 14:41:18 -08:00
Tom Moor 785e208c6c lint 2021-01-31 14:41:00 -08:00
Tom Moor 9d84652dff fix: Frontend translation library expects dash separated, not underscore separated languages – this fix is required to enable working pluralization 2021-01-31 14:40:50 -08:00
Tom Moor ef6ce72cf5 fix: Recently published redirect 2021-01-31 13:01:56 -08:00
Tom Moor 7777cccf3b fix: Save regression from flow refactor 2021-01-31 12:53:52 -08:00
Tom Moor 620e4942d8 feat: Update default collection tab (#1821)
* feat: Allow listing root level documents only via documents.list

* feat: New tab on collection home

* update tab layout

* fix: Correctly sort index sorted documents.list

* revert: Tab layout changes

* fix: Missing route for recently published
fix: Redirect unknown tabs
2021-01-31 12:37:27 -08:00
Tom Moor 91ee3e62f2 fix: Reassign user on unpublish (#1857)
* findOne -> findByPk
2021-01-30 18:31:08 -08:00
Tom Moor eeb7650941 fix: New documents should sort to the top of manually organized collection 2021-01-30 00:18:56 -08:00
Tom Moor ee57f1ccf5 fix 2021-01-29 23:59:48 -08:00
Tom Moor 32f0589190 chore: Upgrade flow (#1854)
* wip: upgrade flow

* chore: More sealed props improvements

* Final fixes
2021-01-29 21:36:09 -08:00
Tom Moor ce2b246e60 fix: auth.config request should only be made on Login screen (#1852) 2021-01-29 17:54:28 -08:00
Tom Moor ae13347d55 chore: Add flow support for M1 macs 2021-01-28 23:25:37 -08:00
Tom Moor 13205171d7 chore: Improve dev efficient on M1 Mac 2021-01-28 21:01:53 -08:00
Tom Moor a912ea24f6 chore: Remove references to window.Sentry 2021-01-27 22:56:40 -08:00
Tom Moor 6fa760688b fix: Adds support for VirtualHost style AWS S3 buckets (#1847)
* Bump aws-sdk

* support virtual host buckets

* fix

* fix: VirtualHost bucket without explicit AWS_S3_FORCE_PATH_STYLE=false
2021-01-27 07:46:43 -08:00
Tom Moor 2825df29de Merge branch 'develop' of github.com:outline/outline into develop 2021-01-25 20:48:42 -08:00
Translate-O-Tron 604e97a6ce New Crowdin updates (#1835)
* fix: New French translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Portuguese translations from Crowdin [ci skip]

* fix: New Russian translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New Thai translations from Crowdin [ci skip]

* fix: New Italian translations from Crowdin [ci skip]

* fix: New Italian translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New French translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Portuguese translations from Crowdin [ci skip]

* fix: New Russian translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New Thai translations from Crowdin [ci skip]

* fix: New Italian translations from Crowdin [ci skip]

* fix: New French translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Portuguese translations from Crowdin [ci skip]

* fix: New Russian translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New Thai translations from Crowdin [ci skip]

* fix: New Italian translations from Crowdin [ci skip]

* fix: New French translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Portuguese translations from Crowdin [ci skip]

* fix: New Russian translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New Thai translations from Crowdin [ci skip]

* fix: New Italian translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]
2021-01-25 20:48:18 -08:00
milesstoetzner dc1bc44c8f feat: Google Drawings Integration (#1814)
* add google drawings integration

* add google drawings image

* update google drawings image and regex

* allow query parameter in google drawings regex

* support CDN for google drawings image
2021-01-25 20:47:23 -08:00
Tom Moor 2a55e78722 fix: Improve some editor alignment 2021-01-25 20:36:20 -08:00
Tom Moor eaf8dc5a3c fix: Text highlight of link in dark mode is impossible to read
closes #1838
2021-01-24 22:47:27 -08:00
Tom Moor f89d5adc37 fix: Ellipisis left in translation string 2021-01-24 12:09:44 -08:00
Tom Moor 978a123122 fix: 16 linting warnings 2021-01-23 10:19:08 -08:00
Tom Moor 96e65f495e chore: Remove custom VisuallyHidden component 2021-01-23 09:47:02 -08:00
Tom Moor 4106f15450 fix: Content jump when leaving edit mode 2021-01-22 23:58:34 -08:00
Tom Moor b3cd78c833 chore: Enable parameterized route profiling 2021-01-22 23:02:12 -08:00
Tom Moor 7b87fea4f4 Merge branch 'develop' of github.com:outline/outline into develop 2021-01-22 21:16:37 -08:00
Tom Moor 7e9bcb0c37 fix: More missing a11y labels 2021-01-22 21:12:25 -08:00
Tom Moor f6370ccf6d chore: Sentry performance monitoring (#1841)
* Hook up performance monitoring

* lint
2021-01-22 20:42:45 -08:00
Tom Moor 11e1108f4a fix: Unneccessary ev.preventDefault 2021-01-22 20:40:26 -08:00
Tom Moor c9fdf48c33 chore: Add missing labels to buttons without text and search inputs 2021-01-22 19:31:30 -08:00
Tom Moor 6a206de6cd chore: Add meta description 2021-01-22 19:12:39 -08:00
Tom Moor c69b393776 fix: JS error when submitting invites from sidebar-triggered modal 2021-01-22 08:57:52 -08:00
Tom Moor 6e9c456147 isMetaKey -> isModKey 2021-01-21 07:28:10 -08:00
Tom Moor 70626ffff0 feat: Organize sidebar (#1834)
* chore: Flip chinese label in language select

* feat: Add settings to sidebar, organize secondary items to bottom
2021-01-21 07:22:20 -08:00
Translate-O-Tron 993aad004e fix: New Korean translations from Crowdin [ci skip] (#1833) 2021-01-21 07:21:23 -08:00
Tom Moor 6fa9e700c8 chore: Flip chinese label in language select 2021-01-20 23:20:06 -08:00
Tom Moor 836b2e310a chore: Missing translation hooks in settings sidebar 2021-01-20 23:13:51 -08:00
Tom Moor 24ecaa8ce4 chore: Reduce default menu width 2021-01-20 23:07:48 -08:00
Tom Moor 40491fafe9 fix: Document star/unstar from list item navigates to document (regression) 2021-01-20 23:07:39 -08:00
Tom Moor 111212b038 feat: Resizable sidebar (#1827)
* wip: First round on sidebar resizing

* feat: Saving setting, animation

* all requirements, refactoring needed

* lint

* refactor useResize

* some mobile improvements

* fix

* refactor
2021-01-20 23:00:14 -08:00
Translate-O-Tron 774c3534d8 fix: New Chinese Simplified translations from Crowdin [ci skip] (#1832) 2021-01-20 22:23:30 -08:00
Malek Hijazi 9759227d73 fix: upgrade command (#1830)
I tested this on the server. Running yarn upgrade will result in yarn self updating. To solve this issue we need to run yarn run upgrade.
2021-01-20 22:19:44 -08:00
Tom Moor f608872c11 chore: Add Chinese and Italian translations 2021-01-20 22:09:36 -08:00
Translate-O-Tron eff9544ef9 New Crowdin updates (#1810)
* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Thai translations from Crowdin [ci skip]

* fix: New Italian translations from Crowdin [ci skip]
2021-01-20 21:36:03 -08:00
Tom Moor 22fb464b87 lint 2021-01-18 16:11:48 -08:00
Tom Moor 3bace8c9e4 fix: Restore DNS prefetching for static resources (#1820)
* fix: Restore DNS prefetching for static resources

* fix: CDN paths
feat: preload instead of prefetch for key bundles

* csp

* fix: Turns out prefetch-src is still behind a flag in Chrome, not publicly available yet
2021-01-18 15:48:46 -08:00
Tom Moor 27fca28450 fix: Account for rehydrated old users before language
closes #1819
2021-01-17 22:19:54 -08:00
Tom Moor afcce7a0ef fix: Add missing width/height tags to img 2021-01-17 21:49:51 -08:00
Tom Moor f33495dddc fix: Editor mod shortcuts not working on Windows
closes #1745
2021-01-17 18:32:32 -08:00
Tom Moor 51b75fa09d 0.52.0 2021-01-16 14:12:35 -08:00
Tom Moor 522df125aa feat: Add CDN support (#1817)
* chore: CSP

* chore: Optionally use CDN for serving images
2021-01-16 11:12:10 -08:00
Tom Moor 1fd2ec31fd fix: Heading positioning changing between edit/read-only
fix: List items beyond #9 chopped
2021-01-15 08:50:19 -08:00
Tom Moor 1af00a0b3d test 2021-01-14 20:15:46 -08:00
Tom Moor ab40545a01 lint 2021-01-14 20:11:04 -08:00
Tom Moor c8d305aeca fix: Unintended scroll reset when switching between view / edit (#1807)
* fix: Don't remount document when switching between edit/read-only
fix: Button vertical alignment when using as=Link

* fix: Bump RME, fixes issue with image behavior changing between read-only/edit without editor remount

* fix: Heading anchor positioning
2021-01-14 19:50:10 -08:00
Maximilian Zinke 68a65be135 feat: Embed Google Drive (#1804)
* implement google drive extension

* add current logo of google drive

* fix issue when posting gdrive links which are already a preview

* always only show the preview

* Add bottom bar to get to original url for Google Drive embeds

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2021-01-14 19:49:56 -08:00
Tom Moor b4d307b3b4 fix: Confusing breadcrumb collapsing 2021-01-14 19:36:31 -08:00
Tom Moor 03cb6d66e7 fix: Alignment of collection icon in header when collection name is very long 2021-01-14 18:59:43 -08:00
Tom Moor 7b8cbc50d5 fix: Document meta unclickable when first item in a document is a heading 2021-01-14 18:51:58 -08:00
Tom Moor f501da9c0f flow 2021-01-14 18:38:02 -08:00
Translate-O-Tron 74a762a7c7 New Crowdin updates (#1790) 2021-01-14 09:08:38 -08:00
Rubén Moya 93ac9892d5 fix: take into account user lang in Time component (#1793)
This PR takes into account the user selected language to format the time in the Time component.

Co-authored-by: tommoor <tom.moor@gmail.com>
2021-01-14 09:08:14 -08:00
Tom Moor e8b7782f5e fix: Keyboard accessible context menus (#1768)
- Makes menus fully accessible and keyboard driven
- Currently adds 2.8% to initial bundle size due to the inclusion of Reakit and its dependency, popperjs.
- Converts all menus to functional components
- Remove old custom menu system
- Various layout and flow improvements around the menus

closes #1766
2021-01-13 22:00:25 -08:00
Rubén Moya 47369dd968 chore: rename collection creatorId to createdById (#1794) 2021-01-11 23:17:31 -08:00
Tom Moor d258082c5f lint 2021-01-11 18:25:21 -08:00
Tom Moor c0bbae50c4 fix: Search results not updated when changing filters 2021-01-11 00:50:44 -08:00
Tom Moor ac082e4a5f Merge branch 'develop' of github.com:outline/outline into develop 2021-01-11 00:47:48 -08:00
Tom Moor 7504d43452 fix: Add indicator of starred status when viewing a document (#1785)
* fix: Add indicator of starred status when viewing a document
closes #461

* fix: Account for shared document
2021-01-10 23:13:58 -08:00
Tom Moor 5dba68dfd3 fix: Incorrect border color on table of contents in dark mode 2021-01-07 23:50:28 -08:00
Tom Moor 4b85603f30 chore: Text highlight blue -> yellow 2021-01-07 23:25:14 -08:00
Tom Moor 34598b317d fix: Deleting a collection should not deleted archived documents within it automatially (#1776)
closes #1775
2021-01-07 19:46:12 -08:00
Translate-O-Tron cbfa25fa2f New Crowdin updates (#1736)
* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New French translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Portuguese translations from Crowdin [ci skip]

* fix: New Russian translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New French translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Portuguese translations from Crowdin [ci skip]

* fix: New Russian translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New Russian translations from Crowdin [ci skip]

* fix: New Russian translations from Crowdin [ci skip]

* fix: New French translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Portuguese translations from Crowdin [ci skip]

* fix: New Russian translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New French translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Portuguese translations from Crowdin [ci skip]

* fix: New Russian translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New French translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Portuguese translations from Crowdin [ci skip]

* fix: New Russian translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]
2021-01-07 08:09:44 -08:00
Tom Moor 67a2246e1a fix: Attempting to restore document in deleted collection without a collectionId override results in server error (#1777)
closes #1767
2021-01-07 08:09:19 -08:00
Tom Moor de7bf8c133 fix: Fixes padding on sidebar collection links
closes #1770
2021-01-06 20:35:02 -08:00
Tom Moor 4fda50f4ad feat: Add 'archive' option in delete confirmation modal (#1764)
* feat: Add 'archive' option in delete confirmation modal
chore: Add translation tags to delete confirmation

* i18n

* language
2021-01-03 11:04:09 -08:00
Tom Moor f4c5cc054e chore: Update sorting icons 2021-01-03 09:38:29 -08:00
Tom Moor f799758a6f feat: Allow Google sign-in users to choose account
Alternative to https://github.com/outline/outline/pull/1763
2021-01-03 08:54:47 -08:00
Tom Moor 9df02d6fd4 chore: Improve toasts 2021-01-02 21:47:02 -08:00
Tom Moor bb81aa0065 fix: Improve toast messages to not show multiple of the same 2021-01-02 21:09:43 -08:00
Tom Moor 68bbd9fa34 fix: Hold hover state on DocumentListItem while DocumentMenu is open 2021-01-02 20:02:57 -08:00
Tom Moor 308d4bd797 i18n 2021-01-02 19:19:45 -08:00
Tom Moor 5329474c85 fix: Developer warning batchingForReactDom 2021-01-02 19:13:11 -08:00
Tom Moor d90af48741 fix: Outer error boundary generates more errors as it doesnt have access to store and theme providers 2021-01-02 19:12:51 -08:00
Tom Moor 611e9b97b3 chore: Move collection sort control (#1762)
* feat: Move collection sort menu

* fix: Improve accessibility

* fix: Dedupe outline-icons (temporary until rme is next merged)
2021-01-02 19:11:13 -08:00
Nan Yu eda5adca2c feat: adds hover to expand functionality on sidebar (#1761)
* feat: adds hover to expand functionality on sidebar

* clear hover intent timeout on drag leave
2021-01-02 17:20:13 -08:00
Tom Moor f0b361158e flow 2021-01-02 09:09:06 -08:00
Tom Moor f8ab793053 fix: 'New' badge should never show to document creator, regardless of whether a view has been logged (#1758) 2020-12-31 16:46:33 -08:00
Nan Yu 2cc45187e6 feat: reordering documents in collection (#1722)
* tweaking effect details

* wrap work on this feature

* adds correct color to drop cursor

* simplify logic for early return

* much better comment so Tom doesn't fire me

* feat: Allow changing sort order of collections

* refactor: Move validation to model
feat: Make custom order the default (in prep for dnd)

* feat: Add sort choice to edit collection modal
fix: Improved styling of generic InputSelect

* fix: Vertical space left after removing previous collection description

* chore: Tweak language, menu contents, add auto-disclosure on sub menus

* only show drop-to-reorder cursor when sort is set to manual

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-12-31 12:51:12 -08:00
Tom Moor ba61091c4c fix: Allow soft deletion of teams (#1754)
* fix: Allow soft deletion of teams

* test: regression specs
2020-12-30 09:40:23 -08:00
Tom Moor 8dba32b5e0 fix: Meta key shortcuts not bound correctly in Windows browsers (#1753) 2020-12-30 09:35:33 -08:00
Clifton Cunningham 40bd9aed0a fix: miro - use the incoming domain to ensure access to logged in boards works (#1756) 2020-12-30 09:35:18 -08:00
Tom Moor d4bb04e921 fix: Handle linked documents destroyed when document is published
closes #1739
2020-12-29 10:32:09 -08:00
Nan Yu 8a3a279c0e Merge branch 'develop' of github.com:outline/outline into develop 2020-12-28 21:35:37 -08:00
Nan Yu 37f2cc8d55 closes #1752 2020-12-28 21:35:13 -08:00
Gustavo Maronato 89903b4bbe feat: Compress avatar images before upload (#1751)
* compress avatar images before upload

* move compressImage to dedicated file

* Update ImageUpload.js
2020-12-28 21:08:10 -08:00
Tom Moor 41be18e938 test 2020-12-28 20:43:27 -08:00
Tom Moor caee7afde2 refactor: documents.batchImport -> collections.import 2020-12-28 18:51:12 -08:00
Tom Moor d79933887d fix: Don't trigger email and slack notifications when mass importing
feat: Show success message after import
2020-12-28 18:02:58 -08:00
Tom Moor 2787e56de3 test: Add additional tests and input validation 2020-12-28 15:30:01 -08:00
Tom Moor b932457fd3 fix: Improve single collection export compatability 2020-12-28 10:07:38 -08:00
Tom Moor ea5d2ea9e0 refactor, add preview 2020-12-27 23:00:26 -08:00
Tom Moor 6e9b4e8363 lint 2020-12-27 12:54:58 -08:00
Tom Moor 012e6b320e feat: Allow document metadata to be stored in zip comment 2020-12-27 12:36:06 -08:00
Tom Moor c8cd7fcf4a fix: API response 2020-12-26 23:12:22 -08:00
Tom Moor 7021c2a9e5 Hook up API 2020-12-26 17:53:56 -08:00
Tom Moor 799e639439 Merge branch 'feat/import-export' into feat/mass-import 2020-12-25 18:05:02 -08:00
Tom Moor ba2552f69f fix 2020-12-25 18:04:38 -08:00
Malek Hijazi b6ab816bb3 feat: command to upgrade outline (#1727)
* Add upgrade script to package.json

* Update the docs to include docker and yarn guides
2020-12-25 15:23:55 -08:00
Tom Moor ac1120914a fix: Unable to delete archived and templated documents (#1749)
closes #1746
2020-12-24 13:28:08 -08:00
Tom Moor a51af98d43 refactor 2020-12-24 10:18:53 -08:00
Tom Moor ad7400a4f5 Merge branch 'develop' of github.com:outline/outline into feat/mass-import 2020-12-22 20:43:58 -08:00
Tom Moor ea57cef89c fix: Reduce double reporting of errors 2020-12-21 21:10:25 -08:00
Tom Moor 087ccdd825 stash 2020-12-21 21:03:11 -08:00
Translate-O-Tron 7d44e1aeeb New Crowdin updates (#1725)
* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New French translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Portuguese translations from Crowdin [ci skip]

* fix: New Russian translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Portuguese translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]
2020-12-21 19:28:41 -08:00
Tom Moor 25d5ad8a7e chore: Enable automatic generation of email server in non production environments (#1731) 2020-12-21 19:27:14 -08:00
dependabot[bot] e34ba1457e chore(deps): bump node-notifier from 8.0.0 to 8.0.1 (#1734)
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-21 19:26:12 -08:00
Tom Moor e966eb8c9a fix: Error notice not displayed to user when exceeding rate limit on signin attempt 2020-12-20 13:05:16 -08:00
Tom Moor 4684b3a3f3 fix: Server error when invalid JSON passed to API endpoint
Fix is to ensure that the errorHandling middleware is mounted before the body parser so that it can catch and return an error response
2020-12-20 12:08:47 -08:00
Tom Moor 47ce8afcc5 fix: Server Error when requesting invalid locale 2020-12-20 11:53:09 -08:00
Tom Moor decbe4f643 fix: Allow deleting attachments not linked to documents when owned by user
closes #1729
2020-12-20 11:39:09 -08:00
Tom Moor 938f6ba8c5 wip 2020-12-19 23:23:37 -08:00
Tom Moor 7f5a7d7df7 Merge branch 'develop' of github.com:outline/outline into feat/mass-import 2020-12-19 16:01:10 -08:00
Tom Moor 117d278d16 fix: Deprecated Buffer usage, closes #1726 2020-12-19 15:58:21 -08:00
Tom Moor 40ca73e684 feat: Collapsible sidebar (#1721)
* wip

* styling, add keyboard shortcut

* tweak styling
2020-12-17 22:26:04 -08:00
Tom Moor b98e4bb1ff stash 2020-12-17 21:19:31 -08:00
Tom Moor 5012104a10 refactor 2020-12-16 21:39:37 -08:00
Nan Yu 051ecab0fc feat: Moving documents via drag and drop in sidebar (#1717)
* wip: added some basic drag and drop UI for combining items

* refactor: pathToDocument to accept only id

* fix: Multiple drop backends error
fix: Incorrect styling dragging over active collection
fix: Stay in disabled state until save is complete

* Improving display while moving doc

* fix: update by user should be changed when moving a doc

* add move guard to drag

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-12-15 19:07:29 -08:00
Tom Moor 3469b82beb feat: Add Korean as available language choice 2020-12-15 08:11:50 -08:00
Tom Moor f2c3481670 test 2020-12-14 23:04:39 -08:00
Tom Moor bc141dc40c New Crowdin updates (#1718)
* fix: New French translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Portuguese translations from Crowdin [ci skip]

* fix: New Russian translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New French translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]

* fix: New French translations from Crowdin [ci skip]

* fix: New Spanish translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Japanese translations from Crowdin [ci skip]

* fix: New Portuguese translations from Crowdin [ci skip]

* fix: New Russian translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New Korean translations from Crowdin [ci skip]
2020-12-14 22:28:47 -08:00
Translate-O-Tron 99814f6e2f fix: New Korean translations from Crowdin [ci skip] 2020-12-14 22:19:57 -08:00
Translate-O-Tron 3737f0b42c fix: New Portuguese translations from Crowdin [ci skip] 2020-12-14 22:19:53 -08:00
Translate-O-Tron 9ef27cb436 fix: New German translations from Crowdin [ci skip] 2020-12-14 22:19:50 -08:00
Translate-O-Tron c9fa3f93f2 fix: New Spanish translations from Crowdin [ci skip] 2020-12-14 22:19:48 -08:00
Translate-O-Tron 24ed96c9a5 fix: New French translations from Crowdin [ci skip] 2020-12-14 22:19:46 -08:00
Translate-O-Tron 956cf401bd fix: New Korean translations from Crowdin [ci skip] 2020-12-14 21:17:46 -08:00
Translate-O-Tron 7cb837f478 fix: New Portuguese, Brazilian translations from Crowdin [ci skip] 2020-12-14 21:17:44 -08:00
Translate-O-Tron a3209e9d23 fix: New Chinese Simplified translations from Crowdin [ci skip] 2020-12-14 21:17:43 -08:00
Translate-O-Tron 29582a1bb1 fix: New Russian translations from Crowdin [ci skip] 2020-12-14 21:17:41 -08:00
Translate-O-Tron 4084c91769 fix: New Portuguese translations from Crowdin [ci skip] 2020-12-14 21:17:39 -08:00
Translate-O-Tron 6772f28226 fix: New Japanese translations from Crowdin [ci skip] 2020-12-14 21:17:37 -08:00
Translate-O-Tron c6b110d339 fix: New German translations from Crowdin [ci skip] 2020-12-14 21:17:35 -08:00
Translate-O-Tron 0a43b50c66 fix: New Spanish translations from Crowdin [ci skip] 2020-12-14 21:17:33 -08:00
Translate-O-Tron 4a82cb0658 fix: New French translations from Crowdin [ci skip] 2020-12-14 21:17:31 -08:00
Tom Moor 2f7fca6106 chore: Move formatting out of translation strings 2020-12-14 21:16:02 -08:00
Translate-O-Tron 8f83cfef25 fix: New Korean translations from Crowdin [ci skip] 2020-12-14 20:39:04 -08:00
Tom Moor e2e66954b5 fix: Attachments should not always be deleted with their original document (#1715)
* fix: Attachments should not be deleted when their original document is deleted when referenced elsewhere

* fix: Attachments deleted prematurely when docs are placed in trash

* mock

* restore hook, cascading delete was the issue
2020-12-14 19:55:22 -08:00
Tom Moor 3dbe54ac1e fix: Bump RME, closes #1719 2020-12-14 19:18:46 -08:00
Translate-O-Tron 50577f6f2f fix: New Korean translations from Crowdin [ci skip] 2020-12-14 09:40:18 -08:00
Translate-O-Tron 16d504703d fix: New Korean translations from Crowdin [ci skip] 2020-12-14 08:42:26 -08:00
Translate-O-Tron 173febcaa1 fix: New Korean translations from Crowdin [ci skip] 2020-12-14 07:40:07 -08:00
Translate-O-Tron f92f4cde7a fix: New Korean translations from Crowdin [ci skip] 2020-12-14 06:45:01 -08:00
Translate-O-Tron 23bec75bd0 fix: New Korean translations from Crowdin [ci skip] 2020-12-14 05:49:49 -08:00
Translate-O-Tron 4dd667f68b fix: New Korean translations from Crowdin [ci skip] 2020-12-14 04:47:25 -08:00
Translate-O-Tron 4b3cb77cc7 fix: New Korean translations from Crowdin [ci skip] 2020-12-14 03:48:01 -08:00
Translate-O-Tron 0e83d54f93 fix: New German translations from Crowdin [ci skip] 2020-12-13 23:30:53 -08:00
Translate-O-Tron d867d9fea5 fix: New Spanish translations from Crowdin [ci skip] 2020-12-13 23:30:51 -08:00
Translate-O-Tron 28c8b8acfe fix: New French translations from Crowdin [ci skip] 2020-12-13 23:30:49 -08:00
Translate-O-Tron 51efffe2ce fix: New Korean translations from Crowdin [ci skip] 2020-12-13 22:34:18 -08:00
Tom Moor 4e9ee7249f Update LICENSE 2020-12-13 17:48:15 -08:00
Tom Moor 574fcc4bb3 0.51.0 2020-12-13 17:43:58 -08:00
Tom Moor 5c3000d5cf Bump RME, fixes table after list and image captions in Safari 2020-12-13 17:20:38 -08:00
Translate-O-Tron c0216cbb8d fix: New Portuguese, Brazilian translations from Crowdin [ci skip] 2020-12-12 22:40:33 -08:00
Translate-O-Tron cf12301077 fix: New Chinese Simplified translations from Crowdin [ci skip] 2020-12-12 22:40:31 -08:00
Translate-O-Tron 1eb7da8742 fix: New Russian translations from Crowdin [ci skip] 2020-12-12 22:40:29 -08:00
Translate-O-Tron b3c548382f fix: New Portuguese translations from Crowdin [ci skip] 2020-12-12 22:40:27 -08:00
Translate-O-Tron 7ebac53b43 fix: New Japanese translations from Crowdin [ci skip] 2020-12-12 22:40:25 -08:00
Translate-O-Tron 64428a6894 fix: New German translations from Crowdin [ci skip] 2020-12-12 22:40:23 -08:00
Translate-O-Tron d536af5269 fix: New Spanish translations from Crowdin [ci skip] 2020-12-12 22:40:22 -08:00
Translate-O-Tron 1726a88a60 fix: New French translations from Crowdin [ci skip] 2020-12-12 22:40:20 -08:00
Tom Moor 3fe807a10a fix: Object printed in UI 2020-12-12 22:29:20 -08:00
Tom Moor 72189e041b feat: attachments.delete (#1714)
* feat: Add endpoint for manually deleting attachments

* mock
2020-12-10 21:40:03 -08:00
Translate-O-Tron bc156f4cc8 New Crowdin updates (#1707)
* fix: New German translations from Crowdin [ci skip]

* fix: New German translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Chinese Simplified translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]

* fix: New French translations from Crowdin [ci skip]

* fix: New Portuguese, Brazilian translations from Crowdin [ci skip]
2020-12-10 19:03:01 -08:00
dependabot[bot] 26693c60df chore(deps): bump ini from 1.3.5 to 1.3.7 (#1713)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-10 18:43:50 -08:00
Nan Yu 9e1f31e14c fix: dropzone error on image upload component (#1711) 2020-12-08 19:32:41 -08:00
Nan Yu 63d926e196 slightly nicer color definitions (#1705) 2020-12-07 08:56:07 -08:00
Reid Beels 3f9f1f0bed docs: Add note to .env.sample about Google OAuth URI (#1706) 2020-12-07 08:55:37 -08:00
Tom Moor b2bdc7f1d4 chore: Add user and auth context to server side error reports (#1693) 2020-12-06 17:59:44 -08:00
Translate-O-Tron 2e798c698d chore: New Crowdin updates (#1691) 2020-12-06 17:54:16 -08:00
Nan Yu aa59f5fe09 chore: React-Dropzone version bump (#1699)
* update dropzone to new version

* remove global styles import

* change bg on active item on drag as well

* add back background
2020-12-06 17:50:59 -08:00
Tom Moor ac2060b166 fix: Migrate attachment columns to incease available length (#1704)
closes #1703
2020-12-06 16:51:25 -08:00
Tom Moor 424c29536d chore: Bump RME (SQL language support) 2020-12-04 10:18:30 -08:00
Tom Moor 6c1ecde4e7 fix: Server error when attempting to update team with identical details to previous 2020-12-04 10:18:30 -08:00
Tom Moor aa6fc45097 Add localization status to README 2020-12-04 08:22:43 -08:00
Tom Moor 9478944718 fix: Account for non-recorded views, closes #1700 2020-12-02 20:50:54 -08:00
Tom Moor 9e1c5d1db3 fix: JS error in UserProfile introduced in refactoring to functional component 2020-12-02 20:48:24 -08:00
Nan Yu 474fbf07e6 chore: Flatten left nav in preparation to refactor drag to reorder (#1689)
* flatten hierarchy
* fix drop to import positioning on collections
2020-12-01 21:59:18 -08:00
Tom Moor fe62048890 fix: One source of transaction deadlock when invites > pg pool (#1696)
* fix: One source of transaction deadlock when invites > pg pool

* lint
2020-12-01 19:20:20 -08:00
Tom Moor 1851477290 fix: Disabling public sharing should disable all existing share links
Issue came through customer support
2020-11-30 23:39:23 -08:00
Tom Moor bde6f4b3c4 fix: Don't make request to record view for deleted document 2020-11-30 23:17:39 -08:00
Saumya Pandey 283b479689 chore: Change response of shares.info response for unshared document (#1666)
* Update server/api/share.js to send 204 status for unshared documents.

* Update shares.info endpoint to expect 204 in a few test.

* Update SharesStore and ApiClient to handle 204 status code
2020-11-30 22:49:15 -08:00
Tom Moor 183f06c2d1 fix: Policies not added to store from all fetch requests
closes #1688
2020-11-30 22:38:11 -08:00
Tom Moor 21fff8d172 fix: ui store spread onto DropToImport 2020-11-30 21:46:55 -08:00
Tom Moor 18e56aff65 fix: Editable title in sidebar impossible to see in dark mode 2020-11-30 21:45:48 -08:00
Tom Moor a97523a652 chore: Upgrade pg (performance improvements) 2020-11-30 21:31:13 -08:00
Tom Moor 2316512a19 Update crowdin.yml 2020-11-30 19:09:41 -08:00
Tom Moor 1285efc49a feat: I18n (#1653)
* feat: i18n

* Changing language single source of truth from TEAM to USER

* Changes according to @tommoor comments on PR

* Changed package.json for build:i18n and translation label

* Finished 1st MVP of i18n for outline

* new translation labels & Portuguese from Portugal translation

* Fixes from PR request

* Described language dropdown as an experimental feature

* Set keySeparator to false in order to cowork with html keys

* Added useTranslation to Breadcrumb

* Repositioned <strong> element

* Removed extra space from TemplatesMenu

* Fortified the test suite for i18n

* Fixed trans component problematic

* Check if selected language is available

* Update yarn.lock

* Removed unused Trans

* Removing debug variable from i18n init

* Removed debug variable

* test: update snapshots

* flow: Remove decorator usage to get proper flow typing
It's a shame, but hopefully we'll move to Typescript in the next 6 months and we can forget this whole Flow mistake ever happened

* translate: Drafts

* More translatable strings

* Mo translation strings

* translation: Search

* async translations loading

* cache translations in client

* Revert "cache translations in client"

This reverts commit 08fb61ce36.

* Revert localStorage cache for cache headers

* Update Crowdin configuration file

* Moved translation files to locales folder and fixed english text

* Added CONTRIBUTING File for CrowdIn

* chore: Move translations again to please CrowdIn

* fix: loading paths
chore: Add strings for editor

* fix: Improve validation on documents.import endpoint

* test: mock bull

* fix: Unknown mimetype should fallback to Markdown parsing if markdown extension (#1678)

* closes #1675

* Update CONTRIBUTING

* chore: Add link to translation portal from app UI

* refactor: Centralize language config

* fix: Ensure creation of i18n directory in build

* feat: Add language prompt

* chore: Improve contributing guidelines, add link from README

* chore: Normalize tab header casing

* chore: More string externalization

* fix: Language prompt in dark mode

Co-authored-by: André Glatzl <andreglatzl@gmail.com>
2020-11-29 20:04:58 -08:00
Tom Moor 63c73c9a51 Create auto_assign.yml 2020-11-27 09:51:52 -08:00
Tom Moor 1b7fe0f7da flow 2020-11-27 09:48:10 -08:00
Tom Moor 6eda1cc0d3 fix: Unknown mimetype should fallback to Markdown parsing if markdown extension (#1678)
closes #1675
2020-11-26 21:16:56 -08:00
Tom Moor ac349b40f5 test: mock bull 2020-11-26 21:11:35 -08:00
Tom Moor 8bddc1b338 fix: Improve validation on documents.import endpoint 2020-11-26 20:29:45 -08:00
Tom Moor 56d5f048f9 fix: Group membership count off after suspending users in groups (#1670)
* fix: Clear group memberships when suspending a user
Refactor to command

* test

* test
2020-11-22 11:21:47 -08:00
Tom Moor 273d9c4680 fix: Correctly map CMD+Shift+P to publish in title
fixes #1655
2020-11-21 22:20:59 -08:00
Tom Moor 44ca447185 fix: Scrollbar styling
closes #1665
2020-11-21 16:16:38 -08:00
Tom Moor 6b511e4251 Bump rich-markdown-editor, 2 minor fixes 2020-11-21 15:34:03 -08:00
Saumya Pandey de6ee91d96 fix: Prevent API request for views data for deleted documents (#1663)
* Prevent API request for views data for deleted documents

Added a conditional statement to check if the document.deletedAt is falsy before making a request to views.list.

* Update app/components/Collaborators.js to use isDeleted attribute.

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-11-18 19:09:08 -08:00
Tom Moor 18fac781a9 Update LICENSE 2020-11-14 23:10:16 -08:00
Tom Moor 1ce01fa936 0.50.0 2020-11-14 23:07:41 -08:00
Tom Moor 12a2e1c387 chore: Menu templates (#1644)
* chore: Menu template system

* NewTemplateMenu

* UserMenu

* MenuItemsTemplate -> DropdownMenuItems

* support nested menus

* DocumentMenu

* BreadcrumbMenu

* isInvited
2020-11-14 20:44:31 -08:00
Tom Moor 19ab32f551 chore: Add additional missing events (#1639)
* chore: Add additional missing events
signed in
profile updated
team setting updated

* Minor refactor to DRY existing code

* Add events

* lint

* flow: Add missing ip to event types
2020-11-14 20:44:18 -08:00
Tom Moor 7bdcba46b8 fix: Virtualize move document listbox (#1650)
* fix: Virtualize move document listbox
closes #1645
2020-11-12 22:02:56 -08:00
Tom Moor 32d3053002 fix: Heading anchor position changed _again_ 2020-11-12 22:02:19 -08:00
Tom Moor 85dd54db3d fix: Consistent spacing when first item in document is a header 2020-11-12 21:51:20 -08:00
Tom Moor 5d0dd9b734 chore: Bump RME (various editor fixes) 2020-11-12 21:47:44 -08:00
Tom Moor 735d5cbf26 fix: Ignore safely ignored loop error
closes #1646
2020-11-11 17:05:05 -08:00
Tom Moor a94012a03a chore: Drop and create test database automatically between runs
docs: Update README to specify using make to run tests
2020-11-11 16:58:45 -08:00
Tom Moor 80d74c9334 fix: Clicking the share link from a context menu propagates the click onto the container (#1643)
closes #1642
2020-11-11 09:02:02 -08:00
Tom Moor 26e6db1afd fix: Update document policy to disable sharing for read-only users (#1638)
* fix: Update document policy to disable sharing for read-only users

* test: Update test for new permission logic
2020-11-10 20:35:41 -08:00
Tom Moor 5e7bbdc111 feat: Sync sessions across browser tabs (#1641)
* feat: Sync sessions across browser tabs

If the user signs in or out in one tab, then make sure their session on the same subdomain is kept in sync on other tabs
2020-11-10 19:43:14 -08:00
Tom Moor 71e9860f88 flow: Correctly type Theme 2020-11-09 00:01:50 -08:00
Tom Moor 26f4901547 fix: 'Not found' page should obey theme
closes #1626
2020-11-08 23:52:00 -08:00
Tom Moor 4c56ed40f1 feat: Hide Outline branding on custom domain share links
closes #1629
2020-11-08 23:01:57 -08:00
Tom Moor 4e7a1cd121 feat: add filters to drafts (#1631)
* feat: add filters to drafts

Co-authored-by: Guilherme Diniz <guilhermedassumpcao@gmail.com>
2020-11-08 22:33:52 -08:00
Tom Moor 14e0ed8108 fix: Various React warnings 2020-11-08 20:28:27 -08:00
Tom Moor 0372ff2727 fix: Unneccessary scrollbar 2020-11-08 20:04:46 -08:00
Tom Moor 02e7e75cb9 fix: Remove non-standardized css (console warning) 2020-11-08 20:01:47 -08:00
Tom Moor af73de4128 feat: Show table of contents when useful on publicly shared docs
closes #1625
2020-11-08 19:50:00 -08:00
Tom Moor 0125a5361d fix: Document published notification potentially sent to users without permission to view document 2020-11-05 19:49:05 -08:00
Nonpawit Teerachetmongkol fdaa36c9fd fix: gist not support username contains numbers (#1622) 2020-11-05 09:03:16 -08:00
Tom Moor 1b6a986986 chore: Refactor authentication pass between subdomains (#1619)
* fix: Use get request instead of cookie to transfer token between domains

* Add domain to database
Add redirects to team domain when present

* 30s -> 1m

* fix: Avoid redirect loop if subdomain and domain set

* fix: Create a transfer specific token to prevent replay requests

* refactor: Move isCustomDomain out of shared as it won't work on the client
2020-11-04 19:54:04 -08:00
Tom Moor 3d09c8f655 chore: Refactor backlinks and revisions (#1611)
* Update backlinks service to not rely on revisions

* fix: Add missing index for finding backlinks

* Debounce revision creation (#1616)

* refactor debounce logic to service

* Debounce slack notification

* Revisions created by service

* fix: Revision sidebar latest

* test: Add tests for notifications
2020-11-01 10:26:39 -08:00
Tom Moor 7735aa12d7 GSuite -> Google Workspace 2020-10-27 22:14:51 -07:00
Tom Moor 7ac724909d fix: Cannot duplicate document with title close to max title length
closes #1610
2020-10-27 19:15:35 -07:00
Tom Moor abd3a1ee12 Update LICENSE 2020-10-26 23:26:43 -07:00
Tom Moor 9bfc0cacae 0.49.0 2020-10-26 23:25:50 -07:00
Tom Moor bd80e8384a chore: Remove events log from settings 2020-10-26 19:32:48 -07:00
Tom Moor bfdfa3ee4b feat: Debounce notification emails by 5 minutes to avoid duplicate notifications where possible (#1598) 2020-10-25 15:06:07 -07:00
Tom Moor dba5dd14e7 fix: Put public and private uploads in separate folders to allow for restrictive AWS policies
closes #1581
2020-10-21 21:00:40 -07:00
Tom Moor a9c05adc3c fix: Account for multiple images on the same line of text when converting images for public share
closes #1602
2020-10-21 20:22:23 -07:00
Tom Moor 34bdc88003 fix: Offset heading styles 2020-10-21 09:04:21 -07:00
Tom Moor df7b9f3e88 feat: Add support for "word" files exported from Confluence (#1600)
* Display error message to end user

* fix: Improve conversion of tables

* fix: Characters at ends of lines in tables lost
2020-10-21 08:53:59 -07:00
Tom Moor b78e2f1e05 fix: Match search requests from Slack using Integration for non-Slack teams (#1599)
* Match slack hook requests to integration
2020-10-21 08:53:38 -07:00
Tom Moor 15337b5bdf fix: Improve error handling when redis connection is lost 2020-10-20 07:41:17 -07:00
Tom Moor 4103f53f2a fix: Offset headers when scrolling from TOC to account for fixed header
closes #1578
2020-10-19 23:07:37 -07:00
Tom Moor 758fcc1759 feat: Show unique views rather than total views in document meta. (#1559)
* unique-views

* fix: 'only you' displays briefly when visiting a document previously only viewed by one other
2020-10-19 22:44:28 -07:00
Debajyoti Halder b3549637fe fix: Dark mode inline code styling fixed #1593 (#1597)
background changed to props.theme.codeBackground
2020-10-19 22:14:14 -07:00
Tom Moor 7bee60a337 fix: Clicking link with blank href should not open new tab 2020-10-19 08:00:52 -07:00
Tom Moor 38a005ed8a lint 2020-10-19 07:48:51 -07:00
Tom Moor 71b7ef1186 fix: Websockets cannot connect in Safari 2020-10-19 07:43:03 -07:00
Tom Moor 3af1a80615 fix: Incorrect cursor on headings 2020-10-19 07:40:12 -07:00
Tom Moor 4044818daa fix: Archived documents should not be returned from documents.list
closes #1575
2020-10-13 20:38:28 -07:00
Tom Moor 428171a1ec closes #1587 – remove global queue events when completed 2020-10-13 20:30:37 -07:00
Tom Moor 9c3195ef25 chore(deps): Bump RME
Fixes unable to upload the same image multiple times
2020-10-13 20:13:51 -07:00
Yohann Leon a6dc708fc0 fix: spotify widget wrong size (#1579) 2020-10-09 19:02:09 -07:00
Tom Moor 9c8f125668 chore: No need to build:server on CI 2020-09-30 20:29:54 -07:00
Tom Moor f348db048e chore: Specify babelrc for server specifically (#1585) 2020-09-30 20:02:33 -07:00
Tom Moor 0b8eb326ab chore(deps): Bump RME
closes #1566
2020-09-30 19:40:00 -07:00
Tom Moor 1da1f3d6e8 chore: Update Zapier integration (no longer invite-only)
fix: Remove link to Zapier integration from self-hosted as it doesnt make sense
2020-09-28 21:08:58 -07:00
Tom Moor 7def0dfab1 chore(deps): Upgrade socket.io-redis dependency for fix related to recent downtime
https://github.com/socketio/socket.io-redis/issues/210
2020-09-28 18:51:49 -07:00
Tom Moor 96987d2091 0.48.1 2020-09-27 10:32:15 -07:00
Tom Moor 6bb32c253b fix: Unable to run migrations in latest image. Added option to run non-SSL migration in production 2020-09-27 10:32:08 -07:00
Tom Moor 1d5f735032 Update LICENSE 2020-09-26 17:19:03 -07:00
Tom Moor f3e3651222 0.48.0 2020-09-26 17:18:34 -07:00
Tom Moor b3d9478486 Merge pull request #1563 from outline/release-0.48.0
release: v48.0.0
2020-09-26 17:09:40 -07:00
Tom Moor f26aeca46a chore(migrations): Add missing indexes 2020-09-26 14:01:04 -07:00
Tom Moor f1a95e5e79 feat: Improved search results when finding links in document editor (#1573)
* feat: Improved search results when finding links in document editor

* chore(deps): Bump RME for smoother link search
2020-09-26 11:07:49 -07:00
Tom Moor 6f1f855083 feat: Add tracking of search source in UI 2020-09-24 21:56:37 -07:00
Tom Moor 40d52e9a78 fix: Cannot press down arrow to navigate via keyboard to search results
(due to withRouter converting DocumentPreview to a functional component)
2020-09-24 21:36:31 -07:00
Tom Moor a2f2971fec fix: Reduce liklihood of false search queries
fix: Reduce possibility of dupe search queries
feat: Allow 'Enter' to trigger search before debounce
2020-09-24 21:29:00 -07:00
Tom Moor d89808ce9d fix: Home link on 'Not Found' page 2020-09-24 19:38:19 -07:00
Tom Moor a43cc9c5a9 chore(deps): Upgrade RME for improved doc search results 2020-09-24 19:35:28 -07:00
Tom Moor bb7fcd1b67 feat: Allow embedding /share/ routes in iframes 2020-09-23 19:26:18 -07:00
Tom Moor c1957025ec fix: Dont dupe record search queries when paging results
feat: Record queries via api tokens separately
2020-09-21 23:31:10 -07:00
Renan Filipe 98626ebbaf feat: Record search queries (#1554)
* Record search queries

* feat: add totalCount to the search response

* feat: add comments to explain why we use setTimeout
2020-09-21 23:05:42 -07:00
Tom Moor 0fa8a6ed2e feat: Add ctx.state.authType for tracking (#1567) 2020-09-21 22:02:37 -07:00
Tom Moor fa96891c8e fix(editor): Upgrade RME, improved link pasting 2020-09-21 20:33:58 -07:00
Tom Moor 9aa81dcf82 fix: Error deleting account as only admin not displayed to user 2020-09-21 20:31:06 -07:00
Tom Moor c04d5bdfb0 flow 2020-09-21 19:47:17 -07:00
Tom Moor ea69d09562 fix: Guard usage of localStorage 2020-09-21 19:43:51 -07:00
Tom Moor c8ff5cf221 fix: Styling of 'New' badge in dark mode
fix: less than a min ago -> just now
2020-09-21 19:35:51 -07:00
Tom Moor 5638f7a687 Merge develop 2020-09-21 19:18:34 -07:00
Tom Moor 1293f52552 lint 2020-09-21 19:18:09 -07:00
Tom Moor 86812cfe76 fix(editor): Upgrade RME, fixes cursor navigation around headings in FF 2020-09-21 19:11:54 -07:00
Tom Moor d9b7384853 fix: Improve handling of invalid file type passed to documents.import API endpoint 2020-09-21 00:34:13 -07:00
Tom Moor 292afd774d fix: CMD+Enter in title should leave editing mode 2020-09-21 00:21:35 -07:00
Tom Moor d3d286b1be tweak search highlight 2020-09-21 00:07:32 -07:00
Tom Moor 26b9566b96 fix: Various fixes for unread tracking 2020-09-20 23:37:09 -07:00
Guilherme DIniz d487da8f15 feat: Visually differentiate unread documents (#1507)
* feat: Visually differentiate unread documents

* feat: add document treatment in document preview

* fix requested changes

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-09-20 22:32:28 -07:00
Tom Moor 4ffc04bc5d fix: Allow selection of embeds (#1562)
* feat: Support importing .docx or .html files as new documents (#1551)

* Support importing .docx as new documents

* Add html file support, build types and interface for easily adding file types to importer

* fix: Upload embedded images in docx to storage

* refactor: Bulk of logic to command

* refactor: Do all importing on server, so we're not splitting logic for import into two places

* test: Add documentImporter tests


Co-authored-by: Lance Whatley <whatl3y@gmail.com>

* fix: Accessibility audit

* fix: Quick fix, non editable title
closes #1560

* fix: Embed selection

Co-authored-by: Lance Whatley <whatl3y@gmail.com>
2020-09-20 22:27:11 -07:00
Tom Moor 68148bd4d8 fix: Quick fix, non editable title
closes #1560
2020-09-18 08:36:57 -07:00
Tom Moor 881105992e fix: Accessibility audit 2020-09-16 22:31:14 -07:00
Tom Moor 2c1a111dee feat: Support importing .docx or .html files as new documents (#1551)
* Support importing .docx as new documents

* Add html file support, build types and interface for easily adding file types to importer

* fix: Upload embedded images in docx to storage

* refactor: Bulk of logic to command

* refactor: Do all importing on server, so we're not splitting logic for import into two places

* test: Add documentImporter tests


Co-authored-by: Lance Whatley <whatl3y@gmail.com>
2020-09-16 21:54:33 -07:00
Tom Moor e67d319e2b fix: Update DocumentMetaWithViews to hooks, correctly observe store changes
closes #1555
2020-09-16 21:15:21 -07:00
Tom Moor 85f7e03921 test: No hotreload in test env 2020-09-16 08:22:50 -07:00
Tom Moor e30adbaac2 fix: Flip production/development NODE_ENV logic
closes #1548
2020-09-16 00:13:12 -07:00
Tom Moor ac8f0ebaac feat: Allow Google Embeds from regular (non publish-to-web) links (#1533)
Improve styling to allow getting back to source document
2020-09-15 18:38:42 -07:00
Tom Moor b3b71d2dc7 feat: Editable titles in sidebar (#1544)
* feat/editable-titles

* feat: Double click to edit titles in the sidebar

* Take into account policies

* fix: Title update on another client

* Improved styling
2020-09-15 18:01:40 -07:00
Tom Moor ab3613af48 fix: Path to onboarding markdown files (changed with updated build process) 2020-09-15 12:20:27 -07:00
Tom Moor 3940f1a108 Update README.md 2020-09-14 19:29:55 -07:00
Tom Moor 142e7da6a5 fix: Placeholder style 2020-09-13 20:26:38 -07:00
Tom Moor 021de66f7a fix: Document titles look faded in Safari 2020-09-13 20:18:50 -07:00
Nan Yu 55858d5d7d fix: put guard around sentry init (#1547) 2020-09-13 19:54:08 -07:00
Tom Moor 93d3582ac7 fix: Dead pointer zone over links when hover card is showing 2020-09-13 19:49:25 -07:00
Tom Moor 0b2107c1ee Merge develop 2020-09-13 10:50:13 -07:00
Tom Moor f8a167fd4b Merge branch 'develop' of github.com:outline/outline into develop 2020-09-13 10:47:31 -07:00
Tom Moor 608be3deef refactor: Remove babel/register for instant production server startup (#1481)
* refactor: Remove babel/register for instant production server startup

* fix: Update procfile location

* fix: package.json must be copied, not linked for production build

* fix: Production file paths

* fix: Public assets path

* Remove unused scripts
2020-09-13 10:46:33 -07:00
Tom Moor 56551d1ab3 fix: Error in backlinks service when updating an old document (pre v1) 2020-09-13 01:03:39 -07:00
Tom Moor 450d6b7e42 fix: Focus accessibility (#1536)
* fix: Focus ring appearing on click
fix: Focus ring not appearing on sidebar links
add: focus-visible polyfill

* fix: More visible outlines on keyboard focus
fix: Header block should be a button semantically
2020-09-12 23:27:23 -07:00
Matheus Rocha Vieira fc98cf78e6 chore: Upgrade Sentry to Latest Version (#1541)
* Upgrade Sentry to Latest Version
2020-09-12 23:24:32 -07:00
Nan Yu d9aa53a094 feat: allow searching for urls of internal documents (#1529)
* core search logic

* bump version of rich markdown editor

* let shift and meta modifiers do their thing when clicking on a link in a doc

* version bump editor

* test: Add parseDocumentSlug test

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-09-12 23:23:40 -07:00
Nan Yu ffab4fbf76 remove -1 bottom from navigation links 2020-09-12 11:24:58 -07:00
Tom Moor 2161fba1dd Update LICENSE 2020-09-11 12:28:10 -07:00
Tom Moor cd2cdd025c 0.47.1 2020-09-11 12:26:13 -07:00
Tom Moor d5f5319f80 fix: History sidebar header shrinking when lots of history 2020-09-11 12:10:40 -07:00
Tom Moor c298c73240 fix: Revision skipped after identical previous autosave 2020-09-11 12:06:57 -07:00
Tom Moor 38d1831259 fix: Send events for draft documents down user channel always 2020-09-11 11:19:30 -07:00
Tom Moor 9c9b95741c fix: Unable to edit collection description
closes #1523
2020-09-09 23:23:01 -07:00
Tom Moor cc8db7e991 fix: Save team logo automatically
closes #1521
2020-09-08 21:12:37 -07:00
Tom Moor c5b7d9be13 fix: Flash of sidebar when navigating between documents 2020-09-08 20:48:52 -07:00
Tom Moor be2e46b5d2 References -> Referenced by
Less ambiguous as to the backlink direction
2020-09-08 18:44:19 -07:00
Tom Moor 4b2a766357 fix: Missing toast message when successfully copying code 2020-09-08 07:31:03 -07:00
Tom Moor f264d67862 fix: Two API endpoints where requesting a permenantly deleted document results in server error 2020-09-08 07:29:06 -07:00
Tom Moor b1648ac2aa Update LICENSE 2020-09-07 20:25:16 -07:00
Tom Moor 25423d8c85 0.47.0 2020-09-07 20:24:40 -07:00
Nan Yu e7ab2939d4 fix: Improved handling of delete events from collection and document sockets (#1517)
* handle delete events fron collection and document sockets

* handle collection deletes to documents

* rework semantics to always reload after a delete

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-09-07 19:05:10 -07:00
Tom Moor ceeac9b982 fix: Deeply nested document titles not updated in collection documentStructure cache
closes #1508
2020-09-07 13:41:17 -07:00
Tom Moor 5de2f969e3 fix: Preload membership 2020-09-07 12:17:04 -07:00
Tom Moor b54901d50c fix: CMD+Eneter in title should still publish 2020-09-07 12:06:03 -07:00
Tom Moor 4de3f69474 fix: Documents in deleted collection should appear in trash (#1362)
* fix: Documents from deleted collection should show in trash

* improve messaging

* test: Add documents.move tests
feat: Add ability to restore trashed documents from deleted collection

* update store

* fix

* ui

* lint

* fix: Improve breadcrumb
2020-09-07 11:51:09 -07:00
Tom Moor c5de2da115 Merge branch 'develop' of github.com:outline/outline into develop 2020-09-07 10:43:36 -07:00
Tom Moor 709c3e78bd fix: Occasional render loop in editor toolbar (#1518)
* fix: CMD+S should save when editor title is focused

* fix: Bump RME, fixes various small editor issues
2020-09-07 10:42:51 -07:00
Tom Moor acb04fdf1a fix: CMD+S should save when editor title is focused 2020-09-06 10:33:39 -07:00
Tom Moor f13696dd2a Update yarn.lock 2020-09-05 19:58:17 -07:00
Tom Moor d6f245d67e Bump RME: Fixes inline styles in table cells with newlines 2020-09-05 19:51:12 -07:00
Tom Moor f2abf38fe4 perf: Remove source once compiled 2020-09-05 12:57:27 -07:00
Tom Moor f0712e22d8 perf: Improving dockerfile 2020-09-05 12:44:40 -07:00
Tom Moor e7e289d9fa end 2020-09-04 23:28:29 -07:00
Tom Moor 713187cfb4 fix 2020-09-04 15:39:36 -07:00
Tom Moor 11d3a5c9b9 fix: Enter in document title should create a newline at the top of editor and focus
closes #1511
2020-09-04 13:23:33 -07:00
Matheus Rocha Vieira cf1e506009 feat: Add ClickUp Embed Service (#1465)
* Add Clickup Embed Service

* Transparency Icon


Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-09-04 13:21:27 -07:00
Tom Moor 6b6d67beb6 fix: Allow disabling SSL for Postgres connection with standard PGSSLMODE env
closes #1501
2020-09-04 12:51:48 -07:00
Tom Moor a98e8ad8df fix: Breadcrumb overflow color is inaccessible
closes #1505
2020-09-04 12:49:20 -07:00
Tom Moor 9049785d98 fix: e shortcut to edit doesn't work when title is selected
closes #1510
2020-09-04 12:42:41 -07:00
Tom Moor e8648d4611 fix: Error in shares.info endpoint when requesting share record for deleted document 2020-09-03 23:22:41 -07:00
Tom Moor dd7436f78c fix: async error in backlinks service when dealing with a deleted document 2020-09-03 22:44:42 -07:00
Tom Moor b93a397ab3 feat: Bump RME 2020-09-03 22:27:30 -07:00
Tom Moor 206160582e chore: Tweak ordering of unpublish menu item 2020-09-02 20:19:36 -07:00
Tom Moor 4bf5926ee3 Bump RME 2020-08-31 21:57:26 -07:00
Tom Moor 82433e02a0 feat: Add custom error state for chunk loading failed 2020-08-31 21:09:23 -07:00
Tom Moor 637a9b5cf9 refactor: Remove unused event handlers 2020-08-31 20:44:19 -07:00
Tom Moor 95b91c466a fix: Disallow creating nested document within document in trash 2020-08-31 20:32:08 -07:00
Tom Moor 4edf90a184 fix: Development warning, missing key on event list items 2020-08-31 20:29:55 -07:00
Tom Moor 31522b0d6f fix: Local shares state not cleared when document is deleted 2020-08-31 20:28:41 -07:00
Tom Moor 759d4a5ac2 fix: Handle error revoking share link on frontend 2020-08-31 20:24:05 -07:00
Tom Moor dd0d51dd9d test 2020-08-31 20:23:51 -07:00
Tom Moor 8550116c6b fix: shares.list should not return shares for deleted documents
fix: shares.info should not return info for revoked shares
closes #1492
2020-08-31 20:15:10 -07:00
Tom Moor 3c7dc93982 Merge branch 'develop' of github.com:outline/outline into develop 2020-08-31 20:06:44 -07:00
Guilherme DIniz 0aa338cccc feat: Allow unpublishing documents (#1467)
* Allow unpublishing documents

* add block unpublish files that has children

* add api tests to new route
2020-08-31 20:03:05 -07:00
Tom Moor 8f41895e66 Merge develop 2020-08-31 19:40:41 -07:00
Tom Moor de8ac4acf5 fix: Configure mobx-react-lite observer batching
Removes development warning
2020-08-31 18:42:12 -07:00
Tom Moor de59147418 chore: Upgrade Sentry to 5.22.3
closes #1498
2020-08-31 18:36:30 -07:00
Tom Moor cf522cc85f fix: Regression with TOC not showing when navigating directly to document (#1500)
fix: Editing document too wide when TOC visible in read only
2020-08-31 18:31:13 -07:00
Tom Moor 8c7200fa87 chore: yarn deduplicate 2020-08-30 19:44:30 -07:00
Tom Moor f2310be173 Updated Yarn lockfile 2020-08-29 12:11:12 -07:00
Tom Moor 29f4dc9331 Bump RME
Fixes #1107 - It's now possible to use line breaks in table cells with Shift+Enter
Fixes #1253 - Selected content can now be dragged to reorder
2020-08-29 12:00:55 -07:00
Tom Moor 03b6dd62a8 fix: Missing click action to change permissions on a collection
fix: Modals no longer stacking correctly since upgrading react-portal
2020-08-25 21:00:50 -07:00
Tom Moor 7f0c608dbb Merge branch 'guilherme-diniz-feature/document-history-header' into develop 2020-08-25 20:04:02 -07:00
Tom Moor c52fbb944e Styling tidy up 2020-08-25 20:03:52 -07:00
Tom Moor e22e952606 Merge branch 'feature/document-history-header' of git://github.com/guilherme-diniz/outline into guilherme-diniz-feature/document-history-header 2020-08-25 19:44:56 -07:00
Guilherme Diniz 197cdff6c3 fix layout issues 2020-08-25 17:22:13 -03:00
Tom Moor 85d09b2351 fix: Deleting a document should correctly show who deleted (#1488) 2020-08-25 08:51:12 -07:00
Tom Moor 69611638b9 fix: Redirect to parent document when deleting a child document if possible (#1489) 2020-08-25 08:45:04 -07:00
Tom Moor e117d5f103 fix: Unable to view all possible locations when moving document (#1490)
* fix: Remove limit of displayed results on Move dialog

* fix: Filter templates from results

* Show final document location on hover/active, reduces visual noise
2020-08-25 08:44:46 -07:00
Tom Moor 03db975217 Merge branch 'feature/document-history-header' of git://github.com/guilherme-diniz/outline into guilherme-diniz-feature/document-history-header 2020-08-24 23:46:16 -07:00
Tom Moor 76279902f9 chore: Introduce AWS_S3_FORCE_PATH_STYLE option to maintain compatability with Minio et al (#1443)
- Make AWS_S3_UPLOAD_BUCKET_NAME optional
2020-08-24 23:27:10 -07:00
Tom Moor a304e91ffc Merge branch 'develop' into perf/issue-1464 2020-08-24 20:58:56 -07:00
Tom Moor 9b5573c5e2 0.46.1 2020-08-24 20:22:08 -07:00
Tom Moor ec61efa12b Remove unused scripts 2020-08-23 21:10:32 -07:00
Tom Moor b01778a39f fix: Public assets path 2020-08-23 20:44:44 -07:00
Tom Moor 5aa092853b fix: Production file paths 2020-08-23 20:35:59 -07:00
Tom Moor 1fa3db4bdc fix: package.json must be copied, not linked for production build 2020-08-23 20:29:17 -07:00
Tom Moor 6a9f74e6cc fix: Update procfile location 2020-08-23 19:21:43 -07:00
Tom Moor e8719340d1 refactor: Remove babel/register for instant production server startup 2020-08-23 19:10:16 -07:00
Tom Moor 70838918c3 fix: Collections not collapsing 2020-08-23 12:51:35 -07:00
Tom Moor ec38f5d79c refactor: Remove old react lifecycle methods (#1480)
* refactor: Remove deprecated APIs

* bump mobx-react for hooks support

* inject -> useStores
https://mobx-react.js.org/recipes-migration\#hooks-to-the-rescue

* chore: React rules of hooks lint
2020-08-23 11:51:56 -07:00
Jonathan Killian 179176c312 fix: Update package.json build script to use yarn instead of npm. (#1476)
* fix: Update package.json build script to yarn.

Update package.json build script to use yarn instead of npm to maintain consistency with the rest of scripts. I was running into an issue with the Dockerfile when using nvm with yarn and this fixed the issue.
2020-08-22 19:56:52 -07:00
Tom Moor c446a91f7d fix: Restore Postgres SSL support on Heroku
https://github.com/brianc/node-postgres/issues/2009
2020-08-22 08:27:42 -07:00
Guilherme Diniz 05f48f054b feat: Add Header to Document History Sidebar 2020-08-21 20:58:57 -03:00
Tom Moor ec55299c8b fix: Improve websocket reliability (#1470)
* check connection on page visibility change

* fix: SocketPresence account for socket changing
2020-08-20 20:37:54 -07:00
Tom Moor 26c574ab58 chore: Upgrade pg and sequelize to support node 14+ (#1462)
* Upgrade pg and sequelize to support node 14+

When Node 14 came out the app was incompatible, we should always have a maximum version defined here until the server code has been tested to prove compatibility

Co-authored-by: Lance Whatley <whatl3y@gmail.com>
2020-08-20 20:19:44 -07:00
Tom Moor 6dd6768f07 feat: Allow moving templates between collections (#1454)
- Allow template move in document policy
- fix: Ensure that document is not added to collection structure in documentMover command
- fix: Moving a template should now show nested documents as options
- fix: Hitting 'm' should not allow moving a draft
- fix: Styling of seperators on move screen
2020-08-20 19:46:29 -07:00
Tom Moor 0555fd2caa pref: JS bundling improvements (#1461)
* perf: Split only initial vendors
2020-08-17 22:09:12 -07:00
Tom Moor d885252fb0 fix: Mobile style fixes and improvements (#1459)
* fixes #1457 – check for matchMedia function before using it

* fixes: Depth issues
closes #1458

* fixes: Long breadcrumbs cause horizontal overflow

* fix: Improve tabs and overflow on mobile
2020-08-17 00:08:22 -07:00
Tom Moor df9b0bcf91 fix: Websocket reconnect when navigating from settings -> home 2020-08-14 17:47:12 -07:00
Tom Moor 31910f1628 Remove auto reconnect, increase reconnectionDelayMax 2020-08-14 17:25:55 -07:00
Tom Moor 14cb3a36c1 perf: Reduce initial bundle size / async bundle loading (#1456)
* feat: Move to React.lazy

* perf: Remove duplicate babel/runtime

* fix: Run yarn-deduplicate

* Further attempts to remove rich-markdown-editor from initial chunk

* perf: Lazy loading of authenticated routes

* perf: Move color picker to async loading
fix: Display placeholder when loading rich editor

* fix: Cache bust on auto reload
2020-08-14 17:23:58 -07:00
Tom Moor d3350c20b6 perf: Attempt websocket connection before polling 2020-08-14 13:37:11 -07:00
Tom Moor 174acfac32 fix: Unnecessary shares.info request when loading public share (#1453)
closes #1450
2020-08-13 16:48:03 -07:00
Tom Moor 9ef4e2b437 Update LICENSE 2020-08-12 20:04:48 -07:00
Tom Moor 8088da8cf3 0.46.0 2020-08-12 20:03:57 -07:00
Tom Moor 221ee48429 fix: Don't mangle class names in production 2020-08-12 19:28:15 -07:00
Tom Moor ffe8c046ef fix: Bump RME – Improves floating toolbar behavior 2020-08-12 17:01:27 -07:00
Tom Moor dbe8a10702 fix: Login to X should be centered when team name wraps to newline 2020-08-12 14:05:32 -07:00
Tom Moor 11f7e3a060 chore: Bundle Stats / Webpack v4 (#1448)
* chore: Experiment with bundle size monitoring service

* chore: Ensure build runs on CI, move lint and flow before test

* chore: Upgrade Webpack v3 -> v4

* chore: Add webpack-cli
Remove unused dep
Move deps to dev

* Move babel deps to production

* Move babel deps to production
2020-08-12 13:16:10 -07:00
Tom Moor 0f41a04e49 refactor: Remove centralized Modal management (#1444)
* refactor: Finally remove centralized Modals component

* chore: Cleanup related unused methods in UiStore
2020-08-12 10:49:15 -07:00
Tom Moor d055021ad4 chore: Remove all usage of collection.type (#1445)
* chore: Remove all usage of collection.type

* migration: Remove type column
2020-08-12 10:49:02 -07:00
Tom Moor 810dc5a061 feat: Clicking the last updated time should open document history sidebar
Ref #1285
2020-08-11 21:01:03 -07:00
ktfth 7abe375b3e refactor: Removed unusued index on the onSearchLink (#1420)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-08-11 19:59:11 -07:00
Tom Moor 63371d8f5b flow 2020-08-11 18:59:57 -07:00
Tom Moor 6e61df0729 fix: Improved loading jank fix, new DelayedMount component 2020-08-10 21:30:12 -07:00
Tom Moor 5ddc4000d0 fixes: Strange scroll behavior on long collection descriptions
closes #1391
2020-08-10 16:23:55 -07:00
Tom Moor 48b61559cc fixes: JS error when attempting to show toast messages from collection description editor 2020-08-10 16:04:23 -07:00
Tom Moor 0cac5cfe51 fix: Prevent reload loop with error on editor load 2020-08-10 15:52:45 -07:00
Tom Moor e9ce80a3aa fixes: Case where websocket will not reconnect
closes #1384
2020-08-09 23:25:27 -07:00
Tom Moor 07d488c826 fix: GitHub Gist embed reliability, closes #1400 2020-08-09 21:53:57 -07:00
Tom Moor e2bd03494d chore: Update syntax, improve more typing (#1439)
* chore: <React.Fragment> to <>

* flow types
2020-08-09 09:48:04 -07:00
Tom Moor ead55442e0 flow: Restore lesser flowtype for styled-components
The current flow-typed def requires an insane amount of manual typing that just doesnt
make any sense. Restoring the old definition for now:
https://github.com/flow-typed/flow-typed/issues/3766
2020-08-08 23:41:02 -07:00
Tom Moor 449dc55aaa chore: Upgrade Babel, Jest, Eslint (#1437)
* chore: Upgrade Prettier 1.8 -> 2.0

* chore: Upgrade Babel 6 -> 7

* chore: Upgrade eslint plugins

* chore: Add eslint import/order rules

* chore: Update flow-typed deps
2020-08-08 22:53:59 -07:00
Tom Moor e312b264a6 chore: Upgrade Prettier 1.8 -> 2.0 (#1436) 2020-08-08 18:53:11 -07:00
Tom Moor 68dcb4de5f fix: Catch expected error when shares.info returns 404 2020-08-08 17:55:21 -07:00
Tom Moor d2b9a5c03f fix: Various React errors in console 2020-08-08 17:51:40 -07:00
Tom Moor 1b023fb6d7 fix: Remove flash of loading state for document lists 2020-08-08 17:39:30 -07:00
Tom Moor afe4553a7e chore: Resolve 2 open security alerts 2020-08-08 17:35:42 -07:00
Tom Moor 139e2e29d7 flow 2020-08-08 17:12:36 -07:00
Tom Moor 638418432a test 2020-08-08 16:32:12 -07:00
Tom Moor c6d2467fae chore: Upgrade Flow to v0.104.0 2020-08-08 16:26:20 -07:00
Tom Moor e9387db895 chore: Remove unused flow-typed 2020-08-08 16:05:32 -07:00
Tom Moor 065d04ec98 chore: Missing flow types 2020-08-08 15:58:34 -07:00
Tom Moor 869fc086d6 feat: Templates (#1399)
* Migrations
* New from template
* fix: Don't allow public share of template
* chore: Template badges
* fix: Collection active
* feat: New doc button on template list item
* feat: New template menu
* fix: Sorting
* feat: Templates onboarding notice
* fix: New doc button showing on archived/deleted templates
2020-08-08 15:18:37 -07:00
dependabot[bot] 59c24aba7c chore(deps): bump elliptic from 6.5.2 to 6.5.3 (#1406)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-30 19:23:44 -07:00
Tom Moor bc4806ac30 feat: Allow checkboxes to be toggled without going into 'edit' mode (#1349) 2020-07-28 20:43:34 -07:00
Tom Moor 169ad5b025 feat: Sharing improvements (#1388)
* add migrations

* first pass at API

* feat: Updated share dialog UI

* tests

* test

* styling tweaks

* feat: Show share state on document

* fix: Allow publishing share links for draft docs

* test: shares.info
2020-07-28 19:14:32 -07:00
Tom Moor 0b33b5bc05 company -> team 2020-07-25 11:33:04 -07:00
Tom Moor 109efcaa27 chore: Remove WEBSOCKETS_ENABLED flag (#1383)
* chore: Remove WEBSOCKETS_ENALBED flag

* lint
2020-07-22 22:44:24 -07:00
Nan Yu 2cc6d7add8 fix: added missing call to onOpen (#1378) 2020-07-21 21:35:27 -07:00
Joona Heikkilä 003d82fe8a refactor: Fix updater's use of UPDATES_KEY (#1376) 2020-07-21 15:05:09 -07:00
Tom Moor f75a07cb0d fix: Remove ugly blue cross 2020-07-20 19:53:13 -07:00
Tom Moor 0d6720e499 fix: Heading style regressions 2020-07-20 19:43:30 -07:00
Tom Moor a97a1df5f1 fix: Extra active outline around editor toolbar buttons 2020-07-20 19:37:50 -07:00
Tom Moor 822395c265 chore: Remove emojis from welcome docs 2020-07-20 19:14:15 -07:00
Tom Moor 96d6e9b85e fix: Breadcrumb spacing 2020-07-20 19:09:51 -07:00
Tom Moor 70e1194f90 feat: Notice blocks available as new editor options (#1371)
* feat: Notice blocks available as new editor options

* fix: styling tweak
feat: Add shortcut to keyboard modal

* add notices to welcome docs

* styling tweaks

* styling tweaks

* styling tweaks
2020-07-20 19:03:14 -07:00
Tom Moor 710fcc697c feat: Add login link to /create page, closes OLN-63 2020-07-19 10:58:35 -07:00
Nan Yu 58f9e95d2f feat: nicer gradient mask for hover previews (#1367)
* feat: nicer gradient mask for hover previews

* tweak the stops on gradient mask
2020-07-18 18:25:54 -07:00
Tom Moor bc128359ab chore: Remove Spectrum references (#1366)
* fix: knowledgebase -> knowledge base

* chore: Remove links and mentions to Spectrum community
2020-07-18 17:19:13 -07:00
Tom Moor af09713c8c fix: knowledgebase -> knowledge base 2020-07-18 13:17:10 -07:00
Tom Moor 35052ef38f 0.45.0 2020-07-18 11:52:32 -07:00
Tom Moor ec3adc6d1c fix: 2 missed process.env spots on frontend 2020-07-18 11:33:34 -07:00
Tom Moor 67981a351e chore: Remove env variables in webpack bundle (#1353)
* chore: Remove env variables in webpack bundle

* remove unused globals

* refactor: consolidate window.env calls to single file

* fix: Slack client side integration auth

* fix: developers url
2020-07-18 11:02:40 -07:00
Necmettin Karakaya 24448c7504 fix: common misspelling errors
https://github.com/outline/outline/blob/master/app/scenes/UserDelete.js#L40: corrected "destory" to "destroy"
https://github.com/outline/outline/blob/master/app/components/ScrollToTop.js#L16: corrected "postion" to "position"
https://github.com/outline/outline/blob/master/server/policies/document.js#L11: corrected "existance" to "existence"
https://github.com/outline/outline/blob/master/server/policies/document.js#L23: corrected "existance" to "existence"
https://github.com/outline/outline/blob/master/server/models/Document.js#L493: corrected "permanantly" to "permanently"
https://github.com/outline/outline/blob/master/shared/utils/domains.js#L12: corrected "unneccessarily" to "unnecessarily"
https://github.com/outline/outline/blob/master/server/api/documents.js#L34: corrected "compatablity" to "compatibility"
2020-07-18 09:33:27 -07:00
Tom Moor d5b5d4fc27 feat: Document hover cards (#1346)
* stash

* refactor

* refactor, styling

* tweaks

* pointer

* styling

* fi: Hide when printing

* fix: No hover cards on shared links

* remove suppressions no longer needed

* fix: Don't show hover cards when editing, they get in the way

* fix: Prevent hover card from going off rhs edge of screen

* fix: Remount hover card when changing between links

* fix: allow one part domains in links (#1350)

* allow one part domains in links

* no TLD when only one part domain

* return null for parseDomain of empty string

* fix fiddly hover preview behavior

* WIP

* refactor hover preview

* fix: Non-rounded bottom corners

* fix: Fixes an edgecase where mounting the nested editor in hovercard causesdocument to scroll if there is a hash in the url

* fix: Incorrect document preview rendering

* lint

Co-authored-by: Nan Yu <thenanyu@gmail.com>
Co-authored-by: Nan Yu <nan@getoutline.com>
2020-07-16 21:26:23 -07:00
dependabot[bot] d8603cc961 chore(deps): bump lodash from 4.17.15 to 4.17.19 (#1361)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-16 17:30:56 -07:00
Tom Moor 943a290b83 chore: Update flow just far enough to get hooks libdefs (#1348) 2020-07-13 20:23:15 -07:00
Tom Moor f4a4f034cf Merge branch 'MatheusRV-feat/change-title-based-on-teamName' into develop 2020-07-13 19:42:57 -07:00
Tom Moor a53934a5c9 fix 2020-07-13 19:41:42 -07:00
Tom Moor e859e3b9e0 Merge branch 'feat/change-title-based-on-teamName' of https://github.com/MatheusRV/outline into MatheusRV-feat/change-title-based-on-teamName 2020-07-13 19:13:59 -07:00
Tom Moor b51d818db3 feat: Adds documents.export endpoint to return cleaned up Markdown (#1343) 2020-07-13 18:23:15 -07:00
Tom Moor bfea742650 fix: Makefile test runner 2020-07-11 12:41:48 -07:00
Tom Moor 9951cbf194 fix: Unneccessary redirect to /home 2020-07-11 09:51:10 -07:00
Tom Moor 5cb04d7ac1 New login screen (#1331)
* wip

* feat: first draft of auth.config

* chore: auth methodS

* chore: styling

* styling, styling, styling

* feat: Auth notices

* chore: Remove server-rendered pages, move shared/components -> components

* lint

* cleanup

* cleanup

* fix: Remove unused component

* fix: Ensure env variables in prod too

* style tweaks

* fix: Entering SSO email into login form fails
fix: Tweak language around guest signin
2020-07-09 22:33:07 -07:00
Tom Moor 75561079eb closes: Lucidchart embed does not work for app subdomain
closes #1340
2020-07-09 21:07:35 -07:00
Matheus Rocha Vieira d2c7f3f166 Update app/components/PageTitle.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-07-08 14:48:14 -03:00
Matheus Rocha Vieira a077766bff Update app/components/Layout.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-07-08 14:48:05 -03:00
Matheus Breguêz a25e03d7cd Fix Name Mistake & Lint 2020-07-07 09:11:19 -03:00
Tom Moor 2953d09ee1 fix: Bump RME 2020-07-05 20:44:37 -07:00
Tom Moor 28d15b1573 Update LICENSE 2020-07-03 21:14:21 -07:00
Tom Moor 18108cb359 0.44.0 2020-07-03 13:11:01 -07:00
Tom Moor 5dfa6a71a4 chore: Remove Lato
closes #1295
2020-07-01 21:40:34 -07:00
Matheus Breguêz 35270cd104 add mobx observer and inject 2020-07-01 09:14:21 -03:00
Matheus Breguêz 19d01ed575 Add Outline in Title 2020-07-01 09:09:21 -03:00
Matheus Breguêz 2b7639c903 Improve Title when TeamName is empty 2020-07-01 08:56:49 -03:00
Matheus Breguêz c8269ca134 Remove Polices 2020-06-29 17:06:47 -03:00
Matheus Breguêz da9fc5bfdf New title based on TeamName 2020-06-29 17:01:34 -03:00
Tom Moor efcfda8398 fix: Port from hosted 2020-06-22 22:11:39 -07:00
Tom Moor ce2f69342c Fix: Port fix from hosted 2020-06-22 22:00:40 -07:00
Tom Moor 9be5597f4b chore: Lint shared directory 2020-06-22 21:29:21 -07:00
Tom Moor 26f6961c82 chore: Include new brand colors in icon color suggestions 2020-06-22 21:24:42 -07:00
Tom Moor bf5f83e97d Subtle styling adjustments to dropdown menus 2020-06-22 21:18:43 -07:00
Tom Moor 8db0260a1a Bump RME 2020-06-22 21:10:24 -07:00
Tom Moor edbae275ae Bump RME 2020-06-22 20:55:29 -07:00
Tom Moor f43deb7940 chore: Move to prettier standard double quotes (#1309) 2020-06-20 13:59:15 -07:00
Tom Moor 2a3b9e2104 chore: Make editor version comparison more lenient to reduce forced reloads 2020-06-20 12:35:32 -07:00
Tom Moor 64c3ff8d6b chore: Remove 'DEPLOYMENT' env option
Add 'Installation' section
2020-06-19 19:11:02 -07:00
Tom Moor 4f7e7ec853 Update package.json to match reality
This will be kept up to date from now on
2020-06-19 17:34:59 -07:00
Tom Moor d864e228e7 feat: Collection Icons (#1281)
* wip: Working for creation, and display

* feat: IconPicker

* fix

* feat: Invert collection icon color when dark in dark mode

* Improve readability of dropdown menus in dark mode
Suggest icon based on collection name

* Add additional icons
Tweaks and final polish

* fix: Write default icon as empty icon column

* feat: Improve icon selection logic
add more keywords
Improve icon coloring when selected and in dark mode

* lint

* lint
2020-06-19 17:18:03 -07:00
Tom Moor f3ea02fdd0 Bump RME, closes #1305 2020-06-18 23:54:02 -07:00
Tom Moor ed096013e4 fix: Cleanup print display 2020-06-18 22:10:20 -07:00
Tom Moor 2e376b32ec fix: sp mistake 2020-06-18 08:49:10 -07:00
Tom Moor f352b35e13 Bump RME 2020-06-16 21:11:01 -07:00
Tom Moor 0f8d503df8 chore: API Consistency (#1304)
* chore: Addressing API inconsistencies

* lint

* add: Missing sort to groups.list
fix: Documention issues

* test: fix

* feat: Add missing shares.info endpoint

* feat: Add sorting to users.list endpoint

* fix: Incorrect pagination parameters listed on user endpoints

* users.s3Upload -> attachments.create

* chore: exportAll -> export_all
2020-06-16 20:56:17 -07:00
Tom Moor 5010b08e83 Bump RME 2020-06-12 22:15:48 -07:00
Tom Moor 933bbdfb84 feat: Add ability to create docs from link editor (#1303)
* feat: Add ability to create docs from link editor

* fix: Handling of paste and click events

* fix: Filter untitled documents from search results

* refactor: Move onCreateLink to DataLoader

* bump rme
2020-06-12 00:19:03 -07:00
Tom Moor d25a9d56dc fix: updatedBy incorrect in documents.update response 2020-06-12 00:18:38 -07:00
Tom Moor 1d8c3f3faf fix: Suspended users showing in group and collection member management (#1302)
* fix: Suspended users showing in group and collection member management

* test
2020-06-11 08:48:47 -07:00
Tom Moor d7766280a9 fix: Possible fix for intermittent CI failures
https://github.com/facebook/flow/issues/8058
2020-06-09 21:50:25 -07:00
moekhalil ae5eff2914 Make MenuItem Links work (#1299)
Menu items pointed to anchors links that were non-existent. 
Adding id's to proper sections for anchor links in menu to work.
2020-06-09 20:39:22 -07:00
Tom Moor b444874944 fix: Shared documents with system in dark mode display partially on light background
closes #1300
2020-06-09 20:38:34 -07:00
Tom Moor 20efa82ad9 Add additional restricted subdomains 2020-06-05 23:46:32 -07:00
Tom Moor bd9d4b3d0d fix: backslash in search query not escaped 2020-06-03 23:59:59 -07:00
Tom Moor 4b4f4fd188 flow 2020-06-02 23:17:54 -07:00
Tom Moor 33815639f2 fix: Improved handling of simultaneous edits 2020-06-02 23:16:15 -07:00
Tom Moor 05e24df226 fix: Update value when saved elsewhere and viewing doc
closes #1103
2020-05-31 22:46:55 -07:00
Tom Moor d2d9164fa1 chore: Remove unused component 2020-05-31 21:19:44 -07:00
Tom Moor f2eb395e8d fix: regex -> startsWith 2020-05-31 16:43:51 -07:00
Tom Moor 133cb56cca fix: Use real icon on settings back arrow 2020-05-30 18:26:40 -07:00
Tom Moor e752dba566 fix: User profile should say 'invited' instead of 'joined' when user has yet to signin 2020-05-30 18:26:40 -07:00
Tom Moor c1a141d99f fix: Make it possible to downgrade permissions of suspended user
closes #1291
2020-05-30 18:26:40 -07:00
Tom Moor ccedea55d6 chore: Reduce loading jank in sidebar (#1294) 2020-05-30 12:50:08 -07:00
Tom Moor c929f83813 feat: Improved error filtering and reporting (#1293) 2020-05-29 07:22:09 -07:00
Tom Moor 1b25d12e2e fix: Regression with upgrade to styled-components@5 – new ServerStyleSheet needed per render 2020-05-28 20:49:07 -07:00
Tom Moor 0c254285a1 fix: Improved readability of input placeholders in dark mode 2020-05-28 20:08:02 -07:00
Tom Moor 8b274c3713 fix: Keyboard shortcuts dialog shortcut should not be active when editing a document
closes #1292
2020-05-28 19:44:52 -07:00
Tom Moor 5a20a35c8b Bump RME 2020-05-28 08:25:25 -07:00
Tom Moor 72635e98e6 Remove precommit hook 2020-05-28 08:25:25 -07:00
Tom Moor 7d55b7f69b fix: Server error when listing memberships for group with deleted user (#1288)
* fix: Server error when listing memberships for group with deleted user

* PR feedback: Filter before slice
2020-05-28 08:21:22 -07:00
Tom Moor ca1ba277ad fix: Gist embed error on load 2020-05-27 23:04:34 -07:00
Tom Moor 32562886aa fix: Bump RME, closes #1286 2020-05-26 20:18:07 -07:00
Tom Moor 7f07cb57a2 chore: Capture event data to error tracker when background jobs fail 2020-05-25 13:48:50 -07:00
Tom Moor 62dd1e41f9 fix: Invariant violation reported to error tracker when client is reloading due to editor update 2020-05-25 13:10:18 -07:00
Tom Moor 446a9ade8c fix: Imported documents should get a best-guess title 2020-05-24 23:10:55 -07:00
Tom Moor a281b1e5be fix: Documents with empty titles (hey, it can happen) are invisible in the sidebar) 2020-05-24 22:43:54 -07:00
Tom Moor 1b5600b025 chore: Cleaner Markdown output when exporting docs 2020-05-24 22:22:06 -07:00
Tom Moor f0e513542d fix: auto focus search input when adding users to a collection 2020-05-24 22:17:11 -07:00
Tom Moor 4797a5fc77 fix: Invalid regex error on Safari when filtering users with certain characters 2020-05-24 22:14:09 -07:00
Tom Moor f05035c0b7 fix: Incorrect overlay background when zooming images 2020-05-23 22:22:19 -07:00
Tom Moor 75cfbd8970 fix: More migration tweaks 2020-05-23 19:23:31 -07:00
Tom Moor c4837f1943 fix: Potential corruption migrating v1 docs to v2 when a mark is adjacent the same mark. This was a quirk of the old editor 2020-05-23 12:26:26 -07:00
Tom Moor 0b3166dab5 Bump yarn.lock 2020-05-23 11:06:37 -07:00
Tom Moor 603f7962a2 fix: An unknown language annotation in code fences will no longer throw an error. It was only possible to hit this if you imported markdown from another source.
closes #1284
2020-05-23 11:01:07 -07:00
Tom Moor 69d16dd1d4 fix: Tables with empty cells are corrupted when converted to v2 documents
fix: Marks with trailing or leading empty spaces are corrupted when converted to v2 documents
2020-05-23 10:58:46 -07:00
Tom Moor e2ffe06221 fix: Document title not centered once scrolled 2020-05-22 14:19:26 -07:00
Tom Moor 6e2ea3ac4b fix: overflow menu on history revision is incorrect color when selected
closes #1140
2020-05-21 22:22:04 -07:00
Tom Moor f4c4a11277 fix: Only transfer accessToken if matches root token 2020-05-21 21:42:46 -07:00
Tom Moor c28dc08f6a fix: Alignment of bullet list
closes #1277
2020-05-21 21:22:33 -07:00
Tom Moor 4ef82d5476 test 2020-05-20 23:48:37 -07:00
Tom Moor 3487eb7857 fix: Submenu auto close 2020-05-20 23:40:54 -07:00
Tom Moor 87020348ce lint 2020-05-20 23:20:05 -07:00
Tom Moor 672ffacc5b feat: Have theme follow system pref 2020-05-20 23:19:07 -07:00
Tom Moor 218b0ea76a fix: Unable to edit starred documents
closes #1275
2020-05-20 21:42:26 -07:00
Tom Moor 47ff6feaee fix: JS error on server 2020-05-20 21:03:53 -07:00
Tom Moor 8ac5a574f3 Merge branch 'master' of github.com:outline/outline 2020-05-20 21:01:10 -07:00
Ante Primorac aed76c7bcb fix revisions backup data type (#1274) 2020-05-20 10:50:52 -07:00
Tom Moor 7f9cd51f37 Update bug template to account for self hosted 2020-05-20 08:30:05 -07:00
Tom Moor 092b29ee63 fix: Breadcrumb separator color in dark mode 2020-05-19 22:34:04 -07:00
Tom Moor ee7e1959c9 fix: Toast color in dark mode 2020-05-19 21:55:26 -07:00
Tom Moor 092d9dce18 fix: Don't set cookie domain when not using multiple subdomains (#1145)
* fix: Don't set cookie domain when not using multiple subdomains

* wip logging domain

* wip logging domain

* wip logging domain

* wip logging domain

* Revert "wip logging domain"

This reverts commit 325907e749.

* Revert "wip logging domain"

This reverts commit 6ee095a49e.

* Revert "wip logging domain"

This reverts commit 813d8eb960.

* Revert "wip logging domain"

This reverts commit f1ca819276.

* Remove SUBDOMAINS_ENABLED from documented env variables, no-one self hosting should need this – it just adds confusion to those looking to host on a single subdomain
fix: Account for server/client process.env parsing

Co-authored-by: Nan Yu <nanyu@Nans-MBP-2.lan>
Co-authored-by: Nan Yu <nan@getoutline.com>
2020-05-19 21:05:57 -07:00
Tom Moor 9274005cbb feat: Upgrade editor (#1227)
* WIP

* document migration

* fix: Handle clashing keyboard events

* fix: convert getSummary

* fix: parseDocumentIds

* lint

* fix: Remove unused plugin

* Move editor version to header
Add editor version check for API endpoints

* fix: Editor update auto-reload
Bump RME

* test

* bump rme

* Remove slate flow types, improve themeing, bump rme

* bump rme

* fix: parseDocumentIds returning duplicate ID's, improved regression tests

* test

* fix: Missing code styles

* lint

* chore: Upgrade v2 migration to use AST

* Bump RME

* Update welcome doc

* add highlight to keyboard shortcuts ref

* theming improvements

* fix: Code comments show as headings, closes #1255

* loop

* fix: TOC highlighting

* lint

* add: Automated backup of docs before migration

* Update embeds to new format

* fix: React warning

* bump to final editor version 10.0.0

* test
2020-05-19 20:39:34 -07:00
Tom Moor 400a1c87bb lint 2020-05-18 20:22:58 -07:00
Tom Moor 93abbab44a feat: Show different icon in theme menu to switch to light mode 2020-05-17 19:15:55 -07:00
Tom Moor 18cf148bd1 chore: Improve performance in dev by running Node/Yarn outside of docker (#1271)
* Improve performance in dev by running Node/Yarn outside of docker

* Transpose exposed port numbers by 100, so less likely conflict with host processes
2020-05-17 18:12:48 -07:00
Tom Moor e0b33ee576 chore: Auto reload frontend of client is out of date (#1270)
* Move editor version to header
Add editor version check for API endpoints

* fix: Editor update auto-reload
Bump RME

* fix: Only redirect if editor header exists

* lint
2020-05-16 14:05:51 -07:00
Tom Moor 82749ffbd8 Remove Spectrum badge 2020-05-12 08:27:17 -07:00
Tom Moor 231aab6ef8 lint 2020-05-12 08:26:31 -07:00
Tom Moor f8077e2125 Add github template chooser 2020-05-12 08:25:11 -07:00
Tom Moor 9d9435cce5 fix: Server error in hooks.slack endpoint if team has no public collections 2020-05-10 18:49:57 -07:00
Tom Moor 5deec264bc chore: Add request-id to error tracking 2020-05-10 16:24:34 -07:00
Tom Moor 48c87a1902 fix: Long titles should wrap
closes #1249
2020-05-07 21:21:58 -07:00
Tom Moor 06a3258b99 fix: Allow empty document body to be saved
closes #1258
2020-05-07 20:52:02 -07:00
Tom Moor bd2837250b fix: Guard missing attachment, closes #1262 2020-05-07 20:37:36 -07:00
Tom Moor e1adb16c43 fix: Incompatible with node 14 2020-05-07 20:33:33 -07:00
Tom Moor d914ecb603 chore: Remove max listener warning in console 2020-04-26 14:08:39 -07:00
Tom Moor 187be4737e fix: Log errors to console when Sentry not installed 2020-04-25 19:53:24 -07:00
Tom Moor 870b91f17a fix: Various extra scrollbars when not using mac-style overlaying scrollbars (#1242)
* fix: Various extra scrollbars when not using mac-style overlaying scrollbars

* Sidebar z-index
2020-04-24 18:44:21 -07:00
Tom Moor 6db92c9f49 remove unused images 2020-04-24 05:33:13 -07:00
Tom Moor c41e6e0423 fix: Minor fixes in backlinks service (#1240) 2020-04-24 05:29:48 -07:00
Tom Moor 9f8e7be755 fix: Restore ability to disable embeds on a document (#1238)
closes #1237
2020-04-21 21:43:01 -07:00
Tom Moor cead37051e fix: test prevents server loading, add logs 2020-04-19 22:14:31 -07:00
Tom Moor fd99da96af chore: upgrade deps 2020-04-19 22:07:17 -07:00
Tom Moor c526adf292 feat: Auto update titles in linked documents (#1233)
* feat: Auto update titles in linked documents

* Add spec
2020-04-19 21:58:42 -07:00
Tom Moor ee5ae140c3 fix: Improve neutral button styling in dark mode 2020-04-11 09:47:52 -07:00
Tom Moor 083ac0d840 fix: Image cropper in dark mode
closes #1229
2020-04-11 09:34:33 -07:00
Tom Moor fbaaa08ec7 closes #1230 2020-04-11 09:27:14 -07:00
Tom Moor b536c682a2 fix: Escape characters visible in TOC
closes #1226
2020-04-06 09:01:03 -07:00
Tom Moor c94823dd59 fix: Failed editor chunk load should refresh page 2020-04-06 08:50:43 -07:00
Tom Moor 1a60f51460 fix: Attempt to focus readonly editor
fix: Non-grow clickable padding beneath editor regression
2020-04-05 22:48:48 -07:00
Tom Moor abf91a3a51 fix: Share link rendering 2020-04-05 22:42:55 -07:00
Tom Moor 383806d155 fix: Document shrinks if only content is embed 2020-04-05 18:44:05 -07:00
Tom Moor 7413e8bf7a Update LICENSE 2020-04-05 18:18:01 -07:00
Tom Moor 7c1aa7622a Update README screenshot 2020-04-05 17:01:54 -07:00
Tom Moor f94efaada8 Update README screenshot 2020-04-05 17:00:30 -07:00
Tom Moor 283a762a9c fix: Title index 2020-04-05 16:46:03 -07:00
Tom Moor cef687464a chore: Improved onboarding docs 2020-04-05 16:32:12 -07:00
Tom Moor 8287355261 CI 2020-04-05 16:11:16 -07:00
Tom Moor 02d33267cc fix: Document updated email does include team subdomain in url
fix: Send document updated emails to any collaborators
fix: Correct quotation marks in email subjects
2020-04-05 16:04:46 -07:00
Tom Moor b964bdbe90 lint 2020-04-05 15:53:27 -07:00
Tom Moor c832265e8a fix: Account for emoji-offset title 2020-04-05 15:50:37 -07:00
Tom Moor 8819a0836e fix: Initial welcome docs account for new title field 2020-04-05 15:41:29 -07:00
Tom Moor 9338a54fe0 feat: Separate title from body (#1216)
* first pass at updating all Time components each second

* fix a couple date variable typos

* use class style state management instead of hooks

* wip: Separate title from body

* address feedback

* test: Remove unused test

* feat: You in publishing info language
fix: Removal of secondary headings

* After much deliberation… a migration is needed for this to be reliable

* fix: Export to work with new title structure

* fix: Untitled

* fix: Consistent spacing of first editor node

* fix: Emoji in title handling

* fix: Time component not updating for new props

* chore: Add createdAt case

* fix: Conflict after merging new TOC

* PR feedback

* lint

* fix: Heading level adjustment

Co-authored-by: Taylor Lapeyre <taylorlapeyre@gmail.com>
2020-04-05 15:07:34 -07:00
Tom Moor a0e73bf4c2 fix: Add shortcut for toggling document contents to help 2020-04-05 13:33:50 -07:00
Tom Moor 8a0263093b fix: Back button on modals should not scroll off screen 2020-04-05 13:33:21 -07:00
Tom Moor 9d8e99400f fix: Various React errors in console 2020-04-05 13:27:11 -07:00
Tom Moor 98b5350c65 lint 2020-04-05 13:21:03 -07:00
Tom Moor 3bd1c1f047 fix: Doc history does not load when linked to directly (race condition) 2020-04-05 13:20:47 -07:00
Tom Moor 9712b8d205 fix: Document history should scroll separate to page content
closes #1225
2020-04-05 13:07:16 -07:00
Tom Moor 597c09d2bc fix: Non-toc horizontal heading alignment 2020-04-05 12:50:38 -07:00
Tom Moor d0606a72c3 feat: Improved table of contents (#1223)
* feat: New table of contents

* fix: Hide TOC in edit mode

* feat: Highlight follows scroll position

* scroll tracking

* UI

* fix: Unrelated css fix with long doc titles

* Improve responsiveness

* feat: Add keyboard shortcut access to TOC

* fix: Headings should reflect content correctly when viewing old document revision

* flow

* fix: Persist TOC choice between sessions
2020-04-05 12:22:26 -07:00
Nan Yu 0deecfac44 make the team logo a little friendlier for first timers (#1222) 2020-04-04 15:34:11 -07:00
Nan Yu f534203cbd Merge pull request #1218 from outline/thenanyu-patch-1
docs: minor ergonomic updates to readme
2020-03-30 16:43:27 -07:00
Nan Yu f521543b0a Update README.md 2020-03-30 08:57:21 -07:00
Nan Yu 7da0d7589e minor ergonomic updates to readme 2020-03-30 08:26:37 -07:00
Tom Moor 09dea295a2 fix: Cleanup S3 Attachments (#1217)
* fix: Server error if attempting to load an unknown attachment

* fix: Migration should cascade delete to document attachments

* fix: Delete S3 attachments along with documents
2020-03-28 15:56:01 -07:00
Taylor Lapeyre d3773dc943 fix: Update all Time components each second (#1214)
* first pass at updating all Time components each second

* fix a couple date variable typos

* use class style state management instead of hooks

* address feedback

* lint

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-03-23 22:31:17 -07:00
Tom Moor 5db43f2607 lint 2020-03-23 22:26:17 -07:00
Tom Moor 4b3ddf8769 fix: Account for no text param passed to hooks.slack
This will never happen in production, Slack always provides the param but prevents a possible 500 server error when messing with the API manually.
2020-03-22 16:41:15 -07:00
Tom Moor 7a6ed86c95 Update LICENSE 2020-03-16 23:19:16 -07:00
Tom Moor f0be9beeb4 feat: Ensure that editorVersion is saved with document/revisions (#1212) 2020-03-16 08:30:23 -07:00
Tom Moor 4851f51d8b docs: Add documentation for groups API endpoints (#1211)
* docs: Add documentation for groups API endpoints
fix: Remove useless permission query param

* restore permission filter on collections.group_memberships

* tweak language
2020-03-16 08:30:15 -07:00
David Miranda e611979a8d Absolute routes won't work when users have subdomains (#1208) 2020-03-15 21:04:46 -07:00
Bryan Joseph 05af318a1d feat: Split up check for Slack environment variables (#1207)
* Split up check for Slack environment variables

This allows for the Slack slash command to be used without
needing Slack sign in enabled.

* Remove conditional checking for slack app id

Co-authored-by: Bryan Joseph <bryanjos@users.noreply.github.com>
2020-03-15 20:53:15 -07:00
Nan Yu 142303b3de feat: Add groups and group permissions (#1204)
* WIP - got one API test to pass yay

* adds group update endpoint

* added group policies

* adds groups.list API

* adds groups.info

* remove comment

* WIP

* tests for delete

* adds group membership list

* adds tests for groups list

* add and remove user endpoints for group

* ask some questions

* fix up some issues around primary keys

* remove export from group permissions

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* remove random file

* only create events on actual updates, add tests to ensure

* adds uniqueness validation to group name

* throw validation errors on model and let it pass through the controller

* fix linting

* WIP

* WIP

* WIP

* WIP

* WIP basic edit and delete

* basic CRUD for groups and memberships in place

* got member counts working

* add member count and limit the number of users sent over teh wire to 6

* factor avatar with AvatarWithPresence into its own class

* wip

* WIP avatars in group lists

* WIP collection groups

* add and remove group endpoints

* wip add collection groups

* wip get group adding to collections to work

* wip get updating collection group memberships to work

* wip get new group modal working

* add tests for collection index

* include collection groups in the withmemberships scope

* tie permissions to group memberships

* remove unused import

* Update app/components/GroupListItem.js

update title copy

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/migrations/20191211044318-create-groups.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/api/groups.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/api/groups.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/menus/CollectionMenu.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/models/Group.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* minor fixes

* Update app/scenes/CollectionMembers/AddGroupsToCollection.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/menus/GroupMenu.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/menus/GroupMenu.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/menus/GroupMenu.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/Collection.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/CollectionMembers/CollectionMembers.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/GroupNew.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/GroupNew.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/Settings/Groups.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/api/documents.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/CollectionMembers/components/CollectionGroupMemberListItem.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* address comments

* WIP - getting websocket stuff up and running

* socket event for group deletion

* wrapped up cascading deletes

* lint

* flow

* fix: UI feedback

* fix: Facepile size

* fix: Lots of missing await's

* Allow clicking facepile on group list item to open members

* remove unused route push, grammar

* fix: Remove bad analytics events
feat: Add group events to audit log

* collection. -> collections.

* Add groups to entity websocket events (sync create/update/delete) between clients

* fix: Users should not be able to see groups they are not a member of

* fix: Not caching errors in UI when changing group memberships

* fix: Hide unusable UI

* test

* fix: Tweak language

* feat: Automatically open 'add member' modal after creating group

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-03-14 20:48:32 -07:00
Tom Moor 6c451a34d4 Update README.md 2020-03-13 20:15:57 -07:00
Tom Moor fa4f1846ec Update LICENSE (#1197) 2020-03-07 10:10:42 -08:00
Tom Moor 4baf5ce99a test: Google embeds (#1202)
Update slides to only embed pub links
2020-03-07 10:10:26 -08:00
Tom Moor 533ec3bd9c add: Support for published google docs / sheets 2020-03-06 22:45:32 -08:00
Tom Moor 572127b830 fix: Point changelog link to public site
Related to #1195
2020-02-28 19:07:25 -08:00
Tom Moor f0afa67012 fix: Focus on empty document after creation
fix: Clicking in whitespace below document should focus
Remove unused component
2020-02-26 22:29:22 -08:00
Tom Moor dac2d43f55 dashboard -> home (#1194) 2020-02-26 21:10:20 -08:00
Tom Moor d06ec5ce0c fix: Nested document menu item appears where it shouldnt (#1193) 2020-02-26 21:10:10 -08:00
Tom Moor 148affb52e fix: Editing with document history open attempts to edit old revision
fix: Document history sidebar missing background
fix: 'Publish' action should not appear when viewing history of drafts
closes #1184
2020-02-26 21:08:36 -08:00
Tom Moor afba1edae4 feat: Adds visual stacking to nested modals (#1189)
Fixes various mobile styling/layout issues
2020-02-26 19:36:23 -08:00
Tom Moor f8c53f8a88 fix: Pagination of people list items (#1192) 2020-02-25 22:50:18 -08:00
Tom Moor 0b86714984 fix: Newly created private collections do not return correct policies (#1188)
closes #1185
2020-02-24 23:16:24 -08:00
Tom Moor 3e7acc377e fix: Rich embeds should work on public share links
closes #1182
2020-02-22 17:19:16 -08:00
Tom Moor 4cb48e7310 fix: Document gets 'stuck' when navigating between docs with similar slugs
closes #1175
2020-02-18 20:13:01 -08:00
Tom Moor 8daef8ebce fix: Reload app if error loading editor chunk 2020-02-17 11:29:58 -08:00
Tom Moor 760e2b2ce9 fix: Attempt to loadRevision with empty revisionId 2020-02-17 10:23:02 -08:00
Tom Moor 902e7a4772 fix: Handle private attachments without documentId (migration process) 2020-02-17 09:38:34 -08:00
Tom Moor 3b0b37628e fix: document.updated slack service hook 2020-02-17 09:29:48 -08:00
Tom Moor c973436870 chore: Disable Sentry breadcrumbs 2020-02-17 08:15:46 -08:00
Tom Moor 41fb2826b3 fix: Sentry CSP 2020-02-16 23:45:00 -08:00
Tom Moor c15cbd06a4 chore: Bugsnag -> Sentry (#1178)
* Bugsnag -> Sentry

* fix: Import style
2020-02-16 22:58:50 -08:00
Tom Moor 8fbd4a7463 fix: Tweak branding, OSS landing page 2020-02-16 19:49:24 -08:00
Tom Moor e18d0fdc77 fix: import 2020-02-16 19:27:40 -08:00
Tom Moor 5a20f6322f remove changelog from OSS 2020-02-16 19:25:12 -08:00
Tom Moor 0556e2a32c add: AWS_S3_ACL to app.json 2020-02-16 19:15:04 -08:00
Tom Moor 908b457dec fix: Use alternative redirect method (#1176) 2020-02-16 17:28:24 -08:00
Tom Moor 71ed0844b9 fix: Pass github authorization via header instead of query string 2020-02-12 21:12:14 -08:00
Tom Moor 394be7ba74 fix: remove unused files 2020-02-12 21:12:00 -08:00
Tom Moor 8225a924c1 fix: CSP for development AWS assets 2020-02-12 19:42:29 -08:00
Huss 8e2b19dc7a feat: private content (#1137)
* save images as private and serve via signed url from images.info api

* download private images to directory on export

* fix lint errors

* private s3 default, AWS.s3 module level scope, default s3 url expiry

* combine regex to one, and only replace when there are matches

* fix lint

* code not needed anymore, remove

* updates after pulling master

* revert the uploadToS3FromUrl url return

* use model gettr to compact code, rename to attachments api

* basic checking of document read permission to allow attachment viewing

* fix: Continue to upload avatars as public
fix: Allow redirect for non-private attachments

* add support for publicly shared documents

* catch errors which crash the app during zip export and user creation

* add tests

* enable AWS signature v4 for s3

* switch to use factories to build models for testing

* add isDocker flag for local serving of attachment redirect url

* fix redirect tests

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-02-12 19:40:44 -08:00
Tom Moor 064d8cea44 fix #1174 – Allow _~ in url slugs 2020-02-12 09:14:42 -08:00
Mark Cabanero 241d557c90 fix: Add UTILS_SECRET to .env.sample (#1166) 2020-01-23 18:38:50 -08:00
Tom Moor 8e5a5a57a9 feat: Store image uploads as attachments in database (#1144)
* First pass

* Documentation

* Added optional documentId relationship

* name -> key

* cleanup: No need for separate documentId prop
2020-01-16 09:42:42 -08:00
Tom Moor 22230c25e5 perf: Use progressive rendering on PaginatedList component (#1156)
* Use progressive rendering on PaginatedList component
Move drafts and starred views to paginated

* heading
2020-01-13 18:17:56 -08:00
Tom Moor 5b78cb8963 perf: Reuse redis connections where possible (#1157)
* reuse redis connections where possible

* redis -> ioredis
2020-01-13 18:17:41 -08:00
Tom Moor f231c664e6 fix: ColorPicker preview height 2020-01-11 19:36:52 -08:00
Tom Moor 6d14dd5028 fix: missing autoComplete values, input types 2020-01-11 19:35:26 -08:00
Tom Moor f776741e77 Update copyright 2020-01-11 15:54:47 -08:00
Tom Moor aa61c37442 fix: View does not appear for first ever view
closes #1152
2020-01-11 13:54:49 -08:00
Tom Moor e38f4996ae feat: Return view model from views.create (#1153)
* feat: Return view model from views.create
Towards #1152

* fix: presenter data
2020-01-11 13:46:13 -08:00
Tom Moor cd3035a692 feat: Add search input to collection and home (#1149)
* feat: Add search input to collection and home

* Tweak spacing

* Add input to drafts/starred too
2020-01-09 19:14:34 -08:00
Tom Moor 0ccbc6126b fix: Drafts appear in document insert search (#1148)
* fix: Drafts appear in document insert search

* test
2020-01-05 17:24:57 -08:00
Tom Moor 9214be5645 fix: Documents not removed from local store when collection is deleted 2020-01-04 17:31:26 -08:00
Tom Moor c1c316b379 fix: Error loading share link view.
closes #1143
2020-01-04 14:02:54 -08:00
Tom Moor 7bbddcaebf fix: Unable to focus into description in collection edit 2020-01-02 22:49:40 -08:00
Tom Moor 9c66a14fec fix: API key create/delete should create audit events
closes #1101
2020-01-02 22:20:13 -08:00
Tom Moor 321e5c9cbd Update LICENSE 2020-01-02 21:46:16 -08:00
Tom Moor 146e4da73b feat: Document presence indicator (#1114)
* Update websockets to allow joining document-based rooms

* dynamic websocket joining

* emit user.join/leave events when entering and exiting document rooms

* presence storage

* feat: frontend presence store

* lint

* UI updates

* First pass editing state

* refactoring

* Timeout per user/doc
lint

* Document data loading refactor to keep Socket mounted

* restore: Mark as viewed functionality
Add display of 'you' to collaborators

* fix: Socket/document remount when document slug changes due to title change

* Revert unneccessary package update

* Move editing ping interval to a shared constant

* fix: Flash of sidebar when loading page directly on editing mode

* separate document and revision loading

* add comments for socket events

* fix: Socket events getting bound multiple times on reconnect

* fix: Clear client side presence state on disconnect

* fix: Don't ignore server side error
Improved documentation

* More comments / why comments

* rename Socket -> SocketPresence

* fix: Handle redis is down
remove unneccessary join

* fix: PR feedback
2020-01-02 21:17:59 -08:00
Tom Moor 541e4ebe37 feat: Show drafts to author in collections (#1134) 2020-01-02 21:17:29 -08:00
Tom Moor c7aa261863 chore: Upgrade react-router-dom dep 2020-01-01 20:54:05 -08:00
Tom Moor c484d15de6 chore: Upgrade react-waypoint dep 2020-01-01 20:36:42 -08:00
Tom Moor 93e4ad8c5e fix: Account for migrations ran on old versions of Sequelize (#1130) 2019-12-30 22:35:29 -08:00
Ezra Free 85e70e579a remove transparency from dark theme sidebar background (#1127) 2019-12-29 09:49:31 -08:00
Tom Moor 10e038be5b lint 2019-12-23 18:12:16 -08:00
Tom Moor 76365e8560 fix: Double scrollbars on search filter dropdowns
closes #1125
2019-12-23 18:08:40 -08:00
Tom Moor 595cb9cda5 fixes: Document menu on search results is empty if not previously loaded
closes #1124
2019-12-23 17:59:15 -08:00
Tom Moor b6fd9f4211 fix: Invites appearing in search author filter
closes #1123
2019-12-23 17:39:25 -08:00
Tom Moor 98dda567c2 fix: User records not written correctly on signin (#1119)
* Initial fix for #1116

* clarify logic
2019-12-22 20:14:06 -08:00
Tom Moor c20282de06 feat: Add child document preloading 2019-12-22 17:06:39 -08:00
Tom Moor d995f27736 feat: Add parentDocumentId option to documents.list endpoint 2019-12-22 17:06:29 -08:00
Tom Moor 6bf2069fa7 fixes #1115 (#1118) 2019-12-22 14:54:12 -08:00
Tom Moor adf323713e fix: Documentation spelling 2019-12-18 21:02:32 -08:00
Tom Moor 293c3b7b9c fix: Move references spacing directly below content (#1113)
* fix: Move references spacing directly below content

* Child document -> Nested document
2019-12-18 21:00:36 -08:00
Tom Moor 949dd296b4 fix: 1px heading misalignment 2019-12-17 23:16:16 -08:00
Tom Moor ca0de9fb5a fix: Incorrect sidebar positioning on mobile in edit mode
closes #1108
2019-12-17 19:55:23 -08:00
Tom Moor 89b87c5268 fix: Emails should be stored and processed in lowercase (#1109) 2019-12-17 19:44:50 -08:00
Tom Moor 4511fb7259 bump: RME 2019-12-16 22:44:15 -08:00
Tom Moor 6b378bf78f Remove link to old roadmap [ci skip] 2019-12-15 21:21:27 -08:00
Tom Moor 671fa9cc84 fix: Para floating on signin page when guest signin not enabled 2019-12-15 20:59:36 -08:00
Tom Moor c360d7cd8c fix: SocketProvider throws error when websockets disabled 2019-12-15 19:49:47 -08:00
Tom Moor 6d8216c54e feat: Guest email authentication (#1088)
* feat: API endpoints for email signin

* fix: After testing

* Initial signin flow working

* move shared middleware

* feat: Add guest signin toggle, obey on endpoints

* feat: Basic email signin when enabled

* Improve guest signin email
Disable double signin with JWT

* fix: Simple rate limiting

* create placeholder users in db

* fix: Give invited users default avatar
add invited users to people settings

* test

* add transaction

* tmp: test CI

* derp

* md5

* urgh

* again

* test: pass

* test

* fix: Remove usage of data values

* guest signin page

* Visually separator 'Invited' from other people tabs

* fix: Edge case attempting SSO signin for guest email account

* fix: Correctly set email auth method to cookie

* Improve rate limit error display

* lint: cleanup / comments

* Improve invalid token error display

* style tweaks

* pass guest value to subdomain

* Restore copy link option

* feat: Allow invite revoke from people management

* fix: Incorrect users email schema does not allow for user deletion

* lint

* fix: avatarUrl for deleted user failure

* change default to off for guest invites

* fix: Changing security settings wipes subdomain

* fix: user delete permissioning

* test: Add user.invite specs
2019-12-15 18:46:08 -08:00
Tom Moor 5731ff34a4 fix: Archived and then deleted documents appear in archived tab after loading trash 2019-12-07 12:39:49 -08:00
Tom Moor cbd9ff2dd9 fixes #1093 – account for no previous revision in backlinks service 2019-12-07 11:40:15 -08:00
Tom Moor 504aa9f7bb Add AWS_REGION to heroku install 2019-12-06 16:48:36 -08:00
Tom Moor a2a7f5ef5c Update docs to recommend against using .env in prod [ci skip] 2019-12-05 16:57:17 -08:00
Tom Moor 9427f06031 Added minimum Redis version. [ci skip] 2019-12-05 16:52:32 -08:00
Tom Moor dd11bb9079 feat: Add warning for self-hosted installations that don't auth auth method configured 2019-12-05 13:22:06 -08:00
Tom Moor 828ce086cc fix: Account for unset S3 url when starting application 2019-12-05 12:55:46 -08:00
Tom Moor 682151554b fix: Additional SQL cascades required 2019-11-18 20:14:55 -08:00
Tom Moor 3ea79dd31a fix: Additional SQL cascades required 2019-11-18 19:49:33 -08:00
Tom Moor e404955394 feat: Trash (#1082)
* wip: trash

* Enable restoration of deleted documents

* update Trash icon

* Add endpoint to trigger garbage collection

* fix: account for drafts

* fix: Archived documents should be deletable

* fix: Missing delete cascade

* bump: upgrade rich-markdown-editor
2019-11-18 18:51:32 -08:00
Tom Moor 14f6e6abad feat: Add support for InVision live images
closes #946
2019-11-03 15:32:43 -08:00
Himanshu Agarwal f06097d9e8 chore: Remove marketing material from OSS project (#941)
* changes to support Plainhome

* changes to env sample

* changes to env variable names

* formatter fixes

* remove the content pages

* test fix

* lint fixes

* minor fixes

* removed unnesscary routes

* Apply suggestions from code review

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* removed team name from env
2019-11-03 15:01:46 -08:00
Tom Moor dce0c4ac73 yarn upgrade
closes #1066
2019-11-03 12:46:47 -08:00
Tom Moor ae6d24c343 upgrade: set-value 2019-11-03 12:26:43 -08:00
Tom Moor 3c794ec5b6 fix: Bump RME, closes #1077 2019-10-30 19:33:57 -07:00
Tom Moor f7a9152ee3 fix: Refreshing search page with special character in query does not reflect
fix: Search query that looks like regex causes JS error
2019-10-27 22:34:11 -07:00
Tom Moor 77153a2529 fix: More space for new empty search state 2019-10-27 22:12:18 -07:00
Tom Moor 2e61bb7d88 feat: Add publish shortcut to keyboard shortcuts overlay 2019-10-27 22:07:01 -07:00
Tom Moor 9ef9c75c6b feat: Add keyboard shortcut to publish document
closes #1073
2019-10-27 18:04:45 -07:00
Tom Moor 98cd93c99c Delete yarn-error.log 2019-10-27 17:02:13 -07:00
Tom Moor 3a8cd2bb35 fix: File upload input must stopPropagation of click events otherwise click event is triggered on sidebar menu item and file choose dialog never appears
closes #1065
2019-10-27 16:59:36 -07:00
Tom Moor e72608938a chore: upgrade flow-typed 2019-10-26 23:50:02 -07:00
Tom Moor e024b1b042 Create SECURITY.md 2019-10-26 22:14:46 -07:00
Tom Moor 3099eaaf12 chore: upgrade micromatch 2019-10-26 21:59:07 -07:00
Tom Moor b4d6c70b29 chore: upgrade google-auth-library 2019-10-26 21:44:45 -07:00
Tom Moor 4080216fe3 chore: upgrade koa-x 2019-10-26 21:35:50 -07:00
Tom Moor 1b415ac19a chore: upgrade html-webpack-plugin 2019-10-26 21:25:09 -07:00
Tom Moor a9f851897d chore: upgrade sequelize 2019-10-26 21:16:36 -07:00
Tom Moor db94a95001 chore: upgrade nodemon 2019-10-26 20:41:50 -07:00
Tom Moor 2d2ad83469 fix: Cannot move a document to nested child in private collection 2019-10-16 08:45:21 -07:00
Tom Moor b95e1cdef3 fix: Keep document menu open when toggling starred status to provide better feedback 2019-10-15 23:14:14 -07:00
Tom Moor 66197a967a fix: Document history menu item should toggle history sidebar 2019-10-15 21:42:07 -07:00
Tom Moor 5263d8a315 fix: Collaborator avatars should overlap 2019-10-15 21:30:33 -07:00
Tom Moor 97c8bfc27f fix: Protect against redirecting back to the same doc
closes #975
2019-10-15 20:59:00 -07:00
Tom Moor b093acd94f fix: closes #1064 – only show active users in collection members 2019-10-15 20:19:08 -07:00
Tom Moor 21af0bd8be fix: Sidebar links unexpand
closes #1044
2019-10-13 16:15:42 -07:00
Tom Moor 766a52f10e flow 2019-10-13 09:32:58 -07:00
Tom Moor 84c1cfea14 lint 2019-10-12 23:08:14 -07:00
Tom Moor 01f672fac9 fix: Drop to import 2019-10-12 23:03:58 -07:00
Tom Moor 5eb384b2c8 refactor, aria props 2019-10-12 21:08:04 -07:00
Mateusz Sapielak 8ea1323a7c fix: Ensure menus are always kept on the screen (#1036)
* ensuring dropdowns fit on the screen

* refactoring

* fix flow types

* no longer fixing the elements which should resolve scrolling issues

* fix menus that should be fixed

* styled-components syntax was wrong

* account for fixed dropdowns when handling overflowing menus

* Update app/components/DropdownMenu/DropdownMenu.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>
2019-10-12 20:21:48 -07:00
Tom Moor 00d5b58850 fix: Collection membership list does not update after change to private
closes #1059
2019-10-12 20:14:18 -07:00
Tom Moor 65b8fb40f3 fix: Empty collection causes export failure
closes #1043
2019-10-12 19:31:15 -07:00
Tom Moor ec4d4fb20f fix: Show error message when signing in to suspended account
closes #1056
2019-10-12 19:16:17 -07:00
Tom Moor fc201663c6 fix: closes #1058 – orphaned archived headig 2019-10-12 13:40:05 -07:00
Tom Moor d4347b6f4b fix: Restore option missing in archived documents 2019-10-12 13:24:48 -07:00
Tom Moor 2d913e3766 fix: Event activity endpoint with deleted actor
closes #1061
2019-10-12 13:03:50 -07:00
Tom Moor e33aaec469 fix: Remove nonsense relationship 2019-10-10 08:25:23 -07:00
Tom Moor 24231053af feat: Child document references (#1054)
* feat: Child document references

* refactor: naming

* lint: flow
2019-10-08 08:01:30 -07:00
Tom Moor 927e0b3fb8 Update LICENSE 2019-10-07 20:45:45 -07:00
Tom Moor b0ceae5af0 fix: Restore 'Publish' action in drafts 2019-10-06 21:09:49 -07:00
Tom Moor 6fde4e2ec5 feat: Add new doc button when search results are empty
closes #1022
2019-10-05 20:06:48 -07:00
Tom Moor b42e9737b6 feat: Memberships (#1032)
* WIP

* feat: Add collection.memberships endpoint

* feat: Add ability to filter collection.memberships with query

* WIP

* Merge stashed work

* feat: Add ability to filter memberships by permission

* continued refactoring

* paginated list component

* Collection member management

* fix: Incorrect policy data sent down after collection.update

* Reduce duplication, add empty state

* cleanup

* fix: Modal close should be a real button

* fix: Allow opening edit from modal

* fix: remove unused methods

* test: fix

* Passing test suite

* Refactor

* fix: Flow UI errors

* test: Add collections.update tests

* lint

* test: moar tests

* fix: Missing scopes, more missing tests

* fix: Handle collection privacy change over socket

* fix: More membership scopes

* fix: view endpoint permissions

* fix: respond to privacy change on socket event

* policy driven menus

* fix: share endpoint policies

* chore: Use policies to drive documents UI

* alignment

* fix: Header height

* fix: Correct behavior when collection becomes private

* fix: Header height for read-only collection

* send id's over socket instead of serialized objects

* fix: Remote policy change

* fix: reduce collection fetching

* More websocket efficiencies

* fix: Document collection pinning

* fix: Restored ability to edit drafts
fix: Removed ability to star drafts

* fix: Require write permissions to pin doc to collection

* fix: Header title overlaying document actions at small screen sizes

* fix: Jank on load caused by previous commit

* fix: Double collection fetch post-publish

* fix: Hide publish button if draft is in no longer accessible collection

* fix: Always allow deleting drafts
fix: Improved handling of deleted documents

* feat: Show collections in drafts view
feat: Show more obvious 'draft' badge on documents

* fix: incorrect policies after publish to private collection

* fix: Duplicating a draft publishes it
2019-10-05 18:42:03 -07:00
Tom Moor 4164fc178c fix: First auto-save unfocuses document (#1046)
* fix: Autosave unfocuses document

* Revert unneeded change

* test: le fix

* fix: Handle offline state
fix: Untitled documents appear with empty titles

* fix: Draft bubble roundness (yes, it doesnt belong here but see it, fix it)
2019-09-22 17:09:11 -07:00
Tom Moor b1a1d24f9c fix: Unknown Slack users should be able to search team accessible docs (#1049)
* fix: Unknown Slack users should be able to search team accessible docs

* test: fix flaky test

* test: remove obsolete snapshot

* lint

* flow

* fix: Spelling mistake
2019-09-22 11:52:15 -07:00
Tom Moor d46530a4a0 Merge branch 'rylxes-master' 2019-09-21 13:27:18 -07:00
Tom Moor 3f7d4f7873 fix: tweak wording 2019-09-21 13:27:00 -07:00
Tom Moor b20d41a047 test: Update snapshots 2019-09-21 13:26:28 -07:00
Tom Moor 1797a0e90c Merge branch 'master' of https://github.com/rylxes/outline into rylxes-master 2019-09-21 13:11:31 -07:00
Tom Moor dd5e30f414 fix: Account for missing localStorage (browser security settings?) 2019-09-21 12:42:28 -07:00
Tom Moor 690299ac6b Redirect unknown integration to integrations home, rather than 404 2019-09-21 12:28:34 -07:00
Tom Moor 7ff0a1d820 tidy env sample 2019-09-21 12:23:47 -07:00
Juncheol Cho 3292d95d8b chore: add env parameter for enforce https (#1042)
* env parameter for enforce https

* Update app.js

fix format for multi-line condition

* Update app.js

fix code format

* Update app.js
2019-09-18 23:26:27 -07:00
Tom Moor 18658e354a Update Editor.js 2019-09-15 21:18:31 -07:00
Sherriff Agboola 02f2868d06 re-added the .env.sample 2019-09-15 23:30:41 +01:00
Sherriff Agboola 4ea4bd41cd changed lastActiveAt boolean to string 2019-09-15 23:28:11 +01:00
Sherriff Agboola 593aa80abf Show last active date on people list instead of joined date 2019-09-15 23:07:43 +01:00
Tom Moor f43643f43b fix: Image and horizontal highlight on selected 2019-09-15 14:53:27 -07:00
Tom Moor e2453b5b2a fix: Editor headings offset 2019-09-15 14:42:32 -07:00
Tom Moor 439ae1e832 fix: CSP for client-side editor uploads 2019-09-15 14:41:34 -07:00
Agboola Sherriff 228c0c45e7 Merge pull request #1 from outline/master
merge
2019-09-14 21:43:17 +01:00
Tom Moor 6520a501e3 fix: accessiblity improvements, focus states, real buttons 2019-08-30 00:27:40 -07:00
Tom Moor 140f009b4d fix: Improve accessibility of buttons / tab indexes with tooltips 2019-08-29 00:06:21 -07:00
Tom Moor 579eaf325b feat: Add keyboard shortcuts to tooltips 2019-08-28 23:30:27 -07:00
Tom Moor b56f8e7870 feat: add padlock next to private collections in lists 2019-08-28 21:41:40 -07:00
Tom Moor 79f8a41b5b fix: Loading state interrupts infinite scrolling 2019-08-28 21:01:35 -07:00
dependabot[bot] abf5b79de6 chore(deps): bump mixin-deep from 1.3.1 to 1.3.2 (#1031)
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-28 16:53:05 -07:00
Tom Moor c60295fcca fix: Slack notification not sent on publish, reported via Spectrum 2019-08-28 00:22:22 -07:00
Tom Moor 5bd2409e39 Revert "WIP"
This reverts commit ccfad1d800.
2019-08-28 00:03:11 -07:00
Tom Moor 780c5c1129 fix: Add github gist styles to CSP 2019-08-27 23:26:32 -07:00
Tom Moor b98c908568 fix: Add github gist to CSP
closes #1028
2019-08-27 23:12:09 -07:00
Tom Moor f1e8633623 fix: Add blob protocol to imgSrc 2019-08-27 09:21:53 -07:00
Tom Moor 39de7c0aee Merge branch 'master' of github.com:outline/outline 2019-08-27 09:19:07 -07:00
dependabot[bot] 8b942cf202 chore(deps): bump eslint-utils from 1.3.1 to 1.4.2 (#1026)
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.2.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](https://github.com/mysticatea/eslint-utils/compare/v1.3.1...v1.4.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-26 13:11:43 -07:00
Tom Moor ccfad1d800 WIP 2019-08-25 15:20:49 -07:00
Tom Moor 347015cf86 feat: improve physicality of draft bubble (it's the little details) 2019-08-24 17:43:23 -07:00
Tom Moor d96afad6c0 fix: Document heading vertical alignment 2019-08-24 10:22:58 -07:00
Tom Moor d066468bc0 chore: Add additional env variable checks for self-hosted installations 2019-08-24 10:19:21 -07:00
Tom Moor b6dd55fbea chore: Add additional env variable checks for self-hosted installations 2019-08-23 22:43:41 -07:00
Tom Moor 8f2d31876d feat: Port new color picker from Journals branch 2019-08-23 22:24:06 -07:00
Tom Moor 8e76c4e8f1 fix: Add missing audit log events UI 2019-08-23 21:51:05 -07:00
Tom Moor 468fd792ed fix: Allow iframes in CSP 2019-08-23 19:39:40 -07:00
Tom Moor c1bef2db59 fix: additional domains in CSP, dont send headers with API responses 2019-08-23 19:21:16 -07:00
Tom Moor 53cc69a413 fix: additional security headers by default 2019-08-23 19:00:38 -07:00
Tom Moor 7e62b3b9aa chore: Upgrade Node to v12 (#1023)
* chore: Upgrade Node to v12

* test: Upgrade test node image
2019-08-23 18:14:51 -07:00
Tom Moor 54565fff74 fix: Handle doc not found / no permission
closes #1021
2019-08-21 22:11:54 -07:00
Tom Moor e2b28dfeb7 refactor: Policies Architecture (#1016)
* add policy serialize method

* Add policies to collection responses

* wip

* test: remove .only

* refactor: Return policies with team and document requests

* store policies on the client

* refactor: drive admin UI from policies
2019-08-21 21:41:37 -07:00
Tom Moor cf18b952a4 chore: Move Dockerfile to Alpine
closes #1020
2019-08-21 08:19:27 -07:00
Tom Moor 929722e1c1 fix: double load on mount. closes #1015 2019-08-20 22:13:36 -07:00
Tom Moor c0ec349ad2 bump RME 2019-08-18 20:16:49 -07:00
Tom Moor 4d2eda6750 fix: Embed does not show selected highlight 2019-08-18 12:45:54 +01:00
Tom Moor db08263e5c fix: Nested lists 2019-08-15 14:05:15 +02:00
Tom Moor 33320ba13d perf: Improve speed of rendering tables
fix: Issue rendering tables with certain cells empty of content
2019-08-14 19:17:10 +01:00
Tom Moor 4dad3f3287 fix: Bump RME, more editor fixes 2019-08-12 20:17:55 -07:00
Tom Moor f87b561685 feat: Allow export of collections as sync zip (#1013)
* feat: Allow export of collections as sync zip

* test: Add spec
2019-08-09 20:37:51 -07:00
Tom Moor d024d31f66 refactor: flow typing (#1012)
* fix: padding

* fix: Minor button alignment issues

* feat: Add icon to invite people button

* WIP
2019-08-08 23:09:09 -07:00
Tom Moor 7b2eea0009 feat: Add icon to invite people button 2019-08-08 22:10:11 -07:00
Tom Moor 2ce11365ab fix: Minor button alignment issues 2019-08-08 22:07:29 -07:00
Tom Moor e936aa82c9 fix: padding 2019-08-08 21:25:51 -07:00
Tom Moor a26ae119fe feat: Keyboard shortcut reference inside editor 2019-08-08 21:13:58 -07:00
Tom Moor 789a1acea1 feat: Add 'edit' item to document menu 2019-08-08 20:00:56 -07:00
Tom Moor dd95c9cba9 feat: Opensearch tags / descriptor 2019-08-08 19:52:29 -07:00
Tom Moor ae1cf2d00c fix: Upgrade RME (fix link toolbar blur) 2019-08-07 23:22:06 -07:00
Tom Moor 978eda3ad2 fix: Deleted collections not showing in audit log
feat: Show titles of objects in audit log
fix: modelId not saved with share events
fix: List item squashes avatar at small screen sizes
2019-08-07 20:52:59 -07:00
Tom Moor 0f028812e1 fix: Flash of documents on home if drafts load before main request
fix: Drafts loading placeholder misplaced
2019-08-06 23:46:27 -07:00
Tom Moor c18e4cd43e feat: separate draft count and icon in sidebar 2019-08-05 23:17:41 -07:00
Tom Moor 7f10fe728f fix: Logout -> Log out 2019-08-05 22:43:24 -07:00
Tom Moor 5c99116898 feat: redirect to requested doc after authentication 2019-08-05 22:25:19 -07:00
Tom Moor 38a67b1f9e fix: Avatars should overlap in document header 2019-08-05 21:10:44 -07:00
Tom Moor fb4f6822a4 feat: Events / audit log (#1008)
* feat: Record events in DB

* feat: events API

* First pass, hacky activity feed

* WIP

* Reset dashboard

* feat: audit log UI
feat: store ip address

* chore: Document events.list api

* fix: command specs

* await event create

* fix: backlinks service

* tidy

* fix: Hide audit log menu item if not admin
2019-08-05 20:38:31 -07:00
Tom Moor 75b03fdba2 Bump RME 2019-08-04 12:59:14 -07:00
Tom Moor 60a31992d0 chore: disable typescript detection in VSCode 2019-08-01 21:34:17 -07:00
Tom Moor be09b6a3bd Merge pull request #1004 from shyim/patch-1
chore: add missing EXPOSE rule
2019-07-30 08:08:09 -07:00
Tom Moor 92a18159b5 feat: Export collection as direct download instead of emailing (#1001)
* feat: Export collection as zip instead of emailing

* Flow typing download.js
2019-07-29 22:35:34 -07:00
Shyim 7c01904cec Add missing expose 2019-07-29 20:48:26 +02:00
Douglas Gadêlha c9b86ec2e7 Fix document duplicate command (#1003) 2019-07-27 10:33:38 -07:00
Tom Moor 466ba6ec1f fix: don't echo request back for unknown endpoints
closes #998
2019-07-25 23:17:45 -07:00
Tom Moor 9cbc9aaad6 chore: RealtimeBoard -> Miro
closes #996
2019-07-25 22:56:20 -07:00
Tom Moor 5ec2c3c7a0 fix: Add support for mm.tt mindmeister links 2019-07-25 22:42:23 -07:00
Tom Moor a8d8fecd15 Update DropdownMenu.js 2019-07-13 12:56:04 -07:00
Tom Moor be09ffea7b feat: sharing drafts (#991)
closes #988
2019-07-13 12:40:25 -07:00
Tom Moor 18d104218e fix: public share links attempting to load backlinks 2019-07-13 11:33:32 -07:00
Tom Moor a515631e21 feat: document menu available in sidebar (#986)
* feat: document menu available in sidebar

* fix: more accessible blue

* feat: accessible blue
feat: clearer new doc button
closes #983

* lint
2019-07-13 10:15:38 -07:00
dependabot[bot] 28954a19af chore(deps): bump lodash from 4.17.11 to 4.17.13 (#987)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.13.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.13)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-12 13:32:56 -07:00
Tom Moor b3f847a371 fix: User profiles dont open from document collaborator facepile 2019-07-11 22:32:37 -07:00
Tom Moor c9da515d4c fix: force resolution of js-yaml (WS-2019-0063) 2019-07-09 21:32:42 -07:00
Tom Moor 3d805d5fe7 chore: tooltip update / remove css loader (#985)
* fix: Add suspended filter to people management #984

* chore: removing css loader

* pui-react-tooltip -> tippy
closes #980

* remove extract-text-plugin
2019-07-09 21:17:25 -07:00
Tom Moor 7db0be0a6a fix: 2px misalignment
feat: Improved readability of tabs and subheadings
2019-07-07 21:40:34 -07:00
Tom Moor 091e542406 feat: Backlinks (#979)
* feat: backlinks

* feat: add backlinkDocumentId to documents.list

* chore: refactor
fix: create and delete backlink handling

* fix: guard against self links

* feat: basic frontend
fix: race condition

* styling

* test: fix parse ids

* self review

* linting

* feat: Improved link styling

* fix: Increase clickable area at bottom of doc / between references

* perf: global styles are SLOW
2019-07-07 19:25:45 -07:00
Tom Moor 599e5c8f5d Merge branch 'thenanyu-refactor-doc-dirty-logic' 2019-07-07 19:20:04 -07:00
Tom Moor 14b746c676 Update documentation 2019-07-07 19:19:21 -07:00
Tom Moor 3e3db7435f lint 2019-07-07 19:18:51 -07:00
Tom Moor 2ef1d3f95c fix: email link in onboarding support doc 2019-07-07 16:13:56 -07:00
Tom Moor 2cfdf7043b fix: zIndex of toolbar buttons 2019-07-07 11:30:15 -07:00
Tom Moor 8ac47074fe Update README.md 2019-07-07 09:29:56 -07:00
Nan Yu beb3a80d3d fix up the readme and sample .env to smooth out first dev experience (#976)
* chore: fix up the readme and sample .env to smooth out first dev experience

* fix indentation
2019-07-07 09:14:27 -07:00
thenanyu dea6085a11 refactor document dirty and empty logic 2019-07-06 21:45:50 -07:00
Tom Moor ccc0906b0a feat: Improved onboarding documents (#970)
* feat: New onboarding documents

* Images -> blocks

* Add tips

* test: removes assumptions of welcome documents

this actually results in the tests being much more understandable too

* add db flag when document was created from welcome flow
2019-07-04 10:33:00 -07:00
dependabot[bot] eb3a1dd673 Bump axios from 0.18.0 to 0.18.1 (#974)
Bumps [axios](https://github.com/axios/axios) from 0.18.0 to 0.18.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.18.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.18.0...v0.18.1)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-04 00:09:30 -07:00
dependabot[bot] b12f15de52 Bump handlebars from 4.1.0 to 4.1.2 (#973)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.0 to 4.1.2.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.0...v4.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-04 00:04:43 -07:00
dependabot[bot] e1e4c006d2 Bump fstream from 1.0.11 to 1.0.12 (#972)
Bumps [fstream](https://github.com/npm/fstream) from 1.0.11 to 1.0.12.
- [Release notes](https://github.com/npm/fstream/releases)
- [Commits](https://github.com/npm/fstream/compare/v1.0.11...v1.0.12)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-04 00:00:41 -07:00
Tom Moor d3abbcf9d5 feat: Added tooltips to editor controls 2019-07-03 21:32:21 -07:00
Tom Moor 34f011d99f Bump RME (fixes special chars in code blocks) 2019-06-29 00:04:26 -07:00
Tom Moor 232216193f fix: Correctly detect Slack team 2019-06-27 22:35:49 -07:00
Tom Moor 5a6b9caabc fix: bring local and remote delete inline 2019-06-26 22:18:18 -07:00
Tom Moor ce675a7fe2 fix: Remove collections/document when removed elsewhere 2019-06-26 22:10:24 -07:00
Tom Moor 3d7eb11a49 fix: react warning with DropToImport 2019-06-26 22:10:07 -07:00
Tom Moor 8200e36b89 fix: Accessibility warning with react-modal 2019-06-26 22:09:52 -07:00
Tom Moor 1ed257de62 fix: Race condition fetching collection after doc create 2019-06-26 20:24:20 -07:00
Tom Moor f0de382367 fix: Deeply nested document breadcrumb menu 2019-06-25 23:21:04 -07:00
Tom Moor 5f8956e5c6 fix: more language cleanup 2019-06-25 22:06:20 -07:00
Tom Moor b93824915d fix: Settings screen cleanup 2019-06-25 21:53:23 -07:00
Tom Moor 7aea6458ce fix: Update email in auth service should update email in Outline 2019-06-25 21:44:46 -07:00
Tom Moor 424af9e72c feat: Show account email address on notification settings 2019-06-25 21:38:23 -07:00
Tom Moor c9c5e43389 fix: add support for help slack command 2019-06-25 20:43:59 -07:00
Tom Moor 46ad1feb96 chore: Remove welcome email for Slack users (against TOS) 2019-06-25 20:28:45 -07:00
Tom Moor 8faed5de6f chore: update about page 2019-06-25 00:22:27 -07:00
Tom Moor 5c39287a59 Merge branch 'mogita-update-installation-guide' 2019-06-24 23:08:06 -07:00
Tom Moor b9e48e86c1 Remove ap- from AWS_REGION example 2019-06-24 23:07:54 -07:00
Tom Moor d39260c5c7 Merge branch 'update-installation-guide' of https://github.com/mogita/outline into mogita-update-installation-guide 2019-06-24 22:59:43 -07:00
Tom Moor d5192acabf feat: invites (#967)
* stub invite endpoint

* feat: First pass invite UI

* feat: allow removing invite rows

* First pass: sending logic

* fix: label accessibility

* fix: add button submits
incorrect permissions
middleware flow error

* 💚

* Error handling, email filtering, tests

* Flow

* Add Invite to people page
Remove old Tip

* Add copy link to subdomain
2019-06-24 22:14:59 -07:00
mogita 1c8e074662 fix: remove redundant line breaks 2019-06-24 13:27:22 +08:00
mogita 4bea33eae0 Add port number to test db 2019-06-24 11:31:14 +08:00
mogita c278172290 Merge from upstream master 2019-06-24 11:29:21 +08:00
mogita fefb9d0c13 Prefer yarn for building 2019-06-24 11:22:56 +08:00
mogita c865c57f92 Add port number 2019-06-24 11:22:16 +08:00
Tom Moor f406faf08e chore: remove asyncLock
closes #928
2019-06-23 17:57:37 -07:00
Tom Moor 0a8a685c12 fix: improved pagination validation 2019-06-23 16:11:15 -07:00
Tom Moor 32f83311f6 chore: upgrade sequelize (#965)
* 0.18.0

* chore: Upgrade sequelize 4 -> 5

* fix: migrations v5 support

* fix: Majority of test failures

* fix: the rest of v5 tests
2019-06-23 15:49:45 -07:00
Tom Moor 595adeb55f 0.18.0 2019-06-19 00:35:13 -07:00
Himanshu Agarwal 0079593446 Fix: Now supports AWS signature version 4. (#949)
* intial commiy

* cleaning code

* added makeCredential to s3.js and removed extra module dependecy

* lint fixes

* minor fix

* minor fixes

* changed encoding type from string to any

* added new env var to env.sample
2019-06-19 00:33:38 -07:00
Tom Moor ebd9535cb4 Flow 2019-06-19 00:06:24 -07:00
Tom Moor 318ad18894 closes #944 2019-06-18 23:45:29 -07:00
Tom Moor e9e21f280e closes #964 2019-06-18 23:39:29 -07:00
Tom Moor 86b2dbf5c8 docs: Add append flag to documentation 2019-06-13 23:38:57 -07:00
arpitsingh94 7dfe8785a2 Added ability to append to documents. Added test cases for the same (#963)
* added ability to append to documents. Added test cases for the same

* made changes required for lint test

* updated snapshot for document.test.js to reflect new test cases added

* append should not enforce newline character
2019-06-13 23:36:24 -07:00
mogita 4448ea8e4b Update placeholders 2019-05-31 11:27:01 +08:00
mogita cb0da79be3 Update installation guide 2019-05-31 11:26:26 +08:00
Tom Moor 18a5cd8765 Bump RME 2019-05-25 22:30:03 -07:00
Tom Moor ad51ac28b1 Table editing (#955)
* WIP

* Up deps
2019-05-25 11:26:51 -07:00
Tom Moor c6ae18503a Closes #903 - Added more syntax highlighters 2019-05-19 18:45:42 -07:00
Tom Moor 2db8cdc7d1 Fixes #952 – Page jump 2019-05-19 17:49:51 -07:00
Tom Moor 8942c7afe8 Add integration pages for Abstract integration 2019-05-07 20:02:23 -07:00
Tom Moor 402638ca54 Added: Abstract public share embed support 2019-05-07 19:46:02 -07:00
Tom Moor d5f6311bbc Fixed: Added support for new loom domain name 2019-05-07 19:32:03 -07:00
Tom Moor 3eb67eaecf Fixes: Calm notifications when hitting CMD+S while editing 2019-04-23 20:54:24 -07:00
Tom Moor bc918b7bf5 Fixes: Search filter dropdown should close on selection 2019-04-23 20:30:40 -07:00
Tom Moor 6d03257cc1 Bump RME – More editor fixes 2019-04-23 20:22:49 -07:00
Tom Moor a35a047cc2 Fixes: Loading indicator on search screen load
Fixes: Unscrollable dropdowns with large datasets
2019-04-23 07:51:02 -07:00
Tom Moor da7fdfef0a Improved search filtering (#940)
* Filter search by collectionId

* Improve spec, remove recursive import

* Add userId filter for documents.search

* 💚

* Search filter UI

* WIP UI

* Date filtering
Prevent dupe menu

* Refactor

* button

* Added year option, improved hover states

* Add new indexes

* Remove manual string interpolation in SQL construction

* Move dateFilter validation to controller

* Fixes: Double query when changing filter
Fixes: Visual jump between filters in dropdown

* Add option to clear filters

* More clearly define dropdowns in dark mode

* Checkbox -> Checkmark
2019-04-23 07:31:20 -07:00
Tom Moor a256eba856 Fixes #936 2019-04-20 15:31:51 -07:00
Tom Moor 8f276731ed Fixes: Socket reconnecting when changing theme 2019-04-20 15:19:35 -07:00
Tom Moor eb638ba68d Fixed: Page component naming 2019-04-20 15:07:25 -07:00
Tom Moor b54583f438 👕 2019-04-20 12:01:09 -07:00
Tom Moor 8ba27762d1 Fix: Race condition in websocket emit 2019-04-20 11:40:14 -07:00
Tom Moor d552d1e34d Prefix socket names 2019-04-18 20:37:46 -07:00
Tom Moor 56a6db7d2a Cleanup 2019-04-18 18:51:16 -07:00
Tom Moor f491029c21 Missing divider on document header 2019-04-17 23:13:25 -07:00
Tom Moor 0bc6662366 Update RME: Fixes horizontal rules being interpreted as headings 2019-04-17 23:09:43 -07:00
Tom Moor 5b34a4f076 Fix: Don't send notifications for autosave events 2019-04-17 21:55:11 -07:00
Tom Moor 77f28584d4 Merge branch 'master' of github.com:outline/outline 2019-04-17 21:49:25 -07:00
Tom Moor 07a941a65d Websocket Support (#937)
* Atom / RSS meta link

* Spike

* Feeling good about this spike now

* Remove document.collection

* Remove koa.ctx from all presenters to make them portable outside requests

* Remove full serialized model from events
Move events.add to controllers for now, will eventually be in commands

* collections.create event
parentDocument -> parentDocumentId

* Fix up deprecated tests

* Fixed: Doc creation

* documents.move

* Handle collection deleted

* 💚

* Authorize room join requests

* Move starred data structure
Account for documents with no context on sockets

* Add socket.io-redis

* Add WEBSOCKETS_ENABLED env variable to disable websockets entirely for self hosted
New installations will default to true, existing installations to false

* 💚 No need for promise response here

* Reload notice
2019-04-17 19:11:23 -07:00
Tom Moor 2ab35e23f3 Atom / RSS meta link 2019-04-11 19:53:26 -07:00
Tom Moor 4a571a088e Closes #930 – Don't allow launch of move dialog from drafts 2019-04-10 21:13:21 -07:00
Tom Moor 0c1bf1586d Closes outline/issues#926
Closes outline/issues#888
Added native lazy loading in prep for Chrome release
2019-04-10 21:06:53 -07:00
Tom Moor c1256c61aa Search archived documents (#932)
* POC

* Improved styling

* Test
2019-04-09 09:20:30 -07:00
Tom Moor 57e051d62b Clarify available options in document move
closes #852
2019-04-08 22:27:10 -07:00
Tom Moor a3ca3447d1 Closes #929 – Clarify pin feature 2019-04-08 21:47:27 -07:00
Tom Moor 763f57a3dc Move document improvements (#927)
* Show all collections in UI

* Introduce command pattern

* Actually remove from previous collection

* Stash

* Fixes: Promises resolved outside of response lifecycle

* 💚

* 💚

* documentMover tests

* Transaction

* Perf. More in transactions
2019-04-08 21:25:13 -07:00
Tom Moor 16066c0b24 Add websocket reserved domains 2019-04-07 17:05:05 -07:00
Tom Moor 705938e622 Bump RME, fix tab to indent lists 2019-04-07 15:57:05 -07:00
Tom Moor d668bd5646 Remove duplicate save in archive
Improve documents.archive test
2019-04-07 09:56:09 -07:00
Tom Moor 135d035eb5 Fixes: Unneccessary refresh navigating to settings 2019-04-06 17:59:15 -07:00
Tom Moor ea3e81acc4 Closes #922 - Dark mode fixes 2019-04-06 17:07:14 -07:00
Tom Moor 1fc5578349 Fixes: Ensure publishing info does not wrap 2019-04-06 16:46:20 -07:00
André Glatzl e33d447a0d Issue #919 : Show DocumentPath in Breadcrumbs at Publishing Info, instead of only showing collection's name (#920)
closes https://github.com/outline/outline/issues/919
2019-04-06 16:45:08 -07:00
Tom Moor bf685c7703 Update routeHelpers.js 2019-04-06 16:29:23 -07:00
Tom Moor 642c11ff7d Document Archive (#921)
* WIP: Archive

* WIP

* Finishing up archive endpoints

* WIP

* Update docs

* Flow

* Stash

* Add toast message confirmations

* Redirect handling, fixed publishhing info for archived docs

* Redirect to collection instead of home, remove unused pub info

* Account for deleted parent

* Trash -> Archive
Allow reading of archived docs

* Dont overload deletedAt

* Fixes

* 💚

* ParentDocumentId wipe for unarchived sub docs

* Fix: CMD+S exits editing
Fix: Duplicate user name on published but unedited docs

* Improve jank on paginated lists

* Prevent editing when archived

* 💚
Separate lint / flow steps
2019-04-06 16:20:27 -07:00
Tom Moor 76957865bb Ensure normalize on load, imported documents arent safe 2019-03-31 14:39:55 -07:00
Tom Moor 1883e77d5c Bump RME, improve perf 2019-03-30 23:36:02 -07:00
Tom Moor 20a54bd2e9 Don't publish by default 2019-03-30 23:35:53 -07:00
Tom Moor 76bb6c4341 Change dev ports to reduce clashes 2019-03-30 23:35:09 -07:00
Tom Moor 49e5748a4f Change dev ports to reduce clashes 2019-03-30 23:34:56 -07:00
Tom Moor 52a029a657 👕 2019-03-13 23:50:52 -07:00
Tom Moor 1ef528bbd7 Bump RME - closes #915 2019-03-13 23:49:54 -07:00
Tom Moor f80c3c6877 Fixed: Return error when Slack auth fails to help with debugging 2019-03-13 23:22:12 -07:00
Tom Moor a7d49e9042 Bump production dependencies with open CVEs
closes #916
2019-03-13 23:11:03 -07:00
Tom Moor 3fcfae257f Small flow issues 2019-03-13 23:00:41 -07:00
Tom Moor 3ef507c137 Fixes #918 - Add extra at bottom of document 2019-03-13 22:59:25 -07:00
Tom Moor 12ea37e71e Fixes: Text color on disabled buttons 2019-03-13 22:45:49 -07:00
Tom Moor aba3d25700 logger.warn does not exist 2019-03-13 09:03:51 -07:00
Tom Moor 7b7ec52eee Bump production dependencies with open CVEs 2019-03-12 23:54:35 -07:00
Tom Moor 680a9245bd More text color tweaking 2019-03-12 22:33:24 -07:00
Tom Moor 0c2d9f2f9c Tweak subheading colors 2019-03-12 22:11:33 -07:00
Tom Moor 59c82f1f06 Dark Mode (#912)
closes #704
2019-03-12 21:35:35 -07:00
Tom Moor 6445da33db Update Flex.js 2019-03-10 14:32:42 -07:00
Tom Moor a2749a752a ESC key should go back when editing a document 2019-03-09 20:12:43 -08:00
Tom Moor 38f4e6b9a2 Closes #909 2019-03-09 20:02:46 -08:00
Tom Moor fc7c485ba9 Add 'n' shortcut for new doc
Fixed cmd+enter shortcut to publish doc
Fixed keyboard shortcut display on non-mac
Fixed heading alignment
Fixed documents smaller than page should not scroll
2019-03-09 20:00:45 -08:00
Tom Moor f75783c2f1 Added empty state on user profiles when no documents edited 2019-03-09 18:55:54 -08:00
Tom Moor f11bba6b63 Remove logging 2019-03-09 18:43:40 -08:00
Tom Moor 24bf3766bf Add shortcut tip when searching 2019-03-09 16:10:53 -08:00
Tom Moor e3cb7f9055 Update index.js 2019-03-07 20:47:37 -08:00
Tom Moor 3db1a6679a Bump RME 2019-03-07 08:44:57 -08:00
Tom Moor 222f164247 Fixes: Don't send client connection issues to error tracker 2019-03-02 21:57:26 -08:00
Tom Moor d91f4045c9 Add favicon to serverside html 2019-03-02 21:43:07 -08:00
Tom Moor 8b639682ff Guard against empty error messages 2019-03-02 21:17:26 -08:00
Tom Moor 67ed017122 Fixes: toString of undefined 2019-03-02 21:11:36 -08:00
Tom Moor f1c14f943e Bump RME 2019-03-02 20:35:28 -08:00
Tom Moor 18aa3f3787 Fix specs, thanks for the breaking minor change jest 2019-03-02 16:16:46 -08:00
Tom Moor 4a90c57dfe More dependency upgrades 2019-03-02 16:02:44 -08:00
Tom Moor 565a0006c9 Remove lint-staged dependency 2019-03-02 15:56:41 -08:00
Tom Moor 78ee921244 Upgrade slug dependency 2019-03-02 15:51:02 -08:00
Tom Moor 78606e892a Merge master 2019-03-02 15:41:46 -08:00
Tom Moor f705da4f3b Update dependencies 2019-03-02 15:39:18 -08:00
Tom Moor fa38ab60eb Fixes: Unexpected token parsing sessions cookie (#905) 2019-03-02 14:58:56 -08:00
Tom Moor ad2e869dea 👕 2019-03-02 14:55:39 -08:00
Tom Moor b4796e5b35 Fixes: Cookie encoding issues 2019-02-28 23:23:44 -08:00
Tom Moor e3b105d1c0 Update Slack logo, closes #866 2019-02-20 21:08:54 -08:00
Tom Moor 1d93acefeb Bump RME – Fixes scroll to anchor
closes #902
2019-02-20 21:00:40 -08:00
Tom Moor 19fc99944a Adds 'post to channel' functionality. (#901)
* Adds 'post to channel' functionality. Closes #613

* Add specs
Update Slack integration marketing page

* Fix specs

* 💚
2019-02-19 22:42:13 -08:00
Tom Moor e283d15d7e Add mindmeister content pages 2019-02-18 11:40:26 -08:00
Tom Moor fbd311d352 Add mindmeister support 2019-02-18 11:32:21 -08:00
Tom Moor 15bc0e7629 Bump RME – Improves keyboard behavior around deleting inline code 2019-02-17 00:39:06 -08:00
Tom Moor 8af7c3c264 Closes #894 - Sidebar jumping regression 2019-02-17 00:38:35 -08:00
Tom Moor 0b1a4c6184 Fixes: Server error when validating UUID against empty value 2019-02-15 21:52:34 -08:00
Tom Moor 346ea4df89 Fixes: Error when user is suspended by deleted user
Fixes: Suspended user interface never displayed
2019-02-15 21:49:48 -08:00
Tom Moor fdb49cf153 Bump RME: Includes fix for addition marks disappearing 2019-02-15 21:48:54 -08:00
Tom Moor 188f70b676 Fixes #893 – Allow links to different subdomains on same domain as wiki 2019-02-09 16:17:54 +07:00
Tom Moor 721332e87a Update RME – Fixes: Individual code lines are scrollable 2019-02-09 16:09:02 +07:00
Tom Moor be85e8a6e0 Closes #895 - Chrome 72 changed flexbox behavior 2019-02-08 10:29:19 +07:00
Tom Moor 945e7ffb7b Fixes: Imported tables are normalized out of document 2019-02-08 10:23:02 +07:00
Tom Moor b597226eeb Merge pull request #887 from outline/issue-726
Fixes: Multiline blockquotes collapse
2019-01-27 22:59:05 +00:00
Tom Moor c2e58898d8 Fixes: Multiline blockquotes collapse 2019-01-27 22:43:40 +00:00
Tom Moor 476bab9333 Fixes: Welcome email dashboard location (#886)
* Fixes: Welcome email dashboard location
Updated logo in email

* 💚
2019-01-27 12:30:53 +00:00
Tom Moor 1a6a7d04e5 Closes #866 - Updated Slack Icons 2019-01-27 00:21:22 +00:00
Tom Moor a2434988b4 Fixes: Overflow of long titles in move dialog 2019-01-26 18:05:58 +00:00
Tom Moor 70d30e31b9 Fixes: Quick fix for document move not working 2019-01-26 18:01:13 +00:00
Tom Moor b46db25553 Fixes: No redirect after doc import 2019-01-26 17:28:08 +00:00
Tom Moor e7e94cdef2 Bump RME 2019-01-26 17:08:00 +00:00
Tom Moor 0ce50781d7 Fixes: Redirects do not push into history stack 2019-01-26 13:01:33 +00:00
Tom Moor 1768a1921d Fixes: Issue with embeds disappearing 🙈 2019-01-22 12:43:54 +00:00
Tom Moor 39a61d8559 Upgrade Dependencies (#873)
* Loading placeholder

* Upgrade dependencies, reduce warnings

* 👕

* Remove more unused deps

* Bump RME
2019-01-21 11:06:44 -08:00
Tom Moor 4f4e55d120 Fixes: New document creation 2019-01-19 18:14:10 -08:00
Tom Moor 5525730272 Refactor history sidebar, reduce thrashing on doc render 2019-01-19 17:28:32 -08:00
Tom Moor babcf4a3f3 More withRouter removal 2019-01-19 15:25:46 -08:00
Tom Moor 9360cd0014 Merge pull request #871 from outline/less-with-router
Reduce withRouter usage
2019-01-19 13:33:12 -08:00
Tom Moor 2d48eb46a9 Closes #868 2019-01-19 13:11:11 -08:00
Tom Moor 258b5464a2 Boop 2019-01-19 01:52:43 -08:00
Tom Moor bfd32843ff Added caching of loaded editor instance 2019-01-19 01:31:34 -08:00
Tom Moor 72d8abe069 Canonical check 2019-01-19 00:51:25 -08:00
Tom Moor 77a8f54973 Even less history passing, fix global styles warning in dev 2019-01-19 00:44:16 -08:00
Tom Moor 13501b6d76 Moving redirects to declarative method 2019-01-19 00:23:39 -08:00
Tom Moor d21dd710bb Upgrade Editor – Slate 0.44 / RME 8.0.0 (#863)
* Upgrade Slate

* Normalization

* Remove dupe dep

* Fixes placeholders

* Image uploading fixed

* Verbose but solid placeholder handling

* RME 8.0.0

* Fixes: Ability to delete embeds
2019-01-18 22:44:31 -08:00
Tom Moor 0be5aef1c6 Merge pull request #865 from satyadeepk/patch-3
Fixed broken License link in Readme
2019-01-16 09:33:15 -08:00
Satyadeep 4015b19484 Fixed broken License link in Readme
The previous link was giving 404. Changed the relative URL to absolute URL.
2019-01-16 15:47:18 +05:30
Boris Mann d081b64ce2 Heroku deploy support (#861)
* Adding app.json for Heroku -- Procfile already exists

* Removed required false and changed values to strings

* Required is required!

* Tested and working install

* Apply suggestions from code review

Thanks to @tommoor for updating the descriptions for items I wasn't sure about. Added!

Co-Authored-By: bmann <boris@bmannconsulting.com>

* missing coma
2019-01-15 19:04:03 -08:00
Tom Moor 8d3dc3a92e User Profile (#858)
* First pass user profile

* 💚

* More collaborator tooltip improvements
2019-01-12 19:41:45 -08:00
Tom Moor ef583314e0 Remove parse-domain dependency (#856)
* Remove parse-domain dependency

* Remove only, add commentary

* Update lockfile
2019-01-12 13:50:30 -08:00
Tom Moor 394adf97f8 Minor grammar and mobile style fixes 2019-01-11 21:46:58 -08:00
Tom Moor 5ba1522ada Add Prezi to integrations page 2019-01-11 21:40:01 -08:00
Tom Moor 6c055810ad Merge pull request #855 from outline/issue-854
Fixes: Regex-like search queries error
2019-01-11 21:16:03 -08:00
Tom Moor 3a260037cd Regex-like search queries from Slack should not cause a server error 2019-01-11 19:41:19 -08:00
Tom Moor a7c669f90b Hide pricing page on self hosted installations 2019-01-10 19:15:36 -08:00
Tom Moor 449f4f7a26 Fixes: Realtimeboard and Vimeo embed should be secure 2019-01-10 19:12:36 -08:00
Tom Moor 6d769a738d Merge pull request #853 from rylxes/slack-document-update-fix
document update fix for slack
2019-01-10 09:29:05 -08:00
sherriff f82a3fa32b document update fix for slack 2019-01-10 14:24:10 +01:00
Tom Moor 6fb51eb7bb 💚 2019-01-09 22:59:39 -08:00
Tom Moor 23b227c352 Closes #842 - Toast messages hanging 2019-01-09 22:41:06 -08:00
Tom Moor c54c3d963e Increase accessibility of search input 2019-01-09 22:15:09 -08:00
Tom Moor 4ba10fc5f7 Implements local search cache
Results no longer disappear when searching something previously searched
Navigating from a document back to results is now instant
Search item in left nav no longer unhighlights
2019-01-09 21:57:17 -08:00
Tom Moor e6fd7276fc Fixed: Viewers for current doc 2019-01-08 23:06:02 -08:00
Tom Moor c78bf3c4bf Display document views (#849)
* Display who has viewed a document in the header

* Add overflow, display of WHEN last viewed
Cleanup old document attributes
Add firstViewedAt, lastViewedAt to API response

* Cleanup

* Added: API documentation for views endpoints

* Include views for deleted users
2019-01-08 22:49:20 -08:00
Tom Moor 11b0ac0c66 Fix new document creation 2019-01-08 09:41:03 -08:00
Tom Moor 4ddd7d4dfe Merge pull request #843 from outline/collection-sort
Add new document sort options to collections
2019-01-08 09:19:51 -08:00
Tom Moor 70c93fcc86 Refactor, add alphabetical sort 2019-01-07 23:42:55 -08:00
Tom Moor 4cd482c80e Merge branch 'master' of github.com:outline/outline into collection-sort 2019-01-07 23:14:50 -08:00
Tom Moor e6e89dc243 Added: Recently published view to collection
Added: Infinite scroll to collection
2019-01-07 23:14:43 -08:00
Tom Moor 3bca0ed9c2 Merge pull request #839 from outline/wildcard-search
Improve partial word matching
2019-01-07 21:53:35 -08:00
Tom Moor 74515e0b19 Improve partial word matching 2019-01-07 21:44:33 -08:00
Tom Moor a68ad856a3 Move draft bubble inline with menu icons 2019-01-06 16:25:05 -08:00
Tom Moor b9765fb59e Improved sidebar selected styling, simplified logic and css 2019-01-06 16:12:07 -08:00
Tom Moor 12e324d34c Fixed: React warning 2019-01-06 14:19:08 -08:00
Tom Moor c970cddd14 Consistent page titles 2019-01-06 14:14:44 -08:00
Tom Moor 56bda12192 WIP: Pricing page 2019-01-06 13:09:22 -08:00
Tom Moor 58e31a9d3d Fixes #831 - Link from Slack notification does not work for teams with subdomains 2019-01-06 00:05:50 -08:00
Tom Moor 44e04c57a9 Add Prezi embed support
Increase size of video embeds
2019-01-05 23:43:51 -08:00
Tom Moor accba7614c Add Google Slides embed support 2019-01-05 23:29:14 -08:00
Tom Moor 028160d9ad Fixes: Share links in private collections visible in share listing 2019-01-05 23:13:58 -08:00
Tom Moor 70287de6d7 Fixes: Cannot load document in private collection from share link when signed in with user that cannot access 2019-01-05 23:04:09 -08:00
Tom Moor 18859bec3d Add real buttons to document header
Fixed: Incorrect page title when starting a new doc
Fixed: Linting error
2019-01-05 18:45:19 -08:00
Tom Moor f80e4ab04c Improved button styling
Added toast when collection permissions are saved
Removed usage of setState (old habits die hard)
2019-01-05 18:23:57 -08:00
Tom Moor 713473b7d2 Revert node version due to sequelize incompat 2019-01-05 13:55:24 -08:00
Tom Moor 8c02b0028c Collection Permissions (#829)
see https://github.com/outline/outline/issues/668
2019-01-05 13:37:33 -08:00
Tom Moor 8978915423 Fix Lucidchart embeds
closes https://github.com/outline/outline/issues/836
2019-01-01 11:58:57 -08:00
Tom Moor d045b8975c Only for admins 2018-12-25 17:18:20 -08:00
Tom Moor 96b1d6257e Added: Dashboard help tip 2018-12-25 17:12:37 -08:00
Tom Moor e08cb10b7f Closes #827 – Add optional github access token 2018-12-24 10:36:17 -08:00
Tom Moor 80a16c8af2 Closes #825 2018-12-23 10:42:34 -08:00
Tom Moor b654ba37f5 Add non-mac typeface fallbacks for headings 2018-12-23 09:45:31 -08:00
Tom Moor b673ec88b2 Merge pull request #824 from outline/content-pages
Content pages
2018-12-22 20:08:48 -08:00
Tom Moor ab82d76332 Optimize images 2018-12-22 19:57:01 -08:00
Tom Moor 4599e03121 Update API docs to new layout 2018-12-22 18:24:49 -08:00
Tom Moor 122fdfa34b Minimal developer page improves to bring inline 2018-12-21 00:35:40 -08:00
Tom Moor 47ea3c343c Figma, framer, invision, marvel pages 2018-12-20 23:53:28 -08:00
Tom Moor ac814abda4 Fixes: Oauth error on subdomains authenticating slack post 2018-12-20 20:25:13 -08:00
Tom Moor b7bea4941e Content pages 2018-12-20 20:00:58 -08:00
Tom Moor d1b352963f Optimize images 2018-12-20 07:19:48 -08:00
Tom Moor 6ebb652481 Adding content pages [wip] 2018-12-20 07:19:05 -08:00
Tom Moor 3a9a5f5ed3 Closes #819 2018-12-17 22:52:06 -08:00
Tom Moor 29630e68d2 Closes #815 2018-12-16 17:57:41 -08:00
Tom Moor 3330359c4c Fixes: Misalignment of signin buttons on mobile 2018-12-16 17:26:38 -08:00
Tom Moor 3c51b38672 Upgrade RME, fixes block insert menu appearing on embeds and block toolbar not hiding correctly on outside click 2018-12-16 14:18:56 -08:00
Tom Moor 8653338f4e Fixes: Connecting slack commands from subdomain 2018-12-15 19:05:22 -08:00
Tom Moor 044b4f16bc Editor embeds (#680)
- [x] Make deleting an embed easier
- [x] Add document level ability to disable embeds
- [x] Add team level ability to disable embeds
- [x] GitHub
- [x] Numeracy
- [x] Mode Analytics
- [x] Figma
- [x] Airtable
- [x] Vimeo
- [x] RealtimeBoard
- [x] Loom
- [x] Lucidcharts
- [x] Framer
- [x] InVision
- [x] Typeform
- [x] Marvel
- [x] Spotify
- [x] Codepen
- [x] Trello
2018-12-15 14:06:29 -08:00
Tom Moor 836f9a88a2 Fixes: Teams with non-latin characters annot signin 2018-12-12 10:31:08 -08:00
Tom Moor 05fe573974 Remove duplicate documents.update hook 2018-12-08 08:59:15 -08:00
Tom Moor b068ba9f02 Customize route for first signin for tracking 2018-12-08 08:57:34 -08:00
Tom Moor d3911b9e20 Fixes: Slack integrations page needs to ensure collections are loaded 2018-12-06 19:18:34 -08:00
Tom Moor 06e7ab84cd Cascade notification setting deletion on user account deletion 2018-12-06 19:14:43 -08:00
Tom Moor 9ca0038d39 Fixes: Collection creation notification email
Added: Unsubscribe option to notification email footers
Added: Two new notification types (emails not written yet)
Fixed: Validation added to notification setting events
2018-12-05 23:44:41 -08:00
Tom Moor cc8dacba32 Preserve function names in production code 2018-12-04 22:36:13 -08:00
Tom Moor 8cbcb77486 Base model refactor (#810)
* Big upgrades

* WIP: Stash

* Stash, 30 flow errors left

* Downgrade mobx

* WIP

* When I understand the difference between class and instance methods

* 💚

* Fixes: File import
Model saving edge cases
pinning and starring docs
Collection editing
Upgrade mobx devtools

* Notification settings saving works

* Disabled settings

* Document mailer

* Working notifications

* Colletion created notification
Ensure not notified for own actions

* Tidy up

* Document updated event only for document creation
Add indexes
Notification setting on user creation

* Commentary

* Fixed: Notification setting on signup

* Fix document move / duplicate stale data
Add BaseModel.refresh method

* Fixes: Title in sidebar not updated after editing document

* 💚

* Improve / restore error handling
Better handle offline errors

* 👕
2018-12-04 22:24:30 -08:00
Tom Moor 67cd250316 Remove diff summary from document history sidebar.
Cause of occassional memory leaks and downtime :(
2018-11-23 11:12:14 -08:00
Tom Moor 36fd81d190 Improve styling of images in Changelog 2018-11-22 21:40:17 -08:00
Tom Moor c5cd2223f7 Bump RME: Fixes deleting images now smoother
Adds code language selection to code blocks
2018-11-22 14:57:03 -08:00
Tom Moor 085c452d77 Add subtle branding to shared documents 2018-11-20 21:12:17 -08:00
Tom Moor 76924e70f5 Fix ordering of recently updated documents
Edited -> Updated
2018-11-20 20:18:24 -08:00
Tom Moor f20f197930 Add ability to create description on collection create 2018-11-19 23:04:55 -08:00
Tom Moor ecc7ba0e9d Added: Collection to starred view
Alphabetical sort to starred view
2018-11-19 23:01:49 -08:00
Tom Moor 2c55f94d39 Move session tracking 2018-11-19 21:28:15 -08:00
Tom Moor 8aaab2fc76 Add ga dimension 2018-11-19 21:05:43 -08:00
Tom Moor 85da275b06 Merge branch 'collection-descriptions' 2018-11-18 22:03:27 -08:00
Tom Moor e251c77f3c Fixes: Error loading new document in Editor 2018-11-18 22:03:10 -08:00
Tom Moor 4845331d70 Merge pull request #807 from outline/collection-descriptions
Collection descriptions
2018-11-18 21:34:05 -08:00
Tom Moor 45445606b4 Improve loading state 2018-11-18 21:27:50 -08:00
Tom Moor 8208a6128a Upgrade RME - z-index fix 2018-11-18 18:59:09 -08:00
Tom Moor 032d843f5b Fix isInternalUrl for subdomain support
Refactor / reduce plumbing
2018-11-18 18:43:11 -08:00
Tom Moor cd1956b971 Split editor 2018-11-18 18:28:22 -08:00
Tom Moor c308a2378f stash 2018-11-18 13:12:46 -08:00
Tom Moor 919bca6769 Collections got descriptions now 2018-11-18 13:12:46 -08:00
Tom Moor 3718a9609d Closes #805 - Unable to signin on self-hosted installations with non-www subdomain 2018-11-18 12:07:11 -08:00
Tom Moor 3c563e3001 Ensure team authentication matches subdomain 2018-11-17 23:30:05 -08:00
Tom Moor 5d6dca0faa Fixes: SPA page tracking 2018-11-17 19:44:57 -08:00
Tom Moor 1b0ac340c2 Best practice for DefinePlugin 2018-11-17 19:09:48 -08:00
Tom Moor 6e32f292c2 Allow filtering of people in admin 2018-11-17 18:43:46 -08:00
Tom Moor d74b99635e Fixes: Save profile picture automatically after upload
Fix jank when cropping large photos
2018-11-17 18:25:10 -08:00
Tom Moor d3834d2dc5 Fixes: Redis keys related to queue jobs should be removed after completion 2018-11-17 16:09:42 -08:00
Tom Moor 11a411447c Bump RME - closes #803 2018-11-17 14:06:21 -08:00
Tom Moor 0a73048f0f Fixed height for keyboard shortcuts UI
closes #792
2018-11-15 00:28:59 -08:00
Tom Moor e3b0b55065 CRUSH pngs on homepage 2018-11-15 00:21:24 -08:00
Tom Moor e73c25e3e3 Include missing doctype (lighthouse feedback) 2018-11-15 00:16:15 -08:00
Tom Moor 26036ad92c Fixes: handling of www subdomain in production
Hanging sessions when subdomain changes
2018-11-13 23:08:27 -08:00
Tom Moor 400d0f264e Closes #801 2018-11-13 20:54:18 -08:00
Tom Moor ac21d4b6e8 v0.17.0 2018-11-12 23:33:03 -08:00
Tom Moor 414cb1d79c Fix specs 2018-11-12 23:17:50 -08:00
Tom Moor a95632b9de Fix infinite redirect on www subdomain
Add first route tests
2018-11-12 22:45:51 -08:00
Tom Moor 1d906c7f68 Merge pull request #791 from outline/subdomains
Custom Subdomains
2018-11-12 22:01:49 -08:00
Tom Moor 2e3737c6f5 Cleanup, fix header links on subdomains 2018-11-12 20:22:01 -08:00
Tom Moor bad8718a6b 💚 2018-11-12 14:53:32 -08:00
Tom Moor c60bd4260f Provision subdomain for ALL new teams, add tests 2018-11-12 14:00:23 -08:00
Tom Moor b3a8d34af3 Add support for SUBDOMAINS_ENABLED=false 2018-11-11 22:06:50 -08:00
Tom Moor 61138ff4fa Cleanup 2018-11-11 21:17:03 -08:00
Tom Moor c81135c09e animations 2018-11-11 21:08:28 -08:00
Tom Moor cc9f32cdc9 Team switcher 2018-11-11 16:24:05 -08:00
Tom Moor 10e1f0231c Iterate, iterate 2018-11-11 14:23:31 -08:00
Tom Moor e24a187699 accessToken per subdomain 2018-11-09 23:40:33 -08:00
Tom Moor c323de4807 Attempt to provision subdomain on team create 2018-11-08 21:05:07 -08:00
Tom Moor 6391474d14 getUrl -> url consistency
test improvements
2018-11-08 21:05:07 -08:00
Tom Moor 8de074b275 Allow removing subdomain 2018-11-08 21:05:07 -08:00
Tom Moor 1be8e13828 Fix localhost
Handle automatic subdomain redirect
2018-11-08 21:05:07 -08:00
Tom Moor 6418712c47 Improve error handling 2018-11-08 21:05:07 -08:00
Tom Moor 21b1c0747c Basic functionality in place, need improved errors and logged in redirect 2018-11-08 21:05:07 -08:00
Tom Moor 07e61bd347 First pass, can create and update 2018-11-08 21:02:36 -08:00
Tom Moor 4260b5e664 datetime -> dateTime [ci skip] 2018-11-06 23:07:07 -08:00
Tom Moor ebc0346ff9 Merge pull request #798 from outline/upgrade-deps
Upgrade dependencies
2018-11-06 22:27:51 -08:00
Tom Moor 8d569fd46d Upgrade dependencies 2018-11-06 21:58:32 -08:00
Tom Moor 690feb6040 Fixes: Opening document history menu 2018-11-05 23:39:10 -08:00
Tom Moor 5f97897418 SSLify 2018-11-04 10:15:37 -08:00
Tom Moor 5f2d4e416c Upgrade RME 2018-10-29 21:05:07 -07:00
Tom Moor 464eda1d82 Merge pull request #785 from JonathanUsername/master
Make isHistory regex slightly more specific
2018-10-19 20:07:54 -07:00
Tom Moor ffe7b5a41c Merge pull request #788 from Polychain/roman/s3-content-length-range
server: fix content-length-range s3 uplaod policy
2018-10-19 20:06:54 -07:00
Roman Shtylman aadea856c3 server: fix content-length-range s3 uplaod policy
The max size should be an integer rather than a string (environment variables
are strings). More strict s3 implementations reject the upload because they do
not consider the policy valid if a string is used rather than an integer.
2018-10-19 18:09:44 -07:00
Jonathan King 91d79491f4 Make isHistory regex slightly more specific 2018-10-16 13:01:17 +01:00
Tom Moor 61cce88ef8 Add note on Google Auth to README [ci skip] 2018-09-30 23:32:06 -07:00
Tom Moor 1356e35ad1 Closes #686 - null does not trigger default param 2018-09-30 18:42:27 -07:00
Tom Moor d54750ef19 Closes #769 2018-09-30 18:31:42 -07:00
Tom Moor 283fad5f87 Merge pull request #781 from outline/zapier
Zapier
2018-09-30 18:11:22 -07:00
Tom Moor b02e5184fd Closes #764 - Visual feedback that avatar is uploading 2018-09-30 18:09:35 -07:00
Tom Moor e8ef1145a1 Add integration icons
Add link to public zapier invite
2018-09-30 17:56:20 -07:00
Tom Moor f284dd1ebf Merge branch 'master' of github.com:outline/outline into zapier 2018-09-30 17:37:35 -07:00
Tom Moor 3f0202f660 Closes #780 2018-09-30 08:58:27 -07:00
Tom Moor b36977cf80 Stash 2018-09-30 08:51:14 -07:00
Tom Moor 7515bd2275 Upgrade styled-components
Upgrade styled-components-grid
2018-09-29 23:19:46 -07:00
Tom Moor ed4013e7ee Fixes #772 - Cursor jumps in search field 2018-09-29 23:10:07 -07:00
Tom Moor f78d9cb072 Link CI status correctly [ci skip] 2018-09-29 22:28:28 -07:00
Tom Moor 2504d48a09 👕 2018-09-29 22:24:52 -07:00
Tom Moor 9cc3264807 💚 2018-09-29 22:14:55 -07:00
Tom Moor d0bee23432 Version History (#768)
* Stash. Super rough progress

* Stash

* 'h' how toggles history panel
Add documents.restore endpoint

* Add tests for documents.restore endpoint

* Document restore endpoint

* Tiding, RevisionMenu, remove scroll dep

* Add history menu item

* Paginate loading

* Fixed: Error boundary styling
Select first revision faster

* Diff summary, styling

* Add history loading placeholder
Fix move modal not opening

* Fixes: Refreshing page on specific revision

* documentation for document.revision

* Better handle versions with no text changes (will no longer be created)
2018-09-29 21:24:07 -07:00
Tom Moor 7973bfeca2 Typo in welcome email
Thanks @belindapreno for spotting
2018-09-27 21:22:29 -07:00
Tom Moor 717e26a7a9 Fixes #778 2018-09-25 22:09:12 -07:00
Tom Moor 2a8b47cab5 Types in onboarding doc 🙈 2018-09-19 15:33:58 -07:00
Tom Moor d4d4907901 Bump RME. Closes #771 2018-09-10 22:21:51 -07:00
Tom Moor 7550e03b22 Fixes: Editor content written between image upload start and finish is lost
Fixes: Image lost after upload if document is immediately closed without further edits
2018-09-03 13:58:24 -07:00
Tom Moor 59277d2c6c Merge pull request #762 from satyadeepk/patch-2
`showCollection` option in Dashboard documents list
2018-08-26 23:51:57 -07:00
Satyadeep eb3e4b2d33 showCollection option in Dashboard documents list
It was added in #718, but seems to have gone after the new tabs in the dashboard
2018-08-27 12:19:29 +05:30
Tom Moor 54a04dd8cc Linting [ci skip] 2018-08-26 15:27:32 -07:00
Tom Moor 328f731541 Share Permissions (#761)
* Share restrictions

* Tweak language, add spec
2018-08-19 16:06:39 -07:00
Tom Moor e704a86e36 Merge pull request #760 from outline/rme-5
Update to rich-markdown-editor 5.0
2018-08-18 17:58:14 -07:00
Tom Moor 61872373ec Remove nolonger neccessary editCache 2018-08-18 17:48:56 -07:00
Tom Moor f401b6f2e0 Tidying, possible fix for excessive view count 2018-08-18 17:45:56 -07:00
Tom Moor 3da078e98b Move isDirty to view concern. Document model is not updated until save 2018-08-18 17:41:09 -07:00
Tom Moor e58da006d0 👕 2018-08-16 22:53:58 -07:00
Tom Moor be09b290b7 RME upgrade, fix autoFocus logic 2018-08-16 22:51:51 -07:00
Tom Moor c140c64346 Use new RME callback to reduce amount of document serialization
Account for new RME autoFocus prop in 5.0
2018-08-16 21:19:31 -07:00
Tom Moor 059cccd36f Merge pull request #757 from egetin/path_modification
Fix PATH in modified shell environment
2018-08-14 00:14:06 -07:00
Erkka Makinen 006c6f137c Move PATH and NODE_ENV under Dockerfile. Fixes problem with PATH in
modified shell environment.
2018-08-14 08:04:52 +03:00
Tom Moor 4c1e33110e Upgrade to rich-markdown-editor 4.0 2018-08-13 21:20:44 -07:00
Tom Moor ff41aa4a17 Update debug dependency. Low severity CVE-2017-16137 2018-08-11 14:09:59 -07:00
Tom Moor 6cd7d5ca5b Fixes: Homepage pagination 2018-08-11 14:02:37 -07:00
Tom Moor 63f6d61ac0 Linting
Pagination of edited / viewed responses
2018-08-11 00:46:10 -07:00
Tom Moor 6b2211f135 Pass offset to pagination 2018-08-10 23:17:19 -07:00
Tom Moor 2de9fedcc0 Merge pull request #747 from outline/dashboard-tabs
Dashboard Tabs
2018-08-10 23:10:12 -07:00
Tom Moor d308442fef Refactor, paginate on scroll
New PaginatedDocumentList component
2018-08-10 23:03:47 -07:00
Tom Moor 71775460c7 Bump RME - Fixes block toolbar coloring 2018-08-10 12:04:58 -07:00
Tom Moor 266b4d735c Tidy, tidy 2018-08-10 00:11:58 -07:00
Tom Moor 2f681b1ce8 WIP: Dashboard tabs 2018-08-09 23:14:51 -07:00
Tom Moor d222a311ad Merge pull request #744 from outline/atlas-id-collection-id
Migrate atlasId -> collectionId
2018-08-08 09:36:46 -07:00
Tom Moor 18cfe26e83 Migrate atlasId -> collectionId 2018-08-07 23:23:26 -07:00
Tom Moor f49c495a9a Merge pull request #742 from outline/issue-625
Clarify where new document will be created from document header
2018-08-07 22:16:30 -07:00
Tom Moor 738dce8c06 Clarify where new document will be created from document header 2018-08-07 22:08:44 -07:00
Tom Moor 2238d1a7fd 👕 2018-08-07 08:30:48 -07:00
Tom Moor 9a440e4321 Merge branch 'issue-739' of github.com:outline/outline 2018-08-07 00:04:31 -07:00
Tom Moor 8e3ae07daf Bump RME - Heading anchor offset 2018-08-07 00:04:08 -07:00
Tom Moor f7bde4a5fc Add 'share' option to document header 2018-08-06 23:58:34 -07:00
Tom Moor 4674c10203 Empty state language improvemnts 2018-08-06 23:22:20 -07:00
Tom Moor 1c9c2d8e26 Add 'new document' menu to starred and drafts screens 2018-08-06 22:49:41 -07:00
Tom Moor 3334d783f3 Closes #724 2018-08-06 22:22:15 -07:00
Tom Moor d863ab3271 Hash navigation improvements 2018-08-05 22:08:46 -07:00
Tom Moor cad83f4e7b Tighten context snippet in slash command results 2018-08-05 11:12:59 -07:00
Tom Moor 61b6b18148 💚 2018-08-05 00:51:47 -07:00
Tom Moor fc7373a6f5 Return relevant context in search results returned to slack slash command 2018-08-05 00:34:08 -07:00
Tom Moor 71830d7c77 Further improved search result snippets 2018-08-04 22:46:55 -07:00
Tom Moor ad2d1a15bb Merge branch 'search-improves' 2018-08-04 21:28:52 -07:00
Tom Moor f5a1f59290 Fix search result ordering
Add support for returning your own drafts in results
Added regression tests
2018-08-04 21:28:37 -07:00
Tom Moor 9464967598 Merge pull request #740 from outline/search-improves
Search Improvements
2018-08-04 18:36:05 -07:00
Tom Moor 7ebbab7634 Merge branch 'master' of github.com:outline/outline into search-improves 2018-08-04 18:33:04 -07:00
Tom Moor e192bcbaee Improves ordering of search results
Modifies documents.search to return a context snippet and search ranking
Displays context snipped on search results screen
2018-08-04 18:32:56 -07:00
Tom Moor 32528749f0 Merge pull request #738 from outline/issue-735
Adds a new Slack message when connecting a channel for posting
2018-08-04 15:29:08 -07:00
Tom Moor 96348ced38 Adds a new Slack message when connecting a channel for posting 2018-08-04 15:10:16 -07:00
Tom Moor 89ee67606f Merge pull request #737 from outline/issue-732
Catch errors around document rendering
2018-08-04 11:02:07 -07:00
Tom Moor d3aeff833d Added ability to show more error details for reporting issue 2018-08-04 10:56:36 -07:00
Tom Moor 892ce64712 Catch errors around document rendering 2018-08-04 10:48:07 -07:00
Tom Moor 43bf47fa62 Merge pull request #734 from outline/issue-730
Allow Slack integration setup for Google Auth accounts
2018-08-02 23:29:09 -07:00
Tom Moor 662f908c76 Allow Slack integration setup for Google Auth accounts 2018-08-02 23:26:44 -07:00
Tom Moor cdd1fc4fb7 Fixes: Can't reshre a link once revoked
closes #733
2018-08-02 22:17:41 -07:00
Tom Moor 8acb60f4c7 Fixes: Link to developer documentation from token settings page 2018-08-02 00:41:51 -07:00
Tom Moor fc5a6127a5 Closes #731 - Potential URL parse error 2018-08-02 00:18:19 -07:00
Tom Moor 4faccbcb4e Fixes: Slack integration creation 2018-08-01 21:55:30 -07:00
Tom Moor 7a0466f9fd Move to CircleCI 2.0
closes #727
2018-07-27 20:26:30 -07:00
Tom Moor a75140b08c Fixes various overflow issues, #724 2018-07-24 21:13:54 -07:00
Tom Moor 9fa1ad55ce Upgrade RME. Potential fix for #723 2018-07-24 00:08:46 -07:00
Tom Moor 3874fc9b3d Closes #673 - Redirect to new document after duplicating 2018-07-21 12:55:40 -07:00
Tom Moor 28690be77c Fixes #709 - Share links fail when logged into another Outline account 2018-07-21 12:42:00 -07:00
Tom Moor 03411ead09 Upgrade RME - Slate deps and bugfixes 2018-07-21 10:53:17 -07:00
Tom Moor b3662cc35c Bring mobile styling of shared documents inline with regular documents 2018-07-21 10:18:39 -07:00
Tom Moor e20232a869 Closes #692 - Fixes download files in Firefox 2018-07-20 23:51:05 -07:00
Tom Moor 1bb4583b3f Upgrade RME - Adds markdown shortcuts to headings, fixes several FF issues 2018-07-20 00:17:59 -07:00
Tom Moor 2c0802372b Update RME - Text loss fix 2018-07-18 23:06:35 -07:00
Tom Moor 7efff83410 Update RME - Moar fixes 2018-07-18 00:32:41 -07:00
Tom Moor 6cd4e3069f Fixes: Scrolling issues in FF
#692
2018-07-15 23:11:49 -07:00
Tom Moor 5884e07c1f Merge master, small refactor 2018-07-15 07:58:58 -07:00
Tom Moor 06953acfdf Merge pull request #721 from outline/rme-2
Upgrade to RME 2
2018-07-14 22:53:20 -07:00
Tom Moor f048c4ab0c Clean up ClickablePadding
Remove log
2018-07-14 22:35:40 -07:00
Tom Moor 7f8a59ae2f Upgrade to RME 2, restores functionality removed from that module 2018-07-14 22:26:26 -07:00
Tom Moor ab6259b162 👕 2018-07-11 21:12:26 -07:00
Tom Moor 8f08f8dabf Update content pages 2018-07-11 21:01:08 -07:00
Tom Moor 19a328ebeb Improved homepage 🙏 2018-07-11 21:01:08 -07:00
Tom Moor 95c4574549 Update Navigation.js 2018-07-11 12:51:18 -07:00
Tom Moor 2735c67ed9 Closes #717 2018-07-10 21:05:45 -07:00
Tom Moor 802496aacb Merge branch 'master' of github.com:outline/outline into signin-link 2018-07-10 21:05:25 -07:00
Tom Moor 2d6f906b83 Account Deletion (#716)
Adds ability to remove user account, wipes personal information and soft-deletes record.
2018-07-10 21:05:01 -07:00
Tom Moor edbf5d754d Merge branch 'master' of github.com:outline/outline into account-delete 2018-07-10 20:51:09 -07:00
Tom Moor 257061011c Remove onCascade as it doesn't work with paranoid 2018-07-10 20:51:06 -07:00
Tom Moor bda4bd6313 Tweak UI 2018-07-10 20:49:58 -07:00
Tom Moor 69677b31e4 Allow more than one user to be deleted 😂 2018-07-10 20:44:59 -07:00
Tom Moor 22d02da2f9 Wiping more information
Ensuring documents and collections created by user still load
2018-07-10 19:47:15 -07:00
Tom Moor 068f199bb0 💚 2018-07-10 18:38:39 -07:00
Tom Moor f15ac0ee2a Merge pull request #718 from satyadeepk/patch-1
`showCollection` option in Dashboard documents list
2018-07-10 08:04:15 -07:00
Satyadeep 34c0e6b24b showCollection option in Dashboard documents list 2018-07-10 12:42:40 +05:30
Tom Moor f0c192cdc0 💚 2018-07-08 13:29:06 -07:00
Tom Moor 5f6236dd65 Merge master 2018-07-08 13:03:36 -07:00
Tom Moor 14f9038419 Merge pull request #714 from outline/remove-password
Remove old code
2018-07-08 15:01:20 -05:00
Tom Moor 2a743dcce6 Merge pull request #715 from outline/issue-draft-save
Fixes initial draft save issue
2018-07-08 15:01:06 -05:00
Tom Moor 8fe7d8e4be Update yarn.lock 2018-07-08 12:42:44 -07:00
Tom Moor 12a63396ab Remove flow type 2018-07-07 18:22:17 -05:00
Tom Moor 4976d53ed8 Remove password field 2018-07-07 18:19:13 -05:00
Tom Moor 08cac861ae Done. Needs testing once back online 2018-07-07 18:09:39 -05:00
Tom Moor dd52f4d82a Delete modal 2018-07-07 17:51:43 -05:00
Tom Moor f9cbd425cb Cleanup unneccessary folders.
Add delete account modal
2018-07-07 17:45:24 -05:00
Tom Moor 465f819c45 Account deletion endpoint 2018-07-07 17:38:22 -05:00
Tom Moor 458d9b5d99 Fixes: Issue saving after draft 2018-07-04 13:00:53 -07:00
Tom Moor a049e0e9bc SlackButton does not need to be connected 2018-07-02 22:37:07 -07:00
Tom Moor 2fd8b35ca9 Fixed: Modified time display on dashboard
New Time component for relative time formatting with accessibility
2018-07-01 19:56:58 -07:00
Tom Moor 933fa9732c CSS tweaks 2018-07-01 12:42:21 -07:00
Tom Moor 73d6238b4c Merge pull request #710 from outline/breadcrumb
Parent Breadcrumb
2018-07-01 12:08:56 -07:00
Tom Moor f41e186da3 👕 2018-07-01 11:57:17 -07:00
Tom Moor 0e940741f6 Mobile styling 2018-07-01 11:54:24 -07:00
Tom Moor dc33cc9734 position sticky 2018-07-01 10:20:57 -07:00
Tom Moor 899b637979 wip 2018-07-01 09:16:38 -07:00
Tom Moor 7780efce0e Update favicon 2018-06-30 19:22:28 -07:00
Tom Moor e50c6488d3 Sidebar styling tweak 2018-06-30 19:19:37 -07:00
Tom Moor 5c7a182897 Added: New document icon / menu to Dashboard screen 2018-06-30 14:01:21 -07:00
Tom Moor c599bb70ca Closes #666 2018-06-30 13:18:18 -07:00
Tom Moor 2f839c75f7 Handle relative urls 2018-06-26 23:43:19 -07:00
Tom Moor 6bd53b72b2 Fixes #707
Improved clickable area around editor content
2018-06-25 22:45:43 -07:00
Tom Moor 657d0775f5 Closes #706 - internal links incorrectly redirecting 2018-06-25 20:45:26 -07:00
Tom Moor 614b08311f Updated FAQ
Improved homepage mobile styling
Minor fixes elsewhere
closes #690
2018-06-24 10:41:49 -07:00
Tom Moor 4ed2b4b475 Adds warning when attempting to leave edit mode with images uploading 2018-06-23 18:58:44 -07:00
Tom Moor d529c98983 Fixes #697 2018-06-23 18:11:17 -07:00
Tom Moor 891c6f1c0a Merge pull request #705 from outline/draft-counter
Added bubble to side of drafts in sidebar with count of pending drafts
2018-06-23 15:40:08 -07:00
Tom Moor 55ddd3137d Added bubble to side of drafts in sidebar with count of pending drafts
Based on feedback that its not clear on initial use
2018-06-23 15:27:16 -07:00
Tom Moor 9de4ed89e1 [ci skip] Added roadmap 2018-06-23 13:52:20 -07:00
Tom Moor 31ba1789f1 Improved document download
Correctly unescapes documents and downloads latest version
2018-06-23 13:35:42 -07:00
Tom Moor 238c6ee653 Upgrade editor, inline code styling 2018-06-23 00:25:17 -07:00
Tom Moor b9f1832578 Closes #671 2018-06-23 00:12:24 -07:00
Tom Moor b8dda3bd65 Update editor, speed up sidebar
closes #694
2018-06-23 00:10:52 -07:00
Tom Moor fa4453a476 Fixes #687
Tidied people list, now displaying joined at date
2018-06-20 22:10:03 -07:00
Tom Moor b9e0668d7d Bulk export (#684)
* First pass (working) collection export to zip

* Add export confirmation screen

* 👕

* Refactor

* Job for team export, move to tmp file, settings UI

* Export all collections job

* 👕

* Add specs

* Clarify UI
2018-06-20 21:33:21 -07:00
Tom Moor cedd31c9ea Upgrade editor, closes #685 2018-06-19 22:30:39 -07:00
Tom Moor 7375e95bf5 Allow manifest discovery 2018-06-16 14:43:34 -07:00
Tom Moor a2c06f5599 👕 2018-06-16 14:37:32 -07:00
Tom Moor 89f75d497c Add manifest.json, required images, remove unused fonts 2018-06-16 14:19:49 -07:00
Tom Moor 42478785fc Bump icons, add theme-color 2018-06-16 14:12:15 -07:00
Tom Moor 87c1d610d1 Add missing alt, add missing lang property 2018-06-16 14:00:24 -07:00
Tom Moor adc78fd408 Closes #679 2018-06-16 13:10:14 -07:00
Tom Moor ae502c10c9 Revoked share links (#664)
* Move to revokation API for share links

* Respect revoked share links
Add documentation for shares endpoints

* 💚
2018-06-16 12:36:25 -07:00
Satyadeep fad5976dd2 Allowed domains env variable for Google Auth (#682)
* Allowed domains env variable for Google Auth

* Fixing lint errors

* PR comments. Use includes instead of indexOf
2018-06-16 12:36:02 -07:00
Tom Moor 19c5cafa51 Restore missing colors 2018-06-10 09:56:08 -07:00
Tom Moor 434129a434 ThemeProvider (#677)
closes #655
2018-06-09 19:10:30 -07:00
Tom Moor 0942deec38 [ci skip] Add styled components badge 2018-06-09 18:59:49 -07:00
Tom Moor aacfd42640 Fixes #676 - Newlines no longer added to nested lists on save 2018-06-09 17:22:03 -07:00
Tom Moor a95b7fc4b6 Emoji work 2018-06-09 17:17:40 -07:00
Tom Moor b929fb2bd3 Fixes TOC 2018-06-07 22:26:53 -07:00
Tom Moor f8cd3bf8c4 Improved offline handling 2018-06-07 21:35:40 -07:00
Tom Moor 21d887151d Fixes #674 - Focus in toolbar no longer lost on autosave 2018-06-07 20:48:43 -07:00
Tom Moor 27f44ae2a0 Merge pull request #672 from outline/duplicate
Duplicate Document
2018-06-05 20:13:46 -07:00
Tom Moor 2d02093f48 Added 'duplicate' menu option
For now duplicates next to original document in the same collection
2018-06-05 06:57:26 -07:00
Tom Moor 45a2c03030 Hint that share link is a two step menu item 2018-06-04 22:01:37 -07:00
Tom Moor 70a8f02564 Add changelog to account menu, make changelog headings anchors 2018-06-04 21:46:24 -07:00
Tom Moor 8c107dfe42 Added toast notifications for share menu 2018-06-04 21:37:08 -07:00
Tom Moor 97c2d8dffc Closes #667 - React warning in development 2018-06-04 21:13:42 -07:00
Tom Moor 22e823df9a Closes #665 - Correctly handle user not granting auth permissions, display friendly error 2018-06-04 21:06:47 -07:00
Tom Moor 53a0f423c3 Track recently active and signin times (#663)
* Track recently active and signin times

* Trust proxy headers in production
2018-06-04 19:07:56 -07:00
Tom Moor 1977278426 Upgrade RME - Allow pasting of Markdown syntax 2018-06-04 17:53:20 -07:00
Tom Moor a5f8d7411e Merge branch 'menu-spacing' 2018-06-04 15:02:48 -07:00
Tom Moor 5b83feefa7 Merge branch 'master' of github.com:outline/outline 2018-06-04 15:02:27 -07:00
Tom Moor 78ea35da29 Mark documents as viewed after a short delay instead of immediately. This should result in more accurate view counts 2018-06-04 15:13:58 -04:00
Tom Moor 874235eb0f User model cleanup 2018-06-04 15:08:29 -04:00
Tom Moor 9d7860feb0 Fixes menu spacing issue 2018-06-04 15:01:20 -04:00
Tom Moor 4469cb7239 Merge pull request #662 from outline/issue-660
Updated parseTitle to remove escape characters
2018-06-03 22:30:48 -04:00
Tom Moor 0adb8814dd 💚 2018-06-03 22:25:40 -04:00
Tom Moor 133aa05bd8 Correct replacement 2018-06-03 22:23:28 -04:00
Tom Moor 6a0a22a636 Updated parseTitle to remove escape characters
Tests pass, however the JS running in the browser appears to be behaving differently. Not got to the bottom of it yet
2018-06-03 22:07:41 -04:00
Tom Moor 1c081f8777 Merge pull request #659 from outline/google-auth
Google Auth
2018-06-03 15:29:02 -04:00
Tom Moor 466033964f Closes #482 2018-06-02 19:00:16 -04:00
Tom Moor 329d23828d Fallback for domain without public logo 2018-06-02 18:43:44 -04:00
Tom Moor 4c9f86c7f7 Save avatars to le cloud in beforeSave hooks
Added encryption to uploads
Updated icon for team settings
2018-06-01 18:00:48 -04:00
Tom Moor a99a804ea0 👕 2018-06-01 15:23:33 -04:00
Tom Moor 2337b9df7f service -> serviceId 2018-06-01 15:13:05 -04:00
Tom Moor b7b5bac5c3 Test team.update endpoint 2018-06-01 15:02:28 -04:00
Tom Moor 140afc8a51 👕 2018-06-01 00:27:18 -04:00
Tom Moor a7fc72e19f 💚 2018-06-01 00:01:06 -04:00
Tom Moor 9315e3f0f0 Members -> People
Update help text throughout settings area
Add details on authentication method
2018-05-31 14:49:19 -07:00
Tom Moor da9477667c user.update endpoint should send full user in response 2018-05-31 12:57:04 -07:00
Tom Moor 0b3feef47a Hide settings items for non admins
Update image uploader for use with team logo
Fix can't cancel cropping modal
2018-05-31 12:52:03 -07:00
Tom Moor 10a0ffe472 Team details settings page 2018-05-31 12:44:32 -07:00
Tom Moor fb7a8f0312 Toast type (success/warning/etc) 2018-05-31 12:07:49 -07:00
Tom Moor f633f63a61 Merge ErrorsStore into UiStore 2018-05-31 11:42:39 -07:00
Tom Moor 55e1451160 Slack commands and post working agagain with new flow 2018-05-29 23:33:30 -07:00
Tom Moor 57aaea60da Fix logout loop 2018-05-29 22:18:11 -07:00
Tom Moor 4a7f8d3895 Move slack auth handling entirely to server 2018-05-28 23:44:56 -07:00
Tom Moor 35f6255dbd Settings -> Profile 2018-05-28 22:58:57 -07:00
Tom Moor aa9ed09f08 Prevent signin without hosted domain 2018-05-28 22:32:36 -07:00
Tom Moor 25aa1f288b Renames, clear token, show signin options based on env 2018-05-28 21:14:43 -07:00
Tom Moor 72d874444e DB migrations
Google button
2018-05-28 20:31:53 -07:00
Tom Moor ddd2b82d20 WIP: Successful Google Auth, broke pretty much everything else in the process 2018-05-28 11:36:37 -07:00
Tom Moor 1ba5c1cf96 Fixes #653 2018-05-26 20:04:57 -07:00
Tom Moor 7e55ca8f39 Fixes #652 - Autosave should not trigger before anything is written 2018-05-26 18:16:07 -07:00
Tom Moor 5bebb7351d 👕 2018-05-26 17:59:34 -07:00
Tom Moor b495dce043 Update editor, fix serialization issues in code 2018-05-26 17:21:28 -07:00
Tom Moor e52d2cb254 Merge pull request #651 from outline/share-links
Public share links
2018-05-26 13:33:38 -07:00
Tom Moor 67e3431fe3 More extensive specs around documents.info endpoint now that it doesn't require auth 2018-05-26 13:29:42 -07:00
Tom Moor 8c62b6e07a Improve error screen for not found share link 2018-05-26 12:22:14 -07:00
Tom Moor 6662e2666d Handle non-existent shareId 2018-05-26 11:23:21 -07:00
Tom Moor 0d7c943bcd Add link to manage shares from modal 2018-05-26 10:38:44 -07:00
Tom Moor de54698408 👕 2018-05-24 23:50:40 -07:00
Tom Moor 511aab5d3a Layout issue 2018-05-24 23:49:46 -07:00
Tom Moor 214f2505a5 API tokens to standard list item 2018-05-24 23:39:17 -07:00
Tom Moor 6df753d962 Team users -> Team members 2018-05-24 23:23:05 -07:00
Tom Moor 54e5037aaf Cleanup user list 2018-05-24 23:07:44 -07:00
Tom Moor e2144051df Fixed returning sensitive data in documents.info 2018-05-24 22:15:36 -07:00
Tom Moor 2c719df32e Close share dialog on copy link 2018-05-24 21:21:45 -07:00
Tom Moor c060a5c798 id -> documentId 2018-05-24 21:19:38 -07:00
Tom Moor e538df0df3 Filter private info from public shares 2018-05-23 23:59:00 -07:00
Tom Moor 7eea1a90af One share link per user, per doc 2018-05-23 23:09:20 -07:00
Tom Moor aeb97ddcae Filter shares.list endpoint by admin 2018-05-23 22:55:01 -07:00
Tom Moor 47fb968009 Ability to revoke, ShareMenu 2018-05-23 22:09:14 -07:00
Tom Moor d93815ca0a Share links list WIP 2018-05-22 23:01:49 -07:00
Tom Moor b40b77b228 Merge branch 'master' into share-links 2018-05-22 21:27:45 -07:00
Tom Moor 05339441e7 Fixes: Minor layout issue in settings sidebar header 2018-05-20 20:21:39 -07:00
Tom Moor 6222d210be Upgrade editor
Prevent markdown in code blocks and headings
Improved handling of valid markdown characters in text
2018-05-20 17:13:12 -07:00
Tom Moor d557ef96ac Fixes #649 – cant delete a draft document that has had its collection previously removed 2018-05-19 15:38:08 -07:00
Tom Moor a4b5d6cabe Fixes #648 2018-05-19 15:12:19 -07:00
Tom Moor bc9d75fcae Updated note on editor source code 2018-05-19 14:34:54 -07:00
Tom Moor d9937b5bd4 Fix squashed image in README on mobile 2018-05-19 14:32:08 -07:00
Tom Moor 187c2dcb27 Working share link loading (plenty of restrictions still to put in place) 2018-05-16 23:52:26 -07:00
Tom Moor 4266020315 Gen and copy share link from frontend 2018-05-16 23:07:33 -07:00
Tom Moor 500d039856 Retrieve documents using shareId 2018-05-13 13:26:06 -07:00
Tom Moor 22bc5a7373 Added delete endpoint 2018-05-13 00:28:31 -07:00
Tom Moor 9000aa3aac First pass at API 2018-05-12 23:14:06 -07:00
Tom Moor dded458582 Setup for unauthenticated doc viewing 2018-05-12 21:01:17 -07:00
Tom Moor 3005da78e2 Pull changelog from Github releases - one less place to manage 2018-05-12 19:56:44 -07:00
Tom Moor 0d32ec452d More prod build fixes 2018-05-12 15:56:05 -07:00
Tom Moor 4dea755db6 Prod uses babel 2018-05-12 15:39:29 -07:00
Tom Moor e6e540cf99 Ensure node versions match everywhere (CI) 2018-05-12 15:24:55 -07:00
Tom Moor cbd4003ddb Split deps, upgrade markdown editor to version with ES5 compilation 2018-05-12 15:22:33 -07:00
Tom Moor 0d28717647 Fixes build by updating Uglify 2018-05-12 14:42:10 -07:00
Tom Moor 24d328c4b7 Merge pull request #639 from outline/refactor-editor
Extract Markdown Editor
2018-05-12 14:21:34 -07:00
Tom Moor a62ad053d7 Upgrade editor 2018-05-12 14:10:49 -07:00
Tom Moor 016bb01948 Tweak header block spacing 2018-05-12 11:09:59 -07:00
Tom Moor a30bdb91f4 Merge pull request #644 from outline/autosave
Autosave Documents
2018-05-12 10:41:52 -07:00
Tom Moor 46c52254c2 Merge pull request #646 from outline/tommoor-patch-1
Restrict engines to < node 10
2018-05-08 23:34:50 -07:00
Tom Moor ee2fc260bf Update package.json 2018-05-08 23:15:56 -07:00
Tom Moor abab370f82 Merge pull request #645 from a--hoang/master
Fix spelling: permanant->permanent
2018-05-08 10:22:08 -07:00
Andrew Hoang 5d413a2679 Fix spelling: permanant->permanent 2018-05-08 13:15:52 -04:00
Tom Moor 94e63b6171 Account for draft being published. Need to reload the collection still in this scenario 2018-05-07 22:53:13 -07:00
Tom Moor ba0a7b7f4a Update docs
Remove extra API request after document.update
Cleanup
2018-05-07 22:08:47 -07:00
Tom Moor 67f2b3cce4 API endpoint accepts autosave 2018-05-06 22:13:52 -07:00
Tom Moor f887a8383b Merge pull request #641 from outline/flow-71
Upgrade to Flow 0.71
2018-05-06 17:06:28 -07:00
Tom Moor a0f21393ee Merge pull request #643 from outline/issue-627
Clarify account dropdown
2018-05-06 17:06:16 -07:00
Tom Moor b41e608909 Merge pull request #642 from outline/sidebar-cleanup
Sidebar cleanup
2018-05-06 14:04:45 -07:00
Tom Moor 3f5a9fdb3a Add icon to clarify menu functionality 2018-05-06 14:01:28 -07:00
Tom Moor b37ed1f8d0 Move logic to Scrollable component 2018-05-06 12:46:52 -07:00
Jori Lallo fbde67d1bd Merge pull request #640 from outline/tommoor-patch-routehelper
Adds _ and ~ as allowed slug characters
2018-05-07 06:40:23 +12:00
Tom Moor c3d7f0785c Restore stickyness of … 2018-05-06 00:06:36 -07:00
Tom Moor b37241229c Remove unworkable menu 2018-05-05 23:49:03 -07:00
Tom Moor 79c9582020 Adding new doc menu to sidebar items 2018-05-05 22:45:10 -07:00
Tom Moor d55a8ad02d Update mailer snapshot (added alt text) 2018-05-05 16:33:12 -07:00
Tom Moor 518015f55b Upgrade to Flow 0.71 2018-05-05 16:16:08 -07:00
Tom Moor 4b5e3aa8f4 Adds _ and ~ as allowed slug characters
closes #636
2018-05-05 14:25:21 -07:00
Tom Moor 4a4f9f7107 Bump rich-markdown-editor 2018-05-03 00:34:28 -07:00
Tom Moor f89eabaeff Hooks 2018-05-02 23:45:14 -07:00
Tom Moor d7327fefa2 Upgrade styled-components
Restore async editor loading
2018-05-02 23:12:13 -07:00
Tom Moor 41a96e4331 Remove Icons 2018-05-02 21:51:39 -07:00
Tom Moor fb41e4fc54 Merge branch 'master' of github.com:outline/outline into refactor-editor 2018-04-28 16:12:26 -07:00
Jori Lallo e176974cfa Merge pull request #635 from outline/jori/homepage-slack
Promo slack on homepage
2018-04-03 23:51:52 -07:00
Jori Lallo 46124654dd Promo slack on homepage 2018-04-03 22:40:20 -07:00
Tom Moor 44cb509ebf Post to Slack (#603)
* Migrations

* WIP: Integration model, slack perms / hooks

* So so rough it pains me. Building this new model is revealing just how much needs to be refactored

* Working connect and post

* Cleanup UI, upating documents

* Show when slack command is connected

* stash

* 💚

* Add documents.update trigger

* Authorization, tidying

* Fixed integration policy

* pick integration presenter keys
2018-04-03 20:36:25 -07:00
Tom Moor f72fa40a0f WIP 2018-04-03 20:20:30 -07:00
Tom Moor 17900c6a11 Merge pull request #633 from outline/improved-headings
Improves rendering of headings
2018-03-26 23:17:44 -07:00
Tom Moor 8793a9dfbf Improves rendering of headings to have better spacing in the Markdown output 2018-03-26 23:12:16 -07:00
Tom Moor 6abc523621 Merge pull request #632 from outline/cache-clear
Bump cache version
2018-03-26 22:24:10 -07:00
Tom Moor c378be0144 Bump cache version 2018-03-26 22:18:53 -07:00
Tom Moor 403e504499 Merge pull request #620 from outline/paragraph-handling
Improved paragraph behavior
2018-03-26 21:23:21 -07:00
Tom Moor 0cb51f63c6 Merge pull request #631 from ganes1410/master
Update README.md
2018-03-26 09:20:18 -07:00
R.Ganesh 616f1e071a Update README.md 2018-03-26 21:24:03 +05:30
Tom Moor bdff3b716b Merge pull request #629 from outline/issue-623
Improves behavior of link toolbar
2018-03-25 16:42:58 -07:00
Tom Moor fc3ffb86de Merge pull request #630 from outline/issue-624
Increase padding at the bottom of the editable area
2018-03-25 16:04:50 -07:00
Tom Moor fcd8f07a2a Increase padding at the bottom of the editable area 2018-03-25 15:56:17 -07:00
Tom Moor a24d745870 Improves behavior of link toolbar based on user feedback 2018-03-25 15:35:59 -07:00
Tom Moor 27ad71b662 Merge pull request #628 from outline/slate-upgrades
Dep updates to Slate 32
2018-03-25 15:35:31 -07:00
Tom Moor f8ba139128 Final dep updates to Slate 32 2018-03-25 14:42:28 -07:00
Tom Moor 38494d6d3c Added migration for existing docs 2018-03-24 15:03:44 -07:00
Tom Moor 14c963ca70 Bump serializer 2018-03-24 14:42:38 -07:00
Tom Moor 48e3a93d83 Bump slate serializer 2018-03-18 01:10:53 -07:00
Tom Moor 5ad0e79a7e Merge pull request #619 from outline/tommoor-patch-1
Improve scrolling behavior
2018-03-10 22:49:34 -08:00
Tom Moor 3a78c4b66e Only show block insert on empty paragraphs 2018-03-10 22:33:13 -08:00
Tom Moor d02fc793ee Improved paragraph behavior 2018-03-10 21:25:07 -08:00
Tom Moor 8a884b446d Improve scrolling behavior
Prevent scrolling in the sidebar/ content area scrolling the other section when the boundary of a scrolling area is reached.

https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior
2018-03-10 11:26:29 -08:00
Jori Lallo c7d50c4a78 Merge pull request #614 from outline/jori/billing-suspended
Suspended accounts and settings changes
2018-03-07 00:11:17 -08:00
Jori Lallo 983b8fe9a0 Wrapped additional error data under data 2018-03-07 00:05:34 -08:00
Jori Lallo f5c1ddf8b9 added suspending admin email to error screen 2018-03-06 23:38:52 -08:00
Jori Lallo e9e4538436 Addressed feedback 2018-03-06 23:09:21 -08:00
Tom Moor 61dfd75ba3 Merge pull request #618 from outline/slate-edit-code
Upgrade slate-edit-code
2018-03-06 21:18:50 -08:00
Tom Moor b9dda35566 Bump slate-edit-code dependency 2018-03-06 21:00:44 -08:00
Tom Moor 209a1e8d35 Merge pull request #617 from outline/remove-moment
Remove moment.js
2018-03-06 20:39:56 -08:00
Tom Moor 16a6c3bffe Remove moment 2018-03-06 20:31:12 -08:00
Jori Lallo 247dbce9b0 Merge pull request #615 from outline/jori/notification-emails
Email template updates
2018-03-06 20:07:52 -08:00
Jori Lallo 0b005afdf9 More email styles 2018-03-06 19:34:13 -08:00
Jori Lallo 189c592a44 Tweaked email layout 2018-03-04 23:18:39 -08:00
Jori Lallo 2f972668f4 Tweaked label style 2018-03-04 22:45:55 -08:00
Jori Lallo 8e4978c638 Cleanup 2018-03-04 22:38:14 -08:00
Jori Lallo 71270bcb93 Members -> Users 2018-03-04 22:34:06 -08:00
Jori Lallo 7ef3110a6d Renamed ApiKeys store 2018-03-04 22:26:02 -08:00
Jori Lallo 1a8ca20fce UI to prevent suspended users viewing the application 2018-03-04 22:18:23 -08:00
Jori Lallo 1c2b3e992e Prevent API access from suspended user 2018-03-04 17:08:18 -08:00
Jori Lallo a0f58583b5 UI work 2018-03-04 16:53:57 -08:00
Jori Lallo 06a6573feb Initial work on the frontend 2018-03-04 15:39:17 -08:00
Jori Lallo 3d6b9466fb Backend support 2018-03-04 15:38:51 -08:00
Tom Moor 7272b24eaf Merge pull request #610 from outline/jori/natural-sort
Added natural sorting for documents and collections
2018-02-28 23:28:47 -08:00
Tom Moor 18b0338736 Pinned documents (#608)
* Migrations and API for pinned documents

* Documentation

* Add pin icon

* Fin.

* v0.2.0

* Remove pin from DocumentPreview, add general menu
Add Pinned documents header

* Tidy

* Fixed: Drafts appearing on collection home
2018-02-28 23:28:36 -08:00
Tom Moor 1722b3f3d9 Merge pull request #611 from outline/issue-drafts
Drafts Fixes
2018-02-28 23:27:56 -08:00
Tom Moor c80ae1bdd6 Fixes: Document not added to structure
Cache key bump
2018-02-28 23:21:29 -08:00
Jori Lallo 3505ed3ad0 Removed quite useless store test 2018-02-28 23:21:17 -08:00
Jori Lallo 4bc8a152c1 Added natural sorting for documents and collections 2018-02-28 23:00:41 -08:00
Tom Moor 871e6918e8 v0.2.0 2018-02-27 23:59:54 -08:00
1212 changed files with 106869 additions and 35332 deletions
+25 -14
View File
@@ -1,18 +1,29 @@
{
"presets": ["react", "env"],
"presets": [
"@babel/preset-react",
"@babel/preset-flow",
[
"@babel/preset-env",
{
"corejs": {
"version": "3",
"proposals": true
},
"useBuiltIns": "usage"
}
]
],
"plugins": [
"lodash",
"styled-components",
"transform-decorators-legacy",
"transform-es2015-destructuring",
"transform-object-rest-spread",
"transform-regenerator",
"transform-class-properties",
"syntax-dynamic-import"
],
"env": {
"development": {
"presets": ["react-hmre"]
}
}
}
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-transform-destructuring",
"@babel/plugin-transform-regenerator",
"transform-class-properties"
]
}
+43
View File
@@ -0,0 +1,43 @@
version: 2
jobs:
build:
working_directory: ~/outline
docker:
- image: circleci/node:14
- image: circleci/redis:latest
- image: circleci/postgres:9.6.5-alpine-ram
environment:
NODE_ENV: test
SECRET_KEY: F0E5AD933D7F6FD8F4DBB3E038C501C052DC0593C686D21ACB30AE205D2F634B
DATABASE_URL_TEST: postgres://root@localhost:5432/circle_test
DATABASE_URL: postgres://root@localhost:5432/circle_test
URL: http://localhost:3000
SMTP_FROM_EMAIL: hello@example.com
AWS_S3_UPLOAD_BUCKET_URL: https://s3.amazonaws.com
AWS_S3_UPLOAD_BUCKET_NAME: outline-circle
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: install-deps
command: yarn install --pure-lockfile
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ./node_modules
- run:
name: migrate
command: ./node_modules/.bin/sequelize db:migrate --url $DATABASE_URL_TEST
- run:
name: lint
command: yarn lint
- run:
name: flow
command: yarn flow check --max-workers 4
- run:
name: test
command: yarn test
- run:
name: build-webpack
command: yarn build:webpack
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
curl --user ${CIRCLE_TOKEN}: \
--request POST \
--form revision=<ENTER COMMIT SHA HERE>\
--form config=@config.yml \
--form notify=false \
https://circleci.com/api/v1.1/project/github/outline/outline/tree/master
+19
View File
@@ -0,0 +1,19 @@
__mocks__
.git
.vscode
.github
.circleci
.DS_Store
.env*
.eslint*
.flowconfig
.log
Makefile
Procfile
app.json
build
docker-compose.yml
fakes3
flow-typed
node_modules
setupJest.js
+126 -27
View File
@@ -1,40 +1,139 @@
# Copy this file to .env, remove this comment and change the keys. For development
# with docker this should mostly work out of the box other than setting the Slack
# keys (for auth) and the SECRET_KEY.
#
# Please use `openssl rand -hex 32` to create SECRET_KEY
# 👋 Welcome, we're glad you're setting up an installation of Outline. Copy this
# file to .env or set the variables in your local environment manually. For
# development with docker this should mostly work out of the box other than
# setting the Slack keys and the SECRET_KEY.
DATABASE_URL=postgres://user:pass@postgres:5432/outline
DATABASE_URL_TEST=postgres://user:pass@postgres:5432/outline-test
SECRET_KEY=F0E5AD933D7F6FD8F4DBB3E038C501C052DC0593C686D21ACB30AE205D2F634B
PORT=3000
REDIS_URL=redis://redis:6379
# –––––––––––––––– REQUIRED ––––––––––––––––
# Generate a hex-encoded 32-byte random key. You should use `openssl rand -hex 32`
# in your terminal to generate a random value.
SECRET_KEY=generate_a_new_key
# Generate a unique random key. The format is not important but you could still use
# `openssl rand -hex 32` in your terminal to produce this.
UTILS_SECRET=generate_a_new_key
# For production point these at your databases, in development the default
# should work out of the box.
DATABASE_URL=postgres://user:pass@localhost:5532/outline
DATABASE_URL_TEST=postgres://user:pass@localhost:5532/outline-test
# Uncomment this to disable SSL for connecting to Postgres
# PGSSLMODE=disable
REDIS_URL=redis://localhost:6479
# URL should point to the fully qualified, publicly accessible URL. If using a
# proxy the port in URL and PORT may be different.
URL=http://localhost:3000
DEPLOYMENT=self
ENABLE_UPDATES=true
DEBUG=sql,cache,presenters,events
PORT=3000
# Third party credentials (required)
SLACK_KEY=71315967491.XXXXXXXXXX
SLACK_SECRET=d2dc414f9953226bad0a356cXXXXYYYY
# To support uploading of images for avatars and document attachments an
# s3-compatible storage must be provided. AWS S3 is recommended for redundency
# however if you want to keep all file storage local an alternative such as
# minio (https://github.com/minio/minio) can be used.
# Third party credentials (optional)
SLACK_VERIFICATION_TOKEN=PLxk6OlXXXXXVj3YYYY
SLACK_APP_ID=A0XXXXXXX
GOOGLE_ANALYTICS_ID=
BUGSNAG_KEY=
# AWS credentials (optional in dev)
AWS_ACCESS_KEY_ID=notcheckedindev
AWS_SECRET_ACCESS_KEY=notcheckedindev
# A more detailed guide on setting up S3 is available here:
# => https://wiki.generaloutline.com/share/125de1cc-9ff6-424b-8415-0d58c809a40f
#
AWS_ACCESS_KEY_ID=get_a_key_from_aws
AWS_SECRET_ACCESS_KEY=get_the_secret_of_above_key
AWS_REGION=xx-xxxx-x
AWS_S3_UPLOAD_BUCKET_URL=http://s3:4569
AWS_S3_UPLOAD_BUCKET_NAME=outline-dev
AWS_S3_UPLOAD_BUCKET_NAME=bucket_name_here
AWS_S3_UPLOAD_MAX_SIZE=26214400
AWS_S3_FORCE_PATH_STYLE=true
AWS_S3_ACL=private
# Emails configuration (optional)
# –––––––––––––– AUTHENTICATION ––––––––––––––
# Third party signin credentials, at least ONE OF EITHER Google, Slack,
# or Microsoft is required for a working installation or you'll have no sign-in
# options.
# To configure Slack auth, you'll need to create an Application at
# => https://api.slack.com/apps
#
# When configuring the Client ID, add a redirect URL under "OAuth & Permissions":
# https://<URL>/auth/slack.callback
SLACK_KEY=get_a_key_from_slack
SLACK_SECRET=get_the_secret_of_above_key
# To configure Google auth, you'll need to create an OAuth Client ID at
# => https://console.cloud.google.com/apis/credentials
#
# When configuring the Client ID, add an Authorized redirect URI:
# https://<URL>/auth/google.callback
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# To configure Microsoft/Azure auth, you'll need to create an OAuth Client. See
# the guide for details on setting up your Azure App:
# => https://wiki.generaloutline.com/share/dfa77e56-d4d2-4b51-8ff8-84ea6608faa4
AZURE_CLIENT_ID=
AZURE_CLIENT_SECRET=
AZURE_RESOURCE_APP_ID=
# –––––––––––––––– OPTIONAL ––––––––––––––––
# If using a Cloudfront/Cloudflare distribution or similar it can be set below.
# This will cause paths to javascript, stylesheets, and images to be updated to
# the hostname defined in CDN_URL. In your CDN configuration the origin server
# should be set to the same as URL.
CDN_URL=
# Auto-redirect to https in production. The default is true but you may set to
# false if you can be sure that SSL is terminated at an external loadbalancer.
FORCE_HTTPS=true
# Have the installation check for updates by sending anonymized statistics to
# the maintainers
ENABLE_UPDATES=true
# Override the maxium size of document imports, could be required if you have
# especially large Word documents with embedded imagery
MAXIMUM_IMPORT_SIZE=5120000
# You may enable or disable debugging categories to increase the noisiness of
# logs. The default is a good balance
DEBUG=cache,presenters,events,emails,mailer,utils,http,server,services
# Comma separated list of domains to be allowed to signin to the wiki. If not
# set, all domains are allowed by default when using Google OAuth to signin
ALLOWED_DOMAINS=
# For a complete Slack integration with search and posting to channels the
# following configs are also needed, some more details
# => https://wiki.generaloutline.com/share/be25efd1-b3ef-4450-b8e5-c4a4fc11e02a
#
SLACK_VERIFICATION_TOKEN=your_token
SLACK_APP_ID=A0XXXXXXX
SLACK_MESSAGE_ACTIONS=true
# Optionally enable google analytics to track pageviews in the knowledge base
GOOGLE_ANALYTICS_ID=
# Optionally enable Sentry (sentry.io) to track errors and performance
SENTRY_DSN=
# To support sending outgoing transactional emails such as "document updated" or
# "you've been invited" you'll need to provide authentication for an SMTP server
SMTP_HOST=
SMTP_PORT=
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_FROM_EMAIL=
SMTP_REPLY_EMAIL=
SMTP_TLS_CIPHERS=
SMTP_SECURE=true
# Custom logo that displays on the authentication screen, scaled to height: 60px
# TEAM_LOGO=https://example.com/images/logo.png
# The default interface language. See translate.getoutline.com for a list of
# available language codes and their rough percentage translated.
DEFAULT_LANGUAGE=en_US
+62 -24
View File
@@ -4,25 +4,57 @@
"react-app",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:flowtype/recommended"
"plugin:flowtype/recommended",
"plugin:react-hooks/recommended"
],
"plugins": [
"prettier",
"flowtype"
],
"plugins": ["prettier", "flowtype"],
"rules": {
"eqeqeq": 2,
"no-unused-vars": 2,
// // Bring back after we remove CSS Modules 100%
// "import/order": "warn",
// Prettier automatically uses the least amount of parens possible, so this
// does more harm than good.
"no-mixed-operators": "off",
// Temporary fix for a failing import lint
"import/no-unresolved": [
"import/order": [
"error",
{
"ignore": ["slate-drop-or-paste-images"]
"alphabetize": {
"order": "asc"
},
"pathGroups": [
{
"pattern": "shared/**",
"group": "external",
"position": "after"
},
{
"pattern": "stores",
"group": "external",
"position": "after"
},
{
"pattern": "stores/**",
"group": "external",
"position": "after"
},
{
"pattern": "models/**",
"group": "external",
"position": "after"
},
{
"pattern": "scenes/**",
"group": "external",
"position": "after"
},
{
"pattern": "components/**",
"group": "external",
"position": "after"
}
]
}
],
// Flow
"flowtype/require-valid-file-annotation": [
2,
"always",
@@ -30,22 +62,34 @@
"annotationStyle": "line"
}
],
"flowtype/space-after-type-colon": [2, "always"],
"flowtype/space-before-type-colon": [2, "never"],
// Enforce that code is formatted with prettier.
"flowtype/space-after-type-colon": [
2,
"always"
],
"flowtype/space-before-type-colon": [
2,
"never"
],
"prettier/prettier": [
"error",
{
"printWidth": 80,
"trailingComma": "es5",
"singleQuote": true
"trailingComma": "es5"
}
]
},
"settings": {
"react": {
"createClass": "createReactClass",
"pragma": "React",
"version": "detect"
},
"import/resolver": {
"node": {
"paths": ["app", "."]
"paths": [
"app",
"."
]
}
},
"flowtype": {
@@ -56,12 +100,6 @@
"jest": true
},
"globals": {
"__DEV__": true,
"SLACK_KEY": true,
"DEPLOYMENT": true,
"BASE_URL": true,
"BUGSNAG_KEY": true,
"afterAll": true,
"Bugsnag": true
"EDITOR_VERSION": true
}
}
}
+5 -7
View File
@@ -4,38 +4,36 @@
.*/shared/.*
[ignore]
.*/node_modules/tiny-cookie/flow/.*
.*/node_modules/styled-components/.*
.*/node_modules/polished/.*
.*/node_modules/mobx/.*.flow
.*/node_modules/react-side-effect/.*
.*/node_modules/fbjs/.*
.*/node_modules/@tommoor/slate-edit-code/example/.*
.*/node_modules/@tommoor/slate-edit-code/lib/.*
.*/node_modules/slate-edit-list/.*
.*/node_modules/slate-prism/.*
.*/node_modules/config-chain/.*
.*/server/scripts/.*
*.test.js
[libs]
[options]
emoji=true
sharedmemory.heap_size=3221225472
module.system.node.resolve_dirname=node_modules
module.system.node.resolve_dirname=app
module.name_mapper='^\(.*\)\.s?css$' -> 'empty/object'
module.name_mapper='^\(.*\)\.md$' -> 'empty/object'
module.name_mapper='^shared\/\(.*\)$' -> '<PROJECT_ROOT>/shared/\1'
module.file_ext=.js
module.file_ext=.scss
module.file_ext=.md
module.file_ext=.json
esproposal.decorators=ignore
esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
unsafe.enable_getters_and_setters=true
esproposal.optional_chaining=enable
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue
-1
View File
@@ -1 +0,0 @@
yarn lint:flow
+3
View File
@@ -0,0 +1,3 @@
# These are supported funding model platforms
github: [outline]
+37
View File
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots or videos to help explain your problem.
**Outline (please complete the following information):**
- Install: [getoutline.com or self hosted]
- Version: [commit sha if self hosted]
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Mobile (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
+8
View File
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Feature request
url: https://github.com/outline/outline/discussions/new
about: Request a feature to be added to the project
- name: Self hosting questions
url: https://github.com/outline/outline/discussions/new
about: Ask questions and discuss running Outline with community members
+10
View File
@@ -0,0 +1,10 @@
# Set to true to add reviewers to pull requests
addReviewers: true
# A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
- tommoor
# A list of keywords to be skipped the process that add reviewers if pull requests include it
skipKeywords:
- wip
+3 -2
View File
@@ -1,12 +1,13 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
daysUntilStale: 90
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
daysUntilClose: 14
# Issues with these labels will never be considered stale
exemptLabels:
- security
- pinned
# Label to use when marking an issue as stale
staleLabel: stale
+3
View File
@@ -1,7 +1,10 @@
dist
build
node_modules/*
.env
.log
npm-debug.log
stats.json
.DS_Store
fakes3/*
.idea
+7
View File
@@ -0,0 +1,7 @@
{
"javascript.validate.enable": false,
"javascript.format.enable": false,
"typescript.validate.enable": false,
"typescript.format.enable": false,
"editor.formatOnSave": true,
}
+67
View File
@@ -0,0 +1,67 @@
# Architecture
Outline is composed of a backend and frontend codebase in this monorepo. As both are written in Javascript, they share some code where possible. We utilize the latest ES6 language features, including `async`/`await`, and [Flow](https://flow.org/) typing. Prettier formatting and ESLint are enforced by CI.
## Frontend
Outline's frontend is a React application compiled with [Webpack](https://webpack.js.org/). It uses [MobX](https://mobx.js.org/) for state management and [Styled Components](https://www.styled-components.com/) for component styles. Unless global, state logic and styles are always co-located with React components together with their subcomponents to make the component tree easier to manage.
> Important Note: The Outline editor is built on [Prosemirror](https://github.com/prosemirror) and managed in a separate open source repository to encourage re-use: [rich-markdown-editor](https://github.com/outline/rich-markdown-editor).
```
app
├── components - React components reusable across scenes
├── embeds - Embed definitions that represent rich interactive embeds in the editor
├── hooks - Reusable React hooks
├── menus - Context menus, often appear in multiple places in the UI
├── models - State models using MobX observables
├── routes - Route definitions, note that chunks are async loaded with suspense
├── scenes - A scene represents a full-page view that contains several components
├── stores - Collections of models and associated fetch logic
├── types - Flow types
└── utils - Utility methods specific to the frontend
```
## Backend
The API server is driven by [Koa](http://koajs.com/), it uses [Sequelize](http://docs.sequelizejs.com/) as the ORM and Redis with [Bull](https://github.com/OptimalBits/bull) for queues and async event management. Authorization logic
is contained in [cancan](https://www.npmjs.com/package/cancan) policies under the "policies" directory.
Interested in more documentation on the API routes? Check out the [API documentation](https://getoutline.com/developers).
```
server
├── api - All API routes are contained within here
│ └── middlewares - Koa middlewares specific to the API
├── auth - Authentication logic
│ └── providers - Authentication providers export passport.js strategies and config
├── commands - We are gradually moving to the command pattern for new write logic
├── config - Database configuration
├── emails - Transactional email templates
│ └── components - Shared React components for email templates
├── middlewares - Koa middlewares
├── migrations - Database migrations
├── models - Sequelize models
├── onboarding - Markdown templates for onboarding documents
├── policies - Authorization logic based on cancan
├── presenters - JSON presenters for database models, the interface between backend -> frontend
├── services - Service definitions are triggered for events and perform async jobs
├── static - Static assets
├── test - Test helpers and fixtures, tests themselves are colocated
└── utils - Utility methods specific to the backend
```
## Shared
Where logic is shared between the client and server it is placed in this directory. This is generally
small utilities.
```
shared
├── i18n - Internationalization confiuration
│ └── locales - Language specific translation files
├── styles - Styles, colors and other global aesthetics
├── utils - Shared utility methods
└── constants - Shared constants
```
-64
View File
@@ -1,64 +0,0 @@
## Jan 28th 2018
- Fixed keyboard shortcuts on Windows
- Fixed slack slash command and improved results formatting in Slack
- Fixed headings now have stable anchors for external linking
- Fixed several JS issues in the editor
- Improved toolbar behavior for link editing
---
## Jan 23rd 2018
- Added 'about' page
- Added dynamic prefetching of scripts for improved performance
- Added more meta tags
- Added new onboarding document
---
## Jan 15th 2018
- Fixed loading placeholders styling
- Added members view to settings pages
- Dynamic loading of editor JS for first load performance
- Added event bus for future integrations
- Improved handling of malformed links
---
## Jan 6th, 2018
- Improved the floating toolbar behavior in the editor
- Added blockquote button to formatting toolbar
- Fixed saving a new document no longer redirects to read-only mode
- Fixed an exception when visiting a document without being signed in
- Fixed a problem with invalid urls causing errors
---
## Dec 18th, 2017
- We now support automatic unfurling of Outline links posted to Slack
- Added privacy policy for the hosted version at getoutline.com
- Added ability to update profile picture in the settings
---
## Dec 11th, 2017
- Added ability to develop locally in Docker. This is now the preferred way to work on Outline.
- Various improvements and fixes to search
---
## Nov 28th, 2017
- Added the changelog youre looking at!
- Fixed some issues with collection homepage
---
## Nov 23rd, 2017
- Initial open source release.
+17 -4
View File
@@ -1,10 +1,23 @@
FROM node:latest
FROM node:14-alpine
ENV APP_PATH /opt/outline
RUN mkdir -p $APP_PATH
WORKDIR $APP_PATH
COPY . $APP_PATH
RUN yarn
RUN cp -r /opt/outline/node_modules /opt/node_modules
COPY package.json ./
COPY yarn.lock ./
RUN yarn --pure-lockfile
COPY . .
RUN yarn build && \
yarn --production --ignore-scripts --prefer-offline && \
rm -rf shared && \
rm -rf app
ENV NODE_ENV production
CMD yarn start
EXPOSE 3000
+98 -14
View File
@@ -1,19 +1,103 @@
Copyright (c) 2017 Outline (https://www.getoutline.com/) and individual contributors.
All rights reserved.
Business Source License 1.1
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Parameters
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Licensor: General Outline, Inc.
Licensed Work: Outline 0.55.0
The Licensed Work is (c) 2020 General Outline, Inc.
Additional Use Grant: You may make use of the Licensed Work, provided that
you may not use the Licensed Work for a Document
Service.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
A “Document Service” is a commercial offering that
allows third parties (other than your employees and
contractors) to access the functionality of the
Licensed Work by creating teams and documents
controlled by such third parties.
3. Neither the name of the Outline nor the names of its contributors may be used to endorse or promote products derived from this software
without specific prior written permission.
Change Date: 2024-04-22
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Change License: Apache License, Version 2.0
For information about alternative licensing arrangements for the Software,
please visit: https://www.getoutline.com
Notice
The Business Source License (this document, or the “License”) is not an Open
Source license. However, the Licensed Work will eventually be made available
under an Open Source License, as stated in this License.
License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
“Business Source License” is a trademark of MariaDB Corporation Ab.
-----------------------------------------------------------------------------
Business Source License 1.1
Terms
The Licensor hereby grants you the right to copy, modify, create derivative
works, redistribute, and make non-production use of the Licensed Work. The
Licensor may make an Additional Use Grant, above, permitting limited
production use.
Effective on the Change Date, or the fourth anniversary of the first publicly
available distribution of a specific version of the Licensed Work under this
License, whichever comes first, the Licensor hereby grants you rights under
the terms of the Change License, and the rights granted in the paragraph
above terminate.
If your use of the Licensed Work does not comply with the requirements
currently in effect as described in this License, you must purchase a
commercial license from the Licensor, its affiliated entities, or authorized
resellers, or you must refrain from using the Licensed Work.
All copies of the original and modified Licensed Work, and derivative works
of the Licensed Work, are subject to this License. This License applies
separately for each version of the Licensed Work and the Change Date may vary
for each version of the Licensed Work released by Licensor.
You must conspicuously display this License on each original or modified copy
of the Licensed Work. If you receive the Licensed Work in original or
modified form from a third party, the terms and conditions set forth in this
License apply to your use of that work.
Any use of the Licensed Work in violation of this License will automatically
terminate your rights under this License for the current and all other
versions of the Licensed Work.
This License does not grant you any right in any trademark or logo of
Licensor or its affiliates (provided that you may use a trademark or logo of
Licensor as expressly required by this License).
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
TITLE.
MariaDB hereby grants you permission to use this Licenses text to license
your works, and to refer to it using the trademark “Business Source License”,
as long as you comply with the Covenants of Licensor below.
Covenants of Licensor
In consideration of the right to use this Licenses text and the “Business
Source License” name and trademark, Licensor covenants to MariaDB, and to all
other recipients of the licensed work to be provided by Licensor:
1. To specify as the Change License the GPL Version 2.0 or any later version,
or a license that is compatible with GPL Version 2.0 or a later version,
where “compatible” means that software provided under the Change License can
be included in a program with software provided under GPL Version 2.0 or a
later version. Licensor may specify additional Change Licenses without
limitation.
2. To either: (a) specify an additional grant of rights to use that does not
impose any additional restriction on the right granted in this License, as
the Additional Use Grant; or (b) insert the text “None”.
3. To specify a Change Date.
4. Not to modify this License in any other way.
+16 -4
View File
@@ -1,16 +1,28 @@
up:
docker-compose up -d redis postgres s3
docker-compose run --rm outline bash -c "yarn && yarn sequelize db:migrate"
docker-compose up outline
yarn install --pure-lockfile
yarn sequelize db:migrate
yarn dev
build:
docker-compose build --pull outline
test:
docker-compose run --rm outline yarn test
docker-compose up -d redis postgres s3
yarn sequelize db:drop --env=test
yarn sequelize db:create --env=test
yarn sequelize db:migrate --env=test
yarn test
watch:
docker-compose up -d redis postgres s3
yarn sequelize db:drop --env=test
yarn sequelize db:create --env=test
yarn sequelize db:migrate --env=test
yarn test:watch
destroy:
docker-compose stop
docker-compose rm -f
.PHONY: up build destroy # let's go to reserve rules names
.PHONY: up build destroy test watch # let's go to reserve rules names
+1 -1
View File
@@ -1 +1 @@
web: node index.js
web: node ./build/server/index.js
+132 -76
View File
@@ -1,45 +1,159 @@
<p align="center">
<img src="https://user-images.githubusercontent.com/31465/34380645-bd67f474-eb0b-11e7-8d03-0151c1730654.png" height="29" />
</p>
<p align="center">
<i>An open, extensible, wiki for your team built using React and Node.js.<br/>Try out Outline using our hosted version at <a href="https://www.getoutline.com">www.getoutline.com</a>.</i>
<br/>
<img src="https://user-images.githubusercontent.com/31465/34456332-51e41eb0-ed9c-11e7-9fa9-20e7fa946494.jpg" alt="Outline" width="800" height="500">
<img width="1640" alt="screenshot" src="https://user-images.githubusercontent.com/380914/110356468-26374600-7fef-11eb-9f6a-f2cc2c8c6590.png">
</p>
<p align="center">
<img src="https://circleci.com/gh/outline/outline.svg?style=shield&amp;circle-token=c0c4c2f39990e277385d5c1ae96169c409eb887a" alt="" data-canonical-src="" style="max-width:100%;">
<a href="https://spectrum.chat/outline" rel="nofollow"><img src="https://withspectrum.github.io/badge/badge.svg" alt="Join the community on Spectrum"/></a>
<a href="https://circleci.com/gh/outline/outline" rel="nofollow"><img src="https://circleci.com/gh/outline/outline.svg?style=shield&amp;circle-token=c0c4c2f39990e277385d5c1ae96169c409eb887a"></a>
<a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat"></a>
<a href="https://github.com/styled-components/styled-components"><img src="https://img.shields.io/badge/style-%F0%9F%92%85%20styled--components-orange.svg"></a>
<a href="https://translate.getoutline.com/project/outline"><img src="https://badges.crowdin.net/outline/localized.svg"></a>
</p>
This is the source code that runs [**Outline**](https://www.getoutline.com) and all the associated services. If you want to use Outline then you don't need to run this code, we offer a hosted version of the app at [getoutline.com](https://www.getoutline.com).
If you'd like to run your own copy of Outline or contribute to development then this is the place for you.
## Installation
# Installation
Outline requires the following dependencies:
- Postgres >=9.5
- Redis
- Slack developer application
- [Node.js](https://nodejs.org/) >= 12
- [Yarn](https://yarnpkg.com)
- [Postgres](https://www.postgresql.org/download/) >=9.5
- [Redis](https://redis.io/) >= 4
- AWS S3 bucket or compatible API for file storage
- Slack or Google developer application for authentication
In development you can quickly get an environment running using Docker by following these steps:
1. Install [Docker for Desktop](https://www.docker.com) if you don't already have it.
## Self-Hosted Production
### Docker
For a manual self-hosted production installation these are the recommended steps:
1. First setup Redis and Postgres servers, this is outside the scope of the guide.
1. Download the latest official Docker image, new releases are available around the middle of every month:
`docker pull outlinewiki/outline`
1. Using the [.env.sample](.env.sample) as a reference, set the required variables in your production environment. You can export the environment variables directly, or create a `.env` file and pass it to the docker image like so:
`docker run --env-file=.env outlinewiki/outline`
1. Setup the database with `yarn db:migrate`. Production assumes an SSL connection to the database by default, if
Postgres is on the same machine and is not SSL you can migrate with `yarn db:migrate --env=production-ssl-disabled`, for example:
`docker run --rm outlinewiki/outline yarn db:migrate`
1. Start the container:
`docker run outlinewiki/outline`
1. Visit http://you_server_ip:3000 and you should be able to see Outline page
> Port number can be changed using the `PORT` environment variable
1. (Optional) You can add an `nginx` or other reverse proxy to serve your instance of Outline for a clean URL without the port number, support SSL, etc.
### Terraform
Alternatively a community member maintains a script to deploy Outline on Google Cloud Platform with [Terraform & Ansible](https://github.com/rjsgn/outline-terraform-ansible).
### Upgrading
#### Docker
If you're running Outline with Docker you'll need to run migrations within the docker container after updating the image. The command will be something like:
```shell
docker run --rm outlinewiki/outline:latest yarn db:migrate
```
#### Git
If you're running Outline by cloning this repository, run the following command to upgrade:
```shell
yarn run upgrade
```
## Local Development
For contributing features and fixes you can quickly get an environment running using Docker by following these steps:
1. Install these dependencies if you don't already have them
1. [Docker for Desktop](https://www.docker.com)
1. [Node.js](https://nodejs.org/) (v12 LTS preferred)
1. [Yarn](https://yarnpkg.com)
1. Clone this repo
1. Register a Slack app at https://api.slack.com/apps
1. Copy the file `.env.sample` to `.env` and fill out the Slack keys, everything
else should work well for development.
1. Run `make up`. This will download dependencies, build and launch a development version of Outline.
1. Copy the file `.env.sample` to `.env`
1. Fill out the following fields:
1. `SECRET_KEY` (follow instructions in the comments at the top of `.env`)
1. `SLACK_KEY` (this is called "Client ID" in Slack admin)
1. `SLACK_SECRET` (this is called "Client Secret" in Slack admin)
1. Configure your Slack app's Oauth & Permissions settings
1. Slack recently prevented the use of `http` protocol for localhost. For local development, you can use a tool like [ngrok](https://ngrok.com) or a package like `mkcert`. ([How to use HTTPS for local development](https://web.dev/how-to-use-local-https/))
1. Add `https://my_ngrok_address/auth/slack.callback` as an Oauth redirect URL
1. Ensure that the bot token scope contains at least `users:read`
1. Run `make up`. This will download dependencies, build and launch a development version of Outline
## Development
### Server
# Contributing
To enable debugging statements, set the following env vars:
Outline is built and maintained by a small team we'd love your help to fix bugs and add features!
Before submitting a pull request please let the core team know by creating or commenting in an issue on [GitHub](https://www.github.com/outline/outline/issues), and we'd also love to hear from you in the [Discussions](https://www.github.com/outline/outline/discussions). This way we can ensure that an approach is agreed on before code is written. This will result in a much higher liklihood of code being accepted.
If youre looking for ways to get started, here's a list of ways to help us improve Outline:
* [Translation](TRANSLATION.md) into other languages
* Issues with [`good first issue`](https://github.com/outline/outline/labels/good%20first%20issue) label
* Performance improvements, both on server and frontend
* Developer happiness and documentation
* Bugs and other issues listed on GitHub
## Architecture
If you're interested in contributing or learning more about the Outline codebase
please refer to the [architecture document](ARCHITECTURE.md) first for a high level overview of how the application is put together.
## Debugging
Outline uses [debug](https://www.npmjs.com/package/debug). To enable debugging output, the following categories are available:
```
DEBUG=sql,cache,presenters,events
DEBUG=sql,cache,presenters,events,importer,exporter,emails,mailer
```
## Tests
We aim to have sufficient test coverage for critical parts of the application and aren't aiming for 100% unit test coverage. All API endpoints and anything authentication related should be thoroughly tested.
To add new tests, write your tests with [Jest](https://facebook.github.io/jest/) and add a file with `.test.js` extension next to the tested code.
```shell
# To run all tests
make test
# To run backend tests in watch mode
make watch
```
Once the test database is created with `make test` you may individually run
frontend and backend tests directly.
```shell
# To run backend tests
yarn test:server
# To run frontend tests
yarn test:app
```
## Migrations
@@ -47,7 +161,7 @@ DEBUG=sql,cache,presenters,events
Sequelize is used to create and run migrations, for example:
```
yarn sequelize migration:create
yarn sequelize migration:generate --name my-migration
yarn sequelize db:migrate
```
@@ -57,64 +171,6 @@ Or to run migrations on test database:
yarn sequelize db:migrate --env test
```
## Structure
Outline is composed of separate backend and frontend application which are both driven by the same Node process. As both are written in Javascript, they share some code but are mostly separate. We utilize latest language features, including `async`/`await`, and [Flow](https://flow.org/) typing. Prettier and ESLint are ran as pre-commit hooks.
### Frontend
Outline's frontend is a React application compiled with [Webpack](https://webpack.js.org/). It uses [Mobx](https://mobx.js.org/) for state management and [Styled Components](https://www.styled-components.com/) for component styles. Unless global, state logic and styles are always co-located with React components together with their subcomponents to make the component tree easier to manage. The editor is driven by [Slate](https://github.com/ianstormtaylor/slate) with several plugins.
- `app/` - Frontend React application
- `app/scenes` - Full page views
- `app/components` - Reusable React components
- `app/components/Editor` - Text editor and its plugins
- `app/stores` - Global state stores
- `app/models` - State models
- `app/types` - Flow types for non-models
### Backend
Backend is driven by [Koa](http://koajs.com/) (API, web server), [Sequelize](http://docs.sequelizejs.com/) (database) and React for public pages and emails.
- `server/api` - API endpoints
- `server/emails` - React rendered email templates
- `server/models` - Database models (Sequelize)
- `server/pages` - Server-side rendered public pages (React)
- `server/presenters` - API responses for database models
- `shared` - Code shared between frontend and backend applications
## Tests
We aim to have sufficient test coverage for critical parts of the application and aren't aiming for 100% unit test coverage. All API endpoints and anything authentication related should be thoroughly tested, and it's generally good to add tests for backend features and code.
To add new tests, write your tests with [Jest](https://facebook.github.io/jest/) and add a file with `.test.js` extension next to the tested code.
```shell
# To run all tests
yarn test
# To run backend tests
yarn test:server
# To run frontend tests
yarn test:app
```
## Contributing
Outline is still built and maintained by a small team we'd love your help to fix bugs and add features!
However, before working on a pull request please let the core team know by creating or commenting in an issue on [GitHub](https://www.github.com/outline/outline/issues), and we'd also love to hear from you in our [Spectrum community](https://spectrum.chat/outline). This way we can ensure that an approach is agreed on before code is written and will hopefully help to get your contributions integrated faster!
If you're looking for ways to get started, here's a list of ways to help us improve Outline:
* Issues with [`good first task`](https://github.com/outline/outline/labels/good%20first%20issue) label
* Performance improvements, both on server and frontend
* Developer happiness and documentation
* Bugs and other issues listed on GitHub
* Helping others on Spectrum
## License
Outline is [BSD licensed](/blob/master/LICENSE).
Outline is [BSL 1.1 licensed](LICENSE).
+11
View File
@@ -0,0 +1,11 @@
# Security Policy
## Reporting a Vulnerability
The Outline team takes security bugs seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
To report a security issue, email [hello@getoutline.com](mailto:hello@getoutline.com) and include the word "SECURITY" in the subject line.
The Outline team will send a response indicating the next steps in handling your report. After the initial reply to your report you will be kept informed of the progress towards a fix and full announcement.
Report security bugs in third-party dependencies to the person or team maintaining the module. You can also report a vulnerability through the [Node Security Project](https://nodesecurity.io/report).
+34
View File
@@ -0,0 +1,34 @@
# Translation
Outline is localized through community contributions. The text in Outline's user interface is in American English by default, we're very thankful for all help that the community provides bringing the app to different languages.
## Externalizing strings
Before a string can be translated, it must be externalized. This is the process where English strings in the source code are wrapped in a function that retrieves the translated string for the users language.
For externalization we use [react-i18next](https://react.i18next.com/), this provides the hooks [useTranslation](https://react.i18next.com/latest/usetranslation-hook) and the [Trans](https://react.i18next.com/latest/trans-component) component for wrapping English text.
PR's are accepted for wrapping English strings in the codebase that were not previously externalized.
## Translating strings
To manage the translation process we use [CrowdIn](https://translate.getoutline.com/), it keeps track of which strings in which languages still need translating, synchronizes with the codebase automatically, and provides a great editor interface.
You'll need to create a free account to use CrowdIn. Once you have joined, you can provide translations by following these steps:
1. Select the language for which you want to contribute (or vote for) a translation (below the language you can see the progress of the translation)
![CrowdIn UI](https://i.imgur.com/AkbDY60.png)
2. Please choose the translation.json file from your desired language
3. Once a file is selected, all the strings associated with the version are displayed on the left side. To display the untranslated strings first, select the filter icon next to the search bar and select “All, Untranslated First”.The red square next to an English string shows that a string has not been translated yet. To provide a translation, select a string on the left side, provide a translation in the target language in the text box in the right side (singular and plural) and press the save button. As soon as a translation has been provided by another user (green square next to string), you can also vote on a translation provided by another user. The translation with the most votes is used unless a different translation has been approved by a proof reader. ![Editor UI](https://i.imgur.com/pldZCRs.png)
## Proofreading
Once a translation has been provided, a proof reader can approve the translation and mark it for use in Outline.
If you are interested in becoming a proof reader, please contact one of the project managers in the Outline CrowdIn project or contact [@tommoor](https://github.com/tommoor). Similarly, if your language is not listed in the list of CrowdIn languages, please contact our project managers or [send us an email](https://www.getoutline.com/contact) so we can add your language.
## Release
Updated translations are automatically PR'd against the codebase by a bot and will be merged regularly so that new translations appear in the next release of Outline.
+18
View File
@@ -0,0 +1,18 @@
/* eslint-disable flowtype/require-valid-file-annotation */
export default class Queue {
name;
constructor(name) {
this.name = name;
}
process = (fn) => {
console.log(`Registered function ${this.name}`);
this.processFn = fn;
};
add = (data) => {
console.log(`Running ${this.name}`);
return this.processFn({ data });
};
}
-2
View File
@@ -1,2 +0,0 @@
import idObj from 'identity-obj-proxy';
export default idObj;
+160
View File
@@ -0,0 +1,160 @@
{
"name": "Outline",
"description": "Open source wiki and knowledge base for growing teams",
"website": "https://www.getoutline.com/",
"repository": "https://github.com/outline/outline",
"keywords": [
"wiki",
"team",
"node",
"markdown",
"slack"
],
"success_url": "/",
"formation": {
"web": {
"quantity": 1,
"size": "Hobby"
}
},
"image": "heroku/node",
"addons": [
{
"plan": "heroku-redis"
},
{
"plan": "heroku-postgresql"
}
],
"scripts": {
"postdeploy": "yarn sequelize db:migrate"
},
"env": {
"NODE_ENV": {
"value": "production",
"required": true
},
"SECRET_KEY": {
"description": "A secret key",
"generator": "secret",
"required": true
},
"ENABLE_UPDATES": {
"value": "true",
"required": true
},
"URL": {
"description": "https://{your app name}.herokuapp.com",
"required": true
},
"GOOGLE_CLIENT_ID": {
"description": "See https://developers.google.com/identity/protocols/OAuth2 to create a new Google OAuth client. You must configure at least one of Slack or Google to control login.",
"required": false
},
"GOOGLE_CLIENT_SECRET": {
"description": "",
"required": false
},
"ALLOWED_DOMAINS": {
"description": "Comma separated list of domains to be allowed (optional). If not set, all Google apps domains are allowed by default",
"required": false
},
"SLACK_KEY": {
"description": "See https://api.slack.com/apps to create a new Slack app. You must configure at least one of Slack or Google to control login.",
"required": false
},
"SLACK_SECRET": {
"description": "Your Slack client secret - d2dc414f9953226bad0a356cXXXXYYYY",
"required": false
},
"SLACK_VERIFICATION_TOKEN": {
"description": "Your Slack verification token - PLxk6OlXXXXXVj3YYYY",
"required": false
},
"SLACK_APP_ID": {
"description": "A0XXXXXXXXX",
"required": false
},
"AWS_ACCESS_KEY_ID": {
"description": "Needed to save file uploads. Optional for development / testing",
"required": false
},
"AWS_SECRET_ACCESS_KEY": {
"description": "",
"required": false
},
"AWS_S3_UPLOAD_BUCKET_NAME": {
"description": "yourbucket.example.com",
"required": false
},
"AWS_S3_UPLOAD_BUCKET_URL": {
"description": "Live web link to your bucket. For CNAMEs, https://yourbucket.example.com",
"required": false
},
"AWS_S3_UPLOAD_MAX_SIZE": {
"description": "Maximum file upload size in bytes",
"value": "26214400",
"required": false
},
"AWS_S3_FORCE_PATH_STYLE": {
"description": "Use path-style URL's for connecting to S3 instead of subdomain. This is useful for S3-compatible storage.",
"value": "true",
"required": false
},
"AWS_REGION": {
"value": "us-east-1",
"description": "Region in which the above S3 bucket exists",
"required": false
},
"AWS_S3_ACL": {
"value": "private",
"description": "S3 canned ACL for document attachments",
"required": false
},
"SMTP_HOST": {
"description": "smtp.example.com (optional)",
"required": false
},
"SMTP_PORT": {
"description": "1234 (optional)",
"required": false
},
"SMTP_USERNAME": {
"description": "me@example.com (optional)",
"required": false
},
"SMTP_PASSWORD": {
"description": "(optional)",
"required": false
},
"SMTP_FROM_EMAIL": {
"description": "wiki@example.com (optional)",
"required": false
},
"SMTP_REPLY_EMAIL": {
"description": "wikireply@example.com (optional)",
"required": false
},
"SMTP_SECURE": {
"value": "true",
"description": "Use a secure SMTP connection (optional)",
"required": false
},
"SMTP_TLS_CIPHERS": {
"description": "Override SMTP cipher configuration (optional)",
"required": false
},
"GOOGLE_ANALYTICS_ID": {
"description": "UA-xxxx (optional)",
"required": false
},
"SENTRY_DSN": {
"description": "An API key for Sentry if you wish to collect error reporting (optional)",
"required": false
},
"TEAM_LOGO": {
"description": "A logo that will be displayed on the signed out home page",
"required": false
}
}
}
+30
View File
@@ -0,0 +1,30 @@
{
"testURL": "http://localhost",
"verbose": false,
"rootDir": "..",
"roots": [
"<rootDir>/app",
"<rootDir>/shared"
],
"moduleNameMapper": {
"^shared/(.*)$": "<rootDir>/shared/$1",
"^.*[.](gif|ttf|eot|svg)$": "<rootDir>/__test__/fileMock.js"
},
"moduleFileExtensions": [
"js",
"jsx",
"json"
],
"moduleDirectories": [
"node_modules"
],
"modulePaths": [
"<rootDir>/app"
],
"setupFiles": [
"<rootDir>/__mocks__/window.js"
],
"setupFilesAfterEnv": [
"./app/test/setup.js"
]
}
+48
View File
@@ -0,0 +1,48 @@
// @flow
import styled from "styled-components";
import breakpoint from "styled-components-breakpoint";
import Flex from "components/Flex";
export const Action = styled(Flex)`
justify-content: center;
align-items: center;
padding: 0 0 0 12px;
height: 32px;
font-size: 15px;
flex-shrink: 0;
&:empty {
display: none;
}
`;
export const Separator = styled.div`
flex-shrink: 0;
margin-left: 12px;
width: 1px;
height: 28px;
background: ${(props) => props.theme.divider};
`;
const Actions = styled(Flex)`
position: fixed;
top: 0;
right: 0;
left: 0;
border-radius: 3px;
background: ${(props) => props.theme.background};
transition: ${(props) => props.theme.backgroundTransition};
padding: 12px;
backdrop-filter: blur(20px);
@media print {
display: none;
}
${breakpoint("tablet")`
left: auto;
padding: 24px;
`};
`;
export default Actions;
-45
View File
@@ -1,45 +0,0 @@
// @flow
import styled from 'styled-components';
import breakpoint from 'styled-components-breakpoint';
import Flex from 'shared/components/Flex';
import { layout, color } from 'shared/styles/constants';
export const Action = styled(Flex)`
justify-content: center;
align-items: center;
padding: 0 0 0 12px;
a {
color: ${color.text};
height: 24px;
}
`;
export const Separator = styled.div`
margin-left: 12px;
width: 1px;
height: 20px;
background: ${color.slateLight};
`;
const Actions = styled(Flex)`
position: fixed;
top: 0;
right: 0;
left: 0;
border-radius: 3px;
background: rgba(255, 255, 255, 0.9);
padding: 16px;
-webkit-backdrop-filter: blur(20px);
@media print {
display: none;
}
${breakpoint('tablet')`
left: auto;
padding: ${layout.vpadding} ${layout.hpadding} 8px 8px;
`};
`;
export default Actions;
-4
View File
@@ -1,4 +0,0 @@
// @flow
import Actions from './Actions';
export { Action, Separator } from './Actions';
export default Actions;
-38
View File
@@ -1,38 +0,0 @@
// @flow
import React from 'react';
import { observer } from 'mobx-react';
import Flex from 'shared/components/Flex';
import styled from 'styled-components';
import { color } from 'shared/styles/constants';
type Props = {
children: React.Element<*>,
type?: 'info' | 'success' | 'warning' | 'danger' | 'offline',
};
@observer
class Alert extends React.Component {
props: Props;
defaultProps = {
type: 'info',
};
render() {
return (
<Container align="center" justify="center" type={this.props.type}>
{this.props.children}
</Container>
);
}
}
const Container = styled(Flex)`
height: $headerHeight;
color: #ffffff;
font-size: 14px;
line-height: 1;
background-color: ${({ type }) => color[type]};
`;
export default Alert;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import Alert from './Alert';
export default Alert;
+47
View File
@@ -0,0 +1,47 @@
// @flow
/* global ga */
import * as React from "react";
import env from "env";
type Props = {
children?: React.Node,
};
export default class Analytics extends React.Component<Props> {
componentDidMount() {
if (!env.GOOGLE_ANALYTICS_ID) {
return null;
}
// standard Google Analytics script
window.ga =
window.ga ||
function () {
// $FlowIssue
(ga.q = ga.q || []).push(arguments);
};
// $FlowIssue
ga.l = +new Date();
ga("create", env.GOOGLE_ANALYTICS_ID, "auto");
ga("set", { dimension1: "true" });
ga("send", "pageview");
const script = document.createElement("script");
script.src = "https://www.google-analytics.com/analytics.js";
script.async = true;
// Track PWA install event
window.addEventListener("appinstalled", () => {
ga("send", "event", "pwa", "install");
});
if (document.body) {
document.body.appendChild(script);
}
}
render() {
return this.props.children || null;
}
}
+23
View File
@@ -0,0 +1,23 @@
// @flow
import * as React from "react";
export default function Arrow() {
return (
<svg
width="13"
height="30"
viewBox="0 0 13 30"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill="currentColor"
d="M7.40242 1.48635C8.23085 0.0650039 10.0656 -0.421985 11.5005 0.39863C12.9354 1.21924 13.427 3.03671 12.5986 4.45806L5.59858 16.4681C4.77015 17.8894 2.93538 18.3764 1.5005 17.5558C0.065623 16.7352 -0.426002 14.9177 0.402425 13.4964L7.40242 1.48635Z"
/>
<path
fill="currentColor"
d="M12.5986 25.5419C13.427 26.9633 12.9354 28.7808 11.5005 29.6014C10.0656 30.422 8.23087 29.935 7.40244 28.5136L0.402438 16.5036C-0.425989 15.0823 0.0656365 13.2648 1.50051 12.4442C2.93539 11.6236 4.77016 12.1106 5.59859 13.5319L12.5986 25.5419Z"
/>
</svg>
);
}
-57
View File
@@ -1,57 +0,0 @@
// @flow
import React from 'react';
import { Provider } from 'mobx-react';
import stores from 'stores';
import SettingsStore from 'stores/SettingsStore';
import DocumentsStore from 'stores/DocumentsStore';
import CollectionsStore from 'stores/CollectionsStore';
import CacheStore from 'stores/CacheStore';
type Props = {
children?: React.Element<any>,
};
let authenticatedStores;
const Auth = ({ children }: Props) => {
if (stores.auth.authenticated && stores.auth.team && stores.auth.user) {
// Only initialize stores once. Kept in global scope because otherwise they
// will get overridden on route change
if (!authenticatedStores) {
// Stores for authenticated user
const { user, team } = stores.auth;
const cache = new CacheStore(user.id);
authenticatedStores = {
settings: new SettingsStore(),
documents: new DocumentsStore({
ui: stores.ui,
cache,
}),
collections: new CollectionsStore({
ui: stores.ui,
teamId: team.id,
cache,
}),
};
if (window.Bugsnag) {
Bugsnag.user = {
id: user.id,
name: user.name,
teamId: team.id,
team: team.name,
};
}
stores.auth.fetch();
authenticatedStores.collections.fetchPage({ limit: 100 });
}
return <Provider {...authenticatedStores}>{children}</Provider>;
}
stores.auth.logout();
return null;
};
export default Auth;
+27
View File
@@ -0,0 +1,27 @@
// @flow
import * as React from "react";
type Props = {
size?: number,
fill?: string,
className?: string,
};
function GoogleLogo({ size = 34, fill = "#FFF", className }: Props) {
return (
<svg
fill={fill}
width={size}
height={size}
viewBox="0 0 34 34"
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<g>
<path d="M32.6162791,13.9090909 L16.8837209,13.9090909 L16.8837209,20.4772727 L25.9395349,20.4772727 C25.0953488,24.65 21.5651163,27.0454545 16.8837209,27.0454545 C11.3581395,27.0454545 6.90697674,22.5636364 6.90697674,17 C6.90697674,11.4363636 11.3581395,6.95454545 16.8837209,6.95454545 C19.2627907,6.95454545 21.4116279,7.80454545 23.1,9.19545455 L28.0116279,4.25 C25.0186047,1.62272727 21.1813953,0 16.8837209,0 C7.52093023,0 0,7.57272727 0,17 C0,26.4272727 7.52093023,34 16.8837209,34 C25.3255814,34 33,27.8181818 33,17 C33,15.9954545 32.8465116,14.9136364 32.6162791,13.9090909 Z" />
</g>
</svg>
);
}
export default GoogleLogo;
+44
View File
@@ -0,0 +1,44 @@
// @flow
import * as React from "react";
type Props = {
size?: number,
fill?: string,
className?: string,
};
function MicrosoftLogo({ size = 34, fill = "#FFF", className }: Props) {
return (
<svg
fill={fill}
width={size}
height={size}
viewBox="0 0 34 34"
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M18.0002 1H33.9998C33.9998 5.8172 34.0007 10.6344 33.9988 15.4516C28.6666 15.4508 23.3334 15.4516 18.0012 15.4516C17.9993 10.6344 18.0002 5.8172 18.0002 1Z"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M18.0009 17.5173C23.3333 17.5155 28.6667 17.5164 34 17.5164V33H18C18.0009 27.8388 17.9991 22.6776 18.0009 17.5173V17.5173Z"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M0 1H16L15.9988 15.4516H0V1Z"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M0 17.5161C5.3332 17.5179 10.6664 17.5155 15.9996 17.5179C16.0005 22.6789 15.9996 27.839 15.9996 33H0V17.5161Z"
/>
</svg>
);
}
export default MicrosoftLogo;
+42
View File
@@ -0,0 +1,42 @@
// @flow
import * as React from "react";
type Props = {
size?: number,
fill?: string,
className?: string,
};
function SlackLogo({ size = 34, fill = "#FFF", className }: Props) {
return (
<svg
fill={fill}
width={size}
height={size}
viewBox="0 0 34 34"
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<g stroke="none" strokeWidth="1" fillRule="evenodd">
<g transform="translate(0.000000, 17.822581)">
<path d="M7.23870968,3.61935484 C7.23870968,5.56612903 5.6483871,7.15645161 3.7016129,7.15645161 C1.75483871,7.15645161 0.164516129,5.56612903 0.164516129,3.61935484 C0.164516129,1.67258065 1.75483871,0.0822580645 3.7016129,0.0822580645 L7.23870968,0.0822580645 L7.23870968,3.61935484 Z" />
<path d="M9.02096774,3.61935484 C9.02096774,1.67258065 10.6112903,0.0822580645 12.5580645,0.0822580645 C14.5048387,0.0822580645 16.0951613,1.67258065 16.0951613,3.61935484 L16.0951613,12.4758065 C16.0951613,14.4225806 14.5048387,16.0129032 12.5580645,16.0129032 C10.6112903,16.0129032 9.02096774,14.4225806 9.02096774,12.4758065 C9.02096774,12.4758065 9.02096774,3.61935484 9.02096774,3.61935484 Z" />
</g>
<g>
<path d="M12.5580645,7.23870968 C10.6112903,7.23870968 9.02096774,5.6483871 9.02096774,3.7016129 C9.02096774,1.75483871 10.6112903,0.164516129 12.5580645,0.164516129 C14.5048387,0.164516129 16.0951613,1.75483871 16.0951613,3.7016129 L16.0951613,7.23870968 L12.5580645,7.23870968 Z" />
<path d="M12.5580645,9.02096774 C14.5048387,9.02096774 16.0951613,10.6112903 16.0951613,12.5580645 C16.0951613,14.5048387 14.5048387,16.0951613 12.5580645,16.0951613 L3.7016129,16.0951613 C1.75483871,16.0951613 0.164516129,14.5048387 0.164516129,12.5580645 C0.164516129,10.6112903 1.75483871,9.02096774 3.7016129,9.02096774 C3.7016129,9.02096774 12.5580645,9.02096774 12.5580645,9.02096774 Z" />
</g>
<g transform="translate(17.822581, 0.000000)">
<path d="M8.93870968,12.5580645 C8.93870968,10.6112903 10.5290323,9.02096774 12.4758065,9.02096774 C14.4225806,9.02096774 16.0129032,10.6112903 16.0129032,12.5580645 C16.0129032,14.5048387 14.4225806,16.0951613 12.4758065,16.0951613 L8.93870968,16.0951613 L8.93870968,12.5580645 Z" />
<path d="M7.15645161,12.5580645 C7.15645161,14.5048387 5.56612903,16.0951613 3.61935484,16.0951613 C1.67258065,16.0951613 0.0822580645,14.5048387 0.0822580645,12.5580645 L0.0822580645,3.7016129 C0.0822580645,1.75483871 1.67258065,0.164516129 3.61935484,0.164516129 C5.56612903,0.164516129 7.15645161,1.75483871 7.15645161,3.7016129 L7.15645161,12.5580645 Z" />
</g>
<g transform="translate(17.822581, 17.822581)">
<path d="M3.61935484,8.93870968 C5.56612903,8.93870968 7.15645161,10.5290323 7.15645161,12.4758065 C7.15645161,14.4225806 5.56612903,16.0129032 3.61935484,16.0129032 C1.67258065,16.0129032 0.0822580645,14.4225806 0.0822580645,12.4758065 L0.0822580645,8.93870968 L3.61935484,8.93870968 Z" />
<path d="M3.61935484,7.15645161 C1.67258065,7.15645161 0.0822580645,5.56612903 0.0822580645,3.61935484 C0.0822580645,1.67258065 1.67258065,0.0822580645 3.61935484,0.0822580645 L12.4758065,0.0822580645 C14.4225806,0.0822580645 16.0129032,1.67258065 16.0129032,3.61935484 C16.0129032,5.56612903 14.4225806,7.15645161 12.4758065,7.15645161 L3.61935484,7.15645161 Z" />
</g>
</g>
</svg>
);
}
export default SlackLogo;
+46
View File
@@ -0,0 +1,46 @@
// @flow
import * as React from "react";
import styled from "styled-components";
import GoogleLogo from "./GoogleLogo";
import MicrosoftLogo from "./MicrosoftLogo";
import SlackLogo from "./SlackLogo";
type Props = {|
providerName: string,
size?: number,
|};
function AuthLogo({ providerName, size = 16 }: Props) {
switch (providerName) {
case "slack":
return (
<Logo>
<SlackLogo size={size} />
</Logo>
);
case "google":
return (
<Logo>
<GoogleLogo size={size} />
</Logo>
);
case "azure":
return (
<Logo>
<MicrosoftLogo size={size} />
</Logo>
);
default:
return null;
}
}
const Logo = styled.div`
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
`;
export default AuthLogo;
+62
View File
@@ -0,0 +1,62 @@
// @flow
import { observer } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { Redirect } from "react-router-dom";
import { isCustomSubdomain } from "shared/utils/domains";
import LoadingIndicator from "components/LoadingIndicator";
import useStores from "../hooks/useStores";
import env from "env";
type Props = {
children: React.Node,
};
const Authenticated = ({ children }: Props) => {
const { auth } = useStores();
const { i18n } = useTranslation();
const language = auth.user && auth.user.language;
// Watching for language changes here as this is the earliest point we have
// the user available and means we can start loading translations faster
React.useEffect(() => {
if (language && i18n.language !== language) {
// Languages are stored in en_US format in the database, however the
// frontend translation framework (i18next) expects en-US
i18n.changeLanguage(language.replace("_", "-"));
}
}, [i18n, language]);
if (auth.authenticated) {
const { user, team } = auth;
const { hostname } = window.location;
if (!team || !user) {
return <LoadingIndicator />;
}
// If we're authenticated but viewing a domain that doesn't match the
// current team then kick the user to the teams correct domain.
if (team.domain) {
if (team.domain !== hostname) {
window.location.href = `${team.url}${window.location.pathname}`;
return <LoadingIndicator />;
}
} else if (
env.SUBDOMAINS_ENABLED &&
team.subdomain &&
isCustomSubdomain(hostname) &&
!hostname.startsWith(`${team.subdomain}.`)
) {
window.location.href = `${team.url}${window.location.pathname}`;
return <LoadingIndicator />;
}
return children;
}
auth.logout(true);
return <Redirect to="/" />;
};
export default observer(Authenticated);
+50 -15
View File
@@ -1,35 +1,70 @@
// @flow
import React, { Component } from 'react';
import styled from 'styled-components';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import { color } from 'shared/styles/constants';
import placeholder from './placeholder.png';
import { observable } from "mobx";
import { observer } from "mobx-react";
import * as React from "react";
import styled from "styled-components";
import User from "models/User";
import placeholder from "./placeholder.png";
type Props = {|
src: string,
size: number,
icon?: React.Node,
user?: User,
onClick?: () => void,
className?: string,
|};
@observer
class Avatar extends Component {
class Avatar extends React.Component<Props> {
@observable error: boolean;
static defaultProps = {
size: 24,
};
handleError = () => {
this.error = true;
};
render() {
const { src, icon, ...rest } = this.props;
return (
<CircleImg
{...this.props}
onError={this.handleError}
src={this.error ? placeholder : this.props.src}
/>
<AvatarWrapper>
<CircleImg
onError={this.handleError}
src={this.error ? placeholder : src}
{...rest}
/>
{icon && <IconWrapper>{icon}</IconWrapper>}
</AvatarWrapper>
);
}
}
const AvatarWrapper = styled.div`
position: relative;
`;
const IconWrapper = styled.div`
display: flex;
position: absolute;
bottom: -2px;
right: -2px;
background: ${(props) => props.theme.primary};
border: 2px solid ${(props) => props.theme.background};
border-radius: 100%;
width: 20px;
height: 20px;
`;
const CircleImg = styled.img`
width: 24px;
height: 24px;
display: block;
width: ${(props) => props.size}px;
height: ${(props) => props.size}px;
border-radius: 50%;
border: 2px solid ${color.white};
border: 2px solid ${(props) => props.theme.background};
flex-shrink: 0;
`;
@@ -0,0 +1,91 @@
// @flow
import { observable } from "mobx";
import { observer } from "mobx-react";
import { EditIcon } from "outline-icons";
import * as React from "react";
import { withTranslation, type TFunction } from "react-i18next";
import styled from "styled-components";
import User from "models/User";
import UserProfile from "scenes/UserProfile";
import Avatar from "components/Avatar";
import Tooltip from "components/Tooltip";
type Props = {
user: User,
isPresent: boolean,
isEditing: boolean,
isCurrentUser: boolean,
profileOnClick: boolean,
t: TFunction,
};
@observer
class AvatarWithPresence extends React.Component<Props> {
@observable isOpen: boolean = false;
handleOpenProfile = () => {
this.isOpen = true;
};
handleCloseProfile = () => {
this.isOpen = false;
};
render() {
const { user, isPresent, isEditing, isCurrentUser, t } = this.props;
const action = isPresent
? isEditing
? t("currently editing")
: t("currently viewing")
: t("previously edited");
return (
<>
<Tooltip
tooltip={
<Centered>
<strong>{user.name}</strong> {isCurrentUser && `(${t("You")})`}
{action && (
<>
<br />
{action}
</>
)}
</Centered>
}
placement="bottom"
>
<AvatarWrapper isPresent={isPresent}>
<Avatar
src={user.avatarUrl}
onClick={
this.props.profileOnClick === false
? undefined
: this.handleOpenProfile
}
size={32}
icon={isEditing ? <EditIcon size={16} color="#FFF" /> : undefined}
/>
</AvatarWrapper>
</Tooltip>
<UserProfile
user={user}
isOpen={this.isOpen}
onRequestClose={this.handleCloseProfile}
/>
</>
);
}
}
const Centered = styled.div`
text-align: center;
`;
const AvatarWrapper = styled.div`
opacity: ${(props) => (props.isPresent ? 1 : 0.5)};
transition: opacity 250ms ease-in-out;
`;
export default withTranslation()<AvatarWithPresence>(AvatarWithPresence);
+4 -1
View File
@@ -1,3 +1,6 @@
// @flow
import Avatar from './Avatar';
import Avatar from "./Avatar";
import AvatarWithPresence from "./AvatarWithPresence";
export { AvatarWithPresence };
export default Avatar;
+20
View File
@@ -0,0 +1,20 @@
// @flow
import styled from "styled-components";
const Badge = styled.span`
margin-left: 10px;
padding: 1px 5px 2px;
background-color: ${({ yellow, primary, theme }) =>
yellow ? theme.yellow : primary ? theme.primary : "transparent"};
color: ${({ primary, yellow, theme }) =>
primary ? theme.white : yellow ? theme.almostBlack : theme.textTertiary};
border: 1px solid
${({ primary, yellow, theme }) =>
primary || yellow ? "transparent" : theme.textTertiary};
border-radius: 8px;
font-size: 12px;
font-weight: 500;
user-select: none;
`;
export default Badge;
+43
View File
@@ -0,0 +1,43 @@
// @flow
import * as React from "react";
import styled from "styled-components";
import OutlineLogo from "./OutlineLogo";
import env from "env";
type Props = {
href?: string,
};
function Branding({ href = env.URL }: Props) {
return (
<Link href={href}>
<OutlineLogo size={16} />
&nbsp;Outline
</Link>
);
}
const Link = styled.a`
position: fixed;
bottom: 0;
left: 0;
font-weight: 600;
font-size: 14px;
text-decoration: none;
border-top-right-radius: 2px;
color: ${(props) => props.theme.text};
display: flex;
align-items: center;
padding: 16px;
svg {
fill: ${(props) => props.theme.text};
}
&:hover {
background: ${(props) => props.theme.sidebarBackground};
}
`;
export default Branding;
+87
View File
@@ -0,0 +1,87 @@
// @flow
import { GoToIcon } from "outline-icons";
import * as React from "react";
import { Link } from "react-router-dom";
import styled from "styled-components";
import Flex from "components/Flex";
import BreadcrumbMenu from "menus/BreadcrumbMenu";
type MenuItem = {|
icon?: React.Node,
title: React.Node,
to?: string,
|};
type Props = {|
items: MenuItem[],
max?: number,
children?: React.Node,
highlightFirstItem?: boolean,
|};
function Breadcrumb({ items, highlightFirstItem, children, max = 2 }: Props) {
const totalItems = items.length;
let topLevelItems: MenuItem[] = [...items];
let overflowItems;
// chop middle breadcrumbs and present a "..." menu instead
if (totalItems > max) {
const halfMax = Math.floor(max / 2);
overflowItems = topLevelItems.splice(halfMax, totalItems - max);
topLevelItems.splice(halfMax, 0, {
title: <BreadcrumbMenu items={overflowItems} />,
});
}
return (
<Flex justify="flex-start" align="center">
{topLevelItems.map((item, index) => (
<React.Fragment key={item.to || index}>
{item.icon}
{item.to ? (
<Item
to={item.to}
$withIcon={!!item.icon}
$highlight={highlightFirstItem && index === 0}
>
{item.title}
</Item>
) : (
item.title
)}
{index !== topLevelItems.length - 1 || !!children ? <Slash /> : null}
</React.Fragment>
))}
{children}
</Flex>
);
}
const Slash = styled(GoToIcon)`
flex-shrink: 0;
fill: ${(props) => props.theme.divider};
`;
const Item = styled(Link)`
display: flex;
flex-shrink: 1;
min-width: 0;
color: ${(props) => props.theme.text};
font-size: 15px;
height: 24px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-weight: ${(props) => (props.$highlight ? "500" : "inherit")};
margin-left: ${(props) => (props.$withIcon ? "4px" : "0")};
svg {
flex-shrink: 0;
}
&:hover {
text-decoration: underline;
}
`;
export default Breadcrumb;
+39
View File
@@ -0,0 +1,39 @@
// @flow
import * as React from "react";
import styled from "styled-components";
import { bounceIn } from "shared/styles/animations";
type Props = {|
count: number,
|};
const Bubble = ({ count }: Props) => {
if (!count) {
return null;
}
return <Count>{count}</Count>;
};
const Count = styled.div`
animation: ${bounceIn} 600ms;
transform-origin: center center;
color: ${(props) => props.theme.white};
background: ${(props) => props.theme.slateDark};
display: inline-block;
font-feature-settings: "tnum";
font-weight: 600;
font-size: 9px;
white-space: nowrap;
vertical-align: baseline;
min-width: 16px;
min-height: 16px;
line-height: 16px;
border-radius: 8px;
text-align: center;
padding: 0 4px;
margin-left: 8px;
user-select: none;
`;
export default Bubble;
+165
View File
@@ -0,0 +1,165 @@
// @flow
import { ExpandedIcon } from "outline-icons";
import { darken } from "polished";
import * as React from "react";
import styled from "styled-components";
const RealButton = styled.button`
display: ${(props) => (props.fullwidth ? "block" : "inline-block")};
width: ${(props) => (props.fullwidth ? "100%" : "auto")};
margin: 0;
padding: 0;
border: 0;
background: ${(props) => props.theme.buttonBackground};
color: ${(props) => props.theme.buttonText};
box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 2px;
border-radius: 4px;
font-size: 14px;
font-weight: 500;
height: 32px;
text-decoration: none;
flex-shrink: 0;
cursor: pointer;
user-select: none;
${(props) =>
!props.borderOnHover &&
`
svg {
fill: ${props.iconColor || props.theme.buttonText};
}
`}
&::-moz-focus-inner {
padding: 0;
border: 0;
}
&:hover {
background: ${(props) => darken(0.05, props.theme.buttonBackground)};
}
&:disabled {
cursor: default;
pointer-events: none;
color: ${(props) => props.theme.white50};
}
${(props) =>
props.$neutral &&
`
background: ${props.theme.buttonNeutralBackground};
color: ${props.theme.buttonNeutralText};
box-shadow: ${
props.borderOnHover
? "none"
: `rgba(0, 0, 0, 0.07) 0px 1px 2px, ${props.theme.buttonNeutralBorder} 0 0 0 1px inset`
};
${
props.borderOnHover
? ""
: `svg {
fill: ${props.iconColor || props.theme.buttonNeutralText};
}`
}
&:hover {
background: ${darken(0.05, props.theme.buttonNeutralBackground)};
box-shadow: rgba(0, 0, 0, 0.07) 0px 1px 2px, ${
props.theme.buttonNeutralBorder
} 0 0 0 1px inset;
}
&:disabled {
color: ${props.theme.textTertiary};
}
`} ${(props) =>
props.danger &&
`
background: ${props.theme.danger};
color: ${props.theme.white};
&:hover {
background: ${darken(0.05, props.theme.danger)};
}
`};
`;
const Label = styled.span`
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
${(props) => props.hasIcon && "padding-left: 4px;"};
`;
export const Inner = styled.span`
display: flex;
padding: 0 8px;
padding-right: ${(props) => (props.disclosure ? 2 : 8)}px;
line-height: ${(props) => (props.hasIcon ? 24 : 32)}px;
justify-content: center;
align-items: center;
min-height: 32px;
${(props) => props.hasIcon && props.hasText && "padding-left: 4px;"};
${(props) => props.hasIcon && !props.hasText && "padding: 0 4px;"};
`;
export type Props = {|
type?: "button" | "submit",
value?: string,
icon?: React.Node,
iconColor?: string,
className?: string,
children?: React.Node,
innerRef?: React.ElementRef<any>,
disclosure?: boolean,
neutral?: boolean,
danger?: boolean,
primary?: boolean,
disabled?: boolean,
fullwidth?: boolean,
autoFocus?: boolean,
style?: Object,
as?: React.ComponentType<any>,
to?: string,
onClick?: (event: SyntheticEvent<>) => mixed,
borderOnHover?: boolean,
"data-on"?: string,
"data-event-category"?: string,
"data-event-action"?: string,
|};
const Button = React.forwardRef<Props, HTMLButtonElement>(
(
{
type = "text",
icon,
children,
value,
disclosure,
neutral,
...rest
}: Props,
innerRef
) => {
const hasText = children !== undefined || value !== undefined;
const hasIcon = icon !== undefined;
return (
<RealButton type={type} ref={innerRef} $neutral={neutral} {...rest}>
<Inner hasIcon={hasIcon} hasText={hasText} disclosure={disclosure}>
{hasIcon && icon}
{hasText && <Label hasIcon={hasIcon}>{children || value}</Label>}
{disclosure && <ExpandedIcon />}
</Inner>
</RealButton>
);
}
);
export default Button;
-114
View File
@@ -1,114 +0,0 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import { color } from 'shared/styles/constants';
import { darken, lighten } from 'polished';
const RealButton = styled.button`
display: inline-block;
margin: 0;
padding: 0;
border: 0;
background: ${color.primary};
color: ${color.white};
border-radius: 4px;
font-size: 15px;
height: 36px;
text-decoration: none;
flex-shrink: 0;
outline: none;
cursor: pointer;
&::-moz-focus-inner {
padding: 0;
border: 0;
}
&:hover {
background: ${darken(0.05, color.primary)};
}
svg {
position: relative;
top: 0.05em;
}
&:disabled {
opacity: 0.8;
cursor: default;
}
${props =>
props.light &&
`
color: ${color.text};
background: ${lighten(0.08, color.slateLight)};
&:hover {
background: ${color.slateLight};
}
`} ${props =>
props.neutral &&
`
background: ${color.slate};
&:hover {
background: ${darken(0.05, color.slate)};
}
`} ${props =>
props.danger &&
`
background: ${color.danger};
&:hover {
background: ${darken(0.05, color.danger)};
}
`};
`;
const Label = styled.span`
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
${props => props.hasIcon && 'padding-left: 2px;'};
`;
const Inner = styled.span`
padding: 0 12px;
display: flex;
line-height: 28px;
justify-content: center;
align-items: center;
${props =>
props.hasIcon &&
(props.small ? 'padding-left: 6px;' : 'padding-left: 10px;')};
`;
export type Props = {
type?: string,
value?: string,
icon?: React$Element<any>,
className?: string,
children?: React$Element<any>,
};
export default function Button({
type = 'text',
icon,
children,
value,
...rest
}: Props) {
const hasText = children !== undefined || value !== undefined;
const hasIcon = icon !== undefined;
return (
<RealButton {...rest}>
<Inner hasIcon={hasIcon}>
{hasIcon && icon}
{hasText && <Label hasIcon={hasIcon}>{children || value}</Label>}
</Inner>
</RealButton>
);
}
-3
View File
@@ -1,3 +0,0 @@
// @flow
import Button from './Button';
export default Button;
+13
View File
@@ -0,0 +1,13 @@
// @flow
import styled from "styled-components";
import Button, { Inner } from "./Button";
const ButtonLarge = styled(Button)`
height: 40px;
${Inner} {
padding: 4px 16px;
}
`;
export default ButtonLarge;
+23
View File
@@ -0,0 +1,23 @@
// @flow
import * as React from "react";
import styled from "styled-components";
type Props = {
onClick: (ev: SyntheticEvent<>) => void,
children: React.Node,
};
export default function ButtonLink(props: Props) {
return <Button {...props} />;
}
const Button = styled.button`
margin: 0;
padding: 0;
border: 0;
color: ${(props) => props.theme.link};
line-height: inherit;
background: none;
text-decoration: none;
cursor: pointer;
`;
+38
View File
@@ -0,0 +1,38 @@
// @flow
import * as React from "react";
import styled from "styled-components";
import breakpoint from "styled-components-breakpoint";
type Props = {|
children?: React.Node,
withStickyHeader?: boolean,
|};
const Container = styled.div`
width: 100%;
max-width: 100vw;
padding: ${(props) => (props.withStickyHeader ? "4px 12px" : "60px 12px")};
${breakpoint("tablet")`
padding: ${(props) => (props.withStickyHeader ? "4px 60px" : "60px")};
`};
`;
const Content = styled.div`
max-width: 46em;
margin: 0 auto;
${breakpoint("desktopLarge")`
max-width: 52em;
`};
`;
const CenteredContent = ({ children, ...rest }: Props) => {
return (
<Container {...rest}>
<Content>{children}</Content>
</Container>
);
};
export default CenteredContent;
@@ -1,32 +0,0 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import breakpoint from 'styled-components-breakpoint';
type Props = {
children?: React.Element<any>,
};
const Container = styled.div`
width: 100%;
padding: 60px 20px;
${breakpoint('tablet')`
padding: 60px;
`};
`;
const Content = styled.div`
max-width: 46em;
margin: 0 auto;
`;
const CenteredContent = ({ children, ...rest }: Props) => {
return (
<Container {...rest}>
<Content>{children}</Content>
</Container>
);
};
export default CenteredContent;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import CenteredContent from './CenteredContent';
export default CenteredContent;
+65
View File
@@ -0,0 +1,65 @@
// @flow
import * as React from "react";
import { VisuallyHidden } from "reakit/VisuallyHidden";
import styled from "styled-components";
import HelpText from "components/HelpText";
export type Props = {|
checked?: boolean,
label?: React.Node,
labelHidden?: boolean,
className?: string,
name?: string,
disabled?: boolean,
onChange: (event: SyntheticInputEvent<HTMLInputElement>) => mixed,
note?: string,
short?: boolean,
small?: boolean,
|};
const LabelText = styled.span`
font-weight: 500;
margin-left: ${(props) => (props.small ? "6px" : "10px")};
${(props) => (props.small ? `color: ${props.theme.textSecondary}` : "")};
`;
const Wrapper = styled.div`
padding-bottom: 8px;
${(props) => (props.small ? "font-size: 14px" : "")};
width: 100%;
`;
const Label = styled.label`
display: flex;
align-items: center;
user-select: none;
`;
export default function Checkbox({
label,
labelHidden,
note,
className,
small,
short,
...rest
}: Props) {
const wrappedLabel = <LabelText small={small}>{label}</LabelText>;
return (
<>
<Wrapper small={small}>
<Label>
<input type="checkbox" {...rest} />
{label &&
(labelHidden ? (
<VisuallyHidden>{wrappedLabel}</VisuallyHidden>
) : (
wrappedLabel
))}
</Label>
{note && <HelpText small>{note}</HelpText>}
</Wrapper>
</>
);
}
+10
View File
@@ -0,0 +1,10 @@
// @flow
import styled from "styled-components";
const ClickablePadding = styled.div`
min-height: 10em;
cursor: ${({ onClick }) => (onClick ? "text" : "default")};
${({ grow }) => grow && `flex-grow: 100;`};
`;
export default ClickablePadding;
+109
View File
@@ -0,0 +1,109 @@
// @flow
import { sortBy, filter, uniq } from "lodash";
import { observer } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { usePopoverState, PopoverDisclosure } from "reakit/Popover";
import styled from "styled-components";
import breakpoint from "styled-components-breakpoint";
import Document from "models/Document";
import { AvatarWithPresence } from "components/Avatar";
import DocumentViews from "components/DocumentViews";
import Facepile from "components/Facepile";
import NudeButton from "components/NudeButton";
import Popover from "components/Popover";
import useStores from "hooks/useStores";
type Props = {|
document: Document,
currentUserId: string,
|};
function Collaborators(props: Props) {
const { t } = useTranslation();
const { users, presence } = useStores();
const { document, currentUserId } = props;
let documentPresence = presence.get(document.id);
documentPresence = documentPresence
? Array.from(documentPresence.values())
: [];
const presentIds = documentPresence.map((p) => p.userId);
const editingIds = documentPresence
.filter((p) => p.isEditing)
.map((p) => p.userId);
// ensure currently present via websocket are always ordered first
const collaborators = React.useMemo(
() =>
sortBy(
filter(
users.orderedData,
(user) =>
presentIds.includes(user.id) ||
document.collaboratorIds.includes(user.id)
),
(user) => presentIds.includes(user.id)
),
[document.collaboratorIds, users.orderedData, presentIds]
);
// load any users we don't know about
React.useEffect(() => {
if (users.isFetching) {
return;
}
uniq([...document.collaboratorIds, ...presentIds]).forEach((userId) => {
if (!users.get(userId)) {
return users.fetch(userId);
}
});
}, [document, users, presentIds, document.collaboratorIds]);
const popover = usePopoverState({
gutter: 0,
placement: "bottom-end",
});
return (
<>
<PopoverDisclosure {...popover}>
{(props) => (
<NudeButton width={collaborators.length * 32} height={32} {...props}>
<FacepileHiddenOnMobile
users={collaborators}
renderAvatar={(user) => {
const isPresent = presentIds.includes(user.id);
const isEditing = editingIds.includes(user.id);
return (
<AvatarWithPresence
key={user.id}
user={user}
isPresent={isPresent}
isEditing={isEditing}
isCurrentUser={currentUserId === user.id}
profileOnClick={false}
/>
);
}}
/>
</NudeButton>
)}
</PopoverDisclosure>
<Popover {...popover} width={300} aria-label={t("Viewers")} tabIndex={0}>
<DocumentViews document={document} isOpen={popover.visible} />
</Popover>
</>
);
}
const FacepileHiddenOnMobile = styled(Facepile)`
${breakpoint("mobile", "tablet")`
display: none;
`};
`;
export default observer(Collaborators);
@@ -1,61 +0,0 @@
// @flow
import React from 'react';
import moment from 'moment';
import styled from 'styled-components';
import Flex from 'shared/components/Flex';
import Avatar from 'components/Avatar';
import Tooltip from 'components/Tooltip';
import Document from 'models/Document';
type Props = { document: Document };
const Collaborators = ({ document }: Props) => {
const {
createdAt,
updatedAt,
createdBy,
updatedBy,
collaborators,
} = document;
let tooltip;
if (createdAt === updatedAt) {
tooltip = `${createdBy.name} published ${moment(createdAt).fromNow()}`;
} else {
tooltip = `${updatedBy.name} modified ${moment(updatedAt).fromNow()}`;
}
return (
<Avatars>
<StyledTooltip tooltip={tooltip} placement="bottom">
{collaborators.map(user => (
<AvatarWrapper key={user.id}>
<Avatar src={user.avatarUrl} />
</AvatarWrapper>
))}
</StyledTooltip>
</Avatars>
);
};
const StyledTooltip = styled(Tooltip)`
display: flex;
flex-direction: row-reverse;
`;
const AvatarWrapper = styled.div`
width: 24px;
height: 24px;
margin-right: -10px;
&:first-child {
margin-right: 0;
}
`;
const Avatars = styled(Flex)`
align-items: center;
flex-direction: row-reverse;
`;
export default Collaborators;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import Collaborators from './Collaborators';
export default Collaborators;
+211
View File
@@ -0,0 +1,211 @@
// @flow
import { observer } from "mobx-react";
import { transparentize } from "polished";
import * as React from "react";
import { useTranslation } from "react-i18next";
import styled from "styled-components";
import Collection from "models/Collection";
import Arrow from "components/Arrow";
import ButtonLink from "components/ButtonLink";
import Editor from "components/Editor";
import LoadingIndicator from "components/LoadingIndicator";
import NudeButton from "components/NudeButton";
import useDebouncedCallback from "hooks/useDebouncedCallback";
import useStores from "hooks/useStores";
type Props = {|
collection: Collection,
|};
function CollectionDescription({ collection }: Props) {
const { collections, ui, policies } = useStores();
const { t } = useTranslation();
const [isExpanded, setExpanded] = React.useState(false);
const [isEditing, setEditing] = React.useState(false);
const [isDirty, setDirty] = React.useState(false);
const can = policies.abilities(collection.id);
const handleStartEditing = React.useCallback(() => {
setEditing(true);
}, []);
const handleStopEditing = React.useCallback(() => {
setEditing(false);
}, []);
const handleClickDisclosure = React.useCallback(
(event) => {
event.preventDefault();
if (isExpanded && document.activeElement) {
document.activeElement.blur();
}
setExpanded(!isExpanded);
},
[isExpanded]
);
const handleSave = useDebouncedCallback(async (getValue) => {
try {
await collection.save({
description: getValue(),
});
setDirty(false);
} catch (err) {
ui.showToast(
t("Sorry, an error occurred saving the collection", {
type: "error",
})
);
throw err;
}
}, 1000);
const handleChange = React.useCallback(
(getValue) => {
setDirty(true);
handleSave(getValue);
},
[handleSave]
);
React.useEffect(() => {
setEditing(false);
}, [collection.id]);
const placeholder = `${t("Add a description")}`;
const key = isEditing || isDirty ? "draft" : collection.updatedAt;
return (
<MaxHeight data-editing={isEditing} data-expanded={isExpanded}>
<Input
$isEditable={can.update}
data-editing={isEditing}
data-expanded={isExpanded}
>
<span onClick={can.update ? handleStartEditing : undefined}>
{collections.isSaving && <LoadingIndicator />}
{collection.hasDescription || isEditing || isDirty ? (
<React.Suspense fallback={<Placeholder>Loading</Placeholder>}>
<Editor
key={key}
defaultValue={collection.description || ""}
onChange={handleChange}
placeholder={placeholder}
readOnly={!isEditing}
autoFocus={isEditing}
onBlur={handleStopEditing}
maxLength={1000}
disableEmbeds
readOnlyWriteCheckboxes
grow
/>
</React.Suspense>
) : (
can.update && <Placeholder>{placeholder}</Placeholder>
)}
</span>
</Input>
{!isEditing && (
<Disclosure
onClick={handleClickDisclosure}
aria-label={isExpanded ? t("Collapse") : t("Expand")}
size={30}
>
<Arrow />
</Disclosure>
)}
</MaxHeight>
);
}
const Disclosure = styled(NudeButton)`
opacity: 0;
color: ${(props) => props.theme.divider};
position: absolute;
top: calc(25vh - 50px);
left: 50%;
z-index: 1;
transform: rotate(-90deg) translateX(-50%);
transition: opacity 100ms ease-in-out;
&:focus,
&:hover {
opacity: 1;
}
&:active {
color: ${(props) => props.theme.sidebarText};
}
`;
const Placeholder = styled(ButtonLink)`
color: ${(props) => props.theme.placeholder};
cursor: text;
min-height: 27px;
`;
const MaxHeight = styled.div`
position: relative;
max-height: 25vh;
overflow: hidden;
margin: -12px -8px -8px;
padding: 8px;
&[data-editing="true"],
&[data-expanded="true"] {
max-height: initial;
overflow: initial;
${Disclosure} {
top: initial;
bottom: 0;
transform: rotate(90deg) translateX(-50%);
}
}
&:hover ${Disclosure} {
opacity: 1;
}
`;
const Input = styled.div`
margin: -8px;
padding: 8px;
border-radius: 8px;
transition: ${(props) => props.theme.backgroundTransition};
&:after {
content: "";
position: absolute;
top: calc(25vh - 50px);
left: 0;
right: 0;
height: 50px;
pointer-events: none;
background: linear-gradient(
180deg,
${(props) => transparentize(1, props.theme.background)} 0%,
${(props) => props.theme.background} 100%
);
}
&[data-editing="true"],
&[data-expanded="true"] {
&:after {
background: transparent;
}
}
&[data-editing="true"] {
background: ${(props) => props.theme.secondaryBackground};
}
.block-menu-trigger,
.heading-anchor {
display: none !important;
}
`;
export default observer(CollectionDescription);
+40
View File
@@ -0,0 +1,40 @@
// @flow
import { observer } from "mobx-react";
import { CollectionIcon } from "outline-icons";
import { getLuminance } from "polished";
import * as React from "react";
import Collection from "models/Collection";
import { icons } from "components/IconPicker";
import useStores from "hooks/useStores";
type Props = {
collection: Collection,
expanded?: boolean,
size?: number,
};
function ResolvedCollectionIcon({ collection, expanded, size }: Props) {
const { ui } = useStores();
// If the chosen icon color is very dark then we invert it in dark mode
// otherwise it will be impossible to see against the dark background.
const color =
ui.resolvedTheme === "dark" && collection.color !== "currentColor"
? getLuminance(collection.color) > 0.12
? collection.color
: "currentColor"
: collection.color;
if (collection.icon && collection.icon !== "collection") {
try {
const Component = icons[collection.icon].component;
return <Component color={color} size={size} />;
} catch (error) {
console.warn("Failed to render custom icon " + collection.icon);
}
}
return <CollectionIcon color={color} expanded={expanded} size={size} />;
}
export default observer(ResolvedCollectionIcon);
-192
View File
@@ -1,192 +0,0 @@
// @flow
import React from 'react';
import { observable, computed, action } from 'mobx';
import { observer } from 'mobx-react';
import styled from 'styled-components';
import Flex from 'shared/components/Flex';
import { LabelText, Outline } from 'components/Input';
import { color, fonts, fontWeight } from 'shared/styles/constants';
import { validateColorHex } from 'shared/utils/color';
const colors = [
'#4E5C6E',
'#19B7FF',
'#7F6BFF',
'#FC7419',
'#FC2D2D',
'#FFE100',
'#14CF9F',
'#EE84F0',
'#2F362F',
];
type Props = {
onSelect: (color: string) => void,
value?: string,
};
@observer
class ColorPicker extends React.Component {
props: Props;
@observable selectedColor: string = colors[0];
@observable customColorValue: string = '';
@observable customColorSelected: boolean;
componentWillMount() {
const { value } = this.props;
if (value && colors.includes(value)) {
this.selectedColor = value;
} else if (value) {
this.customColorSelected = true;
this.customColorValue = value.replace('#', '');
}
}
componentDidMount() {
this.fireCallback();
}
fireCallback = () => {
this.props.onSelect(
this.customColorSelected ? this.customColor : this.selectedColor
);
};
@computed
get customColor(): string {
return this.customColorValue &&
validateColorHex(`#${this.customColorValue}`)
? `#${this.customColorValue}`
: colors[0];
}
@action
setColor = (color: string) => {
this.selectedColor = color;
this.customColorSelected = false;
this.fireCallback();
};
@action
focusOnCustomColor = (event: SyntheticEvent) => {
this.selectedColor = '';
this.customColorSelected = true;
this.fireCallback();
};
@action
setCustomColor = (event: SyntheticEvent) => {
let target = event.target;
if (target instanceof HTMLInputElement) {
const color = target.value;
this.customColorValue = color.replace('#', '');
this.fireCallback();
}
};
render() {
return (
<Flex column>
<LabelText>Color</LabelText>
<StyledOutline justify="space-between">
<Flex>
{colors.map(color => (
<Swatch
key={color}
color={color}
active={
color === this.selectedColor && !this.customColorSelected
}
onClick={() => this.setColor(color)}
/>
))}
</Flex>
<Flex justify="flex-end">
<strong>Custom color:</strong>
<HexHash>#</HexHash>
<CustomColorInput
placeholder="FFFFFF"
onFocus={this.focusOnCustomColor}
onChange={this.setCustomColor}
value={this.customColorValue}
maxLength={6}
/>
<Swatch
color={this.customColor}
active={this.customColorSelected}
/>
</Flex>
</StyledOutline>
</Flex>
);
}
}
type SwatchProps = {
onClick?: () => void,
color?: string,
active?: boolean,
};
const Swatch = ({ onClick, ...props }: SwatchProps) => (
<SwatchOutset onClick={onClick} {...props}>
<SwatchInset {...props} />
</SwatchOutset>
);
const SwatchOutset = styled(Flex)`
width: 24px;
height: 24px;
margin-right: 5px;
border: 2px solid ${({ active, color }) => (active ? color : 'transparent')};
border-radius: 2px;
background: ${({ color }) => color};
${({ onClick }) => onClick && `cursor: pointer;`} &:last-child {
margin-right: 0;
}
`;
const SwatchInset = styled(Flex)`
width: 20px;
height: 20px;
border: 1px solid ${({ active, color }) => (active ? 'white' : 'transparent')};
border-radius: 2px;
background: ${({ color }) => color};
`;
const StyledOutline = styled(Outline)`
padding: 5px;
flex-wrap: wrap;
strong {
font-weight: 500;
}
`;
const HexHash = styled.div`
margin-left: 12px;
padding-bottom: 0;
font-weight: ${fontWeight.medium};
user-select: none;
`;
const CustomColorInput = styled.input`
border: 0;
flex: 1;
width: 65px;
margin-right: 12px;
padding-bottom: 0;
outline: none;
background: none;
font-family: ${fonts.monospace};
font-weight: ${fontWeight.medium};
&::placeholder {
color: ${color.slate};
font-family: ${fonts.monospace};
font-weight: ${fontWeight.medium};
}
`;
export default ColorPicker;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import ColorPicker from './ColorPicker';
export default ColorPicker;
+13
View File
@@ -0,0 +1,13 @@
// @flow
import styled from "styled-components";
const Header = styled.h3`
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
color: ${(props) => props.theme.sidebarText};
letter-spacing: 0.04em;
margin: 1em 12px 0.5em;
`;
export default Header;
+136
View File
@@ -0,0 +1,136 @@
// @flow
import { CheckmarkIcon } from "outline-icons";
import * as React from "react";
import { MenuItem as BaseMenuItem } from "reakit/Menu";
import styled from "styled-components";
import breakpoint from "styled-components-breakpoint";
type Props = {|
onClick?: (SyntheticEvent<>) => void | Promise<void>,
children?: React.Node,
selected?: boolean,
disabled?: boolean,
to?: string,
href?: string,
target?: "_blank",
as?: string | React.ComponentType<*>,
hide?: () => void,
|};
const MenuItem = ({
onClick,
children,
selected,
disabled,
as,
hide,
...rest
}: Props) => {
const handleClick = React.useCallback(
(ev) => {
if (onClick) {
ev.preventDefault();
ev.stopPropagation();
onClick(ev);
}
if (hide) {
hide();
}
},
[onClick, hide]
);
// Preventing default mousedown otherwise menu items do not work in Firefox,
// which triggers the hideOnClickOutside handler first via mousedown hiding
// and un-rendering the menu contents.
const handleMouseDown = React.useCallback((ev) => {
ev.preventDefault();
ev.stopPropagation();
}, []);
return (
<BaseMenuItem
onClick={disabled ? undefined : onClick}
disabled={disabled}
hide={hide}
{...rest}
>
{(props) => (
<MenuAnchor
{...props}
$toggleable={selected !== undefined}
as={onClick ? "button" : as}
onClick={handleClick}
onMouseDown={handleMouseDown}
>
{selected !== undefined && (
<>
{selected ? <CheckmarkIcon color="currentColor" /> : <Spacer />}
&nbsp;
</>
)}
{children}
</MenuAnchor>
)}
</BaseMenuItem>
);
};
const Spacer = styled.svg`
width: 24px;
height: 24px;
flex-shrink: 0;
`;
export const MenuAnchor = styled.a`
display: flex;
margin: 0;
border: 0;
padding: 12px;
width: 100%;
min-height: 32px;
background: none;
color: ${(props) =>
props.disabled ? props.theme.textTertiary : props.theme.textSecondary};
justify-content: left;
align-items: center;
font-size: 16px;
cursor: default;
user-select: none;
svg:not(:last-child) {
margin-right: 4px;
}
svg {
flex-shrink: 0;
opacity: ${(props) => (props.disabled ? ".5" : 1)};
}
${(props) =>
props.disabled
? "pointer-events: none;"
: `
&:hover,
&:focus,
&.focus-visible {
color: ${props.theme.white};
background: ${props.theme.primary};
box-shadow: none;
cursor: pointer;
svg {
fill: ${props.theme.white};
}
}
`};
${breakpoint("tablet")`
padding: ${(props) => (props.$toggleable ? "4px 12px" : "6px 12px")};
font-size: 15px;
`};
`;
export default MenuItem;
@@ -0,0 +1,21 @@
// @flow
import { MoreIcon } from "outline-icons";
import * as React from "react";
import { MenuButton } from "reakit/Menu";
import NudeButton from "components/NudeButton";
export default function OverflowMenuButton({
iconColor,
className,
...rest
}: any) {
return (
<MenuButton {...rest}>
{(props) => (
<NudeButton className={className} {...props}>
<MoreIcon color={iconColor} />
</NudeButton>
)}
</MenuButton>
);
}
+16
View File
@@ -0,0 +1,16 @@
// @flow
import * as React from "react";
import { MenuSeparator } from "reakit/Menu";
import styled from "styled-components";
export default function Separator(rest: {}) {
return (
<MenuSeparator {...rest}>
{(props) => <HorizontalRule {...props} />}
</MenuSeparator>
);
}
const HorizontalRule = styled.hr`
margin: 0.5em 12px;
`;
+174
View File
@@ -0,0 +1,174 @@
// @flow
import { ExpandedIcon } from "outline-icons";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import {
useMenuState,
MenuButton,
MenuItem as BaseMenuItem,
} from "reakit/Menu";
import styled from "styled-components";
import MenuItem, { MenuAnchor } from "./MenuItem";
import Separator from "./Separator";
import ContextMenu from ".";
type TMenuItem =
| {|
title: React.Node,
to: string,
visible?: boolean,
selected?: boolean,
disabled?: boolean,
|}
| {|
title: React.Node,
onClick: (event: SyntheticEvent<>) => void | Promise<void>,
visible?: boolean,
selected?: boolean,
disabled?: boolean,
|}
| {|
title: React.Node,
href: string,
visible?: boolean,
selected?: boolean,
disabled?: boolean,
|}
| {|
title: React.Node,
visible?: boolean,
disabled?: boolean,
style?: Object,
hover?: boolean,
items: TMenuItem[],
|}
| {|
type: "separator",
visible?: boolean,
|}
| {|
type: "heading",
visible?: boolean,
title: React.Node,
|};
type Props = {|
items: TMenuItem[],
|};
const Disclosure = styled(ExpandedIcon)`
transform: rotate(270deg);
position: absolute;
right: 8px;
`;
const Submenu = React.forwardRef(({ templateItems, title, ...rest }, ref) => {
const { t } = useTranslation();
const menu = useMenuState({ modal: true });
return (
<>
<MenuButton ref={ref} {...menu} {...rest}>
{(props) => (
<MenuAnchor {...props}>
{title} <Disclosure color="currentColor" />
</MenuAnchor>
)}
</MenuButton>
<ContextMenu {...menu} aria-label={t("Submenu")}>
<Template {...menu} items={templateItems} />
</ContextMenu>
</>
);
});
export function filterTemplateItems(items: TMenuItem[]): TMenuItem[] {
let filtered = items.filter((item) => item.visible !== false);
// this block literally just trims unneccessary separators
filtered = filtered.reduce((acc, item, index) => {
// trim separators from start / end
if (item.type === "separator" && index === 0) return acc;
if (item.type === "separator" && index === filtered.length - 1) return acc;
// trim double separators looking ahead / behind
const prev = filtered[index - 1];
if (prev && prev.type === "separator" && item.type === "separator")
return acc;
// otherwise, continue
return [...acc, item];
}, []);
return filtered;
}
function Template({ items, ...menu }: Props): React.Node {
return filterTemplateItems(items).map((item, index) => {
if (item.to) {
return (
<MenuItem
as={Link}
to={item.to}
key={index}
disabled={item.disabled}
selected={item.selected}
{...menu}
>
{item.title}
</MenuItem>
);
}
if (item.href) {
return (
<MenuItem
href={item.href}
key={index}
disabled={item.disabled}
selected={item.selected}
target="_blank"
{...menu}
>
{item.title}
</MenuItem>
);
}
if (item.onClick) {
return (
<MenuItem
as="button"
onClick={item.onClick}
disabled={item.disabled}
selected={item.selected}
key={index}
{...menu}
>
{item.title}
</MenuItem>
);
}
if (item.items) {
return (
<BaseMenuItem
key={index}
as={Submenu}
templateItems={item.items}
title={item.title}
{...menu}
/>
);
}
if (item.type === "separator") {
return <Separator key={index} />;
}
return null;
});
}
export default React.memo<Props>(Template);
+121
View File
@@ -0,0 +1,121 @@
// @flow
import * as React from "react";
import { Portal } from "react-portal";
import { Menu } from "reakit/Menu";
import styled from "styled-components";
import breakpoint from "styled-components-breakpoint";
import {
fadeIn,
fadeAndScaleIn,
fadeAndSlideIn,
} from "shared/styles/animations";
import usePrevious from "hooks/usePrevious";
type Props = {|
"aria-label": string,
visible?: boolean,
animating?: boolean,
children: React.Node,
onOpen?: () => void,
onClose?: () => void,
|};
export default function ContextMenu({
children,
onOpen,
onClose,
...rest
}: Props) {
const previousVisible = usePrevious(rest.visible);
React.useEffect(() => {
if (rest.visible && !previousVisible) {
if (onOpen) {
onOpen();
}
}
if (!rest.visible && previousVisible) {
if (onClose) {
onClose();
}
}
}, [onOpen, onClose, previousVisible, rest.visible]);
return (
<>
<Menu hideOnClickOutside preventBodyScroll {...rest}>
{(props) => (
<Position {...props}>
<Background dir="auto">
{rest.visible || rest.animating ? children : null}
</Background>
</Position>
)}
</Menu>
{(rest.visible || rest.animating) && (
<Portal>
<Backdrop />
</Portal>
)}
</>
);
}
const Backdrop = styled.div`
animation: ${fadeIn} 200ms ease-in-out;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: ${(props) => props.theme.backdrop};
z-index: ${(props) => props.theme.depths.menu - 1};
${breakpoint("tablet")`
display: none;
`};
`;
const Position = styled.div`
position: absolute;
z-index: ${(props) => props.theme.depths.menu};
${breakpoint("mobile", "tablet")`
position: fixed !important;
transform: none !important;
top: auto !important;
right: 8px !important;
bottom: 16px !important;
left: 8px !important;
`};
`;
const Background = styled.div`
animation: ${fadeAndSlideIn} 200ms ease;
transform-origin: 50% 100%;
max-width: 100%;
background: ${(props) => props.theme.menuBackground};
border-radius: 6px;
padding: 6px 0;
min-width: 180px;
overflow: hidden;
overflow-y: auto;
max-height: 75vh;
pointer-events: all;
font-weight: normal;
@media print {
display: none;
}
${breakpoint("tablet")`
animation: ${fadeAndScaleIn} 200ms ease;
transform-origin: ${(props) =>
props.left !== undefined ? "25%" : "75%"} 0;
max-width: 276px;
background: ${(props) => props.theme.menuBackground};
box-shadow: ${(props) => props.theme.menuShadow};
border: ${(props) =>
props.theme.menuBorder ? `1px solid ${props.theme.menuBorder}` : "none"};
`};
`;
@@ -1,27 +1,26 @@
// @flow
import React, { PureComponent } from 'react';
import copy from 'copy-to-clipboard';
import copy from "copy-to-clipboard";
import * as React from "react";
type Props = {
text: string,
children?: React.Element<any>,
children?: React.Node,
onClick?: () => void,
onCopy: () => void,
};
class CopyToClipboard extends PureComponent {
props: Props;
onClick = (ev: SyntheticEvent) => {
class CopyToClipboard extends React.PureComponent<Props> {
onClick = (ev: SyntheticEvent<>) => {
const { text, onCopy, children } = this.props;
const elem = React.Children.only(children);
copy(text, {
debug: __DEV__,
debug: process.env.NODE_ENV !== "production",
format: "text/plain",
});
if (onCopy) onCopy();
if (elem && elem.props && typeof elem.props.onClick === 'function') {
if (elem && elem.props && typeof elem.props.onClick === "function") {
elem.props.onClick(ev);
}
};
-3
View File
@@ -1,3 +0,0 @@
// @flow
import CopyToClipboard from './CopyToClipboard';
export default CopyToClipboard;
+24
View File
@@ -0,0 +1,24 @@
// @flow
import * as React from "react";
type Props = {
delay?: number,
children: React.Node,
};
export default function DelayedMount({ delay = 250, children }: Props) {
const [isShowing, setShowing] = React.useState(false);
React.useEffect(() => {
const timeout = setTimeout(() => setShowing(true), delay);
return () => {
clearTimeout(timeout);
};
}, [delay]);
if (!isShowing) {
return null;
}
return children;
}
+11
View File
@@ -0,0 +1,11 @@
// @flow
import styled from "styled-components";
const Divider = styled.hr`
border: 0;
border-bottom: 1px solid ${(props) => props.theme.divider};
margin: 0;
padding: 0;
`;
export default Divider;
-21
View File
@@ -1,21 +0,0 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import Flex from 'shared/components/Flex';
const Divider = () => {
return (
<Flex auto justify="center">
<Content />
</Flex>
);
};
const Content = styled.span`
display: flex;
width: 50%;
margin: 20px 0;
border-bottom: 1px solid #eee;
`;
export default Divider;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import Divider from './Divider';
export default Divider;
+138
View File
@@ -0,0 +1,138 @@
// @flow
import { observer } from "mobx-react";
import {
ArchiveIcon,
EditIcon,
GoToIcon,
ShapesIcon,
TrashIcon,
} from "outline-icons";
import * as React from "react";
import { useTranslation } from "react-i18next";
import styled from "styled-components";
import Document from "models/Document";
import Breadcrumb from "components/Breadcrumb";
import CollectionIcon from "components/CollectionIcon";
import useStores from "hooks/useStores";
import { collectionUrl } from "utils/routeHelpers";
type Props = {|
document: Document,
children?: React.Node,
onlyText: boolean,
|};
function useCategory(document) {
const { t } = useTranslation();
if (document.isDeleted) {
return {
icon: <TrashIcon color="currentColor" />,
title: t("Trash"),
to: "/trash",
};
}
if (document.isArchived) {
return {
icon: <ArchiveIcon color="currentColor" />,
title: t("Archive"),
to: "/archive",
};
}
if (document.isDraft) {
return {
icon: <EditIcon color="currentColor" />,
title: t("Drafts"),
to: "/drafts",
};
}
if (document.isTemplate) {
return {
icon: <ShapesIcon color="currentColor" />,
title: t("Templates"),
to: "/templates",
};
}
return null;
}
const DocumentBreadcrumb = ({ document, children, onlyText }: Props) => {
const { collections } = useStores();
const { t } = useTranslation();
const category = useCategory(document);
let collection = collections.get(document.collectionId);
if (!collection) {
collection = {
id: document.collectionId,
name: t("Deleted Collection"),
color: "currentColor",
url: "deleted-collection",
};
}
const path = React.useMemo(
() =>
collection && collection.pathToDocument
? collection.pathToDocument(document.id).slice(0, -1)
: [],
[collection, document.id]
);
const items = React.useMemo(() => {
let output = [];
if (category) {
output.push(category);
}
if (collection) {
output.push({
icon: <CollectionIcon collection={collection} expanded />,
title: collection.name,
to: collectionUrl(collection.url),
});
}
path.forEach((p) => {
output.push({
title: p.title,
to: p.url,
});
});
return output;
}, [path, category, collection]);
if (!collections.isLoaded) {
return null;
}
if (onlyText === true) {
return (
<>
{collection.name}
{path.map((n) => (
<React.Fragment key={n.id}>
<SmallSlash />
{n.title}
</React.Fragment>
))}
</>
);
}
return <Breadcrumb items={items} children={children} highlightFirstItem />;
};
const SmallSlash = styled(GoToIcon)`
width: 12px;
height: 12px;
vertical-align: middle;
flex-shrink: 0;
fill: ${(props) => props.theme.slate};
opacity: 0.5;
`;
export default observer(DocumentBreadcrumb);
@@ -0,0 +1,199 @@
// @flow
import ArrowKeyNavigation from "boundless-arrow-key-navigation";
import { action, observable } from "mobx";
import { inject, observer } from "mobx-react";
import { CloseIcon } from "outline-icons";
import * as React from "react";
import { type Match, Redirect, type RouterHistory } from "react-router-dom";
import { Waypoint } from "react-waypoint";
import styled from "styled-components";
import breakpoint from "styled-components-breakpoint";
import { DEFAULT_PAGINATION_LIMIT } from "stores/BaseStore";
import DocumentsStore from "stores/DocumentsStore";
import RevisionsStore from "stores/RevisionsStore";
import Button from "components/Button";
import Flex from "components/Flex";
import { ListPlaceholder } from "components/LoadingPlaceholder";
import Revision from "./components/Revision";
import { documentHistoryUrl, documentUrl } from "utils/routeHelpers";
type Props = {
match: Match,
documents: DocumentsStore,
revisions: RevisionsStore,
history: RouterHistory,
};
@observer
class DocumentHistory extends React.Component<Props> {
@observable isLoaded: boolean = false;
@observable isFetching: boolean = false;
@observable offset: number = 0;
@observable allowLoadMore: boolean = true;
@observable redirectTo: ?string;
async componentDidMount() {
await this.loadMoreResults();
this.selectFirstRevision();
}
fetchResults = async () => {
this.isFetching = true;
const limit = DEFAULT_PAGINATION_LIMIT;
const results = await this.props.revisions.fetchPage({
limit,
offset: this.offset,
documentId: this.props.match.params.documentSlug,
});
if (
results &&
(results.length === 0 || results.length < DEFAULT_PAGINATION_LIMIT)
) {
this.allowLoadMore = false;
} else {
this.offset += DEFAULT_PAGINATION_LIMIT;
}
this.isLoaded = true;
this.isFetching = false;
};
selectFirstRevision = () => {
if (this.revisions.length) {
const document = this.props.documents.getByUrl(
this.props.match.params.documentSlug
);
if (!document) return;
this.props.history.replace(
documentHistoryUrl(document, this.revisions[0].id)
);
}
};
@action
loadMoreResults = async () => {
// Don't paginate if there aren't more results or were in the middle of fetching
if (!this.allowLoadMore || this.isFetching) return;
await this.fetchResults();
};
get revisions() {
const document = this.props.documents.getByUrl(
this.props.match.params.documentSlug
);
if (!document) return [];
return this.props.revisions.getDocumentRevisions(document.id);
}
onCloseHistory = () => {
const document = this.props.documents.getByUrl(
this.props.match.params.documentSlug
);
this.redirectTo = documentUrl(document);
};
render() {
const document = this.props.documents.getByUrl(
this.props.match.params.documentSlug
);
const showLoading = (!this.isLoaded && this.isFetching) || !document;
if (this.redirectTo) return <Redirect to={this.redirectTo} push />;
return (
<Sidebar>
<Wrapper column>
<Header>
<Title>History</Title>
<Button
icon={<CloseIcon />}
onClick={this.onCloseHistory}
borderOnHover
neutral
/>
</Header>
{showLoading ? (
<Loading>
<ListPlaceholder count={5} />
</Loading>
) : (
<ArrowKeyNavigation
mode={ArrowKeyNavigation.mode.VERTICAL}
defaultActiveChildIndex={0}
>
{this.revisions.map((revision, index) => (
<Revision
key={revision.id}
revision={revision}
document={document}
showMenu={index !== 0}
selected={this.props.match.params.revisionId === revision.id}
/>
))}
</ArrowKeyNavigation>
)}
{this.allowLoadMore && (
<Waypoint key={this.offset} onEnter={this.loadMoreResults} />
)}
</Wrapper>
</Sidebar>
);
}
}
const Loading = styled.div`
margin: 0 16px;
`;
const Wrapper = styled(Flex)`
position: fixed;
top: 0;
right: 0;
z-index: 1;
min-width: ${(props) => props.theme.sidebarWidth}px;
height: 100%;
overflow-y: auto;
overscroll-behavior: none;
`;
const Sidebar = styled(Flex)`
display: none;
background: ${(props) => props.theme.background};
min-width: ${(props) => props.theme.sidebarWidth}px;
border-left: 1px solid ${(props) => props.theme.divider};
z-index: 1;
${breakpoint("tablet")`
display: flex;
`};
`;
const Title = styled(Flex)`
font-size: 16px;
font-weight: 600;
text-align: center;
align-items: center;
justify-content: flex-start;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
width: 0;
flex-grow: 1;
`;
const Header = styled(Flex)`
align-items: center;
position: relative;
padding: 12px;
border-bottom: 1px solid ${(props) => props.theme.divider};
color: ${(props) => props.theme.text};
flex-shrink: 0;
`;
export default inject("documents", "revisions")(DocumentHistory);
@@ -0,0 +1,87 @@
// @flow
import { format } from "date-fns";
import * as React from "react";
import { NavLink } from "react-router-dom";
import styled, { withTheme } from "styled-components";
import Document from "models/Document";
import Revision from "models/Revision";
import Avatar from "components/Avatar";
import Flex from "components/Flex";
import Time from "components/Time";
import RevisionMenu from "menus/RevisionMenu";
import { type Theme } from "types";
import { documentHistoryUrl } from "utils/routeHelpers";
type Props = {
theme: Theme,
showMenu: boolean,
selected: boolean,
document: Document,
revision: Revision,
};
class RevisionListItem extends React.Component<Props> {
render() {
const { revision, document, showMenu, selected, theme } = this.props;
return (
<StyledNavLink
to={documentHistoryUrl(document, revision.id)}
activeStyle={{ background: theme.primary, color: theme.white }}
>
<Author>
<StyledAvatar src={revision.createdBy.avatarUrl} />{" "}
{revision.createdBy.name}
</Author>
<Meta>
<Time dateTime={revision.createdAt} tooltipDelay={250}>
{format(Date.parse(revision.createdAt), "MMMM do, yyyy h:mm a")}
</Time>
</Meta>
{showMenu && (
<StyledRevisionMenu
document={document}
revision={revision}
iconColor={selected ? theme.white : theme.textTertiary}
/>
)}
</StyledNavLink>
);
}
}
const StyledAvatar = styled(Avatar)`
border-color: transparent;
margin-right: 4px;
`;
const StyledRevisionMenu = styled(RevisionMenu)`
position: absolute;
right: 16px;
top: 20px;
`;
const StyledNavLink = styled(NavLink)`
color: ${(props) => props.theme.text};
display: block;
padding: 8px 16px;
font-size: 15px;
position: relative;
`;
const Author = styled(Flex)`
font-weight: 500;
padding: 0;
margin: 0;
`;
const Meta = styled.p`
font-size: 14px;
opacity: 0.75;
margin: 0 0 2px;
padding: 0;
`;
export default withTheme(RevisionListItem);
+3
View File
@@ -0,0 +1,3 @@
// @flow
import DocumentHistory from "./DocumentHistory";
export default DocumentHistory;
+30
View File
@@ -0,0 +1,30 @@
// @flow
import ArrowKeyNavigation from "boundless-arrow-key-navigation";
import * as React from "react";
import Document from "models/Document";
import DocumentListItem from "components/DocumentListItem";
type Props = {|
documents: Document[],
limit?: number,
showCollection?: boolean,
showPublished?: boolean,
showPin?: boolean,
showDraft?: boolean,
showTemplate?: boolean,
|};
export default function DocumentList({ limit, documents, ...rest }: Props) {
const items = limit ? documents.splice(0, limit) : documents;
return (
<ArrowKeyNavigation
mode={ArrowKeyNavigation.mode.VERTICAL}
defaultActiveChildIndex={0}
>
{items.map((document) => (
<DocumentListItem key={document.id} document={document} {...rest} />
))}
</ArrowKeyNavigation>
);
}
@@ -1,34 +0,0 @@
// @flow
import React from 'react';
import Document from 'models/Document';
import DocumentPreview from 'components/DocumentPreview';
import ArrowKeyNavigation from 'boundless-arrow-key-navigation';
class DocumentList extends React.Component {
props: {
documents: Document[],
showCollection?: boolean,
};
render() {
const { documents, showCollection } = this.props;
return (
<ArrowKeyNavigation
mode={ArrowKeyNavigation.mode.VERTICAL}
defaultActiveChildIndex={0}
>
{documents &&
documents.map(document => (
<DocumentPreview
key={document.id}
document={document}
showCollection={showCollection}
/>
))}
</ArrowKeyNavigation>
);
}
}
export default DocumentList;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import DocumentList from './DocumentList';
export default DocumentList;
+261
View File
@@ -0,0 +1,261 @@
// @flow
import { observer } from "mobx-react";
import { PlusIcon } from "outline-icons";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import styled, { css } from "styled-components";
import breakpoint from "styled-components-breakpoint";
import Document from "models/Document";
import Badge from "components/Badge";
import Button from "components/Button";
import DocumentMeta from "components/DocumentMeta";
import EventBoundary from "components/EventBoundary";
import Flex from "components/Flex";
import Highlight from "components/Highlight";
import StarButton, { AnimatedStar } from "components/Star";
import Tooltip from "components/Tooltip";
import useCurrentTeam from "hooks/useCurrentTeam";
import useCurrentUser from "hooks/useCurrentUser";
import useStores from "hooks/useStores";
import DocumentMenu from "menus/DocumentMenu";
import { newDocumentUrl } from "utils/routeHelpers";
type Props = {|
document: Document,
highlight?: ?string,
context?: ?string,
showNestedDocuments?: boolean,
showCollection?: boolean,
showPublished?: boolean,
showPin?: boolean,
showDraft?: boolean,
showTemplate?: boolean,
|};
const SEARCH_RESULT_REGEX = /<b\b[^>]*>(.*?)<\/b>/gi;
function replaceResultMarks(tag: string) {
// don't use SEARCH_RESULT_REGEX here as it causes
// an infinite loop to trigger a regex inside it's own callback
return tag.replace(/<b\b[^>]*>(.*?)<\/b>/gi, "$1");
}
function DocumentListItem(props: Props, ref) {
const { t } = useTranslation();
const { policies } = useStores();
const currentUser = useCurrentUser();
const currentTeam = useCurrentTeam();
const [menuOpen, setMenuOpen] = React.useState(false);
const {
document,
showNestedDocuments,
showCollection,
showPublished,
showPin,
showDraft = true,
showTemplate,
highlight,
context,
} = props;
const queryIsInTitle =
!!highlight &&
!!document.title.toLowerCase().includes(highlight.toLowerCase());
const canStar =
!document.isDraft && !document.isArchived && !document.isTemplate;
const can = policies.abilities(currentTeam.id);
return (
<DocumentLink
ref={ref}
dir={document.dir}
$isStarred={document.isStarred}
$menuOpen={menuOpen}
to={{
pathname: document.url,
state: { title: document.titleWithDefault },
}}
>
<Content>
<Heading dir={document.dir}>
<Title
text={document.titleWithDefault}
highlight={highlight}
dir={document.dir}
/>
{document.isNew && document.createdBy.id !== currentUser.id && (
<Badge yellow>{t("New")}</Badge>
)}
{canStar && (
<StarPositioner>
<StarButton document={document} />
</StarPositioner>
)}
{document.isDraft && showDraft && (
<Tooltip
tooltip={t("Only visible to you")}
delay={500}
placement="top"
>
<Badge>{t("Draft")}</Badge>
</Tooltip>
)}
{document.isTemplate && showTemplate && (
<Badge primary>{t("Template")}</Badge>
)}
</Heading>
{!queryIsInTitle && (
<ResultContext
text={context}
highlight={highlight ? SEARCH_RESULT_REGEX : undefined}
processResult={replaceResultMarks}
/>
)}
<DocumentMeta
document={document}
showCollection={showCollection}
showPublished={showPublished}
showNestedDocuments={showNestedDocuments}
showLastViewed
/>
</Content>
<Actions>
{document.isTemplate &&
!document.isArchived &&
!document.isDeleted &&
can.createDocument && (
<>
<Button
as={Link}
to={newDocumentUrl(document.collectionId, {
templateId: document.id,
})}
icon={<PlusIcon />}
neutral
>
{t("New doc")}
</Button>
&nbsp;
</>
)}
<DocumentMenu
document={document}
showPin={showPin}
onOpen={() => setMenuOpen(true)}
onClose={() => setMenuOpen(false)}
modal={false}
/>
</Actions>
</DocumentLink>
);
}
const Content = styled.div`
flex-grow: 1;
flex-shrink: 1;
min-width: 0;
`;
const Actions = styled(EventBoundary)`
display: none;
align-items: center;
margin: 8px;
flex-shrink: 0;
flex-grow: 0;
${breakpoint("tablet")`
display: flex;
`};
`;
const DocumentLink = styled(Link)`
display: flex;
align-items: center;
margin: 10px -8px;
padding: 6px 8px;
border-radius: 8px;
max-height: 50vh;
width: calc(100vw - 8px);
${breakpoint("tablet")`
width: auto;
`};
${Actions} {
opacity: 0;
}
${AnimatedStar} {
opacity: ${(props) => (props.$isStarred ? "1 !important" : 0)};
}
&:hover,
&:active,
&:focus,
&:focus-within {
background: ${(props) => props.theme.listItemHoverBackground};
${Actions} {
opacity: 1;
}
${AnimatedStar} {
opacity: 0.5;
&:hover {
opacity: 1;
}
}
}
${(props) =>
props.$menuOpen &&
css`
background: ${(props) => props.theme.listItemHoverBackground};
${Actions} {
opacity: 1;
}
${AnimatedStar} {
opacity: 0.5;
}
`}
`;
const Heading = styled.h3`
display: flex;
justify-content: ${(props) => (props.rtl ? "flex-end" : "flex-start")};
align-items: center;
height: 24px;
margin-top: 0;
margin-bottom: 0.25em;
overflow: hidden;
white-space: nowrap;
color: ${(props) => props.theme.text};
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
`;
const StarPositioner = styled(Flex)`
margin-left: 4px;
align-items: center;
`;
const Title = styled(Highlight)`
max-width: 90%;
overflow: hidden;
text-overflow: ellipsis;
`;
const ResultContext = styled(Highlight)`
display: block;
color: ${(props) => props.theme.textTertiary};
font-size: 14px;
margin-top: -0.25em;
margin-bottom: 0.25em;
`;
export default observer(React.forwardRef(DocumentListItem));
+162
View File
@@ -0,0 +1,162 @@
// @flow
import { observer } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import styled from "styled-components";
import Document from "models/Document";
import DocumentBreadcrumb from "components/DocumentBreadcrumb";
import Flex from "components/Flex";
import Time from "components/Time";
import useStores from "hooks/useStores";
const Container = styled(Flex)`
justify-content: ${(props) => (props.rtl ? "flex-end" : "flex-start")};
color: ${(props) => props.theme.textTertiary};
font-size: 13px;
white-space: nowrap;
overflow: hidden;
min-width: 0;
`;
const Viewed = styled.span`
text-overflow: ellipsis;
overflow: hidden;
`;
const Modified = styled.span`
color: ${(props) => props.theme.textTertiary};
font-weight: ${(props) => (props.highlight ? "600" : "400")};
`;
type Props = {|
showCollection?: boolean,
showPublished?: boolean,
showLastViewed?: boolean,
showNestedDocuments?: boolean,
document: Document,
children: React.Node,
to?: string,
|};
function DocumentMeta({
showPublished,
showCollection,
showLastViewed,
showNestedDocuments,
document,
children,
to,
...rest
}: Props) {
const { t } = useTranslation();
const { collections, auth } = useStores();
const {
modifiedSinceViewed,
updatedAt,
updatedBy,
createdAt,
publishedAt,
archivedAt,
deletedAt,
isDraft,
lastViewedAt,
} = document;
// Prevent meta information from displaying if updatedBy is not available.
// Currently the situation where this is true is rendering share links.
if (!updatedBy) {
return null;
}
let content;
if (deletedAt) {
content = (
<span>
{t("deleted")} <Time dateTime={deletedAt} addSuffix />
</span>
);
} else if (archivedAt) {
content = (
<span>
{t("archived")} <Time dateTime={archivedAt} addSuffix />
</span>
);
} else if (createdAt === updatedAt) {
content = (
<span>
{t("created")} <Time dateTime={updatedAt} addSuffix />
</span>
);
} else if (publishedAt && (publishedAt === updatedAt || showPublished)) {
content = (
<span>
{t("published")} <Time dateTime={publishedAt} addSuffix />
</span>
);
} else if (isDraft) {
content = (
<span>
{t("saved")} <Time dateTime={updatedAt} addSuffix />
</span>
);
} else {
content = (
<Modified highlight={modifiedSinceViewed}>
{t("updated")} <Time dateTime={updatedAt} addSuffix />
</Modified>
);
}
const collection = collections.get(document.collectionId);
const updatedByMe = auth.user && auth.user.id === updatedBy.id;
const timeSinceNow = () => {
if (isDraft || !showLastViewed) {
return null;
}
if (!lastViewedAt) {
return (
<Viewed>
&nbsp;<Modified highlight>{t("Never viewed")}</Modified>
</Viewed>
);
}
return (
<Viewed>
&nbsp;{t("Viewed")} <Time dateTime={lastViewedAt} addSuffix shorten />
</Viewed>
);
};
const nestedDocumentsCount = collection
? collection.getDocumentChildren(document.id).length
: 0;
return (
<Container align="center" rtl={document.dir === "rtl"} {...rest} dir="ltr">
{updatedByMe ? t("You") : updatedBy.name}&nbsp;
{to ? <Link to={to}>{content}</Link> : content}
{showCollection && collection && (
<span>
&nbsp;{t("in")}&nbsp;
<strong>
<DocumentBreadcrumb document={document} onlyText />
</strong>
</span>
)}
{showNestedDocuments && nestedDocumentsCount > 0 && (
<span>
&nbsp;&middot; {nestedDocumentsCount}{" "}
{t("nested document", { count: nestedDocumentsCount })}
</span>
)}
&nbsp;{timeSinceNow()}
{children}
</Container>
);
}
export default observer(DocumentMeta);
+85
View File
@@ -0,0 +1,85 @@
// @flow
import { useObserver } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { usePopoverState, PopoverDisclosure } from "reakit/Popover";
import styled from "styled-components";
import Document from "models/Document";
import DocumentMeta from "components/DocumentMeta";
import DocumentViews from "components/DocumentViews";
import Popover from "components/Popover";
import useStores from "../hooks/useStores";
type Props = {|
document: Document,
isDraft: boolean,
to?: string,
rtl?: boolean,
|};
function DocumentMetaWithViews({ to, isDraft, document, ...rest }: Props) {
const { views } = useStores();
const { t } = useTranslation();
const documentViews = useObserver(() => views.inDocument(document.id));
const totalViewers = documentViews.length;
const onlyYou = totalViewers === 1 && documentViews[0].user.id;
React.useEffect(() => {
if (!document.isDeleted) {
views.fetchPage({ documentId: document.id });
}
}, [views, document.id, document.isDeleted]);
const popover = usePopoverState({
gutter: 8,
placement: "bottom",
modal: true,
});
return (
<Meta document={document} to={to} {...rest}>
{totalViewers && !isDraft ? (
<PopoverDisclosure {...popover}>
{(props) => (
<>
&nbsp;&middot;&nbsp;
<a {...props}>
{t("Viewed by")}{" "}
{onlyYou
? t("only you")
: `${totalViewers} ${
totalViewers === 1 ? t("person") : t("people")
}`}
</a>
</>
)}
</PopoverDisclosure>
) : null}
<Popover {...popover} width={300} aria-label={t("Viewers")} tabIndex={0}>
<DocumentViews document={document} isOpen={popover.visible} />
</Popover>
</Meta>
);
}
const Meta = styled(DocumentMeta)`
justify-content: ${(props) => (props.rtl ? "flex-end" : "flex-start")};
margin: -12px 0 2em 0;
font-size: 14px;
position: relative;
z-index: 1;
a {
color: inherit;
&:hover {
text-decoration: underline;
}
}
@media print {
display: none;
}
`;
export default DocumentMetaWithViews;
@@ -1,120 +0,0 @@
// @flow
import React, { Component } from 'react';
import { observer } from 'mobx-react';
import { Link } from 'react-router-dom';
import Document from 'models/Document';
import styled from 'styled-components';
import { color } from 'shared/styles/constants';
import Highlight from 'components/Highlight';
import StarredIcon from 'components/Icon/StarredIcon';
import PublishingInfo from './components/PublishingInfo';
type Props = {
document: Document,
highlight?: ?string,
showCollection?: boolean,
innerRef?: Function,
};
const StyledStar = styled(({ solid, ...props }) => (
<StarredIcon color={solid ? color.black : color.text} {...props} />
))`
position: absolute;
opacity: ${props => (props.solid ? '1 !important' : 0)};
transition: all 100ms ease-in-out;
margin-left: 2px;
&:hover {
transform: scale(1.1);
}
&:active {
transform: scale(0.95);
}
`;
const DocumentLink = styled(Link)`
display: block;
margin: 0 -16px;
padding: 10px 16px;
border-radius: 8px;
border: 2px solid transparent;
max-height: 50vh;
min-width: 100%;
overflow: hidden;
&:hover,
&:active,
&:focus {
background: ${color.smokeLight};
border: 2px solid ${color.smoke};
outline: none;
${StyledStar} {
opacity: 0.5;
&:hover {
opacity: 1;
}
}
}
&:focus {
border: 2px solid ${color.slateDark};
}
h3 {
margin-top: 0;
margin-bottom: 0.25em;
}
`;
@observer
class DocumentPreview extends Component {
props: Props;
star = (ev: SyntheticEvent) => {
ev.preventDefault();
ev.stopPropagation();
this.props.document.star();
};
unstar = (ev: SyntheticEvent) => {
ev.preventDefault();
ev.stopPropagation();
this.props.document.unstar();
};
render() {
const {
document,
showCollection,
innerRef,
highlight,
...rest
} = this.props;
return (
<DocumentLink to={document.url} innerRef={innerRef} {...rest}>
<h3>
<Highlight text={document.title} highlight={highlight} />
{document.publishedAt &&
(document.starred ? (
<span onClick={this.unstar}>
<StyledStar solid />
</span>
) : (
<span onClick={this.star}>
<StyledStar />
</span>
))}
</h3>
<PublishingInfo
document={document}
collection={showCollection ? document.collection : undefined}
/>
</DocumentLink>
);
}
}
export default DocumentPreview;
@@ -1,68 +0,0 @@
// @flow
import React, { Component } from 'react';
import moment from 'moment';
import styled from 'styled-components';
import { color } from 'shared/styles/constants';
import Collection from 'models/Collection';
import Document from 'models/Document';
import Flex from 'shared/components/Flex';
const Container = styled(Flex)`
color: ${color.slate};
font-size: 13px;
`;
const Modified = styled.span`
color: ${props => (props.highlight ? color.slateDark : color.slate)};
font-weight: ${props => (props.highlight ? '600' : '400')};
`;
class PublishingInfo extends Component {
props: {
collection?: Collection,
document: Document,
views?: number,
};
render() {
const { collection, document } = this.props;
const {
modifiedSinceViewed,
createdAt,
updatedAt,
createdBy,
updatedBy,
publishedAt,
} = document;
const timeAgo = moment(createdAt).fromNow();
return (
<Container align="center">
{publishedAt === updatedAt ? (
<span>
{createdBy.name} published {timeAgo}
</span>
) : (
<React.Fragment>
{updatedBy.name}
{publishedAt ? (
<Modified highlight={modifiedSinceViewed}>
&nbsp;modified {timeAgo}
</Modified>
) : (
<span>&nbsp;saved {timeAgo}</span>
)}
</React.Fragment>
)}
{collection && (
<span>
&nbsp;in <strong>{collection.name}</strong>
</span>
)}
</Container>
);
}
}
export default PublishingInfo;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import DocumentPreview from './DocumentPreview';
export default DocumentPreview;
+80
View File
@@ -0,0 +1,80 @@
// @flow
import { formatDistanceToNow } from "date-fns";
import { sortBy } from "lodash";
import { observer } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import Document from "models/Document";
import Avatar from "components/Avatar";
import ListItem from "components/List/Item";
import PaginatedList from "components/PaginatedList";
import useStores from "hooks/useStores";
type Props = {|
document: Document,
isOpen?: boolean,
|};
function DocumentViews({ document, isOpen }: Props) {
const { t } = useTranslation();
const { views, presence } = useStores();
let documentPresence = presence.get(document.id);
documentPresence = documentPresence
? Array.from(documentPresence.values())
: [];
const presentIds = documentPresence.map((p) => p.userId);
const editingIds = documentPresence
.filter((p) => p.isEditing)
.map((p) => p.userId);
// ensure currently present via websocket are always ordered first
const documentViews = views.inDocument(document.id);
const sortedViews = sortBy(
documentViews,
(view) => !presentIds.includes(view.user.id)
);
const users = React.useMemo(() => sortedViews.map((v) => v.user), [
sortedViews,
]);
return (
<>
{isOpen && (
<PaginatedList
items={users}
renderItem={(item) => {
const view = documentViews.find((v) => v.user.id === item.id);
const isPresent = presentIds.includes(item.id);
const isEditing = editingIds.includes(item.id);
const subtitle = isPresent
? isEditing
? t("Currently editing")
: t("Currently viewing")
: t("Viewed {{ timeAgo }} ago", {
timeAgo: formatDistanceToNow(
view ? Date.parse(view.lastViewedAt) : new Date()
),
});
return (
<ListItem
key={item.id}
title={item.name}
subtitle={subtitle}
image={<Avatar key={item.id} src={item.avatarUrl} size={32} />}
border={false}
small
/>
);
}}
/>
)}
</>
);
}
export default observer(DocumentViews);
@@ -1,42 +0,0 @@
// @flow
import { observable, action } from 'mobx';
import invariant from 'invariant';
import { client } from 'utils/ApiClient';
import type { User } from 'types';
type View = {
user: User,
count: number,
};
class DocumentViewersStore {
documentId: string;
@observable viewers: Array<View>;
@observable isFetching: boolean;
@action
fetchViewers = async () => {
this.isFetching = true;
try {
const res = await client.post(
'/views.list',
{
id: this.documentId,
},
{ cache: true }
);
invariant(res && res.data, 'Data should be available');
this.viewers = res.data.users;
} catch (e) {
console.error('Something went wrong');
}
this.isFetching = false;
};
constructor(documentId: string) {
this.documentId = documentId;
}
}
export default DocumentViewersStore;
@@ -1,72 +0,0 @@
// @flow
import React, { Component } from 'react';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import Popover from 'components/Popover';
import styled from 'styled-components';
import DocumentViewers from './components/DocumentViewers';
import DocumentViewersStore from './DocumentViewersStore';
import Flex from 'shared/components/Flex';
const Container = styled(Flex)`
font-size: 13px;
user-select: none;
a {
color: #ccc;
&:hover {
color: #aaa;
}
}
`;
type Props = {
documentId: string,
count: number,
};
@observer
class DocumentViews extends Component {
@observable opened: boolean = false;
anchor: HTMLElement;
store: DocumentViewersStore;
props: Props;
constructor(props: Props) {
super(props);
this.store = new DocumentViewersStore(props.documentId);
}
openPopover = () => {
this.opened = true;
};
closePopover = () => {
this.opened = false;
};
setRef = (ref: HTMLElement) => {
this.anchor = ref;
};
render() {
return (
<Container align="center">
<a ref={this.setRef} onClick={this.openPopover}>
Viewed {this.props.count} {this.props.count === 1 ? 'time' : 'times'}
</a>
{this.opened && (
<Popover anchor={this.anchor} onClose={this.closePopover}>
<DocumentViewers
onMount={this.store.fetchViewers}
viewers={this.store.viewers}
/>
</Popover>
)}
</Container>
);
}
}
export default DocumentViews;
@@ -1,54 +0,0 @@
// @flow
import React, { Component } from 'react';
import Flex from 'shared/components/Flex';
import styled from 'styled-components';
import map from 'lodash/map';
import Avatar from 'components/Avatar';
import Scrollable from 'components/Scrollable';
type Props = {
viewers: Array<Object>,
onMount: Function,
};
const List = styled.ul`
list-style: none;
font-size: 13px;
margin: -4px 0;
padding: 0;
li {
padding: 4px 0;
}
`;
const UserName = styled.span`
padding-left: 8px;
`;
class DocumentViewers extends Component {
props: Props;
componentDidMount() {
this.props.onMount();
}
render() {
return (
<Scrollable>
<List>
{map(this.props.viewers, view => (
<li key={view.user.id}>
<Flex align="center">
<Avatar src={view.user.avatarUrl} />{' '}
<UserName>{view.user.name}</UserName>
</Flex>
</li>
))}
</List>
</Scrollable>
);
}
}
export default DocumentViewers;
@@ -1,3 +0,0 @@
// @flow
import DocumentViewers from './DocumentViewers';
export default DocumentViewers;
-3
View File
@@ -1,3 +0,0 @@
// @flow
import DocumentViews from './DocumentViews';
export default DocumentViews;
-105
View File
@@ -1,105 +0,0 @@
// @flow
import React, { Component } from 'react';
import { observable } from 'mobx';
import { observer, inject } from 'mobx-react';
import { injectGlobal } from 'styled-components';
import { color } from 'shared/styles/constants';
import importFile from 'utils/importFile';
import invariant from 'invariant';
import _ from 'lodash';
import Dropzone from 'react-dropzone';
import DocumentsStore from 'stores/DocumentsStore';
import LoadingIndicator from 'components/LoadingIndicator';
type Props = {
children?: React$Element<any>,
collectionId: string,
documentId?: string,
activeClassName?: string,
rejectClassName?: string,
documents: DocumentsStore,
disabled: boolean,
history: Object,
};
// eslint-disable-next-line
injectGlobal`
.activeDropZone {
background: ${color.slateDark};
svg { fill: ${color.white}; }
}
.activeDropZone a {
color: ${color.white} !important;
}
`;
@observer
class DropToImport extends Component {
@observable isImporting: boolean = false;
props: Props;
onDropAccepted = async (files = []) => {
this.isImporting = true;
try {
let collectionId = this.props.collectionId;
const documentId = this.props.documentId;
const redirect = files.length === 1;
if (documentId && !collectionId) {
const document = await this.props.documents.fetch(documentId);
invariant(document, 'Document not available');
collectionId = document.collection.id;
}
for (const file of files) {
const doc = await importFile({
documents: this.props.documents,
file,
documentId,
collectionId,
});
if (redirect) {
this.props.history.push(doc.url);
}
}
} catch (err) {
// TODO: show error alert.
} finally {
this.isImporting = false;
}
};
render() {
const props = _.omit(
this.props,
'history',
'documentId',
'collectionId',
'documents',
'disabled',
'menuOpen'
);
if (this.props.disabled) return this.props.children;
return (
<Dropzone
accept="text/markdown, text/plain"
onDropAccepted={this.onDropAccepted}
style={{}}
disableClick
disablePreview
multiple
{...props}
>
{this.isImporting && <LoadingIndicator />}
{this.props.children}
</Dropzone>
);
}
}
export default inject('documents')(DropToImport);
-3
View File
@@ -1,3 +0,0 @@
// @flow
import DropToImport from './DropToImport';
export default DropToImport;
-103
View File
@@ -1,103 +0,0 @@
// @flow
import React, { Component } from 'react';
import invariant from 'invariant';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import styled from 'styled-components';
import { PortalWithState } from 'react-portal';
import Flex from 'shared/components/Flex';
import { color } from 'shared/styles/constants';
import { fadeAndScaleIn } from 'shared/styles/animations';
type Props = {
label: React.Element<*>,
onOpen?: () => void,
onClose?: () => void,
children?: React.Element<*>,
style?: Object,
};
@observer
class DropdownMenu extends Component {
props: Props;
@observable top: number;
@observable right: number;
handleOpen = (openPortal: SyntheticEvent => void) => {
return (ev: SyntheticMouseEvent) => {
ev.preventDefault();
ev.stopPropagation();
const currentTarget = ev.currentTarget;
invariant(document.body, 'why you not here');
if (currentTarget instanceof HTMLDivElement) {
const bodyRect = document.body.getBoundingClientRect();
const targetRect = currentTarget.getBoundingClientRect();
this.top = targetRect.bottom - bodyRect.top;
this.right = bodyRect.width - targetRect.left - targetRect.width;
openPortal(ev);
}
};
};
render() {
return (
<div>
<PortalWithState
onOpen={this.props.onOpen}
onClose={this.props.onClose}
closeOnEsc
closeOnOutsideClick
>
{({ closePortal, openPortal, portal }) => [
<Label onClick={this.handleOpen(openPortal)} key="label">
{this.props.label}
</Label>,
portal(
<Menu
key="menu"
onClick={closePortal}
style={this.props.style}
top={this.top}
right={this.right}
>
{this.props.children}
</Menu>
),
]}
</PortalWithState>
</div>
);
}
}
const Label = styled(Flex).attrs({
justify: 'center',
align: 'center',
})`
z-index: 1000;
cursor: pointer;
`;
const Menu = styled.div`
animation: ${fadeAndScaleIn} 200ms ease;
transform-origin: 75% 0;
position: absolute;
right: ${({ right }) => right}px;
top: ${({ top }) => top}px;
z-index: 1000;
border: ${color.slateLight};
background: ${color.white};
border-radius: 2px;
min-width: 160px;
overflow: hidden;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 4px 8px rgba(0, 0, 0, 0.08),
0 2px 4px rgba(0, 0, 0, 0.08);
@media print {
display: none;
}
`;
export default DropdownMenu;
@@ -1,45 +0,0 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import { color } from 'shared/styles/constants';
type Props = {
onClick?: SyntheticEvent => void,
children?: React.Element<any>,
};
const DropdownMenuItem = ({ onClick, children, ...rest }: Props) => {
return (
<MenuItem onClick={onClick} {...rest}>
{children}
</MenuItem>
);
};
const MenuItem = styled.a`
display: flex;
margin: 0;
padding: 5px 10px;
height: 32px;
color: ${color.slateDark};
justify-content: left;
align-items: center;
cursor: pointer;
font-size: 15px;
svg {
margin-right: 8px;
}
&:hover {
color: ${color.white};
background: ${color.primary};
svg {
fill: ${color.white};
}
}
`;
export default DropdownMenuItem;

Some files were not shown because too many files have changed in this diff Show More