1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-09-07 20:59:09 +01:00
elk/components/account/AccountSignIn.vue
2022-11-23 11:06:56 +08:00

30 lines
766 B
Vue

<script setup lang="ts">
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()
}
</script>
<template>
<div h-full text-center justify-center flex="~ col items-center gap2">
<div text-4xl mb-10>
Nuxtodon
</div>
<div>Mastodon Server</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()">
Sign in
</button>
</div>
</template>