{"action":"created","comment":{"url":"https://api.github.com/repos/likecoin/likecoin-store/pulls/comments/194012047","pull_request_review_id":127104623,"id":194012047,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDAxMjA0Nw==","diff_hunk":"@@ -0,0 +1,233 @@\n+<template>\n+  <div class=\"settings-page\">\n+    <section class=\"lc-container-0\">\n+      \n+      <div class=\"lc-container-1\">\n+        <div class=\"underlay lc-mobile-hide\" />\n+        <div class=\"lc-container-2\">\n+          <div class=\"lc-container-3 lc-padding-bottom-24\">\n+            <h1 class=\"lc-font-size-20 lc-font-weight-400 lc-line-height-1_5\">\n+              {{ $t('Settings.title' ) }}\n+            </h1>\n+          </div>\n+        </div>\n+      </div>\n+\n+      <div class=\"lc-container-1 lc-margin-top-24\">\n+        <div class=\"lc-container-2\">\n+          <div class=\"lc-container-3 lc-padding-vertical-16 lc-bg-gray-1\">\n+            <div class=\"settings-panel\">\n+              <!-- List of Settings -->\n+              <ul>\n+                <li>\n+                  <md-switch\n+                    class=\"md-primary\"\n+                    v-model=\"isEmailEnabled\"\n+                    :disabled=\"disabled\" />\n+                  <div class=\"description\">\n+                    {{ $t('Register.form.enableEmail') }}\n+                  </div>\n+                </li>\n+              </ul>\n+\n+              <div class=\"confirm-button-wrapper\">\n+                <md-button\n+                  class=\"md-likecoin\"\n+                  :disabled=\"!hasChanged || disabled\"\n+                  @click=\"confirmChanges\">\n+                  {{ $t('General.button.confirm') }}\n+                </md-button>\n+              </div>\n+\n+            </div>\n+          </div>\n+        </div>\n+      </div>\n+\n+      <div class=\"lc-container-1\">\n+        <div class=\"lc-container-2 lc-width-2-3\">\n+\n+          <div class=\"lc-container-3 lc-padding-vertical-40\">\n+            <policies-links />\n+          </div>\n+\n+          <div class=\"lc-container-3\">\n+            <i18n tag=\"p\" path=\"Settings.label.contactUs\" class=\"contact-us\">\n+              <a place=\"deleteAccount\" @click=\"deleteAccount\">\n+                {{ $t('Settings.button.deleteAccount') }}</a>\n+              <a place=\"requestReport\" @click=\"requestReport\">\n+                {{ $t('Settings.button.requestReport') }}</a>\n+            </i18n>\n+          </div>\n+\n+        </div>\n+      </div>\n+\n+    </section>\n+  </div>\n+</template>\n+\n+\n+<script>\n+import { mapActions, mapGetters } from 'vuex';\n+\n+import { logTrackerEvent } from '@/util/EventLogger';\n+import User from '@/util/User';\n+\n+import PoliciesLinks from '~/components/PoliciesLinks';\n+\n+export default {\n+  name: 'settings-page',\n+  components: {\n+    PoliciesLinks,\n+  },\n+  data() {\n+    return {\n+      isEmailEnabled: false,\n+      isLoading: false,\n+    };\n+  },\n+  computed: {\n+    ...mapGetters([\n+      'getUserInfo',\n+      'getUserIsReady',\n+      'getUserIsRegistered',\n+      'getUserNeedAuth',\n+      'getUserNeedRegister',\n+    ]),\n+    disabled() {\n+      return this.isLoading || !(this.getUserIsReady && this.getUserIsRegistered);\n+    },\n+    hasChanged() {\n+      const user = this.getUserInfo;\n+      return this.getUserIsReady && this.getUserIsRegistered && (\n+        this.isEmailEnabled !== user.isEmailEnabled\n+      );\n+    },\n+  },\n+  methods: {\n+    ...mapActions([\n+      'loginUser',\n+      'newUser',\n+      'refreshUserInfo',\n+      'setInfoMsg',\n+    ]),\n+    async triggerLoginSign() {\n+      if (!(await this.loginUser())) this.$router.go(-1);\n+    },\n+    async updateInfo() {\n+      const user = this.getUserInfo;\n+      this.isEmailEnabled = !!user.isEmailEnabled;\n+    },\n+    async confirmChanges() {\n+      this.isLoading = true;\n+      try {\n+        const user = this.getUserInfo;\n+        const userInfo = {\n+          user: user.user,\n+          wallet: user.wallet,\n+          isEmailEnabled: this.isEmailEnabled,\n+        };\n+        const data = await User.formatAndSignUserInfo(userInfo, this.$t('Sign.Message.editUser'));\n+        await this.newUser(data);\n+        this.setInfoMsg(`${this.$t('Register.form.label.updatedInfo')}  <a href=\"/${this.user}\">${this.$t('Register.form.label.viewPage')}</a>`);\n+        this.refreshUserInfo(user.user);\n+      } catch (err) {\n+        console.error(err);\n+      }\n+      this.isLoading = false;\n+    },\n+    deleteAccount() {\n+      logTrackerEvent(this, 'Settings', 'deleteAccount', 'User wants to delete account', 1);\n+    },\n+    requestReport() {\n+      logTrackerEvent(this, 'Settings', 'requestReport', 'User wants to fire a report request', 1);","path":"pages/in/settings.vue","position":null,"original_position":144,"commit_id":"19b1e27ca657b6e7c2bf96708fcf0b3279cf8f45","original_commit_id":"09225f94e31dd7f9b1f92c7a9938be59865294cd","user":{"login":"nwingt","id":17264716,"node_id":"MDQ6VXNlcjE3MjY0NzE2","avatar_url":"https://avatars2.githubusercontent.com/u/17264716?v=4","gravatar_id":"","url":"https://api.github.com/users/nwingt","html_url":"https://github.com/nwingt","followers_url":"https://api.github.com/users/nwingt/followers","following_url":"https://api.github.com/users/nwingt/following{/other_user}","gists_url":"https://api.github.com/users/nwingt/gists{/gist_id}","starred_url":"https://api.github.com/users/nwingt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwingt/subscriptions","organizations_url":"https://api.github.com/users/nwingt/orgs","repos_url":"https://api.github.com/users/nwingt/repos","events_url":"https://api.github.com/users/nwingt/events{/privacy}","received_events_url":"https://api.github.com/users/nwingt/received_events","type":"User","site_admin":false},"body":"Updated @williamchong007 ","created_at":"2018-06-08T10:08:19Z","updated_at":"2018-06-08T10:08:20Z","html_url":"https://github.com/likecoin/likecoin-store/pull/540#discussion_r194012047","pull_request_url":"https://api.github.com/repos/likecoin/likecoin-store/pulls/540","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/likecoin/likecoin-store/pulls/comments/194012047"},"html":{"href":"https://github.com/likecoin/likecoin-store/pull/540#discussion_r194012047"},"pull_request":{"href":"https://api.github.com/repos/likecoin/likecoin-store/pulls/540"}},"in_reply_to_id":193961779},"pull_request":{"url":"https://api.github.com/repos/likecoin/likecoin-store/pulls/540","id":193249056,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMjQ5MDU2","html_url":"https://github.com/likecoin/likecoin-store/pull/540","diff_url":"https://github.com/likecoin/likecoin-store/pull/540.diff","patch_url":"https://github.com/likecoin/likecoin-store/pull/540.patch","issue_url":"https://api.github.com/repos/likecoin/likecoin-store/issues/540","number":540,"state":"open","locked":false,"title":"Add settings and privacy pages","user":{"login":"nwingt","id":17264716,"node_id":"MDQ6VXNlcjE3MjY0NzE2","avatar_url":"https://avatars2.githubusercontent.com/u/17264716?v=4","gravatar_id":"","url":"https://api.github.com/users/nwingt","html_url":"https://github.com/nwingt","followers_url":"https://api.github.com/users/nwingt/followers","following_url":"https://api.github.com/users/nwingt/following{/other_user}","gists_url":"https://api.github.com/users/nwingt/gists{/gist_id}","starred_url":"https://api.github.com/users/nwingt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwingt/subscriptions","organizations_url":"https://api.github.com/users/nwingt/orgs","repos_url":"https://api.github.com/users/nwingt/repos","events_url":"https://api.github.com/users/nwingt/events{/privacy}","received_events_url":"https://api.github.com/users/nwingt/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-07T08:59:38Z","updated_at":"2018-06-08T10:08:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"306ee64f0807933f77fb17bc15ba14a5917a91b5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/likecoin/likecoin-store/pulls/540/commits","review_comments_url":"https://api.github.com/repos/likecoin/likecoin-store/pulls/540/comments","review_comment_url":"https://api.github.com/repos/likecoin/likecoin-store/pulls/comments{/number}","comments_url":"https://api.github.com/repos/likecoin/likecoin-store/issues/540/comments","statuses_url":"https://api.github.com/repos/likecoin/likecoin-store/statuses/19b1e27ca657b6e7c2bf96708fcf0b3279cf8f45","head":{"label":"nwingt:feature/gdpr","ref":"feature/gdpr","sha":"19b1e27ca657b6e7c2bf96708fcf0b3279cf8f45","user":{"login":"nwingt","id":17264716,"node_id":"MDQ6VXNlcjE3MjY0NzE2","avatar_url":"https://avatars2.githubusercontent.com/u/17264716?v=4","gravatar_id":"","url":"https://api.github.com/users/nwingt","html_url":"https://github.com/nwingt","followers_url":"https://api.github.com/users/nwingt/followers","following_url":"https://api.github.com/users/nwingt/following{/other_user}","gists_url":"https://api.github.com/users/nwingt/gists{/gist_id}","starred_url":"https://api.github.com/users/nwingt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwingt/subscriptions","organizations_url":"https://api.github.com/users/nwingt/orgs","repos_url":"https://api.github.com/users/nwingt/repos","events_url":"https://api.github.com/users/nwingt/events{/privacy}","received_events_url":"https://api.github.com/users/nwingt/received_events","type":"User","site_admin":false},"repo":{"id":121599603,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE1OTk2MDM=","name":"likecoin-store","full_name":"nwingt/likecoin-store","owner":{"login":"nwingt","id":17264716,"node_id":"MDQ6VXNlcjE3MjY0NzE2","avatar_url":"https://avatars2.githubusercontent.com/u/17264716?v=4","gravatar_id":"","url":"https://api.github.com/users/nwingt","html_url":"https://github.com/nwingt","followers_url":"https://api.github.com/users/nwingt/followers","following_url":"https://api.github.com/users/nwingt/following{/other_user}","gists_url":"https://api.github.com/users/nwingt/gists{/gist_id}","starred_url":"https://api.github.com/users/nwingt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwingt/subscriptions","organizations_url":"https://api.github.com/users/nwingt/orgs","repos_url":"https://api.github.com/users/nwingt/repos","events_url":"https://api.github.com/users/nwingt/events{/privacy}","received_events_url":"https://api.github.com/users/nwingt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nwingt/likecoin-store","description":null,"fork":true,"url":"https://api.github.com/repos/nwingt/likecoin-store","forks_url":"https://api.github.com/repos/nwingt/likecoin-store/forks","keys_url":"https://api.github.com/repos/nwingt/likecoin-store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nwingt/likecoin-store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nwingt/likecoin-store/teams","hooks_url":"https://api.github.com/repos/nwingt/likecoin-store/hooks","issue_events_url":"https://api.github.com/repos/nwingt/likecoin-store/issues/events{/number}","events_url":"https://api.github.com/repos/nwingt/likecoin-store/events","assignees_url":"https://api.github.com/repos/nwingt/likecoin-store/assignees{/user}","branches_url":"https://api.github.com/repos/nwingt/likecoin-store/branches{/branch}","tags_url":"https://api.github.com/repos/nwingt/likecoin-store/tags","blobs_url":"https://api.github.com/repos/nwingt/likecoin-store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nwingt/likecoin-store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nwingt/likecoin-store/git/refs{/sha}","trees_url":"https://api.github.com/repos/nwingt/likecoin-store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nwingt/likecoin-store/statuses/{sha}","languages_url":"https://api.github.com/repos/nwingt/likecoin-store/languages","stargazers_url":"https://api.github.com/repos/nwingt/likecoin-store/stargazers","contributors_url":"https://api.github.com/repos/nwingt/likecoin-store/contributors","subscribers_url":"https://api.github.com/repos/nwingt/likecoin-store/subscribers","subscription_url":"https://api.github.com/repos/nwingt/likecoin-store/subscription","commits_url":"https://api.github.com/repos/nwingt/likecoin-store/commits{/sha}","git_commits_url":"https://api.github.com/repos/nwingt/likecoin-store/git/commits{/sha}","comments_url":"https://api.github.com/repos/nwingt/likecoin-store/comments{/number}","issue_comment_url":"https://api.github.com/repos/nwingt/likecoin-store/issues/comments{/number}","contents_url":"https://api.github.com/repos/nwingt/likecoin-store/contents/{+path}","compare_url":"https://api.github.com/repos/nwingt/likecoin-store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nwingt/likecoin-store/merges","archive_url":"https://api.github.com/repos/nwingt/likecoin-store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nwingt/likecoin-store/downloads","issues_url":"https://api.github.com/repos/nwingt/likecoin-store/issues{/number}","pulls_url":"https://api.github.com/repos/nwingt/likecoin-store/pulls{/number}","milestones_url":"https://api.github.com/repos/nwingt/likecoin-store/milestones{/number}","notifications_url":"https://api.github.com/repos/nwingt/likecoin-store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nwingt/likecoin-store/labels{/name}","releases_url":"https://api.github.com/repos/nwingt/likecoin-store/releases{/id}","deployments_url":"https://api.github.com/repos/nwingt/likecoin-store/deployments","created_at":"2018-02-15T06:51:19Z","updated_at":"2018-05-28T08:35:19Z","pushed_at":"2018-06-08T10:07:03Z","git_url":"git://github.com/nwingt/likecoin-store.git","ssh_url":"git@github.com:nwingt/likecoin-store.git","clone_url":"https://github.com/nwingt/likecoin-store.git","svn_url":"https://github.com/nwingt/likecoin-store","homepage":"https://likecoin.store/","size":55906,"stargazers_count":0,"watchers_count":0,"language":"Vue","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"likecoin:feature/gdpr","ref":"feature/gdpr","sha":"dc3e5f3174ba7d48956c7e70ac055f964dd0b7bb","user":{"login":"likecoin","id":6298090,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyOTgwOTA=","avatar_url":"https://avatars3.githubusercontent.com/u/6298090?v=4","gravatar_id":"","url":"https://api.github.com/users/likecoin","html_url":"https://github.com/likecoin","followers_url":"https://api.github.com/users/likecoin/followers","following_url":"https://api.github.com/users/likecoin/following{/other_user}","gists_url":"https://api.github.com/users/likecoin/gists{/gist_id}","starred_url":"https://api.github.com/users/likecoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/likecoin/subscriptions","organizations_url":"https://api.github.com/users/likecoin/orgs","repos_url":"https://api.github.com/users/likecoin/repos","events_url":"https://api.github.com/users/likecoin/events{/privacy}","received_events_url":"https://api.github.com/users/likecoin/received_events","type":"Organization","site_admin":false},"repo":{"id":116351420,"node_id":"MDEwOlJlcG9zaXRvcnkxMTYzNTE0MjA=","name":"likecoin-store","full_name":"likecoin/likecoin-store","owner":{"login":"likecoin","id":6298090,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyOTgwOTA=","avatar_url":"https://avatars3.githubusercontent.com/u/6298090?v=4","gravatar_id":"","url":"https://api.github.com/users/likecoin","html_url":"https://github.com/likecoin","followers_url":"https://api.github.com/users/likecoin/followers","following_url":"https://api.github.com/users/likecoin/following{/other_user}","gists_url":"https://api.github.com/users/likecoin/gists{/gist_id}","starred_url":"https://api.github.com/users/likecoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/likecoin/subscriptions","organizations_url":"https://api.github.com/users/likecoin/orgs","repos_url":"https://api.github.com/users/likecoin/repos","events_url":"https://api.github.com/users/likecoin/events{/privacy}","received_events_url":"https://api.github.com/users/likecoin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/likecoin/likecoin-store","description":"official site of LikeCoin foundation","fork":false,"url":"https://api.github.com/repos/likecoin/likecoin-store","forks_url":"https://api.github.com/repos/likecoin/likecoin-store/forks","keys_url":"https://api.github.com/repos/likecoin/likecoin-store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/likecoin/likecoin-store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/likecoin/likecoin-store/teams","hooks_url":"https://api.github.com/repos/likecoin/likecoin-store/hooks","issue_events_url":"https://api.github.com/repos/likecoin/likecoin-store/issues/events{/number}","events_url":"https://api.github.com/repos/likecoin/likecoin-store/events","assignees_url":"https://api.github.com/repos/likecoin/likecoin-store/assignees{/user}","branches_url":"https://api.github.com/repos/likecoin/likecoin-store/branches{/branch}","tags_url":"https://api.github.com/repos/likecoin/likecoin-store/tags","blobs_url":"https://api.github.com/repos/likecoin/likecoin-store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/likecoin/likecoin-store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/likecoin/likecoin-store/git/refs{/sha}","trees_url":"https://api.github.com/repos/likecoin/likecoin-store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/likecoin/likecoin-store/statuses/{sha}","languages_url":"https://api.github.com/repos/likecoin/likecoin-store/languages","stargazers_url":"https://api.github.com/repos/likecoin/likecoin-store/stargazers","contributors_url":"https://api.github.com/repos/likecoin/likecoin-store/contributors","subscribers_url":"https://api.github.com/repos/likecoin/likecoin-store/subscribers","subscription_url":"https://api.github.com/repos/likecoin/likecoin-store/subscription","commits_url":"https://api.github.com/repos/likecoin/likecoin-store/commits{/sha}","git_commits_url":"https://api.github.com/repos/likecoin/likecoin-store/git/commits{/sha}","comments_url":"https://api.github.com/repos/likecoin/likecoin-store/comments{/number}","issue_comment_url":"https://api.github.com/repos/likecoin/likecoin-store/issues/comments{/number}","contents_url":"https://api.github.com/repos/likecoin/likecoin-store/contents/{+path}","compare_url":"https://api.github.com/repos/likecoin/likecoin-store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/likecoin/likecoin-store/merges","archive_url":"https://api.github.com/repos/likecoin/likecoin-store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/likecoin/likecoin-store/downloads","issues_url":"https://api.github.com/repos/likecoin/likecoin-store/issues{/number}","pulls_url":"https://api.github.com/repos/likecoin/likecoin-store/pulls{/number}","milestones_url":"https://api.github.com/repos/likecoin/likecoin-store/milestones{/number}","notifications_url":"https://api.github.com/repos/likecoin/likecoin-store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/likecoin/likecoin-store/labels{/name}","releases_url":"https://api.github.com/repos/likecoin/likecoin-store/releases{/id}","deployments_url":"https://api.github.com/repos/likecoin/likecoin-store/deployments","created_at":"2018-01-05T06:38:41Z","updated_at":"2018-06-08T06:45:51Z","pushed_at":"2018-06-08T10:07:04Z","git_url":"git://github.com/likecoin/likecoin-store.git","ssh_url":"git@github.com:likecoin/likecoin-store.git","clone_url":"https://github.com/likecoin/likecoin-store.git","svn_url":"https://github.com/likecoin/likecoin-store","homepage":"https://like.co/in","size":55942,"stargazers_count":17,"watchers_count":17,"language":"Vue","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":9,"open_issues":15,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/likecoin/likecoin-store/pulls/540"},"html":{"href":"https://github.com/likecoin/likecoin-store/pull/540"},"issue":{"href":"https://api.github.com/repos/likecoin/likecoin-store/issues/540"},"comments":{"href":"https://api.github.com/repos/likecoin/likecoin-store/issues/540/comments"},"review_comments":{"href":"https://api.github.com/repos/likecoin/likecoin-store/pulls/540/comments"},"review_comment":{"href":"https://api.github.com/repos/likecoin/likecoin-store/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/likecoin/likecoin-store/pulls/540/commits"},"statuses":{"href":"https://api.github.com/repos/likecoin/likecoin-store/statuses/19b1e27ca657b6e7c2bf96708fcf0b3279cf8f45"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nwingt"}}