summaryrefslogtreecommitdiff
path: root/src/client/pages
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-10-08 13:37:02 +0900
committerGitHub <noreply@github.com>2021-10-08 13:37:02 +0900
commitb875cc994968bb334dfb9d83707e56ab3971a0d1 (patch)
tree5655892af829ecad9f040624f8b6cd31410284f9 /src/client/pages
parentupdate dependencies (diff)
downloadmisskey-b875cc994968bb334dfb9d83707e56ab3971a0d1.tar.gz
misskey-b875cc994968bb334dfb9d83707e56ab3971a0d1.tar.bz2
misskey-b875cc994968bb334dfb9d83707e56ab3971a0d1.zip
feat: アカウント作成にメールアドレス必須にするオプション (#7856)
* feat: アカウント作成にメールアドレス必須にするオプション * ui * fix bug * fix bug * fix bug * :art:
Diffstat (limited to 'src/client/pages')
-rw-r--r--src/client/pages/instance/security.vue5
-rw-r--r--src/client/pages/signup-complete.vue50
2 files changed, 55 insertions, 0 deletions
diff --git a/src/client/pages/instance/security.vue b/src/client/pages/instance/security.vue
index 53f923643a..2b525261ae 100644
--- a/src/client/pages/instance/security.vue
+++ b/src/client/pages/instance/security.vue
@@ -10,6 +10,8 @@
<FormSwitch v-model="enableRegistration">{{ $ts.enableRegistration }}</FormSwitch>
+ <FormSwitch v-model="emailRequiredForSignup">{{ $ts.emailRequiredForSignup }}</FormSwitch>
+
<FormButton @click="save" primary><i class="fas fa-save"></i> {{ $ts.save }}</FormButton>
</FormSuspense>
</FormBase>
@@ -50,6 +52,7 @@ export default defineComponent({
enableHcaptcha: false,
enableRecaptcha: false,
enableRegistration: false,
+ emailRequiredForSignup: false,
}
},
@@ -63,11 +66,13 @@ export default defineComponent({
this.enableHcaptcha = meta.enableHcaptcha;
this.enableRecaptcha = meta.enableRecaptcha;
this.enableRegistration = !meta.disableRegistration;
+ this.emailRequiredForSignup = meta.emailRequiredForSignup;
},
save() {
os.apiWithDialog('admin/update-meta', {
disableRegistration: !this.enableRegistration,
+ emailRequiredForSignup: this.emailRequiredForSignup,
}).then(() => {
fetchInstance();
});
diff --git a/src/client/pages/signup-complete.vue b/src/client/pages/signup-complete.vue
new file mode 100644
index 0000000000..dada92031a
--- /dev/null
+++ b/src/client/pages/signup-complete.vue
@@ -0,0 +1,50 @@
+<template>
+<div>
+ {{ $ts.processing }}
+</div>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import * as os from '@client/os';
+import * as symbols from '@client/symbols';
+import { login } from '@client/account';
+
+export default defineComponent({
+ components: {
+
+ },
+
+ props: {
+ code: {
+ type: String,
+ required: true
+ }
+ },
+
+ data() {
+ return {
+ [symbols.PAGE_INFO]: {
+ title: this.$ts.signup,
+ icon: 'fas fa-user'
+ },
+ }
+ },
+
+ mounted() {
+ os.apiWithDialog('signup-pending', {
+ code: this.code,
+ }).then(res => {
+ login(res.i, '/');
+ });
+ },
+
+ methods: {
+
+ }
+});
+</script>
+
+<style lang="scss" scoped>
+
+</style>