mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 11:00:39 +00:00
added user verification option in admin settings
This commit is contained in:
@@ -58,6 +58,24 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<div class="input-wrapper">
|
||||
<div class="inline-wrapper">
|
||||
<div class="switch-label">
|
||||
<label class="input-label">
|
||||
{{ $t('admin_settings.others.allow_user_verification') }}:
|
||||
</label>
|
||||
<small class="input-help" v-html="$t('admin_settings.others.allow_user_verification_help')"></small>
|
||||
</div>
|
||||
<SwitchInput @input="$updateText('/admin/settings', 'user_verification', app.userVerification)"
|
||||
v-model="app.userVerification"
|
||||
class="switch"
|
||||
:state="app.userVerification"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<FormLabel class="mt-70">
|
||||
{{ $t('admin_settings.others.section_others') }}
|
||||
</FormLabel>
|
||||
@@ -173,7 +191,7 @@
|
||||
mounted() {
|
||||
axios.get('/api/admin/settings', {
|
||||
params: {
|
||||
column: 'contact_email|google_analytics|storage_default|registration|storage_limitation|mimetypes_blacklist|upload_limit'
|
||||
column: 'contact_email|google_analytics|storage_default|registration|storage_limitation|mimetypes_blacklist|upload_limit|user_verification'
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
@@ -186,7 +204,8 @@
|
||||
userRegistration: parseInt(response.data.registration),
|
||||
storageLimitation: parseInt(response.data.storage_limitation),
|
||||
mimetypesBlacklist : response.data.mimetypes_blacklist,
|
||||
uploadLimit: response.data.upload_limit
|
||||
uploadLimit: response.data.upload_limit,
|
||||
userVerification: response.data.user_verification
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -61,6 +61,19 @@
|
||||
</router-link>
|
||||
</span>
|
||||
</AuthContent>
|
||||
|
||||
<AuthContent name="not-verified" :visible="false">
|
||||
|
||||
<div class="user" v-if="checkedAccount">
|
||||
<img class="user-avatar" :src="checkedAccount.avatar" :alt="checkedAccount.name">
|
||||
<h1>{{ checkedAccount.name }}</h1>
|
||||
<h2>{{ $t('page_not_verified.subtitle') }}</h2>
|
||||
</div>
|
||||
|
||||
<span class="additional-link"> {{ $t('page_not_verified.resend_text') }}
|
||||
<a @click="resendEmail" class="text-theme">{{ $t('page_not_verified.resend_button') }} </a>
|
||||
</span>
|
||||
</AuthContent>
|
||||
</AuthContentWrapper>
|
||||
</template>
|
||||
|
||||
@@ -110,6 +123,13 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
resendEmail() {
|
||||
axios.
|
||||
post('/api/user/email/resend/verify', {
|
||||
email: this.loginEmail
|
||||
})
|
||||
.then(console.log('send'))
|
||||
},
|
||||
async logIn() {
|
||||
|
||||
// Validate fields
|
||||
@@ -164,6 +184,13 @@
|
||||
|
||||
if (!isValid) return;
|
||||
|
||||
if(!this.checkedAccount.verified) {
|
||||
|
||||
this.goToAuthPage('not-verified')
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// Start loading
|
||||
this.isLoading = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user