1
0

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

@ -24,10 +24,14 @@ const buildTimeAgo = useTimeAgo(buildTime)
</div>
<div>
<button cursor-pointer hover:underline @click="openPreviewHelp">
Show intro
{{ $t('nav_footer.show_intro') }}
</button>
</div>
<div>A Mastodon client made with 🧡</div>
<div>Built <time :datetime="buildTime" :title="buildTime">{{ buildTimeAgo }}</time> · <a href="https://github.com/elk-zone/elk" target="_blank">GitHub</a></div>
<div>{{ $t('app_desc_short') }}</div>
<div>
<i18n-t keypath="nav_footer.built_at">
<time :datetime="buildTime" :title="buildTime">{{ buildTimeAgo }}</time>
</i18n-t> · <a href="https://github.com/elk-zone/elk" target="_blank">GitHub</a>
</div>
</footer>
</template>

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>

View File

@ -26,6 +26,7 @@
"save_changes": "Save changes",
"sign_in": "Sign in"
},
"app_desc_short": "A Mastodon client made with 🧡",
"app_name": "Elk",
"command": {
"activate": "Activate",
@ -62,8 +63,10 @@
"unpin_on_profile": "Unpin on profile"
},
"nav_footer": {
"built_at": "Built {0}",
"select_feature_flags": "Toggle Feature Flags",
"select_language": "Select Language",
"show_intro": "Show intro",
"toggle_theme": "Toggle Theme",
"zen_mode": "Zen Mode"
},
@ -123,7 +126,10 @@
},
"user": {
"add_existing": "Add an existing account",
"sign_out_account": "Sign out {0}"
"server_address_label": "Mastodon Server Address",
"sign_out_account": "Sign out {0}",
"tip_no_account": "If you don't have a Mastodon account yet, {0}.",
"tip_register_account": "pick your server and register one"
},
"visibility": {
"direct": "Direct",

View File

@ -24,8 +24,9 @@
"publish": "发布!",
"reply": "回复",
"save_changes": "保存更改",
"sign_in": "登"
"sign_in": "登鹿"
},
"app_desc_short": "用 🧡 制作的 Mastodon 客户端",
"app_name": "鹿鸣",
"command": {
"activate": "执行",
@ -62,8 +63,10 @@
"unpin_on_profile": "取消钉选"
},
"nav_footer": {
"built_at": "于 {0} 构建",
"select_feature_flags": "功能开关",
"select_language": "选择语言",
"show_intro": "应用介绍",
"toggle_theme": "切换主题",
"zen_mode": "禅模式"
},
@ -123,7 +126,10 @@
},
"user": {
"add_existing": "添加现有帐户",
"sign_out_account": "登出 {0}"
"server_address_label": "Mastodon 服务器地址",
"sign_out_account": "登出 {0}",
"tip_no_account": "如果您还没有 Mastodon 账户,{0}。",
"tip_register_account": "选择您的服务器并注册一个"
},
"visibility": {
"direct": "私信",