mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
login & registration settings refactoring
This commit is contained in:
@@ -22,9 +22,9 @@
|
||||
"/chunks/app-index.js": "/chunks/app-index.js?id=4f6f1f8c89137d524d22",
|
||||
"/chunks/app-language.js": "/chunks/app-language.js?id=bdea74f5021aedc80a66",
|
||||
"/chunks/app-language~chunks/page-edit~chunks/pages~chunks/plan-create/fixed~chunks/plan-create/metere~daa2a968.js": "/chunks/app-language~chunks/page-edit~chunks/pages~chunks/plan-create/fixed~chunks/plan-create/metere~daa2a968.js?id=ef8cbb733f7e82636b51",
|
||||
"/chunks/app-others.js": "/chunks/app-others.js?id=a12611142f24780ec2ac",
|
||||
"/chunks/app-others.js": "/chunks/app-others.js?id=e756088796cfeadfd28e",
|
||||
"/chunks/app-others~chunks/payments/settings.js": "/chunks/app-others~chunks/payments/settings.js?id=a9748a3aa53098b75df6",
|
||||
"/chunks/app-settings.js": "/chunks/app-settings.js?id=62ce73b2d66590912cbc",
|
||||
"/chunks/app-settings.js": "/chunks/app-settings.js?id=98344316e29786729b08",
|
||||
"/chunks/app-setup.js": "/chunks/app-setup.js?id=c4092eb8dde1708f9adb",
|
||||
"/chunks/billing.js": "/chunks/billing.js?id=7b1f4204ec58056828c2",
|
||||
"/chunks/billings-detail.js": "/chunks/billings-detail.js?id=8a6f15cace7263e2d5d1",
|
||||
@@ -468,5 +468,95 @@
|
||||
"/chunks/user-subscription.c50c214abf0018d85ae6.hot-update.js": "/chunks/user-subscription.c50c214abf0018d85ae6.hot-update.js",
|
||||
"/chunks/app-setup.8d730de7eff1938253a3.hot-update.js": "/chunks/app-setup.8d730de7eff1938253a3.hot-update.js",
|
||||
"/chunks/user-subscription.bc00d83e6108d3670663.hot-update.js": "/chunks/user-subscription.bc00d83e6108d3670663.hot-update.js",
|
||||
"/chunks/user-subscription.fbc90c133a8b0a24b861.hot-update.js": "/chunks/user-subscription.fbc90c133a8b0a24b861.hot-update.js"
|
||||
"/chunks/user-subscription.fbc90c133a8b0a24b861.hot-update.js": "/chunks/user-subscription.fbc90c133a8b0a24b861.hot-update.js",
|
||||
"/js/main.25f101be03aa3c234807.hot-update.js": "/js/main.25f101be03aa3c234807.hot-update.js",
|
||||
"/chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunk~654def57.js": "/chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunk~654def57.js?id=da6eb25a5146f335735b",
|
||||
"/chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app~d6657877.js": "/chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app~d6657877.js?id=01b0834a84499ac9b565",
|
||||
"/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunks/app-sign-in-out~chu~16be4694.js": "/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunks/app-sign-in-out~chu~16be4694.js?id=33b369ab3ff54360e658",
|
||||
"/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunks/app-sign-in-out~chu~850fb31d.js": "/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-others~chunks/app-sign-in-out~chu~850fb31d.js?id=1175616eb6505c4a5b63",
|
||||
"/chunks/app-sign-in-out.js": "/chunks/app-sign-in-out.js?id=9b6eff02e9d0f9d69073",
|
||||
"/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~ch~18c03045.js": "/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~ch~18c03045.js?id=78648b8d5661ff1ae161",
|
||||
"/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~ch~2397855a.js": "/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~ch~2397855a.js?id=aeb31474ee6592052a57",
|
||||
"/js/main.ae311940e17745c654b1.hot-update.js": "/js/main.ae311940e17745c654b1.hot-update.js",
|
||||
"/chunks/app-sign-in-out.ae311940e17745c654b1.hot-update.js": "/chunks/app-sign-in-out.ae311940e17745c654b1.hot-update.js",
|
||||
"/chunks/app-settings.4458fc83b9c9b24c9590.hot-update.js": "/chunks/app-settings.4458fc83b9c9b24c9590.hot-update.js",
|
||||
"/js/main.6cd224ac16adb5d65854.hot-update.js": "/js/main.6cd224ac16adb5d65854.hot-update.js",
|
||||
"/chunks/app-sign-in-out.6cd224ac16adb5d65854.hot-update.js": "/chunks/app-sign-in-out.6cd224ac16adb5d65854.hot-update.js",
|
||||
"/chunks/app-settings.850adff576809d52c687.hot-update.js": "/chunks/app-settings.850adff576809d52c687.hot-update.js",
|
||||
"/chunks/app-settings.70ae8a09f8c20a9a0a08.hot-update.js": "/chunks/app-settings.70ae8a09f8c20a9a0a08.hot-update.js",
|
||||
"/chunks/app-sign-in-out.14f285db7d53a539ddba.hot-update.js": "/chunks/app-sign-in-out.14f285db7d53a539ddba.hot-update.js",
|
||||
"/chunks/app-others.60151927a137bc3fc426.hot-update.js": "/chunks/app-others.60151927a137bc3fc426.hot-update.js",
|
||||
"/chunks/app-sign-in-out.fbaffe3a2638cfa4c5c6.hot-update.js": "/chunks/app-sign-in-out.fbaffe3a2638cfa4c5c6.hot-update.js",
|
||||
"/chunks/app-sign-in-out.baa9554666e521ea479d.hot-update.js": "/chunks/app-sign-in-out.baa9554666e521ea479d.hot-update.js",
|
||||
"/chunks/app-sign-in-out.7064e8e74da9e8e2d074.hot-update.js": "/chunks/app-sign-in-out.7064e8e74da9e8e2d074.hot-update.js",
|
||||
"/chunks/app-sign-in-out.5a48a65fdb31c1a04638.hot-update.js": "/chunks/app-sign-in-out.5a48a65fdb31c1a04638.hot-update.js",
|
||||
"/chunks/app-sign-in-out.ccd7efd50eca669d4eec.hot-update.js": "/chunks/app-sign-in-out.ccd7efd50eca669d4eec.hot-update.js",
|
||||
"/chunks/app-sign-in-out.607e15bcd7d29c17ae3f.hot-update.js": "/chunks/app-sign-in-out.607e15bcd7d29c17ae3f.hot-update.js",
|
||||
"/chunks/app-sign-in-out.2357cc2db803ae6beb12.hot-update.js": "/chunks/app-sign-in-out.2357cc2db803ae6beb12.hot-update.js",
|
||||
"/chunks/app-sign-in-out.aff30babdf0ed02aed26.hot-update.js": "/chunks/app-sign-in-out.aff30babdf0ed02aed26.hot-update.js",
|
||||
"/chunks/app-sign-in-out.8d792a445ae944678e40.hot-update.js": "/chunks/app-sign-in-out.8d792a445ae944678e40.hot-update.js",
|
||||
"/chunks/app-sign-in-out.7258655200155a02bf18.hot-update.js": "/chunks/app-sign-in-out.7258655200155a02bf18.hot-update.js",
|
||||
"/chunks/app-sign-in-out.8cc5900d72ef000e7d3b.hot-update.js": "/chunks/app-sign-in-out.8cc5900d72ef000e7d3b.hot-update.js",
|
||||
"/chunks/app-sign-in-out.9e307bc5d4eec337d641.hot-update.js": "/chunks/app-sign-in-out.9e307bc5d4eec337d641.hot-update.js",
|
||||
"/chunks/app-sign-in-out.229f7f8ffea27263d1e5.hot-update.js": "/chunks/app-sign-in-out.229f7f8ffea27263d1e5.hot-update.js",
|
||||
"/chunks/app-others.c6ea955dbb040bbe8c37.hot-update.js": "/chunks/app-others.c6ea955dbb040bbe8c37.hot-update.js",
|
||||
"/chunks/app-others.544e7eb114647a1a58bd.hot-update.js": "/chunks/app-others.544e7eb114647a1a58bd.hot-update.js",
|
||||
"/chunks/app-sign-in-out.f4551a21130f952e50b1.hot-update.js": "/chunks/app-sign-in-out.f4551a21130f952e50b1.hot-update.js",
|
||||
"/chunks/app-others.94b41f7219a68eca2336.hot-update.js": "/chunks/app-others.94b41f7219a68eca2336.hot-update.js",
|
||||
"/chunks/app-others.7981e588eca5600498e9.hot-update.js": "/chunks/app-others.7981e588eca5600498e9.hot-update.js",
|
||||
"/js/main.a376eaa31293f7c9f576.hot-update.js": "/js/main.a376eaa31293f7c9f576.hot-update.js",
|
||||
"/chunks/app-sign-in-out.a376eaa31293f7c9f576.hot-update.js": "/chunks/app-sign-in-out.a376eaa31293f7c9f576.hot-update.js",
|
||||
"/chunks/app-sign-in-out.dcc71b7a89dc744d679f.hot-update.js": "/chunks/app-sign-in-out.dcc71b7a89dc744d679f.hot-update.js",
|
||||
"/chunks/app-sign-in-out.15a48e4752fd7f7171f1.hot-update.js": "/chunks/app-sign-in-out.15a48e4752fd7f7171f1.hot-update.js",
|
||||
"/js/main.dfef1c20d19b033b384d.hot-update.js": "/js/main.dfef1c20d19b033b384d.hot-update.js",
|
||||
"/chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-setup~chunks~ba362dfc.js": "/chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-setup~chunks~ba362dfc.js?id=f1db11992a10d86198ae",
|
||||
"/chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app~f63e9605.js": "/chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app~f63e9605.js?id=4bbd643494f18c6df213",
|
||||
"/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/payments/billings~chunks/payments/set~0dc0a1dd.js": "/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/payments/billings~chunks/payments/set~0dc0a1dd.js?id=85c3dcde9e03e25b549e",
|
||||
"/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/payments/billings~chunks/payments/set~e2addff2.js": "/chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/payments/billings~chunks/payments/set~e2addff2.js?id=380773832297d90aab4f",
|
||||
"/chunks/app-others.dfef1c20d19b033b384d.hot-update.js": "/chunks/app-others.dfef1c20d19b033b384d.hot-update.js",
|
||||
"/chunks/app-others.7139ae598830adec1273.hot-update.js": "/chunks/app-others.7139ae598830adec1273.hot-update.js",
|
||||
"/chunks/app-others.3a7bed2f12386d7b2b55.hot-update.js": "/chunks/app-others.3a7bed2f12386d7b2b55.hot-update.js",
|
||||
"/chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-setup~chunks~ba362dfc.88d038acb989c84fb2f3.hot-update.js": "/chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-setup~chunks~ba362dfc.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/app-language.88d038acb989c84fb2f3.hot-update.js": "/chunks/app-language.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/app-others.88d038acb989c84fb2f3.hot-update.js": "/chunks/app-others.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/app-sign-in-out.88d038acb989c84fb2f3.hot-update.js": "/chunks/app-sign-in-out.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/billings-detail.88d038acb989c84fb2f3.hot-update.js": "/chunks/billings-detail.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/billing~chunks/settings-storage~chunks/user-storage~chunks/user-subscription.88d038acb989c84fb2f3.hot-update.js": "/chunks/billing~chunks/settings-storage~chunks/user-storage~chunks/user-subscription.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/dashboard.88d038acb989c84fb2f3.hot-update.js": "/chunks/dashboard.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/database.88d038acb989c84fb2f3.hot-update.js": "/chunks/database.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/environment-setup.88d038acb989c84fb2f3.hot-update.js": "/chunks/environment-setup.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/installation-disclaimer.88d038acb989c84fb2f3.hot-update.js": "/chunks/installation-disclaimer.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/page-edit.88d038acb989c84fb2f3.hot-update.js": "/chunks/page-edit.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/plan-delete.88d038acb989c84fb2f3.hot-update.js": "/chunks/plan-delete.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/plan-settings.88d038acb989c84fb2f3.hot-update.js": "/chunks/plan-settings.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/profile.88d038acb989c84fb2f3.hot-update.js": "/chunks/profile.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/settings-password.88d038acb989c84fb2f3.hot-update.js": "/chunks/settings-password.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/status-check.88d038acb989c84fb2f3.hot-update.js": "/chunks/status-check.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/stripe-credentials.88d038acb989c84fb2f3.hot-update.js": "/chunks/stripe-credentials.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/subscription-plans.88d038acb989c84fb2f3.hot-update.js": "/chunks/subscription-plans.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/user-delete.88d038acb989c84fb2f3.hot-update.js": "/chunks/user-delete.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/user-detail.88d038acb989c84fb2f3.hot-update.js": "/chunks/user-detail.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/user-password.88d038acb989c84fb2f3.hot-update.js": "/chunks/user-password.88d038acb989c84fb2f3.hot-update.js",
|
||||
"/chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-setup~chunks~ba362dfc.c644e549d4deddb3c168.hot-update.js": "/chunks/admin-account~chunks/app-appearance~chunks/app-email~chunks/app-index~chunks/app-setup~chunks~ba362dfc.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/app-language.c644e549d4deddb3c168.hot-update.js": "/chunks/app-language.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/app-others.c644e549d4deddb3c168.hot-update.js": "/chunks/app-others.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/app-sign-in-out.c644e549d4deddb3c168.hot-update.js": "/chunks/app-sign-in-out.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/billings-detail.c644e549d4deddb3c168.hot-update.js": "/chunks/billings-detail.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/billing~chunks/settings-storage~chunks/user-storage~chunks/user-subscription.c644e549d4deddb3c168.hot-update.js": "/chunks/billing~chunks/settings-storage~chunks/user-storage~chunks/user-subscription.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/dashboard.c644e549d4deddb3c168.hot-update.js": "/chunks/dashboard.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/database.c644e549d4deddb3c168.hot-update.js": "/chunks/database.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/environment-setup.c644e549d4deddb3c168.hot-update.js": "/chunks/environment-setup.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/installation-disclaimer.c644e549d4deddb3c168.hot-update.js": "/chunks/installation-disclaimer.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/page-edit.c644e549d4deddb3c168.hot-update.js": "/chunks/page-edit.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/plan-delete.c644e549d4deddb3c168.hot-update.js": "/chunks/plan-delete.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/plan-settings.c644e549d4deddb3c168.hot-update.js": "/chunks/plan-settings.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/profile.c644e549d4deddb3c168.hot-update.js": "/chunks/profile.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/settings-password.c644e549d4deddb3c168.hot-update.js": "/chunks/settings-password.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/status-check.c644e549d4deddb3c168.hot-update.js": "/chunks/status-check.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/stripe-credentials.c644e549d4deddb3c168.hot-update.js": "/chunks/stripe-credentials.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/subscription-plans.c644e549d4deddb3c168.hot-update.js": "/chunks/subscription-plans.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/user-delete.c644e549d4deddb3c168.hot-update.js": "/chunks/user-delete.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/user-detail.c644e549d4deddb3c168.hot-update.js": "/chunks/user-detail.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/user-password.c644e549d4deddb3c168.hot-update.js": "/chunks/user-password.c644e549d4deddb3c168.hot-update.js",
|
||||
"/chunks/app-others.4e81c1bdfa33bcbd01ef.hot-update.js": "/chunks/app-others.4e81c1bdfa33bcbd01ef.hot-update.js"
|
||||
}
|
||||
|
||||
10
resources/js/routes/routesAdmin.js
vendored
10
resources/js/routes/routesAdmin.js
vendored
@@ -336,6 +336,16 @@ const routesAdmin = [
|
||||
title: 'routes_title.others'
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'AppSignInUp',
|
||||
path: '/admin/settings/sign-in',
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "chunks/app-sign-in-out" */ '../views/Admin/AppSettings/AppSettingsTabs/SignInUp'),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: 'Sign In/Up'
|
||||
},
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
title: this.$t('admin_settings.tabs.others'),
|
||||
route: 'AppOthers',
|
||||
},
|
||||
{
|
||||
title: this.$t('Login & Registration'),
|
||||
route: 'AppSignInUp',
|
||||
},
|
||||
{
|
||||
title: this.$t('admin_settings.tabs.appearance'),
|
||||
route: 'AppAppearance',
|
||||
|
||||
@@ -60,34 +60,11 @@
|
||||
</AppInputText>
|
||||
</div>
|
||||
|
||||
<!--User Login/Registration-->
|
||||
<div class="card shadow-card">
|
||||
<FormLabel>
|
||||
{{ $t('User Login/Registration') }}
|
||||
</FormLabel>
|
||||
|
||||
<AppInputSwitch :title="$t('admin_settings.others.allow_registration')" :description="$t('admin_settings.others.allow_registration_help')">
|
||||
<SwitchInput
|
||||
@input="$updateText('/admin/settings', 'registration', app.userRegistration)"
|
||||
v-model="app.userRegistration"
|
||||
class="switch"
|
||||
:state="app.userRegistration"
|
||||
/>
|
||||
</AppInputSwitch>
|
||||
|
||||
<AppInputSwitch :title="$t('Require Email Verification')" :description="$t('admin_settings.others.allow_user_verification_help')" :is-last="true">
|
||||
<SwitchInput
|
||||
@input="$updateText('/admin/settings', 'user_verification', app.userVerification)"
|
||||
v-model="app.userVerification"
|
||||
class="switch"
|
||||
:state="app.userVerification"
|
||||
/>
|
||||
</AppInputSwitch>
|
||||
</div>
|
||||
|
||||
<!-- ReCaptcha -->
|
||||
<div class="card shadow-card">
|
||||
<img src="/assets/others/recaptcha.svg" alt="reCaptcha" class="mb-8 h-10">
|
||||
<FormLabel icon="shield">
|
||||
{{ $t('reCaptcha') }}
|
||||
</FormLabel>
|
||||
|
||||
<AppInputSwitch :title="$t('Allow ReCaptcha')" :description="$t('ReCaptcha will be allowed on Registration and Contact Us forms.')" :is-last="! recaptcha.allowedService">
|
||||
<SwitchInput
|
||||
@@ -134,156 +111,6 @@
|
||||
</ValidationObserver>
|
||||
|
||||
</div>
|
||||
|
||||
<!--Facebook Social Authentication-->
|
||||
<div class="card shadow-card">
|
||||
<img :src="$getSocialLogo('facebook')" alt="Facebook" class="mb-8 h-5">
|
||||
|
||||
<AppInputSwitch :title="$t('Allow Login via Facebook')" :description="$t('You users will be able to login via Facebook account.')" :is-last="! facebook.allowedService">
|
||||
<SwitchInput
|
||||
@input="$updateText('/admin/settings', 'allowed_facebook_login', facebook.allowedService)"
|
||||
v-model="facebook.allowedService"
|
||||
class="switch"
|
||||
:state="facebook.allowedService"
|
||||
/>
|
||||
</AppInputSwitch>
|
||||
|
||||
<div v-if="config.isFacebookLoginConfigured && facebook.allowedService" @click="facebook.isVisibleCredentialsForm = !facebook.isVisibleCredentialsForm" class="flex items-center cursor-pointer" :class="{'mb-4': facebook.isVisibleCredentialsForm}">
|
||||
<edit2-icon size="12" class="vue-feather text-theme mr-2" />
|
||||
<b class="text-xs">{{ $t('Update Your Credentials') }}</b>
|
||||
</div>
|
||||
|
||||
<!--Set up facebook credentials-->
|
||||
<ValidationObserver
|
||||
v-if="(! config.isFacebookLoginConfigured || facebook.isVisibleCredentialsForm) && facebook.allowedService"
|
||||
@submit.prevent="storeCredentials('facebook_login')"
|
||||
ref="credentialsForm"
|
||||
v-slot="{ invalid }"
|
||||
tag="form"
|
||||
class="p-5 shadow-lg rounded-xl"
|
||||
>
|
||||
<FormLabel v-if="! config.isFacebookLoginConfigured" icon="shield">
|
||||
{{ $t('Configure Credentials') }}
|
||||
</FormLabel>
|
||||
|
||||
<ValidationProvider tag="div" mode="passive" name="Client ID" rules="required" v-slot="{ errors }">
|
||||
<AppInputText :title="$t('Client ID')" :error="errors[0]">
|
||||
<input v-model="facebook.credentials.client_id" :placeholder="$t('Paste your Client ID here')" type="text" :class="{'border-red': errors[0]}" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
</ValidationProvider>
|
||||
|
||||
<ValidationProvider tag="div" mode="passive" name="Client Secret" rules="required" v-slot="{ errors }">
|
||||
<AppInputText :title="$t('Client Secret')" :error="errors[0]">
|
||||
<input v-model="facebook.credentials.client_secret" :placeholder="$t('Paste your Client Secret here')" type="text" :class="{'border-red': errors[0]}" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
</ValidationProvider>
|
||||
|
||||
<ButtonBase :disabled="isLoading" :loading="isLoading" button-style="theme" type="submit" class="w-full">
|
||||
{{ $t('Store Credentials') }}
|
||||
</ButtonBase>
|
||||
</ValidationObserver>
|
||||
|
||||
</div>
|
||||
|
||||
<!--Google Social Authentication-->
|
||||
<div class="card shadow-card">
|
||||
<img :src="$getSocialLogo('google')" alt="Google" class="mb-8 h-7">
|
||||
|
||||
<AppInputSwitch :title="$t('Allow Login via Google')" :description="$t('You users will be able to login via Google account.')" :is-last="! google.allowedService">
|
||||
<SwitchInput
|
||||
@input="$updateText('/admin/settings', 'allowed_google_login', google.allowedService)"
|
||||
v-model="google.allowedService"
|
||||
class="switch"
|
||||
:state="google.allowedService"
|
||||
/>
|
||||
</AppInputSwitch>
|
||||
|
||||
<div v-if="config.isGoogleLoginConfigured && google.allowedService" @click="google.isVisibleCredentialsForm = !google.isVisibleCredentialsForm" class="flex items-center cursor-pointer" :class="{'mb-4': google.isVisibleCredentialsForm}">
|
||||
<edit2-icon size="12" class="vue-feather text-theme mr-2" />
|
||||
<b class="text-xs">{{ $t('Update Your Credentials') }}</b>
|
||||
</div>
|
||||
|
||||
<!--Set up Google credentials-->
|
||||
<ValidationObserver
|
||||
v-if="(! config.isGoogleLoginConfigured || google.isVisibleCredentialsForm) && google.allowedService"
|
||||
@submit.prevent="storeCredentials('google_login')"
|
||||
ref="credentialsForm"
|
||||
v-slot="{ invalid }"
|
||||
tag="form"
|
||||
class="p-5 shadow-lg rounded-xl"
|
||||
>
|
||||
<FormLabel v-if="! config.isGoogleLoginConfigured" icon="shield">
|
||||
{{ $t('Configure Credentials') }}
|
||||
</FormLabel>
|
||||
|
||||
<ValidationProvider tag="div" mode="passive" name="Client ID" rules="required" v-slot="{ errors }">
|
||||
<AppInputText :title="$t('Client ID')" :error="errors[0]">
|
||||
<input v-model="google.credentials.client_id" :placeholder="$t('Paste your Client ID here')" type="text" :class="{'border-red': errors[0]}" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
</ValidationProvider>
|
||||
|
||||
<ValidationProvider tag="div" mode="passive" name="Client Secret" rules="required" v-slot="{ errors }">
|
||||
<AppInputText :title="$t('Client Secret')" :error="errors[0]">
|
||||
<input v-model="google.credentials.client_secret" :placeholder="$t('Paste your Client Secret here')" type="text" :class="{'border-red': errors[0]}" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
</ValidationProvider>
|
||||
|
||||
<ButtonBase :disabled="isLoading" :loading="isLoading" button-style="theme" type="submit" class="w-full">
|
||||
{{ $t('Store Credentials') }}
|
||||
</ButtonBase>
|
||||
</ValidationObserver>
|
||||
|
||||
</div>
|
||||
|
||||
<!--Github Social Authentication-->
|
||||
<div class="card shadow-card">
|
||||
<img :src="$getSocialLogo('github')" alt="Github" class="mb-8 h-5">
|
||||
|
||||
<AppInputSwitch :title="$t('Allow Login via GitHub')" :description="$t('You users will be able to login via GitHub account.')" :is-last="! github.allowedService">
|
||||
<SwitchInput
|
||||
@input="$updateText('/admin/settings', 'allowed_github_login', github.allowedService)"
|
||||
v-model="github.allowedService"
|
||||
class="switch"
|
||||
:state="github.allowedService"
|
||||
/>
|
||||
</AppInputSwitch>
|
||||
|
||||
<div v-if="config.isGithubLoginConfigured && github.allowedService" @click="github.isVisibleCredentialsForm = !github.isVisibleCredentialsForm" class="flex items-center cursor-pointer" :class="{'mb-4': github.isVisibleCredentialsForm}">
|
||||
<edit2-icon size="12" class="vue-feather text-theme mr-2" />
|
||||
<b class="text-xs">{{ $t('Update Your Credentials') }}</b>
|
||||
</div>
|
||||
|
||||
<!--Set up github credentials-->
|
||||
<ValidationObserver
|
||||
v-if="(! config.isGithubLoginConfigured || github.isVisibleCredentialsForm) && github.allowedService"
|
||||
@submit.prevent="storeCredentials('github_login')"
|
||||
ref="credentialsForm"
|
||||
v-slot="{ invalid }"
|
||||
tag="form"
|
||||
class="p-5 shadow-lg rounded-xl"
|
||||
>
|
||||
<FormLabel v-if="! config.isGithubLoginConfigured" icon="shield">
|
||||
{{ $t('Configure Credentials') }}
|
||||
</FormLabel>
|
||||
|
||||
<ValidationProvider tag="div" mode="passive" name="Client ID" rules="required" v-slot="{ errors }">
|
||||
<AppInputText :title="$t('Client ID')" :error="errors[0]">
|
||||
<input v-model="github.credentials.client_id" :placeholder="$t('Paste your Client ID here')" type="text" :class="{'border-red': errors[0]}" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
</ValidationProvider>
|
||||
|
||||
<ValidationProvider tag="div" mode="passive" name="Client Secret" rules="required" v-slot="{ errors }">
|
||||
<AppInputText :title="$t('Client Secret')" :error="errors[0]">
|
||||
<input v-model="github.credentials.client_secret" :placeholder="$t('Paste your Client Secret here')" type="text" :class="{'border-red': errors[0]}" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
</ValidationProvider>
|
||||
|
||||
<ButtonBase :disabled="isLoading" :loading="isLoading" button-style="theme" type="submit" class="w-full">
|
||||
{{ $t('Store Credentials') }}
|
||||
</ButtonBase>
|
||||
</ValidationObserver>
|
||||
|
||||
</div>
|
||||
</PageTab>
|
||||
</template>
|
||||
|
||||
@@ -292,22 +119,17 @@
|
||||
Edit2Icon,
|
||||
} from 'vue-feather-icons'
|
||||
import {ValidationProvider, ValidationObserver} from 'vee-validate/dist/vee-validate.full'
|
||||
import PageTabGroup from '/resources/js/components/Others/Layout/PageTabGroup'
|
||||
import SelectInput from '/resources/js/components/Others/Forms/SelectInput'
|
||||
import SwitchInput from '/resources/js/components/Others/Forms/SwitchInput'
|
||||
import ImageInput from '/resources/js/components/Others/Forms/ImageInput'
|
||||
import AppInputButton from "../../../../components/Admin/AppInputButton"
|
||||
import AppInputSwitch from "../../../../components/Admin/AppInputSwitch"
|
||||
import FormLabel from '/resources/js/components/Others/Forms/FormLabel'
|
||||
import ButtonBase from '/resources/js/components/FilesView/ButtonBase'
|
||||
import SetupBox from '/resources/js/components/Others/Forms/SetupBox'
|
||||
import AppInputText from "../../../../components/Admin/AppInputText"
|
||||
import PageTab from '/resources/js/components/Others/Layout/PageTab'
|
||||
import InfoBox from '/resources/js/components/Others/Forms/InfoBox'
|
||||
import {required} from 'vee-validate/dist/rules'
|
||||
import {events} from '/resources/js/bus'
|
||||
import {mapGetters} from "vuex"
|
||||
import axios from 'axios'
|
||||
import AppInputButton from "../../../../components/Admin/AppInputButton";
|
||||
|
||||
export default {
|
||||
name: 'AppOthers',
|
||||
@@ -317,17 +139,12 @@
|
||||
ValidationProvider,
|
||||
AppInputSwitch,
|
||||
AppInputText,
|
||||
PageTabGroup,
|
||||
SwitchInput,
|
||||
SelectInput,
|
||||
ImageInput,
|
||||
ButtonBase,
|
||||
Edit2Icon,
|
||||
FormLabel,
|
||||
SetupBox,
|
||||
required,
|
||||
PageTab,
|
||||
InfoBox,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
@@ -347,30 +164,6 @@
|
||||
secret: undefined,
|
||||
},
|
||||
},
|
||||
facebook: {
|
||||
allowedService: false,
|
||||
isVisibleCredentialsForm: false,
|
||||
credentials: {
|
||||
key: undefined,
|
||||
secret: undefined,
|
||||
},
|
||||
},
|
||||
google: {
|
||||
allowedService: false,
|
||||
isVisibleCredentialsForm: false,
|
||||
credentials: {
|
||||
key: undefined,
|
||||
secret: undefined,
|
||||
},
|
||||
},
|
||||
github: {
|
||||
allowedService: false,
|
||||
isVisibleCredentialsForm: false,
|
||||
credentials: {
|
||||
key: undefined,
|
||||
secret: undefined,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -431,13 +224,10 @@
|
||||
},
|
||||
mounted() {
|
||||
this.recaptcha.allowedService = this.config.allowedRecaptcha
|
||||
this.facebook.allowedService = this.config.allowedFacebookLogin
|
||||
this.google.allowedService = this.config.allowedGoogleLogin
|
||||
this.github.allowedService = this.config.allowedGithubLogin
|
||||
|
||||
axios.get('/api/admin/settings', {
|
||||
params: {
|
||||
column: 'contact_email|google_analytics|default_max_storage_amount|registration|storage_limitation|mimetypes_blacklist|upload_limit|user_verification'
|
||||
column: 'contact_email|google_analytics|default_max_storage_amount|storage_limitation|mimetypes_blacklist|upload_limit'
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
@@ -447,11 +237,9 @@
|
||||
contactMail: response.data.contact_email,
|
||||
googleAnalytics: response.data.google_analytics,
|
||||
defaultStorage: response.data.default_max_storage_amount,
|
||||
userRegistration: parseInt(response.data.registration),
|
||||
storageLimitation: parseInt(response.data.storage_limitation),
|
||||
mimetypesBlacklist: response.data.mimetypes_blacklist,
|
||||
uploadLimit: response.data.upload_limit,
|
||||
userVerification: parseInt(response.data.user_verification)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,300 @@
|
||||
<template>
|
||||
<PageTab>
|
||||
|
||||
<!--User Login/Registration-->
|
||||
<div v-if="app" class="card shadow-card">
|
||||
<FormLabel>
|
||||
{{ $t('User Login/Registration') }}
|
||||
</FormLabel>
|
||||
|
||||
<AppInputSwitch :title="$t('admin_settings.others.allow_registration')" :description="$t('admin_settings.others.allow_registration_help')">
|
||||
<SwitchInput
|
||||
@input="$updateText('/admin/settings', 'registration', app.userRegistration)"
|
||||
v-model="app.userRegistration"
|
||||
class="switch"
|
||||
:state="app.userRegistration"
|
||||
/>
|
||||
</AppInputSwitch>
|
||||
|
||||
<AppInputSwitch :title="$t('Require Email Verification')" :description="$t('admin_settings.others.allow_user_verification_help')" :is-last="true">
|
||||
<SwitchInput
|
||||
@input="$updateText('/admin/settings', 'user_verification', app.userVerification)"
|
||||
v-model="app.userVerification"
|
||||
class="switch"
|
||||
:state="app.userVerification"
|
||||
/>
|
||||
</AppInputSwitch>
|
||||
</div>
|
||||
|
||||
<!--Facebook Social Authentication-->
|
||||
<div class="card shadow-card">
|
||||
<img :src="$getSocialLogo('facebook')" alt="Facebook" class="mb-8 h-5">
|
||||
|
||||
<AppInputSwitch :title="$t('Allow Login via Facebook')" :description="$t('You users will be able to login via Facebook account.')" :is-last="! facebook.allowedService">
|
||||
<SwitchInput
|
||||
@input="$updateText('/admin/settings', 'allowed_facebook_login', facebook.allowedService)"
|
||||
v-model="facebook.allowedService"
|
||||
class="switch"
|
||||
:state="facebook.allowedService"
|
||||
/>
|
||||
</AppInputSwitch>
|
||||
|
||||
<div v-if="config.isFacebookLoginConfigured && facebook.allowedService" @click="facebook.isVisibleCredentialsForm = !facebook.isVisibleCredentialsForm" class="flex items-center cursor-pointer" :class="{'mb-4': facebook.isVisibleCredentialsForm}">
|
||||
<edit2-icon size="12" class="vue-feather text-theme mr-2" />
|
||||
<b class="text-xs">{{ $t('Update Your Credentials') }}</b>
|
||||
</div>
|
||||
|
||||
<!--Set up facebook credentials-->
|
||||
<ValidationObserver
|
||||
v-if="(! config.isFacebookLoginConfigured || facebook.isVisibleCredentialsForm) && facebook.allowedService"
|
||||
@submit.prevent="storeCredentials('facebook_login')"
|
||||
ref="credentialsForm"
|
||||
v-slot="{ invalid }"
|
||||
tag="form"
|
||||
class="p-5 shadow-lg rounded-xl"
|
||||
>
|
||||
<FormLabel v-if="! config.isFacebookLoginConfigured" icon="shield">
|
||||
{{ $t('Configure Credentials') }}
|
||||
</FormLabel>
|
||||
|
||||
<ValidationProvider tag="div" mode="passive" name="Client ID" rules="required" v-slot="{ errors }">
|
||||
<AppInputText :title="$t('Client ID')" :error="errors[0]">
|
||||
<input v-model="facebook.credentials.client_id" :placeholder="$t('Paste your Client ID here')" type="text" :class="{'border-red': errors[0]}" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
</ValidationProvider>
|
||||
|
||||
<ValidationProvider tag="div" mode="passive" name="Client Secret" rules="required" v-slot="{ errors }">
|
||||
<AppInputText :title="$t('Client Secret')" :error="errors[0]">
|
||||
<input v-model="facebook.credentials.client_secret" :placeholder="$t('Paste your Client Secret here')" type="text" :class="{'border-red': errors[0]}" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
</ValidationProvider>
|
||||
|
||||
<ButtonBase :disabled="isLoading" :loading="isLoading" button-style="theme" type="submit" class="w-full">
|
||||
{{ $t('Store Credentials') }}
|
||||
</ButtonBase>
|
||||
</ValidationObserver>
|
||||
|
||||
</div>
|
||||
|
||||
<!--Google Social Authentication-->
|
||||
<div class="card shadow-card">
|
||||
<img :src="$getSocialLogo('google')" alt="Google" class="mb-8 h-7">
|
||||
|
||||
<AppInputSwitch :title="$t('Allow Login via Google')" :description="$t('You users will be able to login via Google account.')" :is-last="! google.allowedService">
|
||||
<SwitchInput
|
||||
@input="$updateText('/admin/settings', 'allowed_google_login', google.allowedService)"
|
||||
v-model="google.allowedService"
|
||||
class="switch"
|
||||
:state="google.allowedService"
|
||||
/>
|
||||
</AppInputSwitch>
|
||||
|
||||
<div v-if="config.isGoogleLoginConfigured && google.allowedService" @click="google.isVisibleCredentialsForm = !google.isVisibleCredentialsForm" class="flex items-center cursor-pointer" :class="{'mb-4': google.isVisibleCredentialsForm}">
|
||||
<edit2-icon size="12" class="vue-feather text-theme mr-2" />
|
||||
<b class="text-xs">{{ $t('Update Your Credentials') }}</b>
|
||||
</div>
|
||||
|
||||
<!--Set up Google credentials-->
|
||||
<ValidationObserver
|
||||
v-if="(! config.isGoogleLoginConfigured || google.isVisibleCredentialsForm) && google.allowedService"
|
||||
@submit.prevent="storeCredentials('google_login')"
|
||||
ref="credentialsForm"
|
||||
v-slot="{ invalid }"
|
||||
tag="form"
|
||||
class="p-5 shadow-lg rounded-xl"
|
||||
>
|
||||
<FormLabel v-if="! config.isGoogleLoginConfigured" icon="shield">
|
||||
{{ $t('Configure Credentials') }}
|
||||
</FormLabel>
|
||||
|
||||
<ValidationProvider tag="div" mode="passive" name="Client ID" rules="required" v-slot="{ errors }">
|
||||
<AppInputText :title="$t('Client ID')" :error="errors[0]">
|
||||
<input v-model="google.credentials.client_id" :placeholder="$t('Paste your Client ID here')" type="text" :class="{'border-red': errors[0]}" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
</ValidationProvider>
|
||||
|
||||
<ValidationProvider tag="div" mode="passive" name="Client Secret" rules="required" v-slot="{ errors }">
|
||||
<AppInputText :title="$t('Client Secret')" :error="errors[0]">
|
||||
<input v-model="google.credentials.client_secret" :placeholder="$t('Paste your Client Secret here')" type="text" :class="{'border-red': errors[0]}" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
</ValidationProvider>
|
||||
|
||||
<ButtonBase :disabled="isLoading" :loading="isLoading" button-style="theme" type="submit" class="w-full">
|
||||
{{ $t('Store Credentials') }}
|
||||
</ButtonBase>
|
||||
</ValidationObserver>
|
||||
|
||||
</div>
|
||||
|
||||
<!--Github Social Authentication-->
|
||||
<div class="card shadow-card">
|
||||
<img :src="$getSocialLogo('github')" alt="Github" class="mb-8 h-5">
|
||||
|
||||
<AppInputSwitch :title="$t('Allow Login via GitHub')" :description="$t('You users will be able to login via GitHub account.')" :is-last="! github.allowedService">
|
||||
<SwitchInput
|
||||
@input="$updateText('/admin/settings', 'allowed_github_login', github.allowedService)"
|
||||
v-model="github.allowedService"
|
||||
class="switch"
|
||||
:state="github.allowedService"
|
||||
/>
|
||||
</AppInputSwitch>
|
||||
|
||||
<div v-if="config.isGithubLoginConfigured && github.allowedService" @click="github.isVisibleCredentialsForm = !github.isVisibleCredentialsForm" class="flex items-center cursor-pointer" :class="{'mb-4': github.isVisibleCredentialsForm}">
|
||||
<edit2-icon size="12" class="vue-feather text-theme mr-2" />
|
||||
<b class="text-xs">{{ $t('Update Your Credentials') }}</b>
|
||||
</div>
|
||||
|
||||
<!--Set up github credentials-->
|
||||
<ValidationObserver
|
||||
v-if="(! config.isGithubLoginConfigured || github.isVisibleCredentialsForm) && github.allowedService"
|
||||
@submit.prevent="storeCredentials('github_login')"
|
||||
ref="credentialsForm"
|
||||
v-slot="{ invalid }"
|
||||
tag="form"
|
||||
class="p-5 shadow-lg rounded-xl"
|
||||
>
|
||||
<FormLabel v-if="! config.isGithubLoginConfigured" icon="shield">
|
||||
{{ $t('Configure Credentials') }}
|
||||
</FormLabel>
|
||||
|
||||
<ValidationProvider tag="div" mode="passive" name="Client ID" rules="required" v-slot="{ errors }">
|
||||
<AppInputText :title="$t('Client ID')" :error="errors[0]">
|
||||
<input v-model="github.credentials.client_id" :placeholder="$t('Paste your Client ID here')" type="text" :class="{'border-red': errors[0]}" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
</ValidationProvider>
|
||||
|
||||
<ValidationProvider tag="div" mode="passive" name="Client Secret" rules="required" v-slot="{ errors }">
|
||||
<AppInputText :title="$t('Client Secret')" :error="errors[0]">
|
||||
<input v-model="github.credentials.client_secret" :placeholder="$t('Paste your Client Secret here')" type="text" :class="{'border-red': errors[0]}" class="focus-border-theme input-dark" />
|
||||
</AppInputText>
|
||||
</ValidationProvider>
|
||||
|
||||
<ButtonBase :disabled="isLoading" :loading="isLoading" button-style="theme" type="submit" class="w-full">
|
||||
{{ $t('Store Credentials') }}
|
||||
</ButtonBase>
|
||||
</ValidationObserver>
|
||||
|
||||
</div>
|
||||
</PageTab>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
Edit2Icon,
|
||||
} from 'vue-feather-icons'
|
||||
import {ValidationProvider, ValidationObserver} from 'vee-validate/dist/vee-validate.full'
|
||||
import SwitchInput from '/resources/js/components/Others/Forms/SwitchInput'
|
||||
import AppInputSwitch from "../../../../components/Admin/AppInputSwitch"
|
||||
import FormLabel from '/resources/js/components/Others/Forms/FormLabel'
|
||||
import ButtonBase from '/resources/js/components/FilesView/ButtonBase'
|
||||
import AppInputText from "../../../../components/Admin/AppInputText"
|
||||
import PageTab from '/resources/js/components/Others/Layout/PageTab'
|
||||
import {required} from 'vee-validate/dist/rules'
|
||||
import {events} from '/resources/js/bus'
|
||||
import {mapGetters} from "vuex"
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
name: 'SignInUp',
|
||||
components: {
|
||||
ValidationObserver,
|
||||
ValidationProvider,
|
||||
AppInputSwitch,
|
||||
AppInputText,
|
||||
SwitchInput,
|
||||
ButtonBase,
|
||||
Edit2Icon,
|
||||
FormLabel,
|
||||
required,
|
||||
PageTab,
|
||||
events,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'config',
|
||||
])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoading: false,
|
||||
app: {
|
||||
userRegistration: undefined,
|
||||
userVerification: undefined,
|
||||
},
|
||||
facebook: {
|
||||
allowedService: false,
|
||||
isVisibleCredentialsForm: false,
|
||||
credentials: {
|
||||
key: undefined,
|
||||
secret: undefined,
|
||||
},
|
||||
},
|
||||
google: {
|
||||
allowedService: false,
|
||||
isVisibleCredentialsForm: false,
|
||||
credentials: {
|
||||
key: undefined,
|
||||
secret: undefined,
|
||||
},
|
||||
},
|
||||
github: {
|
||||
allowedService: false,
|
||||
isVisibleCredentialsForm: false,
|
||||
credentials: {
|
||||
key: undefined,
|
||||
secret: undefined,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async storeCredentials(service) {
|
||||
|
||||
// Validate fields
|
||||
const isValid = await this.$refs.credentialsForm.validate();
|
||||
|
||||
if (!isValid) return;
|
||||
|
||||
// Start loading
|
||||
this.isLoading = true
|
||||
|
||||
// Send request to get verify account
|
||||
axios
|
||||
.post('/api/admin/settings/social-service', {
|
||||
client_id: this[service].credentials.client_id,
|
||||
client_secret: this[service].credentials.client_secret,
|
||||
service: service,
|
||||
})
|
||||
.then(() => {
|
||||
// Commit credentials
|
||||
this.$store.commit('SET_SOCIAL_LOGIN_CONFIGURED', service)
|
||||
|
||||
this[service].allowedService = true
|
||||
this[service].isVisibleCredentialsForm = false
|
||||
|
||||
// Show toaster
|
||||
events.$emit('toaster', {
|
||||
type: 'success',
|
||||
message: this.$t('toaster.credentials_set', {service: service}),
|
||||
})
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
if (error.response.status === 500) {
|
||||
this.isError = true
|
||||
this.errorMessage = error.response.data.message
|
||||
}
|
||||
})
|
||||
.finally(() => this.isLoading = false)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.facebook.allowedService = this.config.allowedFacebookLogin
|
||||
this.google.allowedService = this.config.allowedGoogleLogin
|
||||
this.github.allowedService = this.config.allowedGithubLogin
|
||||
|
||||
this.app.userRegistration = this.config.userRegistration
|
||||
this.app.userVerification = this.config.userVerification
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -73,8 +73,6 @@
|
||||
app_description: '{{ $settings->app_description ?? __t('app_description') }}',
|
||||
|
||||
allowHomepage: {{ $settings->allow_homepage ?? 1 }},
|
||||
userRegistration: {{ $settings->registration ?? 1 }},
|
||||
userVerification: {{ $settings->user_verification ?? 0 }},
|
||||
storageLimit: {{ $settings->storage_limitation ?? 1 }},
|
||||
storageDefaultSpace: {{ $settings->default_max_storage_amount ?? 5 }},
|
||||
storageDefaultSpaceFormatted: '{{ isset($settings->default_max_storage_amount) ? format_gigabytes($settings->default_max_storage_amount) : format_gigabytes(5) }}',
|
||||
@@ -146,6 +144,10 @@
|
||||
// User settings
|
||||
defaultEmoji: '{{ $defaultEmoji }}',
|
||||
defaultThemeMode: '{{ $defaultThemeMode }}',
|
||||
|
||||
// App settings
|
||||
userRegistration: {{ $settings->registration ?? 1 }},
|
||||
userVerification: {{ $settings->user_verification ?? 0 }},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user