feat: basic mutli-accounts support
This commit is contained in:
parent
24c573ccf0
commit
241b28241c
15 changed files with 170 additions and 34 deletions
|
@ -4,25 +4,21 @@ import { DEFAULT_SERVER } from '~/constants'
|
|||
const server = ref<string>()
|
||||
|
||||
async function oauth() {
|
||||
const a = document.createElement('a')
|
||||
a.href = `/api/${server.value || DEFAULT_SERVER}/login`
|
||||
a.target = '_blank'
|
||||
a.click()
|
||||
location.href = `/api/${server.value || DEFAULT_SERVER}/login`
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div h-full text-center justify-center flex="~ col items-center gap2">
|
||||
<div text-4xl mb-10>
|
||||
Nuxtodon
|
||||
<div text-3xl mb2>
|
||||
Sign in
|
||||
</div>
|
||||
|
||||
<div>Mastodon Server</div>
|
||||
<div>Mastodon Server Name</div>
|
||||
<div flex bg-gray:10 px2 py1 mxa rounded border="~ border" w-80 text-xl items-center>
|
||||
<span op35 mr1 text-sm>https://</span>
|
||||
<input v-model="server" :placeholder="DEFAULT_SERVER" outline-none bg-transparent>
|
||||
</div>
|
||||
<button btn-solid mxa @click="oauth()">
|
||||
<button btn-solid mxa mt2 @click="oauth()">
|
||||
Sign in
|
||||
</button>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue