dashboard -> home (#1194)
This commit is contained in:
		| @ -81,7 +81,7 @@ class MainSidebar extends React.Component<Props> { | |||||||
|           <Scrollable shadow> |           <Scrollable shadow> | ||||||
|             <Section> |             <Section> | ||||||
|               <SidebarLink |               <SidebarLink | ||||||
|                 to="/dashboard" |                 to="/home" | ||||||
|                 icon={<HomeIcon />} |                 icon={<HomeIcon />} | ||||||
|                 exact={false} |                 exact={false} | ||||||
|                 label="Home" |                 label="Home" | ||||||
|  | |||||||
| @ -52,7 +52,7 @@ describe('Abstract', () => { | |||||||
|     expect('https://goabstract.com'.match(match)).toBe(null); |     expect('https://goabstract.com'.match(match)).toBe(null); | ||||||
|     expect('https://app.goabstract.com'.match(match)).toBe(null); |     expect('https://app.goabstract.com'.match(match)).toBe(null); | ||||||
|     expect('https://abstract.com/features'.match(match)).toBe(null); |     expect('https://abstract.com/features'.match(match)).toBe(null); | ||||||
|     expect('https://app.abstract.com/dashboard'.match(match)).toBe(null); |     expect('https://app.abstract.com/home'.match(match)).toBe(null); | ||||||
|     expect('https://abstract.com/pricing'.match(match)).toBe(null); |     expect('https://abstract.com/pricing'.match(match)).toBe(null); | ||||||
|     expect('https://goabstract.com/pricing'.match(match)).toBe(null); |     expect('https://goabstract.com/pricing'.match(match)).toBe(null); | ||||||
|     expect('https://www.goabstract.com/pricing'.match(match)).toBe(null); |     expect('https://www.goabstract.com/pricing'.match(match)).toBe(null); | ||||||
|  | |||||||
| @ -43,8 +43,9 @@ export default function Routes() { | |||||||
|         <SocketProvider> |         <SocketProvider> | ||||||
|           <Layout> |           <Layout> | ||||||
|             <Switch> |             <Switch> | ||||||
|               <Route path="/dashboard/:tab" component={Dashboard} /> |               <Redirect from="/dashboard" to="/home" /> | ||||||
|               <Route path="/dashboard" component={Dashboard} /> |               <Route path="/home/:tab" component={Dashboard} /> | ||||||
|  |               <Route path="/home" component={Dashboard} /> | ||||||
|               <Route exact path="/starred" component={Starred} /> |               <Route exact path="/starred" component={Starred} /> | ||||||
|               <Route exact path="/starred/:sort" component={Starred} /> |               <Route exact path="/starred/:sort" component={Starred} /> | ||||||
|               <Route exact path="/drafts" component={Drafts} /> |               <Route exact path="/drafts" component={Drafts} /> | ||||||
|  | |||||||
| @ -31,16 +31,16 @@ class Dashboard extends React.Component<Props> { | |||||||
|         <PageTitle title="Home" /> |         <PageTitle title="Home" /> | ||||||
|         <h1>Home</h1> |         <h1>Home</h1> | ||||||
|         <Tabs> |         <Tabs> | ||||||
|           <Tab to="/dashboard" exact> |           <Tab to="/home" exact> | ||||||
|             Recently updated |             Recently updated | ||||||
|           </Tab> |           </Tab> | ||||||
|           <Tab to="/dashboard/recent" exact> |           <Tab to="/home/recent" exact> | ||||||
|             Recently viewed |             Recently viewed | ||||||
|           </Tab> |           </Tab> | ||||||
|           <Tab to="/dashboard/created">Created by me</Tab> |           <Tab to="/home/created">Created by me</Tab> | ||||||
|         </Tabs> |         </Tabs> | ||||||
|         <Switch> |         <Switch> | ||||||
|           <Route path="/dashboard/recent"> |           <Route path="/home/recent"> | ||||||
|             <PaginatedDocumentList |             <PaginatedDocumentList | ||||||
|               key="recent" |               key="recent" | ||||||
|               documents={documents.recentlyViewed} |               documents={documents.recentlyViewed} | ||||||
| @ -48,7 +48,7 @@ class Dashboard extends React.Component<Props> { | |||||||
|               showCollection |               showCollection | ||||||
|             /> |             /> | ||||||
|           </Route> |           </Route> | ||||||
|           <Route path="/dashboard/created"> |           <Route path="/home/created"> | ||||||
|             <PaginatedDocumentList |             <PaginatedDocumentList | ||||||
|               key="created" |               key="created" | ||||||
|               documents={documents.createdByUser(user)} |               documents={documents.createdByUser(user)} | ||||||
| @ -57,7 +57,7 @@ class Dashboard extends React.Component<Props> { | |||||||
|               showCollection |               showCollection | ||||||
|             /> |             /> | ||||||
|           </Route> |           </Route> | ||||||
|           <Route path="/dashboard"> |           <Route path="/home"> | ||||||
|             <PaginatedDocumentList |             <PaginatedDocumentList | ||||||
|               documents={documents.recentlyUpdated} |               documents={documents.recentlyUpdated} | ||||||
|               fetch={documents.fetchRecentlyUpdated} |               fetch={documents.fetchRecentlyUpdated} | ||||||
|  | |||||||
| @ -9,7 +9,7 @@ type Props = { | |||||||
| }; | }; | ||||||
|  |  | ||||||
| const Home = observer(({ auth }: Props) => { | const Home = observer(({ auth }: Props) => { | ||||||
|   if (auth.authenticated) return <Redirect to="/dashboard" />; |   if (auth.authenticated) return <Redirect to="/home" />; | ||||||
|   auth.logout(true); |   auth.logout(true); | ||||||
|   return null; |   return null; | ||||||
| }); | }); | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
| import Document from 'models/Document'; | import Document from 'models/Document'; | ||||||
|  |  | ||||||
| export function homeUrl(): string { | export function homeUrl(): string { | ||||||
|   return '/dashboard'; |   return '/home'; | ||||||
| } | } | ||||||
|  |  | ||||||
| export function starredUrl(): string { | export function starredUrl(): string { | ||||||
|  | |||||||
| @ -13,7 +13,7 @@ | |||||||
|       "sizes": "512x512" |       "sizes": "512x512" | ||||||
|     } |     } | ||||||
|   ], |   ], | ||||||
|   "start_url": "/dashboard?source=pwa", |   "start_url": "/home?source=pwa", | ||||||
|   "background_color": "#FFFFFF", |   "background_color": "#FFFFFF", | ||||||
|   "display": "standalone", |   "display": "standalone", | ||||||
|   "theme_color": "#FFFFFF" |   "theme_color": "#FFFFFF" | ||||||
|  | |||||||
| @ -43,7 +43,7 @@ Object { | |||||||
|             <tr> |             <tr> | ||||||
|               <td align=\\"center\\"> |               <td align=\\"center\\"> | ||||||
|                 <span style=\\"display: none !important; color: #FFFFFF; margin:0; padding:0; font-size:1px; line-height:1px;\\">Outline is a place for your team to build and share knowledge.</span> |                 <span style=\\"display: none !important; color: #FFFFFF; margin:0; padding:0; font-size:1px; line-height:1px;\\">Outline is a place for your team to build and share knowledge.</span> | ||||||
|                 <table width=\\"550\\" padding=\\"40\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td align=\\"left\\"><table width=\\"100%\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td><table width=\\"100%\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td width=\\"100%\\" height=\\"40px\\" style=\\"line-height:40px;font-size:1px;mso-line-height-rule:exactly\\"> </td></tr></tbody></table><img alt=\\"Outline\\" src=\\"http://localhost:3000/email/header-logo.png\\" height=\\"48\\" width=\\"48\\"/></td></tr></tbody></table><table width=\\"100%\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td><table width=\\"100%\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td width=\\"100%\\" height=\\"10px\\" style=\\"line-height:10px;font-size:1px;mso-line-height-rule:exactly\\"> </td></tr></tbody></table><p><span style=\\"font-weight:500;font-size:18px\\">Welcome to Outline!</span></p><p>Outline is a place for your team to build and share knowledge.</p><p>To get started, head to your dashboard and try creating a collection to help document your workflow, create playbooks or help with team onboarding.</p><p>You can also import existing Markdown documents by dragging and dropping them to your collections.</p><table width=\\"100%\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td width=\\"100%\\" height=\\"10px\\" style=\\"line-height:10px;font-size:1px;mso-line-height-rule:exactly\\"> </td></tr></tbody></table><p><a href=\\"http://example.com/dashboard\\" style=\\"display:inline-block;padding:10px 20px;color:#FFFFFF;background:#000000;border-radius:4px;font-weight:500;text-decoration:none;cursor:pointer\\">View my dashboard</a></p><table width=\\"100%\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td width=\\"100%\\" height=\\"40px\\" style=\\"line-height:40px;font-size:1px;mso-line-height-rule:exactly\\"> </td></tr></tbody></table></td></tr></tbody></table><table width=\\"100%\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td style=\\"padding:20px 0;border-top:1px solid #E8EBED;color:#9BA6B2;font-size:14px\\"><a href=\\"http://localhost:3000\\" style=\\"color:#9BA6B2;font-weight:500;text-decoration:none;margin-right:10px\\">Outline</a><a href=\\"https://twitter.com/outlinewiki\\" style=\\"color:#9BA6B2;text-decoration:none;margin:0 10px\\">Twitter</a><a href=\\"https://spectrum.chat/outline\\" style=\\"color:#9BA6B2;text-decoration:none;margin:0 10px\\">Spectrum</a></td></tr></tbody></table></td></tr></tbody></table> |                 <table width=\\"550\\" padding=\\"40\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td align=\\"left\\"><table width=\\"100%\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td><table width=\\"100%\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td width=\\"100%\\" height=\\"40px\\" style=\\"line-height:40px;font-size:1px;mso-line-height-rule:exactly\\"> </td></tr></tbody></table><img alt=\\"Outline\\" src=\\"http://localhost:3000/email/header-logo.png\\" height=\\"48\\" width=\\"48\\"/></td></tr></tbody></table><table width=\\"100%\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td><table width=\\"100%\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td width=\\"100%\\" height=\\"10px\\" style=\\"line-height:10px;font-size:1px;mso-line-height-rule:exactly\\"> </td></tr></tbody></table><p><span style=\\"font-weight:500;font-size:18px\\">Welcome to Outline!</span></p><p>Outline is a place for your team to build and share knowledge.</p><p>To get started, head to your dashboard and try creating a collection to help document your workflow, create playbooks or help with team onboarding.</p><p>You can also import existing Markdown documents by dragging and dropping them to your collections.</p><table width=\\"100%\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td width=\\"100%\\" height=\\"10px\\" style=\\"line-height:10px;font-size:1px;mso-line-height-rule:exactly\\"> </td></tr></tbody></table><p><a href=\\"http://example.com/home\\" style=\\"display:inline-block;padding:10px 20px;color:#FFFFFF;background:#000000;border-radius:4px;font-weight:500;text-decoration:none;cursor:pointer\\">View my dashboard</a></p><table width=\\"100%\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td width=\\"100%\\" height=\\"40px\\" style=\\"line-height:40px;font-size:1px;mso-line-height-rule:exactly\\"> </td></tr></tbody></table></td></tr></tbody></table><table width=\\"100%\\" border=\\"0\\" cellSpacing=\\"0\\" cellPadding=\\"0\\"><tbody><tr><td style=\\"padding:20px 0;border-top:1px solid #E8EBED;color:#9BA6B2;font-size:14px\\"><a href=\\"http://localhost:3000\\" style=\\"color:#9BA6B2;font-weight:500;text-decoration:none;margin-right:10px\\">Outline</a><a href=\\"https://twitter.com/outlinewiki\\" style=\\"color:#9BA6B2;text-decoration:none;margin:0 10px\\">Twitter</a><a href=\\"https://spectrum.chat/outline\\" style=\\"color:#9BA6B2;text-decoration:none;margin:0 10px\\">Spectrum</a></td></tr></tbody></table></td></tr></tbody></table> | ||||||
|               </td> |               </td> | ||||||
|             </tr> |             </tr> | ||||||
|           </table> |           </table> | ||||||
| @ -61,7 +61,7 @@ To get started, head to your dashboard and try creating a collection to help doc | |||||||
|  |  | ||||||
| You can also import existing Markdown documents by dragging and dropping them to your collections. | You can also import existing Markdown documents by dragging and dropping them to your collections. | ||||||
|  |  | ||||||
| http://example.com/dashboard | http://example.com/home | ||||||
| ", | ", | ||||||
|   "to": "user@example.com", |   "to": "user@example.com", | ||||||
| } | } | ||||||
|  | |||||||
| @ -34,7 +34,7 @@ router.get('/redirect', auth(), async ctx => { | |||||||
|   }); |   }); | ||||||
|  |  | ||||||
|   const team = await Team.findByPk(user.teamId); |   const team = await Team.findByPk(user.teamId); | ||||||
|   ctx.redirect(`${team.url}/dashboard`); |   ctx.redirect(`${team.url}/home`); | ||||||
| }); | }); | ||||||
|  |  | ||||||
| app.use(bodyParser()); | app.use(bodyParser()); | ||||||
|  | |||||||
| @ -26,7 +26,7 @@ export const ExportEmail = () => { | |||||||
|         </p> |         </p> | ||||||
|         <EmptySpace height={10} /> |         <EmptySpace height={10} /> | ||||||
|         <p> |         <p> | ||||||
|           <Button href={`${process.env.URL}/dashboard`}>Go to dashboard</Button> |           <Button href={`${process.env.URL}/home`}>Go to dashboard</Button> | ||||||
|         </p> |         </p> | ||||||
|       </Body> |       </Body> | ||||||
|  |  | ||||||
|  | |||||||
| @ -21,7 +21,7 @@ To get started, head to your dashboard and try creating a collection to help doc | |||||||
|  |  | ||||||
| You can also import existing Markdown documents by dragging and dropping them to your collections. | You can also import existing Markdown documents by dragging and dropping them to your collections. | ||||||
|  |  | ||||||
| ${teamUrl}/dashboard | ${teamUrl}/home | ||||||
| `; | `; | ||||||
|  |  | ||||||
| export const WelcomeEmail = ({ teamUrl }: Props) => { | export const WelcomeEmail = ({ teamUrl }: Props) => { | ||||||
| @ -43,7 +43,7 @@ export const WelcomeEmail = ({ teamUrl }: Props) => { | |||||||
|         </p> |         </p> | ||||||
|         <EmptySpace height={10} /> |         <EmptySpace height={10} /> | ||||||
|         <p> |         <p> | ||||||
|           <Button href={`${teamUrl}/dashboard`}>View my dashboard</Button> |           <Button href={`${teamUrl}/home`}>View my dashboard</Button> | ||||||
|         </p> |         </p> | ||||||
|       </Body> |       </Body> | ||||||
|  |  | ||||||
|  | |||||||
| @ -134,7 +134,7 @@ export default function auth(options?: { required?: boolean } = {}) { | |||||||
|           httpOnly: false, |           httpOnly: false, | ||||||
|           expires, |           expires, | ||||||
|         }); |         }); | ||||||
|         ctx.redirect(`${team.url}/dashboard${isFirstSignin ? '?welcome' : ''}`); |         ctx.redirect(`${team.url}/home${isFirstSignin ? '?welcome' : ''}`); | ||||||
|       } |       } | ||||||
|     }; |     }; | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user