dashboard -> home (#1194)

This commit is contained in:
Tom Moor 2020-02-26 21:10:20 -08:00 committed by GitHub
parent d06ec5ce0c
commit dac2d43f55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 21 additions and 20 deletions

View File

@ -81,7 +81,7 @@ class MainSidebar extends React.Component<Props> {
<Scrollable shadow>
<Section>
<SidebarLink
to="/dashboard"
to="/home"
icon={<HomeIcon />}
exact={false}
label="Home"

View File

@ -52,7 +52,7 @@ describe('Abstract', () => {
expect('https://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://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://goabstract.com/pricing'.match(match)).toBe(null);
expect('https://www.goabstract.com/pricing'.match(match)).toBe(null);

View File

@ -43,8 +43,9 @@ export default function Routes() {
<SocketProvider>
<Layout>
<Switch>
<Route path="/dashboard/:tab" component={Dashboard} />
<Route path="/dashboard" component={Dashboard} />
<Redirect from="/dashboard" to="/home" />
<Route path="/home/:tab" component={Dashboard} />
<Route path="/home" component={Dashboard} />
<Route exact path="/starred" component={Starred} />
<Route exact path="/starred/:sort" component={Starred} />
<Route exact path="/drafts" component={Drafts} />

View File

@ -31,16 +31,16 @@ class Dashboard extends React.Component<Props> {
<PageTitle title="Home" />
<h1>Home</h1>
<Tabs>
<Tab to="/dashboard" exact>
<Tab to="/home" exact>
Recently updated
</Tab>
<Tab to="/dashboard/recent" exact>
<Tab to="/home/recent" exact>
Recently viewed
</Tab>
<Tab to="/dashboard/created">Created by me</Tab>
<Tab to="/home/created">Created by me</Tab>
</Tabs>
<Switch>
<Route path="/dashboard/recent">
<Route path="/home/recent">
<PaginatedDocumentList
key="recent"
documents={documents.recentlyViewed}
@ -48,7 +48,7 @@ class Dashboard extends React.Component<Props> {
showCollection
/>
</Route>
<Route path="/dashboard/created">
<Route path="/home/created">
<PaginatedDocumentList
key="created"
documents={documents.createdByUser(user)}
@ -57,7 +57,7 @@ class Dashboard extends React.Component<Props> {
showCollection
/>
</Route>
<Route path="/dashboard">
<Route path="/home">
<PaginatedDocumentList
documents={documents.recentlyUpdated}
fetch={documents.fetchRecentlyUpdated}

View File

@ -9,7 +9,7 @@ type Props = {
};
const Home = observer(({ auth }: Props) => {
if (auth.authenticated) return <Redirect to="/dashboard" />;
if (auth.authenticated) return <Redirect to="/home" />;
auth.logout(true);
return null;
});

View File

@ -2,7 +2,7 @@
import Document from 'models/Document';
export function homeUrl(): string {
return '/dashboard';
return '/home';
}
export function starredUrl(): string {

View File

@ -13,7 +13,7 @@
"sizes": "512x512"
}
],
"start_url": "/dashboard?source=pwa",
"start_url": "/home?source=pwa",
"background_color": "#FFFFFF",
"display": "standalone",
"theme_color": "#FFFFFF"

View File

@ -43,7 +43,7 @@ Object {
<tr>
<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>
<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\\">&nbsp;</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\\">&nbsp;</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\\">&nbsp;</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\\">&nbsp;</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\\">&nbsp;</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\\">&nbsp;</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\\">&nbsp;</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\\">&nbsp;</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>
</tr>
</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.
http://example.com/dashboard
http://example.com/home
",
"to": "user@example.com",
}

View File

@ -34,7 +34,7 @@ router.get('/redirect', auth(), async ctx => {
});
const team = await Team.findByPk(user.teamId);
ctx.redirect(`${team.url}/dashboard`);
ctx.redirect(`${team.url}/home`);
});
app.use(bodyParser());

View File

@ -26,7 +26,7 @@ export const ExportEmail = () => {
</p>
<EmptySpace height={10} />
<p>
<Button href={`${process.env.URL}/dashboard`}>Go to dashboard</Button>
<Button href={`${process.env.URL}/home`}>Go to dashboard</Button>
</p>
</Body>

View File

@ -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.
${teamUrl}/dashboard
${teamUrl}/home
`;
export const WelcomeEmail = ({ teamUrl }: Props) => {
@ -43,7 +43,7 @@ export const WelcomeEmail = ({ teamUrl }: Props) => {
</p>
<EmptySpace height={10} />
<p>
<Button href={`${teamUrl}/dashboard`}>View my dashboard</Button>
<Button href={`${teamUrl}/home`}>View my dashboard</Button>
</p>
</Body>

View File

@ -134,7 +134,7 @@ export default function auth(options?: { required?: boolean } = {}) {
httpOnly: false,
expires,
});
ctx.redirect(`${team.url}/dashboard${isFirstSignin ? '?welcome' : ''}`);
ctx.redirect(`${team.url}/home${isFirstSignin ? '?welcome' : ''}`);
}
};