mirror of
https://github.com/elk-zone/elk.git
synced 2024-09-06 12:19:08 +01:00
feat: i18n for sign page in mastodon
This commit is contained in:
parent
88ac29ea14
commit
04480eef44
2 changed files with 4 additions and 1 deletions
|
@ -12,6 +12,7 @@ let autocompleteIndex = $ref(0)
|
||||||
let autocompleteShow = $ref(false)
|
let autocompleteShow = $ref(false)
|
||||||
|
|
||||||
const users = useUsers()
|
const users = useUsers()
|
||||||
|
const userSettings = useUserSettings()
|
||||||
|
|
||||||
async function oauth() {
|
async function oauth() {
|
||||||
if (busy)
|
if (busy)
|
||||||
|
@ -32,6 +33,7 @@ async function oauth() {
|
||||||
body: {
|
body: {
|
||||||
force_login: users.value.some(u => u.server === server),
|
force_login: users.value.some(u => u.server === server),
|
||||||
origin: location.origin,
|
origin: location.origin,
|
||||||
|
lang: userSettings.value.language,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { getApp, getRedirectURI } from '~/server/shared'
|
||||||
|
|
||||||
export default defineEventHandler(async (event) => {
|
export default defineEventHandler(async (event) => {
|
||||||
let { server } = getRouterParams(event)
|
let { server } = getRouterParams(event)
|
||||||
const { origin, force_login } = await readBody(event)
|
const { origin, force_login, lang } = await readBody(event)
|
||||||
server = server.toLocaleLowerCase().trim()
|
server = server.toLocaleLowerCase().trim()
|
||||||
const app = await getApp(origin, server)
|
const app = await getApp(origin, server)
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ export default defineEventHandler(async (event) => {
|
||||||
scope: 'read write follow push',
|
scope: 'read write follow push',
|
||||||
redirect_uri: getRedirectURI(origin, server),
|
redirect_uri: getRedirectURI(origin, server),
|
||||||
response_type: 'code',
|
response_type: 'code',
|
||||||
|
lang,
|
||||||
})
|
})
|
||||||
|
|
||||||
return `https://${server}/oauth/authorize?${query}`
|
return `https://${server}/oauth/authorize?${query}`
|
||||||
|
|
Loading…
Reference in a new issue