From d3f6d98ab686d37ea97e6732ef8ce54a022e6479 Mon Sep 17 00:00:00 2001 From: Jernej Pregelj Date: Wed, 8 May 2019 17:24:58 +0200 Subject: [PATCH] texts --- client/package-lock.json | 26 +--------------- .../components/atoms/AreaButton.module.scss | 1 - client/src/data/form-publish.json | 4 +-- client/src/routes/Publish/index.tsx | 31 +++++++------------ client/src/routes/Publish/loader.tsx | 5 +-- 5 files changed, 17 insertions(+), 50 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index d0cbb1a..63bc876 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -16073,14 +16073,6 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "requires": { - "is-typedarray": "^1.0.0" - } - }, "typescript": { "version": "3.4.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz", @@ -17001,8 +16993,7 @@ "integrity": "sha512-8p6ZLv+1JYa5Vs8oBn33Nn3VGFBbF+wVfO+b78RJS1Qf1uIOzjFVDk3XwYDD7rlz9G5BKpxhaQw+6EGQ7L02aw==", "requires": { "underscore": "1.8.3", - "web3-core-helpers": "1.0.0-beta.37", - "websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2" + "web3-core-helpers": "1.0.0-beta.37" }, "dependencies": { "bn.js": { @@ -17042,16 +17033,6 @@ "underscore": "1.8.3", "utf8": "2.1.1" } - }, - "websocket": { - "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", - "from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", - "requires": { - "debug": "^2.2.0", - "nan": "^2.3.3", - "typedarray-to-buffer": "^3.1.2", - "yaeti": "^0.0.6" - } } } }, @@ -17809,11 +17790,6 @@ "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", "dev": true }, - "yaeti": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" - }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", diff --git a/client/src/components/atoms/AreaButton.module.scss b/client/src/components/atoms/AreaButton.module.scss index c231bda..097148d 100644 --- a/client/src/components/atoms/AreaButton.module.scss +++ b/client/src/components/atoms/AreaButton.module.scss @@ -3,7 +3,6 @@ .areaButton { overflow-wrap: break-word; word-wrap: break-word; - word-break: break-all; > div { display: block; diff --git a/client/src/data/form-publish.json b/client/src/data/form-publish.json index 0a0c8c8..77c6e60 100644 --- a/client/src/data/form-publish.json +++ b/client/src/data/form-publish.json @@ -158,7 +158,7 @@ } ] }, - "algorithm": { + "script": { "defaults": { "name": "", "dateCreated": "", @@ -193,7 +193,7 @@ "steps": [ { "title": "Essentials", - "description": "Start by adding a title and URLs for your algorithm.", + "description": "Start by adding a title and URLs for your script.", "fields": { "name": { "label": "Title", diff --git a/client/src/routes/Publish/index.tsx b/client/src/routes/Publish/index.tsx index de31b9a..e69932d 100644 --- a/client/src/routes/Publish/index.tsx +++ b/client/src/routes/Publish/index.tsx @@ -18,20 +18,11 @@ class Publish extends Component<{}, PublishState> { public state = { type: 'start' } - public publishDataset = () => { - this.setState({ type: 'dataset' }) - } - public publishContainer = () => { - this.setState({ type: 'container' }) - } - public publishWorkflow = () => { - this.setState({ type: 'workflow' }) - } - public publishAlgorithm = () => { - this.setState({ type: 'script' }) + public publishType = (type: string) => { + this.setState({ type }) } public toSelect = () => { - this.setState({ type: 'start' }) + this.publishType('start') } public render() { return ( @@ -47,26 +38,26 @@ class Publish extends Component<{}, PublishState> {
this.publishType('dataset')} image={Dataset} /> this.publishType('container')} image={Container} /> this.publishType('workflow')} image={Workflow} /> this.publishType('script')} image={Script} />
diff --git a/client/src/routes/Publish/loader.tsx b/client/src/routes/Publish/loader.tsx index 7a8d5a9..07631d1 100644 --- a/client/src/routes/Publish/loader.tsx +++ b/client/src/routes/Publish/loader.tsx @@ -223,6 +223,7 @@ class Loader extends Component { } public render() { + const loadedType = (dataPublishForm as any)[this.props.loadType] return ( { )}
- {(dataPublishForm as any)[this.props.loadType].steps.map( + {loadedType.steps.map( (step: any, index: number) => (