1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-10 19:09:58 +00:00

feat: add sign in for mobile

This commit is contained in:
三咲智子 2022-11-26 11:53:23 +08:00
parent db762cdbba
commit 696ddb2bad
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
3 changed files with 8 additions and 3 deletions

View file

@ -21,6 +21,11 @@
<AccountAvatar :account="currentUser.account" h="1.5em" /> <AccountAvatar :account="currentUser.account" h="1.5em" />
</NuxtLink> </NuxtLink>
</template> </template>
<template v-else>
<button btn-solid text-sm px-2 py-1 text-center @click="openSigninDialog()">
Sign in
</button>
</template>
</div> </div>
</div> </div>
<slot name="header" /> <slot name="header" />

View file

@ -23,7 +23,7 @@ watchOnce(modelValue, () => {
/> />
<div <div
class=" class="
bg-base absolute transition-all duration-200 ease-out shadow rounded-md transform ml-0 bg-base absolute transition-all duration-200 ease-out shadow rounded-md transform
border border-base top-1/2 -translate-y-1/2 mx-8 md:(left-1/2 -translate-x-1/2) border border-base top-1/2 -translate-y-1/2 mx-8 md:(left-1/2 -translate-x-1/2)
" "
:class="modelValue ? 'opacity-100' : 'opacity-0'" :class="modelValue ? 'opacity-100' : 'opacity-0'"

View file

@ -15,12 +15,12 @@ async function handleInput() {
</script> </script>
<template> <template>
<div h-full text-center justify-center flex="~ col items-center gap2"> <div text-center justify-center flex="~ col items-center gap2">
<div text-3xl mb2> <div text-3xl mb2>
Sign in Sign in
</div> </div>
<div>Mastodon Server Name</div> <div>Mastodon Server Name</div>
<div flex bg-gray:10 px2 py1 mxa rounded border="~ border" w-80 text-xl items-center> <div flex bg-gray:10 px2 py1 mxa rounded border="~ border" text-xl items-center>
<span op35 mr1 text-sm>https://</span> <span op35 mr1 text-sm>https://</span>
<input v-model="server" :placeholder="DEFAULT_SERVER" outline-none bg-transparent @input="handleInput"> <input v-model="server" :placeholder="DEFAULT_SERVER" outline-none bg-transparent @input="handleInput">
</div> </div>