diff --git a/plugins/coral-plugin-permalink/client/.babelrc b/plugins/coral-plugin-permalink/client/.babelrc deleted file mode 100644 index 60be246eb..000000000 --- a/plugins/coral-plugin-permalink/client/.babelrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "presets": [ - "es2015" - ], - "plugins": [ - "add-module-exports", - "transform-class-properties", - "transform-decorators-legacy", - "transform-object-assign", - "transform-object-rest-spread", - "transform-async-to-generator", - "transform-react-jsx" - ] -} \ No newline at end of file diff --git a/plugins/coral-plugin-permalink/client/.eslintrc.json b/plugins/coral-plugin-permalink/client/.eslintrc.json deleted file mode 100644 index 9fe56bd14..000000000 --- a/plugins/coral-plugin-permalink/client/.eslintrc.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "env": { - "browser": true, - "es6": true, - "mocha": true - }, - "parserOptions": { - "sourceType": "module", - "ecmaFeatures": { - "experimentalObjectRestSpread": true, - "jsx": true - } - }, - "parser": "babel-eslint", - "plugins": [ - "react" - ], - "rules": { - "react/jsx-uses-react": "error", - "react/jsx-uses-vars": "error", - "no-console": ["warn", { "allow": ["warn", "error"] }] - } -} diff --git a/plugins/coral-plugin-permalink/client/components/PermalinkButton.js b/plugins/coral-plugin-permalink/client/components/PermalinkButton.js deleted file mode 100644 index 41c0cae6d..000000000 --- a/plugins/coral-plugin-permalink/client/components/PermalinkButton.js +++ /dev/null @@ -1,95 +0,0 @@ -import React from 'react'; -import {Button} from 'coral-ui'; -import styles from './styles.css'; -import t from 'coral-framework/services/i18n'; -import ClickOutside from 'coral-framework/components/ClickOutside'; -import cn from 'classnames'; - -const name = 'coral-plugin-permalinks'; - -export default class PermalinkButton extends React.Component { - constructor (props) { - super(props); - - this.state = { - popoverOpen: false, - copySuccessful: null, - copyFailure: null - }; - - } - - toggle = () => { - this.popover.style.top = `${this.linkButton.offsetTop - 80}px`; - - this.setState({ - popoverOpen: !this.state.popoverOpen - }); - } - - handleClickOutside = () => { - this.setState({ - popoverOpen: false - }); - } - - copyPermalink = () => { - this.permalinkInput.select(); - try { - document.execCommand('copy'); - this.setState({ - copySuccessful: true, - copyFailure: null - }); - } catch (err) { - this.setState({ - copyFailure: true, - copySuccessful: null - }); - } - - setTimeout(() => { - this.setState({ - copyFailure: null, - copySuccessful: null - }); - }, 3000); - } - - render () { - const {copySuccessful, copyFailure, popoverOpen} = this.state; - const {asset} = this.props; - return ( - -
- -
this.popover = ref} - className={cn([`${name}-popover`, styles.container, {active: popoverOpen}])}> - this.permalinkInput = input} - value={`${asset.url}#${this.props.commentId}`} - /> - - -
-
-
- ); - } -} diff --git a/plugins/coral-plugin-permalink/client/components/styles.css b/plugins/coral-plugin-permalink/client/components/styles.css deleted file mode 100644 index ba263fe0c..000000000 --- a/plugins/coral-plugin-permalink/client/components/styles.css +++ /dev/null @@ -1,67 +0,0 @@ -.container { - border-radius: 3px; - padding: 15px 10px; - box-sizing: border-box; - border: solid 1px rgba(153, 153, 153, 0.33); - left: 0; - width: 100%; - z-index: 10; - - &::before { - content: ''; - border: 10px solid transparent; - border-top-color: white; - position: absolute; - right: 7em; - bottom: -20px; - z-index: 2; - } - - &::after{ - content: ''; - border: 10px solid transparent; - border-top-color: rgba(153, 153, 153, 0.33); - position: absolute; - right: 7em; - bottom: -21px; - z-index: 1; - } - - input { - display: inline-block; - width: calc(100% - 78px); - padding: 8px; - border-radius: 3px; - border: solid 1px #e0e0e0; - height: 32px; - box-sizing: border-box; - font-size: 1em; - } - - button { - display: inline-block; - float: right; - box-sizing: border-box; - margin: 0; - background-color: #e0e0e0; - font-size: 1em; - width: auto; - height: auto; - padding: 2px; - transition: background-color 0.4s ease; - - &:hover{ - color: black; - } - - &.success { - background-color: #00897B; - color: white; - } - - &.failure { - background-color: #FF5252; - color: white; - } - } -} diff --git a/plugins/coral-plugin-permalink/client/index.js b/plugins/coral-plugin-permalink/client/index.js deleted file mode 100644 index d413da870..000000000 --- a/plugins/coral-plugin-permalink/client/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import PermalinkButton from './components/PermalinkButton'; - -export default { - slots: { - commentActions: [PermalinkButton] - } -}; diff --git a/plugins/coral-plugin-permalink/index.js b/plugins/coral-plugin-permalink/index.js deleted file mode 100644 index f053ebf79..000000000 --- a/plugins/coral-plugin-permalink/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {}; diff --git a/plugins/coral-plugin-permalink/package.json b/plugins/coral-plugin-permalink/package.json deleted file mode 100644 index 0d1f1e6ba..000000000 --- a/plugins/coral-plugin-permalink/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "coral-plugin-permalink", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC" -}