{"action":"created","comment":{"url":"https://api.github.com/repos/keybase/client/pulls/comments/44478321","id":44478321,"diff_hunk":"@@ -4,32 +4,76 @@\n import React from '../base-react'\n import BaseComponent from '../base-component'\n \n+// TODO const when integrating\n+const verified = 'verified'\n+const checking = 'checking'\n+const deleted = 'deleted'\n+const unreachable = 'unreachable'\n+const pending = 'pending'\n+\n export default class ProofsRender extends BaseComponent {\n+  openLink (proof, platform) {\n+    window.open(platform ? proof.platformLink : proof.proofLink)\n+  }\n+\n+  metaColor (pp) {\n+    return {\n+      'new': 'orange',\n+      deleted: 'red',\n+      unreachable: 'red',\n+      pending: 'gray'\n+    }[pp.proof.meta]\n+  }\n+\n+  tempStatus (pp) {\n+    return {\n+      verified: '[v]',\n+      checking: '[c]',\n+      deleted: '[d]',\n+      unreachable: '[u]',\n+      pending: '[p]'\n+    }[pp.proof.status]\n+  }\n+\n+  renderPlatformProof (pp) {\n+    const name = pp.platform.name === 'web' ? pp.platform.uri : pp.platform.name\n+    console.log(name)\n+    return (\n+      <div style={{display: 'flex'}}>\n+        <p title={name} style={{width: 40, marginRight: 10, cursor: 'pointer'}} onTouchTap={() => this.openLink(pp.platform.uri)}>{pp.platform.icon}</p>\n+        <div style={{display: 'flex', flexDirection: 'column', alignItems: 'flex-start'}}>\n+          <p style={{textDecoration: pp.proof.status === deleted ? 'line-through' : 'inherit', marginBottom: 0, cursor: 'pointer'}} onTouchTap={() => this.openLink(pp.platform.uri)}> {name}</p>\n+          <span style={{backgroundColor: this.metaColor(pp)}}>{pp.proof.meta}</span>\n+        </div>\n+        <div style={{display: 'flex', flex: 1, justifyContent: 'flex-end', paddingRight: 20}}>\n+          <p style={{cursor: 'pointer'}} onTouchTap={() => this.openLink(pp.proof.uri)}>{this.tempStatus(pp)}</p>\n+        </div>\n+      </div>\n+    )\n+  }\n+\n   render () {\n     return (\n-      <div style={{backgroundColor: 'green', display: 'flex', flex: 1, flexDirection: 'column', overflowY: 'auto'}}>\n-        <h1>Proof1</h1>\n-        <h1>Proof2</h1>\n-        <h1>Proof3</h1>\n-        <h1>Proof4</h1>\n-        <h1>Proof5</h1>\n-        <h1>Proof6</h1>\n-        <h1>Proof7</h1>\n-        <h1>Proof8</h1>\n-        <h1>Proof9</h1>\n-        <h1>Proof10</h1>\n-        <h1>Proof11</h1>\n-        <h1>Proof12</h1>\n-        <h1>Proof13</h1>\n-        <h1>Proof14</h1>\n-        <h1>Proof15</h1>\n-        <h1>Proof16</h1>\n-        <h1>Proof17</h1>\n-        <h1>Proof18</h1>\n-        <h1>Proof19</h1>\n-        <h1>Proof20</h1>\n-        <h1>Proof21</h1>\n+      <div style={{display: 'flex', flex: 1, flexDirection: 'column', overflowY: 'auto'}}>\n+        { this.props.platformProofs && this.props.platformProofs.map(platformProof => this.renderPlatformProof(platformProof)) }\n       </div>\n     )\n   }\n }\n+\n+ProofsRender.propTypes = {\n+  platformProofs: React.PropTypes.arrayOf(React.PropTypes.shape({\n+    platform: React.PropTypes.shape({\n+      icon: React.PropTypes.string.isRequired,\n+      name: React.PropTypes.string,\n+      username: React.PropTypes.string,\n+      uri: React.PropTypes.string\n+    }).isRequired,\n+    proof: React.PropTypes.shape({\n+      title: React.PropTypes.string,\n+      uri: React.PropTypes.string,\n+      status: React.PropTypes.oneOf([verified, checking, deleted, unreachable, pending]).isRequired,\n+      meta: React.PropTypes.string","path":"react-native/react/tracker/proofs-render.desktop.js","position":95,"original_position":95,"commit_id":"9b719384d4560c43bd977284f3c2cf91361bdb66","original_commit_id":"9b719384d4560c43bd977284f3c2cf91361bdb66","user":{"login":"MarcoPolo","id":594035,"avatar_url":"https://avatars.githubusercontent.com/u/594035?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcoPolo","html_url":"https://github.com/MarcoPolo","followers_url":"https://api.github.com/users/MarcoPolo/followers","following_url":"https://api.github.com/users/MarcoPolo/following{/other_user}","gists_url":"https://api.github.com/users/MarcoPolo/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcoPolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcoPolo/subscriptions","organizations_url":"https://api.github.com/users/MarcoPolo/orgs","repos_url":"https://api.github.com/users/MarcoPolo/repos","events_url":"https://api.github.com/users/MarcoPolo/events{/privacy}","received_events_url":"https://api.github.com/users/MarcoPolo/received_events","type":"User","site_admin":false},"body":"only `status` is required?","created_at":"2015-11-10T22:52:10Z","updated_at":"2015-11-10T22:52:10Z","html_url":"https://github.com/keybase/client/pull/1307#discussion_r44478321","pull_request_url":"https://api.github.com/repos/keybase/client/pulls/1307","_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/comments/44478321"},"html":{"href":"https://github.com/keybase/client/pull/1307#discussion_r44478321"},"pull_request":{"href":"https://api.github.com/repos/keybase/client/pulls/1307"}}},"pull_request":{"url":"https://api.github.com/repos/keybase/client/pulls/1307","id":50287122,"html_url":"https://github.com/keybase/client/pull/1307","diff_url":"https://github.com/keybase/client/pull/1307.diff","patch_url":"https://github.com/keybase/client/pull/1307.patch","issue_url":"https://api.github.com/repos/keybase/client/issues/1307","number":1307,"state":"open","locked":false,"title":"Proof dumb component","user":{"login":"chrisnojima","id":516435,"avatar_url":"https://avatars.githubusercontent.com/u/516435?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisnojima","html_url":"https://github.com/chrisnojima","followers_url":"https://api.github.com/users/chrisnojima/followers","following_url":"https://api.github.com/users/chrisnojima/following{/other_user}","gists_url":"https://api.github.com/users/chrisnojima/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisnojima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisnojima/subscriptions","organizations_url":"https://api.github.com/users/chrisnojima/orgs","repos_url":"https://api.github.com/users/chrisnojima/repos","events_url":"https://api.github.com/users/chrisnojima/events{/privacy}","received_events_url":"https://api.github.com/users/chrisnojima/received_events","type":"User","site_admin":false},"body":"@keybase/react-hackers dumb proofs page","created_at":"2015-11-10T17:50:13Z","updated_at":"2015-11-10T22:52:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9c583d507f3f5eaffd31d3ccbb966dba3ca169a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/keybase/client/pulls/1307/commits","review_comments_url":"https://api.github.com/repos/keybase/client/pulls/1307/comments","review_comment_url":"https://api.github.com/repos/keybase/client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keybase/client/issues/1307/comments","statuses_url":"https://api.github.com/repos/keybase/client/statuses/9b719384d4560c43bd977284f3c2cf91361bdb66","head":{"label":"keybase:nojima/DESKTOP-52-proof-component","ref":"nojima/DESKTOP-52-proof-component","sha":"9b719384d4560c43bd977284f3c2cf91361bdb66","user":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"name":"client","full_name":"keybase/client","owner":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","created_at":"2015-01-11T17:17:12Z","updated_at":"2015-11-09T08:06:17Z","pushed_at":"2015-11-10T22:51:29Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":123362,"stargazers_count":13,"watchers_count":13,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":16,"forks":1,"open_issues":16,"watchers":13,"default_branch":"master"}},"base":{"label":"keybase:nojima/DESKTOP-53-action-bar","ref":"nojima/DESKTOP-53-action-bar","sha":"1856d9a7f961bdc204c356df8d2a74f80474924b","user":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"name":"client","full_name":"keybase/client","owner":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","created_at":"2015-01-11T17:17:12Z","updated_at":"2015-11-09T08:06:17Z","pushed_at":"2015-11-10T22:51:29Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":123362,"stargazers_count":13,"watchers_count":13,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":16,"forks":1,"open_issues":16,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/1307"},"html":{"href":"https://github.com/keybase/client/pull/1307"},"issue":{"href":"https://api.github.com/repos/keybase/client/issues/1307"},"comments":{"href":"https://api.github.com/repos/keybase/client/issues/1307/comments"},"review_comments":{"href":"https://api.github.com/repos/keybase/client/pulls/1307/comments"},"review_comment":{"href":"https://api.github.com/repos/keybase/client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keybase/client/pulls/1307/commits"},"statuses":{"href":"https://api.github.com/repos/keybase/client/statuses/9b719384d4560c43bd977284f3c2cf91361bdb66"}}}}