mirror of https://github.com/halo-dev/halo
refactor: weaken the animation of the login page #359 (halo-dev/console#369)
parent
287668fa85
commit
02dea4e3af
|
@ -2342,11 +2342,6 @@ i.trigger:hover {
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
.logo {
|
|
||||||
}
|
|
||||||
.logo h1 {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
.sider {
|
.sider {
|
||||||
box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
|
box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
|
||||||
}
|
}
|
||||||
|
@ -2358,9 +2353,6 @@ i.trigger:hover {
|
||||||
background: white;
|
background: white;
|
||||||
box-shadow: 1px 1px 0 0 #e8e8e8;
|
box-shadow: 1px 1px 0 0 #e8e8e8;
|
||||||
}
|
}
|
||||||
.sider.light .logo h1 {
|
|
||||||
color: @primary-color;
|
|
||||||
}
|
|
||||||
.sider.light :global(.ant-menu-light) {
|
.sider.light :global(.ant-menu-light) {
|
||||||
border-right-color: transparent;
|
border-right-color: transparent;
|
||||||
}
|
}
|
||||||
|
@ -2386,9 +2378,6 @@ i.trigger:hover {
|
||||||
.head.light {
|
.head.light {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
.logo h1 {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
.light h1 {
|
.light h1 {
|
||||||
color: #002140;
|
color: #002140;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,37 +7,22 @@
|
||||||
layout="vertical"
|
layout="vertical"
|
||||||
@keyup.enter.native="form.needAuthCode ? handleLogin() : handleLoginClick()"
|
@keyup.enter.native="form.needAuthCode ? handleLogin() : handleLoginClick()"
|
||||||
>
|
>
|
||||||
<a-form-model-item
|
<a-form-model-item v-if="!form.needAuthCode" prop="username">
|
||||||
v-if="!form.needAuthCode"
|
|
||||||
:style="{ 'animation-delay': '0.1s' }"
|
|
||||||
class="animated fadeInUp"
|
|
||||||
prop="username"
|
|
||||||
>
|
|
||||||
<a-input v-model="form.model.username" placeholder="用户名/邮箱">
|
<a-input v-model="form.model.username" placeholder="用户名/邮箱">
|
||||||
<a-icon slot="prefix" style="color: rgba(0,0,0,.25)" type="user" />
|
<a-icon slot="prefix" style="color: rgba(0,0,0,.25)" type="user" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item
|
<a-form-model-item v-if="!form.needAuthCode" prop="password">
|
||||||
v-if="!form.needAuthCode"
|
|
||||||
:style="{ 'animation-delay': '0.2s' }"
|
|
||||||
class="animated fadeInUp"
|
|
||||||
prop="password"
|
|
||||||
>
|
|
||||||
<a-input v-model="form.model.password" placeholder="密码" type="password">
|
<a-input v-model="form.model.password" placeholder="密码" type="password">
|
||||||
<a-icon slot="prefix" style="color: rgba(0,0,0,.25)" type="lock" />
|
<a-icon slot="prefix" style="color: rgba(0,0,0,.25)" type="lock" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item
|
<a-form-model-item v-if="form.needAuthCode" prop="authcode">
|
||||||
v-if="form.needAuthCode"
|
|
||||||
:style="{ 'animation-delay': '0.1s' }"
|
|
||||||
class="animated fadeInUp"
|
|
||||||
prop="authcode"
|
|
||||||
>
|
|
||||||
<a-input v-model="form.model.authcode" :maxLength="6" placeholder="两步验证码">
|
<a-input v-model="form.model.authcode" :maxLength="6" placeholder="两步验证码">
|
||||||
<a-icon slot="prefix" style="color: rgba(0,0,0,.25)" type="safety-certificate" />
|
<a-icon slot="prefix" style="color: rgba(0,0,0,.25)" type="safety-certificate" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item :style="{ 'animation-delay': '0.3s' }" class="animated fadeInUp">
|
<a-form-model-item>
|
||||||
<a-button
|
<a-button
|
||||||
:block="true"
|
:block="true"
|
||||||
:loading="form.logging"
|
:loading="form.logging"
|
||||||
|
|
|
@ -41,39 +41,6 @@
|
||||||
animation-name: fadeInRight;
|
animation-name: fadeInRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
@-webkit-keyframes fadeInUp {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transform: translate3d(0, 100%, 0);
|
|
||||||
transform: translate3d(0, 100%, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
-webkit-transform: translate3d(0, 0, 0);
|
|
||||||
transform: translate3d(0, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes fadeInUp {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transform: translate3d(0, 100%, 0);
|
|
||||||
transform: translate3d(0, 100%, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
-webkit-transform: translate3d(0, 0, 0);
|
|
||||||
transform: translate3d(0, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.fadeInUp {
|
|
||||||
-webkit-animation-name: fadeInUp;
|
|
||||||
animation-name: fadeInUp;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes fadeIn {
|
@keyframes fadeIn {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
|
@ -18,23 +18,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.halo-logo {
|
.halo-logo {
|
||||||
margin-bottom: 20px;
|
margin-top: 10px;
|
||||||
|
margin-bottom: 30px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
vertical-align: text-bottom;
|
margin-left: 5px;
|
||||||
font-size: 38px;
|
font-size: 12px;
|
||||||
display: inline-block;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #1790fe;
|
color: #1790fe;
|
||||||
background-image: linear-gradient(-20deg, #6e45e2 0%, #88d3ce 100%);
|
}
|
||||||
-webkit-text-fill-color: transparent;
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
background-clip: text;
|
|
||||||
|
|
||||||
small {
|
img {
|
||||||
margin-left: 5px;
|
width: 78px;
|
||||||
font-size: 35%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,43 +1,35 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="container-wrapper">
|
<div class="container-wrapper animated fadeIn">
|
||||||
<div class="halo-logo animated fadeInUp">
|
<div class="halo-logo">
|
||||||
<span
|
<img src="/images/logo.svg" alt="Halo Logo" />
|
||||||
>Halo
|
<span v-if="apiForm.visible">API 设置</span>
|
||||||
<small v-if="apiForm.visible">API 设置</small>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-show="!apiForm.visible" class="login-form animated">
|
<div v-show="!apiForm.visible" class="login-form">
|
||||||
<LoginForm @success="onLoginSucceed" />
|
<LoginForm @success="onLoginSucceed" />
|
||||||
<a-row>
|
<router-link v-if="resetPasswordButtonVisible" class="tip" :to="{ name: 'ResetPassword' }">
|
||||||
<a-col :span="24">
|
找回密码
|
||||||
<router-link :to="{ name: 'ResetPassword' }">
|
</router-link>
|
||||||
<a v-if="resetPasswordButtonVisible" class="tip animated fadeInRight" href="javascript:void(0);">
|
<a class="tip" @click="handleToggleShowApiForm">
|
||||||
找回密码
|
<a-icon type="setting" />
|
||||||
</a>
|
</a>
|
||||||
</router-link>
|
|
||||||
<a :style="{ 'animation-delay': '0.4s' }" class="tip animated fadeInUp" @click="handleToggleShowApiForm">
|
|
||||||
<a-icon type="setting" />
|
|
||||||
</a>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-show="apiForm.visible" class="api-form animated">
|
<div v-show="apiForm.visible" class="api-form">
|
||||||
<a-form layout="vertical">
|
<a-form layout="vertical">
|
||||||
<a-form-item :style="{ 'animation-delay': '0.1s' }" class="animated fadeInUp">
|
<a-form-item>
|
||||||
<a-tooltip placement="top" title="如果 Admin 不是独立部署,请不要更改此 API" trigger="click">
|
<a-tooltip placement="top" title="如果 Admin 不是独立部署,请不要更改此 API" trigger="click">
|
||||||
<a-input v-model="apiForm.apiUrl" placeholder="API 地址">
|
<a-input v-model="apiForm.apiUrl" placeholder="API 地址">
|
||||||
<a-icon slot="prefix" style="color: rgba(0,0,0,.25)" type="api" />
|
<a-icon slot="prefix" style="color: rgba(0,0,0,.25)" type="api" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item :style="{ 'animation-delay': '0.2s' }" class="animated fadeInUp">
|
<a-form-item>
|
||||||
<a-button :block="true" @click="handleRestoreApiUrl">恢复默认</a-button>
|
<a-button :block="true" @click="handleRestoreApiUrl">恢复默认</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item :style="{ 'animation-delay': '0.3s' }" class="animated fadeInUp">
|
<a-form-item>
|
||||||
<a-button :block="true" type="primary" @click="handleModifyApiUrl">保存设置</a-button>
|
<a-button :block="true" type="primary" @click="handleModifyApiUrl">保存设置</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a :style="{ 'animation-delay': '0.4s' }" class="tip animated fadeInUp" @click="handleToggleShowApiForm">
|
<a class="tip" @click="handleToggleShowApiForm">
|
||||||
<a-icon type="rollback" />
|
<a-icon type="rollback" />
|
||||||
</a>
|
</a>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
|
@ -1,33 +1,34 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="container-wrapper">
|
<div class="container-wrapper animated fadeIn">
|
||||||
<div class="halo-logo animated fadeInUp">
|
<div class="halo-logo">
|
||||||
<span>Halo<small>重置密码</small></span>
|
<img src="/images/logo.svg" alt="Halo Logo" />
|
||||||
|
<span>重置密码</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="animated">
|
<div>
|
||||||
<a-form layout="vertical">
|
<a-form layout="vertical">
|
||||||
<a-form-item class="animated fadeInUp" :style="{ 'animation-delay': '0.1s' }">
|
<a-form-item>
|
||||||
<a-input placeholder="用户名" v-model="resetParam.username">
|
<a-input placeholder="用户名" v-model="resetParam.username">
|
||||||
<a-icon slot="prefix" type="user" style="color: rgba(0, 0, 0, 0.25)" />
|
<a-icon slot="prefix" type="user" style="color: rgba(0, 0, 0, 0.25)" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item class="animated fadeInUp" :style="{ 'animation-delay': '0.2s' }">
|
<a-form-item>
|
||||||
<a-input placeholder="邮箱" v-model="resetParam.email">
|
<a-input placeholder="邮箱" v-model="resetParam.email">
|
||||||
<a-icon slot="prefix" type="mail" style="color: rgba(0, 0, 0, 0.25)" />
|
<a-icon slot="prefix" type="mail" style="color: rgba(0, 0, 0, 0.25)" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item class="animated fadeInUp" :style="{ 'animation-delay': '0.3s' }">
|
<a-form-item>
|
||||||
<a-input v-model="resetParam.code" type="password" placeholder="验证码">
|
<a-input v-model="resetParam.code" type="password" placeholder="验证码">
|
||||||
<a-icon slot="prefix" type="safety-certificate" style="color: rgba(0, 0, 0, 0.25)" />
|
<a-icon slot="prefix" type="safety-certificate" style="color: rgba(0, 0, 0, 0.25)" />
|
||||||
<a href="javascript:void(0);" slot="addonAfter" @click="handleSendCode"> 获取 </a>
|
<a href="javascript:void(0);" slot="addonAfter" @click="handleSendCode"> 获取 </a>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item class="animated fadeInUp" :style="{ 'animation-delay': '0.4s' }">
|
<a-form-item>
|
||||||
<a-input v-model="resetParam.password" type="password" placeholder="新密码" autocomplete="new-password">
|
<a-input v-model="resetParam.password" type="password" placeholder="新密码" autocomplete="new-password">
|
||||||
<a-icon slot="prefix" type="lock" style="color: rgba(0, 0, 0, 0.25)" />
|
<a-icon slot="prefix" type="lock" style="color: rgba(0, 0, 0, 0.25)" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item class="animated fadeInUp" :style="{ 'animation-delay': '0.5s' }">
|
<a-form-item>
|
||||||
<a-input
|
<a-input
|
||||||
v-model="resetParam.confirmPassword"
|
v-model="resetParam.confirmPassword"
|
||||||
type="password"
|
type="password"
|
||||||
|
@ -37,16 +38,13 @@
|
||||||
<a-icon slot="prefix" type="lock" style="color: rgba(0, 0, 0, 0.25)" />
|
<a-icon slot="prefix" type="lock" style="color: rgba(0, 0, 0, 0.25)" />
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item class="animated fadeInUp" :style="{ 'animation-delay': '0.6s' }">
|
<a-form-item>
|
||||||
<a-button type="primary" :block="true" @click="handleResetPassword">重置密码</a-button>
|
<a-button type="primary" :block="true" @click="handleResetPassword">重置密码</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-row>
|
|
||||||
<router-link :to="{ name: 'Login' }">
|
|
||||||
<a class="tip animated fadeInUp" :style="{ 'animation-delay': '0.7s' }"> 返回登录 </a>
|
|
||||||
</router-link>
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
</a-form>
|
||||||
|
<router-link class="tip" :to="{ name: 'Login' }">
|
||||||
|
返回登录
|
||||||
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue