From 111b78ffc4b9bbab15432e4571d8aba021ae5a9a Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 3 Mar 2022 21:31:27 -0800 Subject: [PATCH 1/2] fix: .env.sample should use standard ports --- .env.sample | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.sample b/.env.sample index 9d92216ba..dfd6688df 100644 --- a/.env.sample +++ b/.env.sample @@ -10,11 +10,11 @@ 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 +DATABASE_URL=postgres://user:pass@localhost:5432/outline +DATABASE_URL_TEST=postgres://user:pass@localhost:5432/outline-test # Uncomment this to disable SSL for connecting to Postgres # PGSSLMODE=disable -REDIS_URL=redis://localhost:6479 +REDIS_URL=redis://localhost:6379 # URL should point to the fully qualified, publicly accessible URL. If using a # proxy the port in URL and PORT may be different. From 03fdb846cdde51efa795b243490c61a290526bfc Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 3 Mar 2022 21:46:53 -0800 Subject: [PATCH 2/2] fix: Hide TOC toggle on publicly shared links if there are no headings in the document (#3172) closes #3006 --- app/scenes/Document/components/Document.tsx | 5 ++++- app/scenes/Document/components/Header.tsx | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/scenes/Document/components/Document.tsx b/app/scenes/Document/components/Document.tsx index 83ab850f9..881db17ec 100644 --- a/app/scenes/Document/components/Document.tsx +++ b/app/scenes/Document/components/Document.tsx @@ -416,8 +416,10 @@ class DocumentScene extends React.Component { this.editor.current.getHeadings() : []; + const hasHeadings = headings.length > 0; const showContents = - ui.tocVisible && (readOnly || team?.collaborativeEditing); + ui.tocVisible && + ((readOnly && hasHeadings) || team?.collaborativeEditing); const collaborativeEditing = team?.collaborativeEditing && !document.isArchived && @@ -509,6 +511,7 @@ class DocumentScene extends React.Component { )}
- {toc} + {documentHasHeadings ? toc : null} ) }