ui: improve login dialog

This commit is contained in:
Anthony Fu 2022-11-30 09:45:52 +08:00
parent c9731f787d
commit afed995138
4 changed files with 41 additions and 14 deletions

View file

@ -21,16 +21,27 @@ onMounted(() => {
</script>
<template>
<form text-center justify-center items-center flex="~ col gap2" @submit.prevent="oauth">
<div text-3xl mb2>
{{ $t('action.sign_in') }}
<form text-center justify-center items-center w-150 py6 flex="~ col gap-3" @submit.prevent="oauth">
<div flex="~ center" mb2>
<img src="/logo.svg" w-12 h-12 mxa alt="logo">
<div text-3xl>
{{ $t('action.sign_in') }}
</div>
</div>
<div>Mastodon Server Name</div>
<div flex bg-gray:10 px2 py1 mxa rounded border="~ border" text-xl items-center>
<span text-secondary-light mr1 text-sm>https://</span>
<input ref="input" v-model="server" :placeholder="DEFAULT_SERVER" outline-none bg-transparent @input="handleInput">
<div>{{ $t('user.server_address_label') }}</div>
<div flex bg-gray:10 px4 py2 mxa rounded border="~ base" items-center font-mono focus:outline-none focus:ring="2 primary inset">
<span text-secondary-light mr1>https://</span>
<input ref="input" v-model="server" outline-none bg-transparent @input="handleInput">
</div>
<button btn-solid mt2>
<div text-secondary text-sm flex>
<div i-ri:lightbulb-line mr-1 />
<span>
<i18n-t keypath="user.tip_no_account">
<a href="https://joinmastodon.org/servers" target="_blank" hover="underline text-primary">{{ $t('user.tip_register_account') }}</a>
</i18n-t>
</span>
</div>
<button btn-solid mt2 :disabled="!server">
{{ $t('action.sign_in') }}
</button>
</form>