This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* eslint no-undef: "error" */ | |
| /* eslint-env browser */ | |
| import 'babel-polyfill' | |
| import toposort from 'toposort' | |
| import waterfall from 'async/waterfall' | |
| const getThreadInfo = async (thread) => { | |
| const threadId = thread || 'default' | |
| return executeJsonCmd('GET', `${API}/threads/${threadId}`, { ctype: 'application/json' }) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react' | |
| import { observer, inject } from 'mobx-react' | |
| import { Card, Icon, Image, Input, Form } from 'semantic-ui-react' | |
| import Moment from 'react-moment' | |
| @inject('store') @observer | |
| class Profile extends Component { | |
| handleUsername = e => { | |
| e.preventDefault() | |
| this.props.store.setProfile(this.inputRef.value, null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/Store.js b/src/Store.js | |
| --- a/src/Store.js | |
| +++ b/src/Store.js | |
| @@ -1,7 +1,10 @@ | |
| -import { observe, action, observable } from 'mobx' | |
| +import { observe, action, observable, runInAction } from 'mobx' | |
| +import { utc } from 'moment' | |
| import { Textile } from '@textile/js-http-client' | |
| import { toast } from 'react-semantic-toasts' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/Main.js b/src/Main.js | |
| index a545559..e34f915 100644 | |
| --- a/src/Main.js | |
| +++ b/src/Main.js | |
| @@ -1,21 +1,11 @@ | |
| import React, { Component } from 'react' | |
| import { observer, inject } from 'mobx-react' | |
| -import { Image } from 'semantic-ui-react' | |
| -// import Moment from 'react-moment' | |
| -import * as Logo from './[email protected]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| const cli = require('cac')('txtl') | |
| const { log } = console | |
| // Create 'default' chat command | |
| cli.command('', 'Starts an interactive chat session in a thread.') | |
| .action((opts) => { | |
| log('do something') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/index.js b/index.js | |
| index 11b46ac..4cf1473 100644 | |
| --- a/index.js | |
| +++ b/index.js | |
| @@ -1,6 +1,7 @@ | |
| #!/usr/bin/env node | |
| const cli = require('cac')('txtl') | |
| +var readline = require('readline') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/index.js b/index.js | |
| index 4cf1473..598b1d1 100644 | |
| --- a/index.js | |
| +++ b/index.js | |
| @@ -1,6 +1,7 @@ | |
| #!/usr/bin/env node | |
| const cli = require('cac')('txtl') | |
| +const textile = require('@textile/js-http-client').default | |
| var readline = require('readline') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/index.js b/index.js | |
| index 598b1d1..963d96f 100644 | |
| --- a/index.js | |
| +++ b/index.js | |
| @@ -31,7 +31,31 @@ cli.command('', 'Starts an interactive chat session in a thread.') | |
| // Only subscribe to text events on the specified thread | |
| textile.subscribe.stream(['TEXT'], opts.thread) | |
| .then((stream) => { | |
| - log('do something') | |
| + // All js-http-client stream endpoints return a ReadableSream |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/index.js b/index.js | |
| index 963d96f..6e7bfc1 100644 | |
| --- a/index.js | |
| +++ b/index.js | |
| @@ -3,6 +3,8 @@ | |
| const cli = require('cac')('txtl') | |
| const textile = require('@textile/js-http-client').default | |
| var readline = require('readline') | |
| +const chalk = require('chalk') | |
| +const { emojify } = require('node-emoji') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| import { cac } from 'cac' | |
| import textile, { Block, FeedItem } from '@textile/js-http-client' | |
| import readline from 'readline' | |
| import chalk from 'chalk' | |
| import { emojify } from 'node-emoji' | |
| const cli = cac('txtl') | |
| const { log } = console |