From 98154a1921d730f830dce4dcd7b50598f1259cc7 Mon Sep 17 00:00:00 2001 From: Bradley Date: Sat, 26 Feb 2022 18:52:14 -0600 Subject: [PATCH] changed repost to open a modal instead of new page --- ui/component/claimRepostButton/index.js | 9 ++++ ui/component/claimRepostButton/view.jsx | 32 +++++++++++++ ui/component/fileActions/view.jsx | 8 +++- ui/component/repostCreate/view.jsx | 57 +++++++++++------------ ui/component/searchTopClaim/index.js | 2 + ui/component/searchTopClaim/view.jsx | 13 ++---- ui/constants/modal_types.js | 1 + ui/modal/modalRepost/index.js | 11 +++++ ui/modal/modalRepost/view.jsx | 62 +++++++++++++++++++++++++ ui/modal/modalRouter/view.jsx | 1 + ui/page/top/index.js | 2 + ui/page/top/view.jsx | 8 ++-- ui/scss/init/_gui.scss | 7 +++ 13 files changed, 169 insertions(+), 44 deletions(-) create mode 100644 ui/component/claimRepostButton/index.js create mode 100644 ui/component/claimRepostButton/view.jsx create mode 100644 ui/modal/modalRepost/index.js create mode 100644 ui/modal/modalRepost/view.jsx diff --git a/ui/component/claimRepostButton/index.js b/ui/component/claimRepostButton/index.js new file mode 100644 index 000000000..6331ab9a4 --- /dev/null +++ b/ui/component/claimRepostButton/index.js @@ -0,0 +1,9 @@ +import { connect } from 'react-redux'; +import { doOpenModal } from 'redux/actions/app'; +import ClaimRepostButton from './view'; + +const perform = { + doOpenModal, +}; + +export default connect(null, perform)(ClaimRepostButton); diff --git a/ui/component/claimRepostButton/view.jsx b/ui/component/claimRepostButton/view.jsx new file mode 100644 index 000000000..c9dfc85e0 --- /dev/null +++ b/ui/component/claimRepostButton/view.jsx @@ -0,0 +1,32 @@ +// @flow +import * as MODALS from 'constants/modal_types'; +import * as ICONS from 'constants/icons'; +import React from 'react'; +import classnames from 'classnames'; +import Button from 'component/button'; +import Tooltip from 'component/common/tooltip'; + +type Props = { + uri: string, + fileAction?: boolean, + doOpenModal: (string, {}) => void, +}; + +export default function ClaimRepostButton(props: Props) { + const { uri, fileAction, doOpenModal } = props; + + console.log('uri', uri); + + return ( + +