env
This commit is contained in:
parent
c97ddc41c7
commit
ebe440af12
|
@ -1 +1,2 @@
|
||||||
NUXT_PUBLIC_API_BASE='http://localhost:8000/api'
|
NUXT_PUBLIC_API_BASE='http://localhost:8000/api'
|
||||||
|
NUXT_PUBLIC_TGBOT='svstech_inventory_bot'
|
|
@ -11,6 +11,7 @@ export default defineNuxtConfig({
|
||||||
runtimeConfig: {
|
runtimeConfig: {
|
||||||
public: {
|
public: {
|
||||||
apiBase: '/api',
|
apiBase: '/api',
|
||||||
|
tgbot: ''
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
|
@ -1,4 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
const config = useRuntimeConfig()
|
||||||
|
console.log(config.public.tgbot)
|
||||||
import { telegramLoginTemp } from 'vue3-telegram-login'
|
import { telegramLoginTemp } from 'vue3-telegram-login'
|
||||||
const items = ref()
|
const items = ref()
|
||||||
const page = ref(1)
|
const page = ref(1)
|
||||||
|
@ -36,7 +38,7 @@ const columns = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
const testCallback = (user:any) => {
|
const testCallback = (user: any) => {
|
||||||
user_id.value = user.id
|
user_id.value = user.id
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -45,7 +47,7 @@ const testCallback = (user:any) => {
|
||||||
<h1>Проведенные инвентаризации</h1>
|
<h1>Проведенные инвентаризации</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-span-12" v-if="!user_id">
|
<div class="col-span-12" v-if="!user_id">
|
||||||
<telegramLoginTemp mode="callback" telegram-login="aarizona_test_bot" @callback="testCallback" />
|
<telegramLoginTemp mode="callback" :telegram-login="config.public.tgbot" @callback="testCallback" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-span-12" v-if="user_id">
|
<div class="col-span-12" v-if="user_id">
|
||||||
<UTable :rows="items" :columns="columns" :ui="{ td: { base: 'whitespace-normal max-w-sm align-top' } }">
|
<UTable :rows="items" :columns="columns" :ui="{ td: { base: 'whitespace-normal max-w-sm align-top' } }">
|
||||||
|
|
Loading…
Reference in New Issue