|
|
@ -1,12 +1,14 @@ |
|
|
|
<script lang="ts" setup> |
|
|
|
<script lang="ts" setup> |
|
|
|
import { useNuxtApp } from '#app' |
|
|
|
import { useNuxtApp } from '#app' |
|
|
|
import { message } from 'ant-design-vue' |
|
|
|
import { message } from 'ant-design-vue' |
|
|
|
import { extractSdkResponseErrorMsg, useApi } from '#imports' |
|
|
|
import { extractSdkResponseErrorMsg, useApi,useGlobal } from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
const { api, isLoading } = useApi() |
|
|
|
const { api, isLoading } = useApi() |
|
|
|
|
|
|
|
|
|
|
|
const {$e} = useNuxtApp() |
|
|
|
const {$e} = useNuxtApp() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const {loadAppInfo} = useGlobal() |
|
|
|
|
|
|
|
|
|
|
|
let key = $ref('') |
|
|
|
let key = $ref('') |
|
|
|
|
|
|
|
|
|
|
|
const loadLicense = async () => { |
|
|
|
const loadLicense = async () => { |
|
|
@ -22,6 +24,7 @@ const setLicense = async () => { |
|
|
|
try { |
|
|
|
try { |
|
|
|
await api.orgLicense.set({ key: key }) |
|
|
|
await api.orgLicense.set({ key: key }) |
|
|
|
message.success('License key updated') |
|
|
|
message.success('License key updated') |
|
|
|
|
|
|
|
await loadAppInfo(); |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
message.error(await extractSdkResponseErrorMsg(e)) |
|
|
|
message.error(await extractSdkResponseErrorMsg(e)) |
|
|
|
} |
|
|
|
} |
|
|
|