|
|
|
@ -5,6 +5,8 @@ import { extractSdkResponseErrorMsg, useApi, useGlobal } from '#imports'
|
|
|
|
|
|
|
|
|
|
const { api, isLoading } = useApi() |
|
|
|
|
|
|
|
|
|
const { t } = useI18n() |
|
|
|
|
|
|
|
|
|
const { $e } = useNuxtApp() |
|
|
|
|
|
|
|
|
|
const { loadAppInfo } = useGlobal() |
|
|
|
@ -22,7 +24,7 @@ const loadLicense = async () => {
|
|
|
|
|
const setLicense = async () => { |
|
|
|
|
try { |
|
|
|
|
await api.orgLicense.set({ key: key.value }) |
|
|
|
|
message.success('License key updated') |
|
|
|
|
message.success(t('success.licenseKeyUpdated')) |
|
|
|
|
await loadAppInfo() |
|
|
|
|
} catch (e: any) { |
|
|
|
|
message.error(await extractSdkResponseErrorMsg(e)) |
|
|
|
@ -35,14 +37,14 @@ loadLicense()
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
|
<div class="h-full overflow-y-scroll scrollbar-thin-dull"> |
|
|
|
|
<!-- <div class="text-xl mt-4 mb-8 text-center font-weight-bold">License</div>--> |
|
|
|
|
<!-- <div class="mx-auto w-150">--> |
|
|
|
|
<!-- <div>--> |
|
|
|
|
<!-- <a-textarea v-model:value="key" placeholder="License key" class="!mt-2 !max-w-[600px]"></a-textarea>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<!-- <div class="text-center">--> |
|
|
|
|
<!-- <a-button class="mt-4 !h-[2.2rem] !rounded-md" @click="setLicense" type="primary">Save license key</a-button>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<!-- <div class="text-xl mt-4 mb-8 text-center font-weight-bold">License</div>--> |
|
|
|
|
<!-- <div class="mx-auto w-150">--> |
|
|
|
|
<!-- <div>--> |
|
|
|
|
<!-- <a-textarea v-model:value="key" placeholder="License key" class="!mt-2 !max-w-[600px]"></a-textarea>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<!-- <div class="text-center">--> |
|
|
|
|
<!-- <a-button class="mt-4 !h-[2.2rem] !rounded-md" @click="setLicense" type="primary">Save license key</a-button>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|