Add locales
This commit is contained in:
parent
cd18b7e4d7
commit
89abe88650
|
@ -26,10 +26,10 @@
|
|||
</div>
|
||||
<div v-else class="buttons">
|
||||
<b-button @click="logInVia('twitter')" type="is-primary" outlined expanded>
|
||||
Sign in with Twitter
|
||||
{{ $t('pages.form.twitterSignIn') }}
|
||||
</b-button>
|
||||
<b-button @click="logInVia('github')" type="is-primary" outlined expanded>
|
||||
Sign in with Github
|
||||
{{ $t('pages.form.githubSignIn') }}
|
||||
</b-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -11,11 +11,11 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
message: 'Loading'
|
||||
message: this.$t('common.loading')
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$root.$on('enableLoading', (msg = 'Loading') => {
|
||||
this.$root.$on('enableLoading', (msg = this.$t('common.loading')) => {
|
||||
this.loading = true
|
||||
this.message = msg
|
||||
})
|
||||
|
|
|
@ -6,11 +6,77 @@
|
|||
},
|
||||
"pages": {
|
||||
"header": {
|
||||
"instructions": "Gidelins"
|
||||
"instructions": "Instructions"
|
||||
},
|
||||
"ceremony": {
|
||||
"titleSherpa": "Sherpa Cash",
|
||||
"titleCeremony": "Trusted Setup Ceremony"
|
||||
"form": {
|
||||
"twitterSignIn": "Sign in with Twitter",
|
||||
"githubSignIn": "Sign in with Github"
|
||||
},
|
||||
"index": {
|
||||
"sherpaCash": "Sherpa.cash",
|
||||
"trustedSetupCeremonyTitle": "Trusted Setup Ceremony",
|
||||
"zkSnarks": "zk-SNARKs require a pre-existing setup between Prover and Verifier. A set of public parameters\n defines the “rules of the game” for the construction of zk-SNARKs. Please contribute with your\n source of entropy, so that Sherpa.cash can become fully trustless.",
|
||||
"contribute": "Contribute",
|
||||
"currently": "Currently there are",
|
||||
"contributions": "contributions",
|
||||
"account": "Account",
|
||||
"name": "Name",
|
||||
"project": "Project",
|
||||
"attestation": "Attestation",
|
||||
"nothingHere": "Nothing here.",
|
||||
"search": "Search..."
|
||||
},
|
||||
"authorize": {
|
||||
"saveInformation": "Save information",
|
||||
"postAttestationTwitter": "Now you can post your attestation to Twitter",
|
||||
"postAttestation": "Post attestation",
|
||||
"contributeIdentity": "Would you like to provide identity for your contribution #",
|
||||
"specifyName": "Please specify your name and project.",
|
||||
"contributionUpdated": "Your contribution has been updated",
|
||||
"somethingWrong": "Something went wrong. Please contact support"
|
||||
},
|
||||
"contribution": {
|
||||
"hello": "Hello, ",
|
||||
"contributeHow": "How would you like to contribute to the Sherpa.cash Trusted Setup Ceremony?",
|
||||
"anonymously": "Anonymously",
|
||||
"socialAccount": "By using social account",
|
||||
"contributionHash": "Your contribution hash (Blake2b)",
|
||||
"postAttestationTwitter": "And now you can post your attestation to Twitter.",
|
||||
"postAttestation": "Post attestation",
|
||||
"provideIdentity": "You can still provide identity for your contribution by following",
|
||||
"thisLink": "this link",
|
||||
"trustBinaries": "If you don’t trust binaries, we encourage you to follow these",
|
||||
"instructions": "instructions",
|
||||
"easyCompile": "to contribute by compiling from the source code. It is fairly easy!",
|
||||
"contribution": "Contribution",
|
||||
"provideRandom": "Please provide your random input that will be used as a source of entropy for your contribution along with browser's RNG.",
|
||||
"contribute": "Contribute",
|
||||
"downloadingLast": "Downloading last contribution",
|
||||
"generatingRandom": "Generating random contribution. Your browser may appear unresponsive. It can take a minute or so to complete",
|
||||
"uploadingContribution": "Uploading and verifying your contribution",
|
||||
"contributionVerified": "Your contribution has been verified and recorded.",
|
||||
"failedUpload": "Failed to upload your contribution after ",
|
||||
"attempts": " attempts",
|
||||
"uploadError": "Error uploading your contribution",
|
||||
"copied": "Copied!"
|
||||
},
|
||||
"instructions": {
|
||||
"instructions" : "Instructions",
|
||||
"pureRust": "Using pure Rust implementation:",
|
||||
"installRust": "# Install Rust",
|
||||
"cloneRepo": "# Clone the repository with the ceremony code",
|
||||
"runCeremony": "# Run the ceremony",
|
||||
"afterContribution": "After the contribution, we recommend you to reboot your machine to clear your RAM.",
|
||||
"usingDocker": "Using Docker container:",
|
||||
"downloadRustContainer": "Using this method, you will download and compile the ceremony source code from our git repo in a stock Rust container. This is not a prebuilt container distribution.",
|
||||
"installDocker": "Start by installing Docker on your system:",
|
||||
"windows": "Windows",
|
||||
"mac": "Mac",
|
||||
"linux": "Linux",
|
||||
"downloadDockerfile": "# Download Dockerfile",
|
||||
"buildDockerImage": "# Build docker image",
|
||||
"runCeremony": "# Run the ceremony"
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
"common": {
|
||||
"loading": "Loading",
|
||||
"error": "error",
|
||||
"close": "close"
|
||||
},
|
||||
"pages": {
|
||||
"header": {
|
||||
"instructions": "Instructions"
|
||||
},
|
||||
"form": {
|
||||
"twitterSignIn": "Sign in with Twitter",
|
||||
"githubSignIn": "Sign in with Github"
|
||||
},
|
||||
"index": {
|
||||
"sherpaCash": "Sherpa.cash",
|
||||
"trustedSetupCeremonyTitle": "Trusted Setup Ceremony",
|
||||
"zkSnarks": "zk-SNARKs require a pre-existing setup between Prover and Verifier. A set of public parameters\n defines the “rules of the game” for the construction of zk-SNARKs. Please contribute with your\n source of entropy, so that Sherpa.cash can become fully trustless.",
|
||||
"contribute": "Contribute",
|
||||
"currently": "Currently there are",
|
||||
"contributions": "contributions",
|
||||
"account": "Account",
|
||||
"name": "Name",
|
||||
"project": "Project",
|
||||
"attestation": "Attestation",
|
||||
"nothingHere": "Nothing here.",
|
||||
"search": "Search..."
|
||||
},
|
||||
"authorize": {
|
||||
"saveInformation": "Save information",
|
||||
"postAttestationTwitter": "Now you can post your attestation to Twitter",
|
||||
"postAttestation": "Post attestation",
|
||||
"contributeIdentity": "Would you like to provide identity for your contribution #",
|
||||
"specifyName": "Please specify your name and project.",
|
||||
"contributionUpdated": "Your contribution has been updated",
|
||||
"somethingWrong": "Something went wrong. Please contact support"
|
||||
},
|
||||
"contribution": {
|
||||
"hello": "Hello, ",
|
||||
"contributeHow": "How would you like to contribute to the Sherpa.cash Trusted Setup Ceremony?",
|
||||
"anonymously": "Anonymously",
|
||||
"socialAccount": "By using social account",
|
||||
"contributionHash": "Your contribution hash (Blake2b)",
|
||||
"postAttestationTwitter": "And now you can post your attestation to Twitter.",
|
||||
"postAttestation": "Post attestation",
|
||||
"provideIdentity": "You can still provide identity for your contribution by following",
|
||||
"thisLink": "this link",
|
||||
"trustBinaries": "If you don’t trust binaries, we encourage you to follow these",
|
||||
"instructions": "instructions",
|
||||
"easyCompile": "to contribute by compiling from the source code. It is fairly easy!",
|
||||
"contribution": "Contribution",
|
||||
"provideRandom": "Please provide your random input that will be used as a source of entropy for your contribution along with browser's RNG.",
|
||||
"contribute": "Contribute",
|
||||
"downloadingLast": "Downloading last contribution",
|
||||
"generatingRandom": "Generating random contribution. Your browser may appear unresponsive. It can take a minute or so to complete",
|
||||
"uploadingContribution": "Uploading and verifying your contribution",
|
||||
"contributionVerified": "Your contribution has been verified and recorded.",
|
||||
"failedUpload": "Failed to upload your contribution after ",
|
||||
"attempts": " attempts",
|
||||
"uploadError": "Error uploading your contribution",
|
||||
"copied": "Copied!"
|
||||
},
|
||||
"instructions": {
|
||||
"instructions" : "Instructions",
|
||||
"pureRust": "Using pure Rust implementation:",
|
||||
"installRust": "# Install Rust",
|
||||
"cloneRepo": "# Clone the repository with the ceremony code",
|
||||
"runCeremony": "# Run the ceremony",
|
||||
"afterContribution": "After the contribution, we recommend you to reboot your machine to clear your RAM.",
|
||||
"usingDocker": "Using Docker container:",
|
||||
"downloadRustContainer": "Using this method, you will download and compile the ceremony source code from our git repo in a stock Rust container. This is not a prebuilt container distribution.",
|
||||
"installDocker": "Start by installing Docker on your system:",
|
||||
"windows": "Windows",
|
||||
"mac": "Mac",
|
||||
"linux": "Linux",
|
||||
"downloadDockerfile": "# Download Dockerfile",
|
||||
"buildDockerImage": "# Build docker image",
|
||||
"runCeremony": "# Run the ceremony"
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,16 +1,82 @@
|
|||
{
|
||||
"common": {
|
||||
"loading": "Loading",
|
||||
"error": "error",
|
||||
"close": "close"
|
||||
"loading": "로드하는 중",
|
||||
"error": "오류",
|
||||
"close": "닫기"
|
||||
},
|
||||
"pages": {
|
||||
"header": {
|
||||
"instructions": "안내사항"
|
||||
"instructions": "사용 설명서"
|
||||
},
|
||||
"ceremony": {
|
||||
"titleSherpa": "Sherpa Cash",
|
||||
"titleCeremony": "Trusted Setup Ceremony"
|
||||
"form": {
|
||||
"twitterSignIn": "트위터로 로그인",
|
||||
"githubSignIn": "깃허브으로 로그인"
|
||||
},
|
||||
"index": {
|
||||
"sherpaCash": "셰르파 캐시",
|
||||
"trustedSetupCeremonyTitle": "신뢰할 수있는 설정 행사",
|
||||
"zkSnarks": "zk-SNARKs를 사용하는 시스템에는 신뢰할 수있는 설정이 필요합니다. 신뢰할 수있는 설정 행사 참가자 수가 많을수록 시스템이 더 안전합니다. 셰르파 캐시 더욱 안전하게 만들려면 기여하십시오.",
|
||||
"contribute": "기여합니다",
|
||||
"currently": "지금은 ",
|
||||
"contributions": "개의 기여물이 있습니다",
|
||||
"account": "계좌",
|
||||
"name": "성함",
|
||||
"project": "회사",
|
||||
"attestation": "증거",
|
||||
"nothingHere": "여기는 아무것도 없습니다. ",
|
||||
"search": "검색..."
|
||||
},
|
||||
"authorize": {
|
||||
"saveInformation": "정보 저장",
|
||||
"postAttestationTwitter": "지금 증거를 트위터에서 공유할 수 있습니다.",
|
||||
"postAttestation": "증거를 고유",
|
||||
"contributeIdentity": "신분을 공개하시겠어요? 기여 #",
|
||||
"specifyName": "성함과 회사를 입력해 주십시오.",
|
||||
"contributionUpdated": "기여가 업데이트되었습니다",
|
||||
"somethingWrong": "오류가 발생했습니다. 우리 지원 팀에 문의하십시오."
|
||||
},
|
||||
"contribution": {
|
||||
"hello": "안녕하세요, ",
|
||||
"contributeHow": "셰르파 개시 신뢰할 수 있는 설정 행사에 어떻게 기여하시겠어요?",
|
||||
"anonymously": "익명으로",
|
||||
"socialAccount": "SNS로",
|
||||
"contributionHash": "기여물의 해시값 (Blake2b)",
|
||||
"postAttestationTwitter": "금 증거를 트위터에서 공유할 수 있습니다.",
|
||||
"postAttestation": "증거를 고유",
|
||||
"provideIdentity": "나중에 신분을 공개하시려면 ",
|
||||
"thisLink": "이 링크를 클릭하십시오",
|
||||
"trustBinaries": "이진 파일을 신뢰하지 않을 경우",
|
||||
"instructions": "사용 설명서를 참조하며 ",
|
||||
"easyCompile": "쉽게 소스컴파일할 수도 있습니다",
|
||||
"contribution": "기여",
|
||||
"provideRandom": "임의의 문자열을 입력하십시오.",
|
||||
"contribute": "기여하기",
|
||||
"downloadingLast": "마지막 기여물 다운받기",
|
||||
"generatingRandom": "랜돔 기여물을 생성하기. 브라우저가 잠시 동안 응답하지 않을 수 있습니다. 약 1분 기다려 주십시오",
|
||||
"uploadingContribution": "기여물을 확인하고 업로드 중입니다.",
|
||||
"contributionVerified": "기여물이 확인되고 등록되었습니다.",
|
||||
"failedUpload": "기여물을 업롣하지 못 했습니다.",
|
||||
"attempts": " 번 시도했습니다.",
|
||||
"uploadError": "기여물을 업로드하는 중 오류가 발생했습니다.",
|
||||
"copied": "복사되었습니다!"
|
||||
},
|
||||
"instructions": {
|
||||
"instructions" : "사용 설명서",
|
||||
"pureRust": "순수한 러스트 구현:",
|
||||
"installRust": "# 러스트 설치",
|
||||
"cloneRepo": "# 신뢰할 수있는 설정 행사 리포지토리를 clone하기",
|
||||
"runCeremony": "# 신뢰할 수있는 설정 행사를 실행하기",
|
||||
"afterContribution": "기여하신 다음에, RAM을 지우기 위해 시스템을 다시 시작하십시오.",
|
||||
"usingDocker": "도커 컨테이너:",
|
||||
"downloadRustContainer": "본 방벙이 도커 컨테이너 안에서 우리 깃허브 리포지토리에서 신뢰할 수있는 설정 행사 소스를 다운받고 컴파일합니다. 사전 빌드된 컨테이너가 아닙니다.",
|
||||
"installDocker": "먼저 도커를 설치하십시오:",
|
||||
"windows": "윈도우",
|
||||
"mac": "맥OS",
|
||||
"linux": "리눅스",
|
||||
"downloadDockerfile": "# 도커파일을 다운받기",
|
||||
"buildDockerImage": "# 도거 이미지 빌드하기",
|
||||
"runCeremony": "# 신뢰할 수있는 설정 행사를 실행하기"
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,16 +17,16 @@
|
|||
type="is-primary"
|
||||
outlined
|
||||
>
|
||||
Save information
|
||||
{{ $t('pages.index.saveInformation') }}
|
||||
</b-button>
|
||||
</div>
|
||||
<div v-show="status.type !== ''" class="status">
|
||||
<div :class="status.type" class="status-message">{{ status.msg }}</div>
|
||||
<div v-show="status.type === 'is-success'" class="status-message is-success">
|
||||
Now you can post your attestation to Twitter.
|
||||
{{ $t('pages.index.postAttestationTwitter') }}
|
||||
<div class="buttons is-centered">
|
||||
<b-button @click="makeTweet" type="is-primary" tag="a" target="_blank" outlined>
|
||||
Post attestation
|
||||
{{ $t('pages.index.postAttestation') }}
|
||||
</b-button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -60,9 +60,9 @@ export default {
|
|||
return null
|
||||
}
|
||||
if (!this.isLoggedIn) {
|
||||
return `Would you like to provide identity for your contribution #${this.contributionIndex}?`
|
||||
return this.$t('pages.authorize.contributeIdentity') + `#${this.contributionIndex}?`
|
||||
} else {
|
||||
return `Please, specify your name and project.`
|
||||
return this.$t('pages.authorize.specifyName')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -97,7 +97,7 @@ export default {
|
|||
body: JSON.stringify(body)
|
||||
})
|
||||
if (response.ok) {
|
||||
this.status.msg = `Your contribution has been updated.`
|
||||
this.status.msg = this.$t('pages.authorize.contributionUpdated')
|
||||
this.status.type = 'is-success'
|
||||
this.hideSaveBtn = true
|
||||
} else {
|
||||
|
@ -106,7 +106,7 @@ export default {
|
|||
this.status.type = 'is-danger'
|
||||
}
|
||||
} catch (e) {
|
||||
this.status.msg = 'Something went wrong. Please contact support'
|
||||
this.status.msg = this.$t('pages.authorize.somethingWrong')
|
||||
this.status.type = 'is-danger'
|
||||
}
|
||||
},
|
||||
|
@ -133,7 +133,7 @@ export default {
|
|||
this.hideSaveBtn = true
|
||||
}
|
||||
} catch (e) {
|
||||
this.status.msg = 'Something went wrong. Please contact support'
|
||||
this.status.msg = this.$t('pages.authorize.somethingWrong')
|
||||
this.status.type = 'is-danger'
|
||||
}
|
||||
}
|
||||
|
|
234
pages/index.vue
234
pages/index.vue
|
@ -1,138 +1,139 @@
|
|||
<template>
|
||||
<div class="ceremony">
|
||||
<h1 class="title is-size-1 is-size-2-mobile is-spaced">
|
||||
Tornado.cash <span>Trusted Setup Ceremony</span>
|
||||
{{ $t('pages.index.sherpaCash') }}
|
||||
<span>{{ $t('pages.index.trustedSetupCeremonyTitle') }}</span>
|
||||
</h1>
|
||||
<p class="p is-size-6">
|
||||
zk-SNARKs require a pre-existing setup between Prover and Verifier. A set of public parameters
|
||||
defines the “rules of the game” for the construction of zk-SNARKs. Please contribute with your
|
||||
source of entropy, so that Tornado.cash can become fully trustless.
|
||||
{{ $t('pages.index.zkSnarks') }}
|
||||
</p>
|
||||
<div class="buttons is-centered">
|
||||
<b-button type="is-primary" outlined tag="router-link" to="/make-contribution">
|
||||
Contribute
|
||||
{{ $t('pages.index.contribute') }}
|
||||
</b-button>
|
||||
</div>
|
||||
<div class="currently">
|
||||
Currently there are <span>{{ contributions.length }}</span> contributions
|
||||
</div>
|
||||
<div class="summary">
|
||||
<div class="currently">
|
||||
{{ $t('pages.index.currently') }} <span>{{ contributions.length }}</span>
|
||||
{{ $t('pages.index.contributions') }}
|
||||
</div>
|
||||
|
||||
<b-table
|
||||
:data="filteredContributions"
|
||||
:hoverable="true"
|
||||
:mobile-cards="false"
|
||||
:per-page="rowsPerPage"
|
||||
paginated
|
||||
pagination-position="both"
|
||||
>
|
||||
<template slot-scope="props">
|
||||
<b-table-column field="id" label="#" width="40" numeric>
|
||||
{{ props.row.id }}
|
||||
</b-table-column>
|
||||
<b-table
|
||||
:data="filteredContributions"
|
||||
:hoverable="true"
|
||||
:mobile-cards="false"
|
||||
:per-page="rowsPerPage"
|
||||
paginated
|
||||
pagination-position="both"
|
||||
>
|
||||
<template slot-scope="props">
|
||||
<b-table-column field="id" label="#" width="40" numeric>
|
||||
{{ props.row.id }}
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column label="Account">
|
||||
<a
|
||||
v-if="props.row.handle"
|
||||
:href="`https://${props.row.socialType}.com/${props.row.handle}`"
|
||||
class="social-link"
|
||||
target="_blank"
|
||||
>
|
||||
<span :class="`icon-${props.row.socialType}`" class="icon"></span>
|
||||
@{{ props.row.handle }}
|
||||
</a>
|
||||
<div v-else class="social-link">
|
||||
<span :class="`icon-${props.row.socialType}`" class="icon"></span>
|
||||
Anonymous
|
||||
</div>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="name" label="Name">
|
||||
{{ props.row.name }}
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="company" label="Project">
|
||||
{{ props.row.company }}
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column :centered="true" label="Attestation">
|
||||
<a
|
||||
v-if="props.row.attestation"
|
||||
:href="`https://twitter.com/${props.row.handle}/status/${props.row.attestation}`"
|
||||
target="_blank"
|
||||
class="button is-icon"
|
||||
>
|
||||
<span class="icon icon-link"></span>
|
||||
</a>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column>
|
||||
<a :href="`${downloadUrl}/response_${props.row.id}`" class="button is-icon" download>
|
||||
<span class="icon icon-save"></span>
|
||||
</a>
|
||||
</b-table-column>
|
||||
</template>
|
||||
|
||||
<template slot="empty">
|
||||
<section class="section">
|
||||
<div class="content has-text-centered">
|
||||
<p>
|
||||
<span class="icon icon-emoticon-sad icon-48px"></span>
|
||||
</p>
|
||||
<p>Nothing here.</p>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<template slot="top-left">
|
||||
<b-field class="table-search">
|
||||
<b-input
|
||||
v-model="contributionSearch"
|
||||
placeholder="Search..."
|
||||
type="search"
|
||||
icon="magnify"
|
||||
></b-input>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<template slot="bottom-left">
|
||||
<b-field horizontal label="Show">
|
||||
<b-dropdown v-model="rowsPerPage" expanded aria-role="list" position="is-top-right">
|
||||
<div slot="trigger" class="control">
|
||||
<div class="input">
|
||||
<span>{{ rowsPerPage }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<b-dropdown-item
|
||||
v-for="(rows, index) in [10, 25, 50, 100, 1000]"
|
||||
:key="index"
|
||||
:value="rows"
|
||||
aria-role="listitem"
|
||||
<b-table-column :label="$t('pages.index.account')">
|
||||
<a
|
||||
v-if="props.row.handle"
|
||||
:href="`https://${props.row.socialType}.com/${props.row.handle}`"
|
||||
class="social-link"
|
||||
target="_blank"
|
||||
>
|
||||
{{ rows }}
|
||||
</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</b-field>
|
||||
</template>
|
||||
</b-table>
|
||||
<span :class="`icon-${props.row.socialType}`" class="icon"></span>
|
||||
@{{ props.row.handle }}
|
||||
</a>
|
||||
<div v-else class="social-link">
|
||||
<span :class="`icon-${props.row.socialType}`" class="icon"></span>
|
||||
Anonymous
|
||||
</div>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column :label="$t('pages.index.name')" field="name">
|
||||
{{ props.row.name }}
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column :label="$t('pages.index.project')" field="company">
|
||||
{{ props.row.company }}
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column :centered="true" :label="$t('pages.index.attestation')">
|
||||
<a
|
||||
v-if="props.row.attestation"
|
||||
:href="`https://twitter.com/${props.row.handle}/status/${props.row.attestation}`"
|
||||
target="_blank"
|
||||
class="button is-icon"
|
||||
>
|
||||
<span class="icon icon-link"></span>
|
||||
</a>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column>
|
||||
<a :href="`${downloadUrl}/response_${props.row.id}`" class="button is-icon" download>
|
||||
<span class="icon icon-save"></span>
|
||||
</a>
|
||||
</b-table-column>
|
||||
</template>
|
||||
|
||||
<template slot="empty">
|
||||
<section class="section">
|
||||
<div class="content has-text-centered">
|
||||
<p>
|
||||
<span class="icon icon-emoticon-sad icon-48px"></span>
|
||||
</p>
|
||||
<p>{{ $t('pages.index.nothingHere') }}</p>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<template slot="top-left">
|
||||
<b-field class="table-search">
|
||||
<b-input
|
||||
v-model="contributionSearch"
|
||||
:placeholder="$t('pages.index.search')"
|
||||
type="search"
|
||||
icon="magnify"
|
||||
></b-input>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<template slot="bottom-left">
|
||||
<b-field horizontal label="Show">
|
||||
<b-dropdown v-model="rowsPerPage" expanded aria-role="list" position="is-top-right">
|
||||
<div slot="trigger" class="control">
|
||||
<div class="input">
|
||||
<span>{{ rowsPerPage }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<b-dropdown-item
|
||||
v-for="(rows, index) in [10, 25, 50, 100, 1000]"
|
||||
:key="index"
|
||||
:value="rows"
|
||||
aria-role="listitem"
|
||||
>
|
||||
{{ rows }}
|
||||
</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</b-field>
|
||||
</template>
|
||||
</b-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
const contributor = {
|
||||
id: 1,
|
||||
socialType: 'twitter',
|
||||
account: '@VitalikButerin',
|
||||
name: 'Vitalik Buterin',
|
||||
company: 'Ethereum',
|
||||
attestation: 'https://twitter.com/VitalikButerin/status/1220158987456237568',
|
||||
contribution: '#'
|
||||
}
|
||||
return {
|
||||
contributions: [],
|
||||
// contributions: [
|
||||
// {
|
||||
// id: 1,
|
||||
// socialType: 'twitter',
|
||||
// account: '@VitalikButerin',
|
||||
// name: 'Vitalik Buterin',
|
||||
// company: 'Ethereum',
|
||||
// attestation: 'https://twitter.com/VitalikButerin/status/1220158987456237568',
|
||||
// contribution: '#'
|
||||
// }
|
||||
// ],
|
||||
// contributions: [],
|
||||
contributions: [...Array(20).keys()].map((i) => contributor),
|
||||
rowsPerPage: 100,
|
||||
contributionSearch: '',
|
||||
downloadUrl: process.env.downloadUrl
|
||||
|
@ -152,7 +153,8 @@ export default {
|
|||
try {
|
||||
const response = await fetch('/api/contributions')
|
||||
const data = await response.json()
|
||||
this.contributions = data
|
||||
this.temp = data
|
||||
// this.contributions = data
|
||||
} catch (e) {
|
||||
console.error('e', e)
|
||||
}
|
||||
|
|
|
@ -1,63 +1,66 @@
|
|||
<template>
|
||||
<div class="ceremony">
|
||||
<h1 class="title is-size-1 is-size-2-mobile is-spaced">
|
||||
Instructions
|
||||
{{ $t('pages.instructions.instructions') }}
|
||||
</h1>
|
||||
<h2 class="subtitle">
|
||||
Using pure Rust implementation:
|
||||
{{ $t('pages.instructions.pureRust') }}
|
||||
</h2>
|
||||
<figure class="highlight">
|
||||
<pre v-highlightjs><code class="bash"># Install Rust
|
||||
<pre v-highlightjs><code class="bash">{{ $t('pages.instructions.installRust') }}
|
||||
curl -sSf https://sh.rustup.rs | sh
|
||||
|
||||
# Clone the repository with the ceremony code
|
||||
{{ $t('pages.instructions.cloneRepo') }}
|
||||
git clone https://github.com/tornadocash/phase2-bn254
|
||||
cd phase2-bn254/phase2
|
||||
|
||||
# Run the ceremony
|
||||
{{ $t('pages.instructions.runCeremony') }}
|
||||
cargo run --release --bin tornado
|
||||
</code></pre>
|
||||
</figure>
|
||||
<div class="content afterwords p">
|
||||
<p>
|
||||
After the contribution, we recommend you to reboot your machine to clear your RAM.
|
||||
{{ $t('pages.instructions.afterContribution') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h2 class="subtitle">
|
||||
Using Docker container:
|
||||
{{ $t('pages.instructions.usingDocker') }}
|
||||
</h2>
|
||||
|
||||
<div class="content p">
|
||||
<p>
|
||||
Using this method, you will download and compile the ceremony source code from our git repo
|
||||
in a stock Rust container. This is not a prebuilt container distribution.
|
||||
{{ $t('pages.instructions.downloadRustContainer') }}
|
||||
</p>
|
||||
<p>
|
||||
Start by installing Docker on your system:
|
||||
{{ $t('pages.instructions.installDocker') }}
|
||||
<a
|
||||
href="https://download.docker.com/win/stable/Docker%20Desktop%20Installer.exe"
|
||||
target="_blank"
|
||||
>Windows</a
|
||||
>{{ $t('pages.instructions.windows') }}</a
|
||||
>
|
||||
<a href="https://download.docker.com/mac/stable/Docker.dmg" target="_blank">Mac</a>
|
||||
<a href="https://docs.docker.com/install/#supported-platforms" target="_blank">Linux</a>
|
||||
<a href="https://download.docker.com/mac/stable/Docker.dmg" target="_blank">{{
|
||||
$t('pages.instructions.mac')
|
||||
}}</a>
|
||||
<a href="https://docs.docker.com/install/#supported-platforms" target="_blank">{{
|
||||
$t('pages.instructions.linux')
|
||||
}}</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<figure class="highlight">
|
||||
<pre v-highlightjs><code class="bash"># Download Dockerfile
|
||||
<pre v-highlightjs><code class="bash">{{ $t('pages.instructions.downloadDockerfile') }}
|
||||
wget https://raw.githubusercontent.com/tornadocash/phase2-bn254/master/Dockerfile
|
||||
|
||||
# Build docker image
|
||||
{{ $t('pages.instructions.buildDockerImage') }}
|
||||
docker build . -t ceremony
|
||||
|
||||
# Run the ceremony
|
||||
{{ $t('pages.instructions.runCeremony') }}
|
||||
docker run -ti ceremony</code></pre>
|
||||
</figure>
|
||||
<div class="content afterwords p">
|
||||
<p>
|
||||
After the contribution, we recommend you to reboot your machine to clear your RAM.
|
||||
{{ $t('pages.instructions.afterContribution') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div class="ceremony">
|
||||
<h1 class="title is-size-1 is-size-2-mobile is-spaced">
|
||||
Hello, <span>@{{ userHandle }}</span>
|
||||
{{ $t('pages.contribution.hello') }} <span>@{{ userHandle }}</span>
|
||||
</h1>
|
||||
<h2 class="subtitle">
|
||||
How would you like to contribute to the Tornado.cash Trusted Setup Ceremony?
|
||||
{{ $t('pages.contribution.contributeHow') }}
|
||||
</h2>
|
||||
<fieldset :disabled="status.type === 'is-success'">
|
||||
<div class="columns is-centered">
|
||||
|
@ -14,13 +14,13 @@
|
|||
@click="onAnonymousHandler"
|
||||
class="box box-anonymous"
|
||||
>
|
||||
<div class="title is-5">Anonymously</div>
|
||||
<div class="title is-5">{{ $t('pages.contribution.anonymously') }}</div>
|
||||
<Cloak />
|
||||
</button>
|
||||
</div>
|
||||
<div class="column is-one-third">
|
||||
<div :class="{ 'is-hovered': isLoggedIn }" class="box">
|
||||
<div class="title is-5">By using social account</div>
|
||||
<div class="title is-5">{{ $t('pages.contribution.socialAccount') }}</div>
|
||||
<Form />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -28,7 +28,7 @@
|
|||
</fieldset>
|
||||
|
||||
<div v-show="contributionHash" class="status">
|
||||
<div class="label">Your contribution hash (Blake2b)</div>
|
||||
<div class="label">{{ $t('pages.contribution.contributionHash') }}</div>
|
||||
<b-field position="is-centered" class="has-addons contribution-hash">
|
||||
<b-input
|
||||
@click.native="copyContributionHash"
|
||||
|
@ -44,17 +44,18 @@
|
|||
v-show="status.type === 'is-success' && contributionType !== 'anonymous'"
|
||||
class="status-message is-success"
|
||||
>
|
||||
And now you can post your attestation to Twitter.
|
||||
{{ $t('pages.contribution.postAttestationTwitter') }}
|
||||
<div class="buttons is-centered">
|
||||
<b-button @click="makeTweet" type="is-primary" tag="a" target="_blank" outlined>
|
||||
Post attestation
|
||||
{{ $t('pages.contribution.postAttestation') }}
|
||||
</b-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="authorizeLink" class="status">
|
||||
You can still provide identity for your contribution by following
|
||||
<a :href="authorizeLink" class="has-text-primary">this link</a>.
|
||||
{{ $t('pages.contribution.provideIdentity') }}
|
||||
<a :href="authorizeLink" class="has-text-primary">{{ $t('pages.contribution.thisLink') }}</a
|
||||
>.
|
||||
</div>
|
||||
|
||||
<div class="buttons is-centered">
|
||||
|
@ -69,9 +70,9 @@
|
|||
</b-button>
|
||||
</div>
|
||||
<p class="p">
|
||||
If you don’t trust binaries, we encorage you to follow these
|
||||
<router-link to="/instructions">instructions</router-link> to contribute by compiling from the
|
||||
source code. It is fairly easy!
|
||||
{{ $t('pages.contribution.trustBinaries') }}
|
||||
<router-link to="/instructions">{{ $t('pages.contribution.instructions') }}</router-link>
|
||||
{{ $t('pages.contribution.easyCompile') }}
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -158,12 +159,12 @@ export default {
|
|||
...mapActions('user', ['makeTweet', 'logOut', 'getUserData']),
|
||||
getUserRandom() {
|
||||
this.$buefy.dialog.prompt({
|
||||
title: 'Contribution',
|
||||
message: `Please provide your random input that will be used as a source of entropy for your contribution along with browser's RNG.`,
|
||||
title: this.$t('pages.contribution.contribution'),
|
||||
message: this.$t('pages.contribution.provideRandom'),
|
||||
inputAttrs: {
|
||||
maxlength: 300
|
||||
},
|
||||
confirmText: 'Contribute',
|
||||
confirmText: this.$t('pages.contribution.contribute'),
|
||||
trapFocus: true,
|
||||
onConfirm: (userInput) => {
|
||||
this.makeContribution({ userInput })
|
||||
|
@ -176,14 +177,11 @@ export default {
|
|||
this.isContributeBtnSnown = true
|
||||
this.status.msg = ''
|
||||
this.status.type = ''
|
||||
this.$root.$emit('enableLoading', 'Downloading last contribution')
|
||||
this.$root.$emit('enableLoading', this.$t('pages.contribution.downloadingLast'))
|
||||
let data = await fetch('api/challenge')
|
||||
data = new Uint8Array(await data.arrayBuffer())
|
||||
|
||||
this.$root.$emit(
|
||||
'enableLoading',
|
||||
'Generating random contribution. Your browser may appear unresponsive. It can take a minute or so to complete'
|
||||
)
|
||||
this.$root.$emit('enableLoading', this.$t('pages.contribution.generatingRandom'))
|
||||
await timeout(100) // allow UI to update before freezing in wasm
|
||||
console.log('Source params', data)
|
||||
|
||||
|
@ -211,7 +209,7 @@ export default {
|
|||
console.log('hash', hash)
|
||||
console.log('contribution', contribution)
|
||||
|
||||
this.$root.$emit('enableLoading', 'Uploading and verifying your contribution')
|
||||
this.$root.$emit('enableLoading', this.$t('pages.contribution.uploadingContribution'))
|
||||
const formData = new FormData()
|
||||
formData.append('response', new Blob([contribution], { type: 'application/octet-stream' }))
|
||||
if (this.contributionType !== 'anonymous') {
|
||||
|
@ -225,7 +223,7 @@ export default {
|
|||
if (resp.ok) {
|
||||
const responseData = await resp.json()
|
||||
this.$store.commit('user/SET_CONTRIBUTION_INDEX', responseData.contributionIndex)
|
||||
this.status.msg = 'Your contribution has been verified and recorded.'
|
||||
this.status.msg = this.$t('pages.contribution.contributionVerified')
|
||||
this.status.type = 'is-success'
|
||||
this.contributionHash = hash
|
||||
if (this.contributionType === 'anonymous') {
|
||||
|
@ -236,12 +234,15 @@ export default {
|
|||
console.log(`Looks like someone else uploaded contribution ahead of us, retrying`)
|
||||
await this.makeContribution({ userInput, retry: retry++ })
|
||||
} else {
|
||||
this.status.msg = `Failed to upload your contribution after ${retry} attempts`
|
||||
this.status.msg =
|
||||
this.$t('pages.contribution.failedUpload') +
|
||||
retry +
|
||||
this.$t('pages.contribution.attempts')
|
||||
this.status.type = 'is-danger'
|
||||
this.isContributeBtnSnown = false
|
||||
}
|
||||
} else {
|
||||
this.status.msg = 'Error uploading your contribution'
|
||||
this.status.msg = this.$t('pages.contribution.uploadError')
|
||||
this.status.type = 'is-danger'
|
||||
this.isContributeBtnSnown = false
|
||||
}
|
||||
|
@ -261,7 +262,7 @@ export default {
|
|||
copyContributionHash() {
|
||||
navigator.clipboard.writeText(this.contributionHash).then(() => {
|
||||
this.$buefy.toast.open({
|
||||
message: 'Copied!',
|
||||
message: this.$t('pages.contribution.copied'),
|
||||
type: 'is-primary'
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue