diff --git a/.env.staging b/.env.staging index cbcd4d8..2f4460b 100644 --- a/.env.staging +++ b/.env.staging @@ -1,4 +1,5 @@ PUBLIC_WEB_URL=http://10.13.114.114:91 PUBLIC_ADMIN_URL=http://10.13.114.114:91/admin PUBLIC_BASE_URL=http://10.13.114.114:91/api -PUBLIC_MAXKB_URL=http://10.13.114.114:92/chat/api/embed?protocol=http&host=10.13.114.114:92&token=df542e305f27dee6 \ No newline at end of file +PUBLIC_MAXKB_URL=http://10.13.114.114:92/chat/api/embed?protocol=http&host=10.13.114.114:92&token=df542e305f27dee6 +PUBLIC_ICONIFY_URL=http://10.13.114.114:8098 \ No newline at end of file diff --git a/components.d.ts b/components.d.ts index f1b6e92..417845a 100644 --- a/components.d.ts +++ b/components.d.ts @@ -19,9 +19,7 @@ declare module 'vue' { NAlert: typeof import('naive-ui')['NAlert'] NButton: typeof import('naive-ui')['NButton'] NCard: typeof import('naive-ui')['NCard'] - NCode: typeof import('naive-ui')['NCode'] NConfigProvider: typeof import('naive-ui')['NConfigProvider'] - NDataTable: typeof import('naive-ui')['NDataTable'] NDialogProvider: typeof import('naive-ui')['NDialogProvider'] NDropdown: typeof import('naive-ui')['NDropdown'] NEmpty: typeof import('naive-ui')['NEmpty'] @@ -34,10 +32,8 @@ declare module 'vue' { NMessageProvider: typeof import('naive-ui')['NMessageProvider'] NModal: typeof import('naive-ui')['NModal'] NModalProvider: typeof import('naive-ui')['NModalProvider'] - NPagination: typeof import('naive-ui')['NPagination'] NPopover: typeof import('naive-ui')['NPopover'] NRate: typeof import('naive-ui')['NRate'] - NSpin: typeof import('naive-ui')['NSpin'] NSplit: typeof import('naive-ui')['NSplit'] NTab: typeof import('naive-ui')['NTab'] NTabPane: typeof import('naive-ui')['NTabPane'] diff --git a/src/env.d.ts b/src/env.d.ts index 2fe6390..a39b0c4 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -3,6 +3,7 @@ interface ImportMetaEnv { readonly PUBLIC_BASE_URL: string readonly PUBLIC_ADMIN_URL: string readonly PUBLIC_MAXKB_URL: string + readonly PUBLIC_ICONIFY_URL: string } interface ImportMeta { diff --git a/src/main.ts b/src/main.ts index 6d1cbf1..70f81c0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,7 @@ import { createApp } from "vue" import { create } from "naive-ui" import App from "./App.vue" +import { addAPIProvider } from "@iconify/vue" //@ts-ignore import "github-markdown-css/github-markdown-light.css" @@ -46,3 +47,9 @@ const naive = create() app.use(naive) app.use(router) app.mount("#app") + +if (!!import.meta.env.PUBLIC_ICONIFY_URL) { + addAPIProvider("", { + resources: [import.meta.env.PUBLIC_ICONIFY_URL], + }) +}