You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OneAuth/oaweb/app.config.ts

41 lines
865 B
TypeScript

6 months ago
/*
* app.config.ts
* Copyright (C) 2024 veypi <i@veypi.com>
* 2024-05-31 18:10
* Distributed under terms of the MIT license.
*/
3 weeks ago
import oaer from '@veypi/oaer'
6 months ago
3 weeks ago
const ready = ref(false)
oaer.init().then(() => {
api.apitoken.value = oaer.Token()
api.apitoken.set_updator(oaer.TokenRefresh)
console.log('oaer init')
ready.value = true
oaer.on('logout', () => {
api.apitoken.value = ''
ready.value = false
})
}).catch(() => {
console.log('oaer init error')
oaer.logout()
})
6 months ago
export default defineAppConfig({
6 months ago
// host: window.location.protocol + '//' + window.location.host,
4 weeks ago
ui: {
// primary: '#2196f3',
// gray: '#111'
},
3 weeks ago
ready: computed(() => ready),
host: window.location.origin,
6 months ago
layout: {
theme: '',
6 months ago
fullscreen: false,
6 months ago
size: [0, 0],
header_height: 80,
footer_height: 16,
menu_width: 40,
}
})