summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-07 12:09:24 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-07 12:09:24 +0900
commit8f39655fef4d66fb4a5d645b97e3a23cc7865272 (patch)
tree56a9f4f442c441839463d25ba1886b07940c3e42 /src
parent10.43.1 (diff)
downloadsharkey-8f39655fef4d66fb4a5d645b97e3a23cc7865272.tar.gz
sharkey-8f39655fef4d66fb4a5d645b97e3a23cc7865272.tar.bz2
sharkey-8f39655fef4d66fb4a5d645b97e3a23cc7865272.zip
Fix bug
Diffstat (limited to 'src')
-rw-r--r--src/client/app/common/views/components/signup.vue6
-rw-r--r--src/server/api/endpoints/meta.ts3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/client/app/common/views/components/signup.vue b/src/client/app/common/views/components/signup.vue
index d743202c27..42d6d23fb4 100644
--- a/src/client/app/common/views/components/signup.vue
+++ b/src/client/app/common/views/components/signup.vue
@@ -35,7 +35,7 @@
<p v-if="passwordRetypeState == 'not-match'" style="color:#FF1161"><fa icon="exclamation-triangle" fixed-width/> %i18n:@password-not-matched%</p>
</div>
</ui-input>
- <div v-if="meta.recaptchaSiteKey != null" class="g-recaptcha" :data-sitekey="meta.recaptchaSiteKey" style="margin: 16px 0;"></div>
+ <div v-if="meta.enableRecaptcha" class="g-recaptcha" :data-sitekey="meta.recaptchaSiteKey" style="margin: 16px 0;"></div>
<ui-button type="submit">%i18n:@create%</ui-button>
</template>
</form>
@@ -130,7 +130,7 @@ export default Vue.extend({
username: this.username,
password: this.password,
invitationCode: this.invitationCode,
- 'g-recaptcha-response': this.meta.recaptchaSiteKey != null ? (window as any).grecaptcha.getResponse() : null
+ 'g-recaptcha-response': this.meta.enableRecaptcha ? (window as any).grecaptcha.getResponse() : null
}, true).then(() => {
(this as any).api('signin', {
username: this.username,
@@ -141,7 +141,7 @@ export default Vue.extend({
}).catch(() => {
alert('%i18n:@some-error%');
- if (this.meta.recaptchaSiteKey != null) {
+ if (this.meta.enableRecaptcha) {
(window as any).grecaptcha.reset();
}
});
diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts
index ae07b944c2..311e3d6692 100644
--- a/src/server/api/endpoints/meta.ts
+++ b/src/server/api/endpoints/meta.ts
@@ -60,7 +60,8 @@ export default define(meta, (ps, me) => new Promise(async (res, rej) => {
driveCapacityPerLocalUserMb: instance.localDriveCapacityMb,
driveCapacityPerRemoteUserMb: instance.remoteDriveCapacityMb,
cacheRemoteFiles: instance.cacheRemoteFiles,
- recaptchaSiteKey: instance.enableRecaptcha ? instance.recaptchaSiteKey : null,
+ enableRecaptcha: instance.enableRecaptcha,
+ recaptchaSiteKey: instance.recaptchaSiteKey,
swPublickey: config.sw ? config.sw.public_key : null,
bannerUrl: instance.bannerUrl,
maxNoteTextLength: instance.maxNoteTextLength,