From 2d389cf6ee6993ede7691354208a9fb5a90d8c7f Mon Sep 17 00:00:00 2001 From: Kyle Doherty <kyle.l.doherty@gmail.com> Date: Tue, 29 May 2018 11:14:02 -0700 Subject: [PATCH] clean up toast --- frontend/src/metabase/containers/UndoListing.css | 1 - frontend/src/metabase/containers/UndoListing.jsx | 1 + .../dashboard/components/DashboardMoveModal.jsx | 16 ++++++++++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/frontend/src/metabase/containers/UndoListing.css b/frontend/src/metabase/containers/UndoListing.css index 6995e35cf25..e9c00660e9b 100644 --- a/frontend/src/metabase/containers/UndoListing.css +++ b/frontend/src/metabase/containers/UndoListing.css @@ -9,7 +9,6 @@ composes: bordered rounded shadowed from "style"; composes: relative from "style"; composes: flex align-center from "style"; - width: 320px; background-color: #2e353b; color: white; } diff --git a/frontend/src/metabase/containers/UndoListing.jsx b/frontend/src/metabase/containers/UndoListing.jsx index dfab03d0bab..c92cf2451b7 100644 --- a/frontend/src/metabase/containers/UndoListing.jsx +++ b/frontend/src/metabase/containers/UndoListing.jsx @@ -8,6 +8,7 @@ import S from "./UndoListing.css"; import { dismissUndo, performUndo } from "metabase/redux/undo"; import { getUndos } from "metabase/selectors/undo"; import { t } from "c-3po"; + import Icon from "metabase/components/Icon"; import BodyComponent from "metabase/components/BodyComponent"; diff --git a/frontend/src/metabase/dashboard/components/DashboardMoveModal.jsx b/frontend/src/metabase/dashboard/components/DashboardMoveModal.jsx index a6240943bd3..e547e34c0fe 100644 --- a/frontend/src/metabase/dashboard/components/DashboardMoveModal.jsx +++ b/frontend/src/metabase/dashboard/components/DashboardMoveModal.jsx @@ -3,13 +3,16 @@ import { Box, Flex, Subhead } from "rebass"; import cx from "classnames"; import { withRouter } from "react-router"; import { connect } from "react-redux"; -import { t } from "c-3po"; +import { jt } from "c-3po"; +import * as Urls from "metabase/lib/urls"; +import { normal } from "metabase/lib/colors"; import { DashboardApi } from "metabase/services"; import { addUndo, createUndo } from "metabase/redux/undo"; import Button from "metabase/components/Button"; import Icon from "metabase/components/Icon"; +import Link from "metabase/components/Link"; import CollectionListLoader from "metabase/containers/CollectionListLoader"; @@ -33,6 +36,7 @@ class DashboardMoveModal extends React.Component { async _moveDashboard() { const { addUndo, createUndo } = this.props; + const { selectedCollection } = this.state; try { await DashboardApi.update({ @@ -45,7 +49,15 @@ class DashboardMoveModal extends React.Component { message: () => ( <Flex align="center"> <Icon name="all" mr={1} color="white" /> - {t`Dashboard moved to ${this.state.selectedCollection.name}`} + {jt`Dashboard moved to ${( + <Link + ml={1} + color={normal.blue} + to={Urls.collection(selectedCollection.id)} + > + {selectedCollection.name} + </Link> + )}`} </Flex> ), }), -- GitLab