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/ui/env.js

18 lines
389 B
JavaScript

import VBase from './vbase.js'
export default async ($mod) => {
// Load i18n
try {
const langs = await (await fetch($mod.scoped + '/langs.json')).json()
$mod.$i18n.load(langs)
} catch (e) {
console.error('Failed to load langs.json', e)
}
if (!$mod.$auth) {
$mod.users = {}
const vbase = new VBase($mod.scoped, null, $mod.users)
$mod.$auth = vbase
}
}