2022-11-23 03:06:56 +00:00
|
|
|
<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>
|
|
|
|
|
2022-11-23 02:53:22 +00:00
|
|
|
<template>
|
2022-11-23 03:06:56 +00:00
|
|
|
<div h-full text-center justify-center flex="~ col items-center gap2">
|
|
|
|
<div text-4xl mb-10>
|
|
|
|
Nuxtodon
|
2022-11-23 02:53:22 +00:00
|
|
|
</div>
|
2022-11-23 03:06:56 +00:00
|
|
|
|
|
|
|
<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()">
|
2022-11-23 02:53:22 +00:00
|
|
|
Sign in
|
2022-11-23 03:06:56 +00:00
|
|
|
</button>
|
2022-11-23 02:53:22 +00:00
|
|
|
</div>
|
|
|
|
</template>
|