cache
This commit is contained in:
parent
0e984c46b4
commit
e5cf2c1367
@ -1,13 +1,23 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>UShare</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<!-- Emoji 图标方案 -->
|
||||
<link rel="icon"
|
||||
href="data:image/svg+xml,
|
||||
<svg xmlns='http://www.w3.org/2000/svg'
|
||||
viewBox='0 0 100 100'>
|
||||
<text y='.9em'
|
||||
font-size='90'
|
||||
style='font-family: Arial, sans-serif'>
|
||||
🗃️
|
||||
</text>
|
||||
</svg>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>UShare</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
@ -89,7 +89,7 @@ export const Login: React.FC = () => {
|
||||
<input placeholder={"请输入账号"}/>
|
||||
</div>
|
||||
<div className={classes.input}>
|
||||
<input placeholder={"请输入密码"}/>
|
||||
<input placeholder={"请输入密码"} type={"password"} />
|
||||
</div>
|
||||
<div className={classes.button}>
|
||||
<button>登录</button>
|
||||
|
@ -109,8 +109,12 @@ func (m *meta) Start(ctx context.Context) {
|
||||
for code, info := range m.m {
|
||||
if now.Sub(info.last) > 1*time.Minute {
|
||||
m.Lock()
|
||||
info.f.Close()
|
||||
os.RemoveAll(opt.FilePath(code))
|
||||
if err := info.f.Close(); err != nil {
|
||||
log.Warn("handler.Meta: [timer] close file failed, file = %s, err = %s", opt.FilePath(code), err.Error())
|
||||
}
|
||||
if err := os.RemoveAll(opt.FilePath(code)); err != nil {
|
||||
log.Warn("handler.Meta: [timer] remove file failed, file = %s, err = %s", opt.FilePath(code), err.Error())
|
||||
}
|
||||
delete(m.m, code)
|
||||
m.Unlock()
|
||||
log.Warn("MetaController: code timeout removed, code = %s", code)
|
||||
|
143
page/login.html
143
page/login.html
@ -1,93 +1,92 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>登录页面</title>
|
||||
<title>Login Page</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Segoe UI', Arial, sans-serif;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #f5f5f5;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
background: #f0f2f5;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.login-box {
|
||||
background: white;
|
||||
padding: 40px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.login-header {
|
||||
h2 {
|
||||
text-align: center;
|
||||
color: #333;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.login-header h1 {
|
||||
color: #1a73e8;
|
||||
font-size: 28px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.login-header p {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.form-group input {
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 12px 15px;
|
||||
padding: 12px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 6px;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
transition: border-color 0.3s;
|
||||
transition: border-color 0.3s ease;
|
||||
}
|
||||
|
||||
.form-group input:focus {
|
||||
input[type="text"]:focus,
|
||||
input[type="password"]:focus {
|
||||
border-color: #4CAF50;
|
||||
outline: none;
|
||||
border-color: #1a73e8;
|
||||
box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
|
||||
}
|
||||
|
||||
.form-group input:hover {
|
||||
border-color: #1a73e8;
|
||||
}
|
||||
|
||||
.options {
|
||||
.form-options {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 25px;
|
||||
font-size: 14px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.remember-me {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.remember-me input {
|
||||
margin-right: 8px;
|
||||
gap: 5px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.forgot-password {
|
||||
color: #1a73e8;
|
||||
color: #4CAF50;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.forgot-password:hover {
|
||||
@ -97,17 +96,17 @@
|
||||
.login-button {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
background: #1a73e8;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.login-button:hover {
|
||||
background: #1557b0;
|
||||
background-color: #45a049;
|
||||
}
|
||||
|
||||
.signup-link {
|
||||
@ -117,44 +116,50 @@
|
||||
}
|
||||
|
||||
.signup-link a {
|
||||
color: #1a73e8;
|
||||
color: #4CAF50;
|
||||
text-decoration: none;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.signup-link a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Responsive Design */
|
||||
@media (max-width: 480px) {
|
||||
.login-box {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.form-options {
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="login-container">
|
||||
<div class="login-header">
|
||||
<h1>欢迎登录</h1>
|
||||
<p>请输入您的账号信息</p>
|
||||
</div>
|
||||
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="用户名/邮箱" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="password" placeholder="密码" required>
|
||||
</div>
|
||||
|
||||
<div class="options">
|
||||
<label class="remember-me">
|
||||
<input type="checkbox"> 记住我
|
||||
</label>
|
||||
<a href="#" class="forgot-password">忘记密码?</a>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="login-button">立即登录</button>
|
||||
</form>
|
||||
|
||||
<div class="signup-link">
|
||||
还没有账号?<a href="#">立即注册</a>
|
||||
<div class="login-box">
|
||||
<h2>Welcome Back</h2>
|
||||
<form class="login-form">
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" id="username" name="username" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="password" required>
|
||||
</div>
|
||||
<div class="form-options">
|
||||
<label class="remember-me">
|
||||
<input type="checkbox"> Remember me
|
||||
</label>
|
||||
<a href="#" class="forgot-password">Forgot Password?</a>
|
||||
</div>
|
||||
<button type="submit" class="login-button">Log In</button>
|
||||
</form>
|
||||
<p class="signup-link">Don't have an account? <a href="#">Sign up</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
Loading…
x
Reference in New Issue
Block a user