mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
feat: improve UI and warning on mobile
This commit is contained in:
1 parent
82c68a316f
commit
5731d5de1a
5 files changed
+33
-23
No files matched your search
@@ -89,6 +89,13 @@ const handleChange = () => {
|
|||||||
class="bg-bg border-8 border-bg-primary flex flex-1 flex-col items-center justify-center rounded-3xl p-10"
|
class="bg-bg border-8 border-bg-primary flex flex-1 flex-col items-center justify-center rounded-3xl p-10"
|
||||||
>
|
>
|
||||||
<h1 class="text-text-primary text-3xl font-black mb-2">{{ title }}</h1>
|
<h1 class="text-text-primary text-3xl font-black mb-2">{{ title }}</h1>
|
||||||
|
<div class="text-error inline-flex justify-center items-center xl:hidden">
|
||||||
|
<font-awesome-icon
|
||||||
|
:icon="['fas', 'circle-exclamation']"
|
||||||
|
class="px-1 text-sm"
|
||||||
|
/>
|
||||||
|
<span>建議使用電腦全螢幕執行</span>
|
||||||
|
</div>
|
||||||
<form @submit.prevent="handleSubmit()" class="w-full">
|
<form @submit.prevent="handleSubmit()" class="w-full">
|
||||||
<div v-if="socialLogin && hasSocialLogins">
|
<div v-if="socialLogin && hasSocialLogins">
|
||||||
<a
|
<a
|
||||||
@@ -113,13 +120,13 @@ const handleChange = () => {
|
|||||||
/>
|
/>
|
||||||
<span class="font-medium">Continue with GitHub</span>
|
<span class="font-medium">Continue with GitHub</span>
|
||||||
</a>
|
</a>
|
||||||
|
<p
|
||||||
|
class="text-text-secondary flex justify-center mt-3"
|
||||||
|
v-if="type === 'login' || type === 'register'"
|
||||||
|
>
|
||||||
|
or
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<p
|
|
||||||
class="text-text-secondary flex justify-center mt-3"
|
|
||||||
v-if="type === 'login' || type === 'register'"
|
|
||||||
>
|
|
||||||
or
|
|
||||||
</p>
|
|
||||||
<div class="mb-6">
|
<div class="mb-6">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
@@ -136,9 +143,8 @@ const handleChange = () => {
|
|||||||
class="text-sm font-normal text-text-secondary"
|
class="text-sm font-normal text-text-secondary"
|
||||||
v-if="type === 'username' || type === 'register'"
|
v-if="type === 'username' || type === 'register'"
|
||||||
>
|
>
|
||||||
<p>Username can be up to 32 characters</p>
|
<p>可用小寫字母、數字、"_"和"-"</p>
|
||||||
<p>Username must begin with lowercase letter</p>
|
<p>小寫字母開頭,至多32字元</p>
|
||||||
<p>Username can consist of lowercase, numbers, "_", and "-"</p>
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-6" v-if="type === 'register'">
|
<div class="mb-6" v-if="type === 'register'">
|
||||||
|
|||||||
+11
-7
@@ -13,6 +13,8 @@ import {
|
|||||||
faArrowRotateLeft,
|
faArrowRotateLeft,
|
||||||
faArrowRightFromBracket,
|
faArrowRightFromBracket,
|
||||||
faArrowRight,
|
faArrowRight,
|
||||||
|
faBug,
|
||||||
|
faCircleExclamation,
|
||||||
} from '@fortawesome/free-solid-svg-icons'
|
} from '@fortawesome/free-solid-svg-icons'
|
||||||
import {
|
import {
|
||||||
faLightbulb,
|
faLightbulb,
|
||||||
@@ -25,17 +27,19 @@ import { faGithub, faGoogle } from '@fortawesome/free-brands-svg-icons'
|
|||||||
library.add(
|
library.add(
|
||||||
faBars,
|
faBars,
|
||||||
faArrowLeft,
|
faArrowLeft,
|
||||||
faTriangleExclamation,
|
|
||||||
faGear,
|
|
||||||
faExpand,
|
|
||||||
faList,
|
faList,
|
||||||
faLightbulb,
|
faGear,
|
||||||
faCircleQuestion,
|
faTriangleExclamation,
|
||||||
faArrowRotateLeft,
|
faExpand,
|
||||||
faCircleRight,
|
|
||||||
faTerminal,
|
faTerminal,
|
||||||
|
faArrowRotateLeft,
|
||||||
faArrowRightFromBracket,
|
faArrowRightFromBracket,
|
||||||
faArrowRight,
|
faArrowRight,
|
||||||
|
faBug,
|
||||||
|
faCircleExclamation,
|
||||||
|
faLightbulb,
|
||||||
|
faCircleQuestion,
|
||||||
|
faCircleRight,
|
||||||
faGithub,
|
faGithub,
|
||||||
faGoogle
|
faGoogle
|
||||||
)
|
)
|
||||||
@@ -45,12 +45,12 @@ async function handleSubmit({ username, success, error }) {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="relative w-screen h-screen">
|
<div class="w-screen h-screen">
|
||||||
<Background class="w-full h-full" />
|
<Background class="w-full h-full" />
|
||||||
<div
|
<div
|
||||||
class="h-screen w-screen absolute top-0 left-0 flex flex-wrap justify-center content-center"
|
class="h-screen w-screen absolute top-0 left-0 flex flex-wrap justify-center content-center"
|
||||||
>
|
>
|
||||||
<div class="w-1/3">
|
<div class="w-fit">
|
||||||
<AuthForm
|
<AuthForm
|
||||||
@onSubmit="handleSubmit"
|
@onSubmit="handleSubmit"
|
||||||
@onChange="check"
|
@onChange="check"
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ const handleLogin = async ({ username, password, success, error }) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="relative w-screen h-screen">
|
<div class="w-screen h-screen">
|
||||||
<Background class="w-full h-full" />
|
<Background class="w-full h-full" />
|
||||||
<div
|
<div
|
||||||
class="h-screen w-screen absolute top-0 left-0 flex flex-wrap justify-center content-center"
|
class="w-screen h-screen absolute top-0 left-0 flex flex-wrap justify-center content-center"
|
||||||
>
|
>
|
||||||
<div class="w-1/3">
|
<div class="w-fit">
|
||||||
<AuthForm @onSubmit="handleLogin" type="login" />
|
<AuthForm @onSubmit="handleLogin" type="login" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -65,12 +65,12 @@ async function check({ username, email, password, error }) {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="relative w-screen h-screen">
|
<div class="w-screen h-screen">
|
||||||
<Background class="w-full h-full" />
|
<Background class="w-full h-full" />
|
||||||
<div
|
<div
|
||||||
class="h-screen w-screen absolute top-0 left-0 flex flex-wrap justify-center content-center"
|
class="h-screen w-screen absolute top-0 left-0 flex flex-wrap justify-center content-center"
|
||||||
>
|
>
|
||||||
<div class="w-1/3">
|
<div class="w-fit">
|
||||||
<AuthForm
|
<AuthForm
|
||||||
@onSubmit="handleRegister"
|
@onSubmit="handleRegister"
|
||||||
@onChange="check"
|
@onChange="check"
|
||||||
|
|||||||
Reference in new issue
Block a user