mirror of https://github.com/nocodb/nocodb
Pranav C
2 years ago
10 changed files with 247 additions and 143 deletions
@ -1,9 +1,41 @@
|
||||
<script lang="ts" setup> |
||||
import { message } from 'ant-design-vue' |
||||
import { extractSdkResponseErrorMsg, useApi } from '#imports' |
||||
|
||||
const { api } = useApi() |
||||
|
||||
let settings = $ref({ enable_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 name="virtual">Enable user signup</a-checkbox> |
||||
<a-checkbox v-model:checked="settings.enable_user_signup" name="virtual" @change="saveSettings" |
||||
>Enable user signup</a-checkbox |
||||
> |
||||
</a-form-item> |
||||
</div> |
||||
</template> |
||||
|
@ -0,0 +1,2 @@
|
||||
export const LICENSE_KEY = 'nc-license-key'; |
||||
export const NC_APP_SETTINGS = 'nc-app-settings'; |
Loading…
Reference in new issue