From da9fc5bfdf21fdc01685523dccdb05feedae7241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Bregu=C3=AAz?= Date: Mon, 29 Jun 2020 17:01:34 -0300 Subject: [PATCH 1/8] New title based on TeamName --- app/components/Layout.js | 2 +- app/components/PageTitle.js | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/components/Layout.js b/app/components/Layout.js index 8349be3dd..d3b2845fd 100644 --- a/app/components/Layout.js +++ b/app/components/Layout.js @@ -97,7 +97,7 @@ class Layout extends React.Component { return ( - Outline + {team.name} ( - {`${title} - Outline`} + {`${title} - ${team.name}`} Date: Mon, 29 Jun 2020 17:06:47 -0300 Subject: [PATCH 2/8] Remove Polices --- app/components/PageTitle.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/components/PageTitle.js b/app/components/PageTitle.js index 631f1bcb5..d662bfa90 100644 --- a/app/components/PageTitle.js +++ b/app/components/PageTitle.js @@ -1,17 +1,15 @@ // @flow import * as React from "react"; import { Helmet } from "react-helmet"; -import PoliciesStore from "stores/PoliciesStore"; import AuthStore from "stores/AuthStore"; type Props = { title: string, favicon?: string, - policies: PoliciesStore, auth: AuthStore, }; -const { policies, auth } = this.props; +const { auth } = this.props; const { team } = auth; const PageTitle = ({ title, favicon }: Props) => ( From 2b7639c903ff12821d33a11a3872ef9126c31202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Bregu=C3=AAz?= Date: Wed, 1 Jul 2020 08:56:49 -0300 Subject: [PATCH 3/8] Improve Title when TeamName is empty --- app/components/Layout.js | 2 +- app/components/PageTitle.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/Layout.js b/app/components/Layout.js index d3b2845fd..5fa7f64c6 100644 --- a/app/components/Layout.js +++ b/app/components/Layout.js @@ -97,7 +97,7 @@ class Layout extends React.Component { return ( - {team.name} + {team.name | "Outline"} ( - {`${title} - ${team.name}`} + {`${title} - ${team.name}` | `${title} - Outline`} Date: Wed, 1 Jul 2020 09:09:21 -0300 Subject: [PATCH 4/8] Add Outline in Title --- app/components/Layout.js | 2 +- app/components/PageTitle.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/Layout.js b/app/components/Layout.js index 5fa7f64c6..6ae688f95 100644 --- a/app/components/Layout.js +++ b/app/components/Layout.js @@ -97,7 +97,7 @@ class Layout extends React.Component { return ( - {team.name | "Outline"} + {`${team.name} | Outline` | "Outline"} ( - {`${title} - ${team.name}` | `${title} - Outline`} + {`${title} - ${team.name} | Outline` | `${title} - Outline`} Date: Wed, 1 Jul 2020 09:14:21 -0300 Subject: [PATCH 5/8] add mobx observer and inject --- app/components/PageTitle.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/components/PageTitle.js b/app/components/PageTitle.js index 7339e0df9..b8b7f8718 100644 --- a/app/components/PageTitle.js +++ b/app/components/PageTitle.js @@ -1,5 +1,6 @@ // @flow import * as React from "react"; +import { observer, inject } from "mobx-react"; import { Helmet } from "react-helmet"; import AuthStore from "stores/AuthStore"; @@ -12,7 +13,7 @@ type Props = { const { auth } = this.props; const { team } = auth; -const PageTitle = ({ title, favicon }: Props) => ( +const PageTitle = observer(({ auth, title, favicon }: Props) => ( {`${title} - ${team.name} | Outline` | `${title} - Outline`} ( ); -export default PageTitle; +export default inject("auth")(PageTitle); From a25e03d7cd0e97a7a9371bafabbb9e1478cbbcae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Bregu=C3=AAz?= Date: Tue, 7 Jul 2020 09:11:19 -0300 Subject: [PATCH 6/8] Fix Name Mistake & Lint --- app/components/Layout.js | 2 +- app/components/PageTitle.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/components/Layout.js b/app/components/Layout.js index 6ae688f95..82bbabaf5 100644 --- a/app/components/Layout.js +++ b/app/components/Layout.js @@ -97,7 +97,7 @@ class Layout extends React.Component { return ( - {`${team.name} | Outline` | "Outline"} + {team.name ? `${team.name} | Outline` : "Outline"} ( - {`${title} - ${team.name} | Outline` | `${title} - Outline`} + + {team.name ? `${title} - ${team.name} | Outline` : `${title} - Outline`} + ( /> -); +)); export default inject("auth")(PageTitle); From a077766bff0bf537f61be41a6133e56c4e6336c1 Mon Sep 17 00:00:00 2001 From: Matheus Rocha Vieira Date: Wed, 8 Jul 2020 14:48:05 -0300 Subject: [PATCH 7/8] Update app/components/Layout.js Co-authored-by: Tom Moor --- app/components/Layout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/Layout.js b/app/components/Layout.js index 82bbabaf5..6c0660fe9 100644 --- a/app/components/Layout.js +++ b/app/components/Layout.js @@ -97,7 +97,7 @@ class Layout extends React.Component { return ( - {team.name ? `${team.name} | Outline` : "Outline"} + {team ? `${team.name} – Outline` : "Outline"} Date: Wed, 8 Jul 2020 14:48:14 -0300 Subject: [PATCH 8/8] Update app/components/PageTitle.js Co-authored-by: Tom Moor --- app/components/PageTitle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/PageTitle.js b/app/components/PageTitle.js index af02af4d4..43413e006 100644 --- a/app/components/PageTitle.js +++ b/app/components/PageTitle.js @@ -16,7 +16,7 @@ const { team } = auth; const PageTitle = observer(({ auth, title, favicon }: Props) => ( - {team.name ? `${title} - ${team.name} | Outline` : `${title} - Outline`} + {team ? `${title} - ${team.name} - Outline` : `${title} - Outline`}