mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.1 KiB
46 lines
1.1 KiB
<script lang="ts" setup> |
|
import { message } from 'ant-design-vue' |
|
import { extractSdkResponseErrorMsg, useApi } from '#imports' |
|
|
|
const { api } = useApi() |
|
|
|
let settings = $ref<{ disable_user_signup?: boolean }>({ disable_user_signup: false }) |
|
|
|
const loadSettings = async () => { |
|
try { |
|
const response = await api.orgAppSettings.get() |
|
settings = response |
|
} catch (e) { |
|
message.error(await extractSdkResponseErrorMsg(e)) |
|
} |
|
} |
|
|
|
const saveSettings = async () => { |
|
try { |
|
await api.orgAppSettings.set(settings) |
|
message.success('Settings ky updated') |
|
} catch (e) { |
|
message.error(await extractSdkResponseErrorMsg(e)) |
|
} |
|
} |
|
|
|
loadSettings() |
|
</script> |
|
|
|
<template> |
|
<div> |
|
<div class="text-xl">Settings</div> |
|
<a-divider class="!my-3" /> |
|
<a-form-item> |
|
<a-checkbox class="nc-checkbox" v-model:checked="settings.disable_user_signup" name="virtual" |
|
@change="saveSettings"> |
|
Disable user signup |
|
</a-checkbox> |
|
</a-form-item> |
|
</div> |
|
</template> |
|
<style scoped> |
|
:deep(.nc-checkbox label) { |
|
@apply flex-row-reverse !flex; |
|
} |
|
</style>
|
|
|