{"action":"created","comment":{"url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments/76369391","id":76369391,"diff_hunk":"@@ -197,12 +173,43 @@ class Topbar extends Component {\n       }) :\n       null;\n \n+    // menu props\n+    const hasMenuContext = !!this.props.menu;\n+    const menuLinksData = hasMenuContext ?\n+      this.props.menu.links.map((l) => (\n+        {\n+          active: l.link === location,\n+          activeColor: marketplaceColor1,\n+          content: l.title,\n+          href: l.link,\n+          type: 'menuitem',\n+          priority: l.priority,\n+          external: l.external,\n+        }\n+      )) :\n+      [];\n+    const menuProps = hasMenuContext ?\n+      Object.assign({}, this.props.menu, {\n+        key: 'menu',\n+        name: t('web.topbar.more'),\n+        nameFallback: t('web.topbar.menu'),\n+        identifier: 'Menu',\n+        limitPriorityLinks: this.props.menu.limit_priority_links,\n+        menuLabelType: LABEL_TYPE_DROPDOWN,\n+        menuLabelTypeFallback: LABEL_TYPE_MENU,\n+        content: menuLinksData,\n+      }) :\n+      {};\n \n-    const pathParams = { return_to: location };\n-    const loginRoute = this.props.routes.login_path ? this.props.routes.login_path(pathParams) : '#';\n-    const signupRoute = this.props.routes.sign_up_path ? this.props.routes.sign_up_path() : '#';\n-\n-    const mobileMenuProps = this.props.menu ?\n+    // mobile menu props\n+    const isAdmin = !!(this.props.user && this.props.user.isAdmin && loggedInUsername);","path":"client/app/components/sections/Topbar/Topbar.js","position":277,"original_position":126,"commit_id":"df5bc7f53a13dd4e34f29967ff5531e1133a199a","original_commit_id":"1babab5026a30af8001189798366c6a98edc3af7","user":{"login":"mporkola","id":432030,"avatar_url":"https://avatars.githubusercontent.com/u/432030?v=3","gravatar_id":"","url":"https://api.github.com/users/mporkola","html_url":"https://github.com/mporkola","followers_url":"https://api.github.com/users/mporkola/followers","following_url":"https://api.github.com/users/mporkola/following{/other_user}","gists_url":"https://api.github.com/users/mporkola/gists{/gist_id}","starred_url":"https://api.github.com/users/mporkola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mporkola/subscriptions","organizations_url":"https://api.github.com/users/mporkola/orgs","repos_url":"https://api.github.com/users/mporkola/repos","events_url":"https://api.github.com/users/mporkola/events{/privacy}","received_events_url":"https://api.github.com/users/mporkola/received_events","type":"User","site_admin":false},"body":"`isAdmin` is also used in `ProfileDropdown`, so maybe not under \"mobile menu props\"","created_at":"2016-08-26T06:24:24Z","updated_at":"2016-08-26T06:24:24Z","html_url":"https://github.com/sharetribe/sharetribe/pull/2455#discussion_r76369391","pull_request_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2455","_links":{"self":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments/76369391"},"html":{"href":"https://github.com/sharetribe/sharetribe/pull/2455#discussion_r76369391"},"pull_request":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2455"}}},"pull_request":{"url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2455","id":82724981,"html_url":"https://github.com/sharetribe/sharetribe/pull/2455","diff_url":"https://github.com/sharetribe/sharetribe/pull/2455.diff","patch_url":"https://github.com/sharetribe/sharetribe/pull/2455.patch","issue_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/2455","number":2455,"state":"open","locked":false,"title":"Topbar.js: refactoring most pressing things.","user":{"login":"Gnito","id":717315,"avatar_url":"https://avatars.githubusercontent.com/u/717315?v=3","gravatar_id":"","url":"https://api.github.com/users/Gnito","html_url":"https://github.com/Gnito","followers_url":"https://api.github.com/users/Gnito/followers","following_url":"https://api.github.com/users/Gnito/following{/other_user}","gists_url":"https://api.github.com/users/Gnito/gists{/gist_id}","starred_url":"https://api.github.com/users/Gnito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gnito/subscriptions","organizations_url":"https://api.github.com/users/Gnito/orgs","repos_url":"https://api.github.com/users/Gnito/repos","events_url":"https://api.github.com/users/Gnito/events{/privacy}","received_events_url":"https://api.github.com/users/Gnito/received_events","type":"User","site_admin":false},"body":"Lots of refactoring - there's still room to improve, but I guess that can be done later.","created_at":"2016-08-25T14:01:31Z","updated_at":"2016-08-26T06:24:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"947b34d59ef1947fd3ead75d63916a8c0792eb37","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2455/commits","review_comments_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2455/comments","review_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/2455/comments","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/df5bc7f53a13dd4e34f29967ff5531e1133a199a","head":{"label":"sharetribe:topbar-refactoring","ref":"topbar-refactoring","sha":"df5bc7f53a13dd4e34f29967ff5531e1133a199a","user":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"repo":{"id":4447023,"name":"sharetribe","full_name":"sharetribe/sharetribe","owner":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sharetribe/sharetribe","description":"Open source marketplace platform","fork":false,"url":"https://api.github.com/repos/sharetribe/sharetribe","forks_url":"https://api.github.com/repos/sharetribe/sharetribe/forks","keys_url":"https://api.github.com/repos/sharetribe/sharetribe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharetribe/sharetribe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharetribe/sharetribe/teams","hooks_url":"https://api.github.com/repos/sharetribe/sharetribe/hooks","issue_events_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/events{/number}","events_url":"https://api.github.com/repos/sharetribe/sharetribe/events","assignees_url":"https://api.github.com/repos/sharetribe/sharetribe/assignees{/user}","branches_url":"https://api.github.com/repos/sharetribe/sharetribe/branches{/branch}","tags_url":"https://api.github.com/repos/sharetribe/sharetribe/tags","blobs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharetribe/sharetribe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharetribe/sharetribe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/{sha}","languages_url":"https://api.github.com/repos/sharetribe/sharetribe/languages","stargazers_url":"https://api.github.com/repos/sharetribe/sharetribe/stargazers","contributors_url":"https://api.github.com/repos/sharetribe/sharetribe/contributors","subscribers_url":"https://api.github.com/repos/sharetribe/sharetribe/subscribers","subscription_url":"https://api.github.com/repos/sharetribe/sharetribe/subscription","commits_url":"https://api.github.com/repos/sharetribe/sharetribe/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharetribe/sharetribe/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharetribe/sharetribe/contents/{+path}","compare_url":"https://api.github.com/repos/sharetribe/sharetribe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharetribe/sharetribe/merges","archive_url":"https://api.github.com/repos/sharetribe/sharetribe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharetribe/sharetribe/downloads","issues_url":"https://api.github.com/repos/sharetribe/sharetribe/issues{/number}","pulls_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls{/number}","milestones_url":"https://api.github.com/repos/sharetribe/sharetribe/milestones{/number}","notifications_url":"https://api.github.com/repos/sharetribe/sharetribe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharetribe/sharetribe/labels{/name}","releases_url":"https://api.github.com/repos/sharetribe/sharetribe/releases{/id}","deployments_url":"https://api.github.com/repos/sharetribe/sharetribe/deployments","created_at":"2012-05-25T15:34:17Z","updated_at":"2016-08-26T01:41:17Z","pushed_at":"2016-08-25T21:33:03Z","git_url":"git://github.com/sharetribe/sharetribe.git","ssh_url":"git@github.com:sharetribe/sharetribe.git","clone_url":"https://github.com/sharetribe/sharetribe.git","svn_url":"https://github.com/sharetribe/sharetribe","homepage":"https://www.sharetribe.com","size":116374,"stargazers_count":733,"watchers_count":733,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":493,"mirror_url":null,"open_issues_count":27,"forks":493,"open_issues":27,"watchers":733,"default_branch":"master"}},"base":{"label":"sharetribe:master","ref":"master","sha":"0a13f79baf5c62767d905488fe4d44fdd640eed2","user":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"repo":{"id":4447023,"name":"sharetribe","full_name":"sharetribe/sharetribe","owner":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sharetribe/sharetribe","description":"Open source marketplace platform","fork":false,"url":"https://api.github.com/repos/sharetribe/sharetribe","forks_url":"https://api.github.com/repos/sharetribe/sharetribe/forks","keys_url":"https://api.github.com/repos/sharetribe/sharetribe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharetribe/sharetribe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharetribe/sharetribe/teams","hooks_url":"https://api.github.com/repos/sharetribe/sharetribe/hooks","issue_events_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/events{/number}","events_url":"https://api.github.com/repos/sharetribe/sharetribe/events","assignees_url":"https://api.github.com/repos/sharetribe/sharetribe/assignees{/user}","branches_url":"https://api.github.com/repos/sharetribe/sharetribe/branches{/branch}","tags_url":"https://api.github.com/repos/sharetribe/sharetribe/tags","blobs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharetribe/sharetribe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharetribe/sharetribe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/{sha}","languages_url":"https://api.github.com/repos/sharetribe/sharetribe/languages","stargazers_url":"https://api.github.com/repos/sharetribe/sharetribe/stargazers","contributors_url":"https://api.github.com/repos/sharetribe/sharetribe/contributors","subscribers_url":"https://api.github.com/repos/sharetribe/sharetribe/subscribers","subscription_url":"https://api.github.com/repos/sharetribe/sharetribe/subscription","commits_url":"https://api.github.com/repos/sharetribe/sharetribe/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharetribe/sharetribe/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharetribe/sharetribe/contents/{+path}","compare_url":"https://api.github.com/repos/sharetribe/sharetribe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharetribe/sharetribe/merges","archive_url":"https://api.github.com/repos/sharetribe/sharetribe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharetribe/sharetribe/downloads","issues_url":"https://api.github.com/repos/sharetribe/sharetribe/issues{/number}","pulls_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls{/number}","milestones_url":"https://api.github.com/repos/sharetribe/sharetribe/milestones{/number}","notifications_url":"https://api.github.com/repos/sharetribe/sharetribe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharetribe/sharetribe/labels{/name}","releases_url":"https://api.github.com/repos/sharetribe/sharetribe/releases{/id}","deployments_url":"https://api.github.com/repos/sharetribe/sharetribe/deployments","created_at":"2012-05-25T15:34:17Z","updated_at":"2016-08-26T01:41:17Z","pushed_at":"2016-08-25T21:33:03Z","git_url":"git://github.com/sharetribe/sharetribe.git","ssh_url":"git@github.com:sharetribe/sharetribe.git","clone_url":"https://github.com/sharetribe/sharetribe.git","svn_url":"https://github.com/sharetribe/sharetribe","homepage":"https://www.sharetribe.com","size":116374,"stargazers_count":733,"watchers_count":733,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":493,"mirror_url":null,"open_issues_count":27,"forks":493,"open_issues":27,"watchers":733,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2455"},"html":{"href":"https://github.com/sharetribe/sharetribe/pull/2455"},"issue":{"href":"https://api.github.com/repos/sharetribe/sharetribe/issues/2455"},"comments":{"href":"https://api.github.com/repos/sharetribe/sharetribe/issues/2455/comments"},"review_comments":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2455/comments"},"review_comment":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2455/commits"},"statuses":{"href":"https://api.github.com/repos/sharetribe/sharetribe/statuses/df5bc7f53a13dd4e34f29967ff5531e1133a199a"}}}}
{"actor":{"display_login":"mporkola"}}