diff --git a/client/coral-admin/config.sample.json b/client/coral-admin/config.sample.json deleted file mode 100644 index 55d39db05..000000000 --- a/client/coral-admin/config.sample.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "basePath": "client/coral-admin" -} diff --git a/client/coral-admin/src/containers/Configure.js b/client/coral-admin/src/containers/Configure.js index 4a36e56e7..f90e8c747 100644 --- a/client/coral-admin/src/containers/Configure.js +++ b/client/coral-admin/src/containers/Configure.js @@ -12,6 +12,8 @@ import { } from 'react-mdl' import Page from 'components/Page' import styles from './Configure.css' +import I18n from 'coral-framework/i18n/i18n' +import translations from '../translations' class Configure extends React.Component { constructor (props) { @@ -40,12 +42,28 @@ class Configure extends React.Component { } + copyToClipBoard (event) { + const copyTextarea = document.querySelector('.' + styles.embedInput) + copyTextarea.select() + + try { + document.execCommand('copy') + } catch (err) { + console.error('Unable to copy') + } + } + getEmbed () { + const embedText = + `
` + return

Copy and paste code below into your CMS to embed your comment box in your articles

- - + +
} @@ -94,3 +112,5 @@ class Configure extends React.Component { } export default connect(x => x)(Configure) + +const lang = new I18n(translations) diff --git a/client/coral-admin/webpack.config.js b/client/coral-admin/webpack.config.js index 1b6fc0962..0cceded4b 100644 --- a/client/coral-admin/webpack.config.js +++ b/client/coral-admin/webpack.config.js @@ -14,10 +14,6 @@ module.exports = Object.assign({}, devConfig, { ] }, plugins: [ - new Copy([{ - from: path.join(__dirname, '..', 'coral-embed-stream', 'dist'), - to: './embed/comment-stream' - }]), autoprefixer, precss ] }) diff --git a/package.json b/package.json index df096877d..dd22a5f8c 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "pretest": "npm install", "test": "mocha tests --recursive", "test-watch": "mocha tests --recursive -w", - "embed-start": "./node_modules/webpack/bin/webpack.js --config ./client/coral-embed-stream/webpack.config.dev.js && ./bin/www" + "embed-start": "npm run build && ./bin/www" }, "config": { "pre-git": {