React = require 'react' {DatabaseStore, NamespaceStore, TaskStore, Actions, Contact, Message} = require 'inbox-exports' ActivityBarStore = require './activity-bar-store' ActivityBarCurlItem = React.createClass render: ->
_onCopyCommand: -> clipboard = require('clipboard') clipboard.writeText(@props.item.command) _onRunCommand: -> curlFile = "#{atom.getConfigDirPath()}/curl.command" fs = require 'fs-plus' if fs.existsSync(curlFile) fs.unlinkSync(curlFile) fs.writeFileSync(curlFile, @props.item.command) fs.chmodSync(curlFile, '777') shell = require 'shell' shell.openItem(curlFile) module.exports = ActivityBar = React.createClass getInitialState: -> @_getStateFromStores() componentDidMount: -> @task_store_unsubscribe = TaskStore.listen @_onChange @activity_store_unsubscribe = ActivityBarStore.listen @_onChange componentWillUnmount: -> @task_store_unsubscribe() if @task_store_unsubscribe @activity_store_unsubscribe() if @activity_store_unsubscribe render: -> expandedDiv = if @state.expandedSection == 'curl' curlDivs = @state.curlHistory.map (item) ->Hi, Edgehill team!
I have some feedback for you.
What happened
Impact
Feedback
Environment
I'm using Edgehill #{atom.getVersion()} and my platform is #{process.platform}-#{process.arch}.
--
#{user}
-- Extra Debugging Data --
#{debugData}
""" DatabaseStore.persistModel(draft).then -> DatabaseStore.localIdForModel(draft).then (localId) -> Actions.composePopoutDraft(localId) _getStateFromStores: -> expandedSection: ActivityBarStore.expandedSection() curlHistory: ActivityBarStore.curlHistory() queue:TaskStore.queuedTasks() queuePending: TaskStore.pendingTasks() queueState: if TaskStore.isPaused() then "paused" else "running" longPollState: ActivityBarStore.longPollState()