9 Commits
Author SHA1 Message Date
mei e68d48e816 fix 2026-03-01 09:32:51 +08:00
mei 564e8a920b fix 2026-03-01 09:32:31 +08:00
mei ff949af529 update docker image version 2026-03-01 09:28:31 +08:00
mei 24630223a4 feat: 新前端 2026-03-01 08:56:32 +08:00
mei 0e689a3377 fix 2026-01-18 10:15:58 +08:00
mei bfb0fceb48 fix 2026-01-18 10:15:20 +08:00
mei eef983b1a5 fix 2026-01-18 10:13:47 +08:00
mei c66649c0ca fix 2026-01-18 10:09:53 +08:00
mei 0989fec5c1 fix:docker compose 2026-01-18 10:09:39 +08:00
5 changed files with 129 additions and 123 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
"cause_stop": "自杀" "cause_stop": "自杀"
}, },
"signal_secret": "", "signal_secret": "",
"debug": true, "debug": false,
"disconnect_duration": 5, "disconnect_duration": 5,
"enable_qq": true, "enable_qq": true,
"cat_bot_url": "", "cat_bot_url": "",
+3 -3
View File
@@ -1,17 +1,17 @@
version: '3.8'
services: services:
goodbaby: goodbaby:
image: mei232/goodbaby:latest image: mei232/goodbaby:v0.1.8
ports: ports:
- "8088:8088" - "8088:8088"
environment: environment:
- TZ=Asia/Shanghai - TZ=Asia/Shanghai
- GIN_MODE=release
restart: unless-stopped restart: unless-stopped
networks: networks:
- app-network - app-network
volumes: volumes:
- ./config.json:/app/config.json:ro - ./config.json:/app/config.json:ro
- ./tmp:/app/tmp
networks: networks:
app-network: app-network:
+1 -1
View File
@@ -22,7 +22,7 @@ func SendMail() {
return return
} }
stopMsg := fmt.Sprintf("%s\n\n%s\n\n本消息由自动程序发送(摇篮系统)", GetBasicInfo(), config.MailContent) stopMsg := fmt.Sprintf("%s\n\n%s\n\n本消息由自动程序发送", GetBasicInfo(), config.MailContent)
for _, address := range config.MailList { for _, address := range config.MailList {
sendMailMsgWithRetry(address, stopMsg, config.MailTitle) sendMailMsgWithRetry(address, stopMsg, config.MailTitle)
+115 -109
View File
@@ -5,45 +5,51 @@
} }
body { body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); background-color: #f8fafc;
color: #334155;
min-height: 100vh; min-height: 100vh;
padding: 20px; padding: 20px;
line-height: 1.6;
} }
.container { .container {
max-width: 800px; max-width: 640px;
margin: 0 auto; margin: 0 auto;
background: white;
border-radius: 12px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
overflow: hidden;
} }
header { header {
text-align: center; text-align: center;
color: white; background: #f1f5f9;
margin-bottom: 30px; padding: 32px 24px;
border-bottom: 1px solid #e2e8f0;
} }
header h1 { header h1 {
font-size: 2.5rem; font-size: 1.875rem;
margin-bottom: 10px; font-weight: 600;
} color: #1e293b;
letter-spacing: -0.025em;
header p {
font-size: 1.2rem;
opacity: 0.9;
} }
.card { .card {
background: rgba(255, 255, 255, 0.95); padding: 32px;
border-radius: 15px; border-bottom: 1px solid #e2e8f0;
padding: 25px; }
margin-bottom: 25px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); .card:last-child {
backdrop-filter: blur(10px); border-bottom: none;
} }
.card h2 { .card h2 {
color: #333; color: #1e293b;
margin-bottom: 20px; font-size: 1.25rem;
font-weight: 600;
margin-bottom: 24px;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 10px; gap: 10px;
@@ -52,143 +58,143 @@ header p {
.form-group { .form-group {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 15px; gap: 16px;
} }
.form-group label { .form-group label {
font-weight: 600; font-weight: 500;
color: #555; color: #334155;
font-size: 0.875rem;
} }
.form-group input { .form-group input {
padding: 12px 15px; padding: 12px 16px;
border: 2px solid #ddd; border: 1px solid #cbd5e1;
border-radius: 8px; border-radius: 6px;
font-size: 16px; font-size: 1rem;
transition: border-color 0.3s; transition: border-color 0.2s, box-shadow 0.2s;
background: #f8fafc;
} }
.form-group input:focus { .form-group input:focus {
outline: none; outline: none;
border-color: #667eea; border-color: #94a3b8;
} box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.1);
.btn-primary, .btn-secondary, .btn-danger {
padding: 12px 20px;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.btn-secondary {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
color: white;
}
.btn-danger {
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
color: white;
padding: 15px 30px;
font-size: 18px;
}
.btn-primary:hover, .btn-secondary:hover, .btn-danger:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
} }
.status-container { .status-container {
text-align: center; display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
} }
.timer-display { .timer-display {
font-size: 3rem; font-size: 2rem;
font-weight: 700; font-weight: 600;
color: #333; color: #1e293b;
margin: 20px 0; font-family: monospace;
font-family: 'Courier New', monospace;
} }
.progress-bar { .progress-bar {
width: 100%; width: 100%;
height: 20px; height: 8px;
background-color: #eee; background: #e2e8f0;
border-radius: 10px; border-radius: 4px;
overflow: hidden; overflow: hidden;
margin: 20px 0;
} }
.progress-fill { .progress-fill {
height: 100%; height: 100%;
background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%); background: #3b82f6;
width: 0%; width: 0%;
transition: width 0.5s ease; transition: width 0.3s ease;
} }
.controls { .controls {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.btn-primary, .btn-secondary, .btn-danger {
padding: 12px 24px;
border: none;
border-radius: 6px;
font-size: 0.95rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
text-align: center; text-align: center;
} }
.btn-primary {
background: #3b82f6;
color: white;
}
.btn-primary:hover {
background: #2563eb;
}
.btn-secondary {
background: #64748b;
color: white;
}
.btn-secondary:hover {
background: #475569;
}
.btn-danger {
background: #ef4444;
color: white;
padding: 12px 24px;
font-weight: 500;
}
.btn-danger:hover {
background: #dc2626;
}
.hint { .hint {
color: #666; font-size: 0.875rem;
margin-top: 15px; color: #64748b;
font-style: italic; margin-top: 4px;
} }
footer { footer {
text-align: center; text-align: center;
color: white; padding: 24px;
margin-top: 30px; color: #64748b;
opacity: 0.8; font-size: 0.875rem;
background: #f1f5f9;
} }
.notification { .notification {
position: fixed; position: fixed;
top: 20px; top: 20px;
right: 20px; right: 20px;
padding: 15px 25px; padding: 12px 20px;
border-radius: 8px; border-radius: 6px;
color: white; color: white;
font-weight: 600; font-size: 0.875rem;
transform: translateX(400px); transform: translateX(200%);
transition: transform 0.3s ease; transition: transform 0.3s ease;
z-index: 1000; z-index: 1000;
max-width: 300px;
word-wrap: break-word;
}
.notification.success {
background: #22c55e;
}
.notification.error {
background: #ef4444;
} }
.notification.show { .notification.show {
transform: translateX(0); transform: translateX(0);
}
.notification.success {
background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}
.notification.error {
background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
}
@media (max-width: 768px) {
.container {
padding: 10px;
}
header h1 {
font-size: 2rem;
}
.card {
padding: 20px;
}
.timer-display {
font-size: 2rem;
}
} }
+9 -9
View File
@@ -9,21 +9,21 @@
<body> <body>
<div class="container"> <div class="container">
<header> <header>
<h1>GoodBaby控制面板</h1> <h1>GoodBaby</h1>
</header> </header>
<main> <main>
<section class="card"> <section class="card">
<h2>🔐 身份验证</h2> <h2>访问设置</h2>
<div class="form-group"> <div class="form-group">
<label for="secret">请输入密钥:</label> <label for="secret">密钥</label>
<input type="password" id="secret" placeholder="输入您的访问密钥"> <input type="password" id="secret" placeholder="输入您的访问密钥">
<button id="save-secret" class="btn-secondary">保存密钥</button> <button id="save-secret" class="btn-secondary">保存</button>
</div> </div>
</section> </section>
<section class="card"> <section class="card">
<h2>📊 定时器状态</h2> <h2>状态信息</h2>
<div class="status-container"> <div class="status-container">
<div class="timer-display"> <div class="timer-display">
<span id="remaining-time">--:--:--</span> <span id="remaining-time">--:--:--</span>
@@ -31,21 +31,21 @@
<div class="progress-bar"> <div class="progress-bar">
<div id="progress-fill" class="progress-fill"></div> <div id="progress-fill" class="progress-fill"></div>
</div> </div>
<button id="refresh-status" class="btn-primary">🔄 刷新状态</button> <button id="refresh-status" class="btn-primary">刷新状态</button>
</div> </div>
</section> </section>
<section class="card"> <section class="card">
<h2>⚡ 操作控制</h2> <h2>执行操作</h2>
<div class="controls"> <div class="controls">
<button id="send-signal" class="btn-danger">📡 发送信号</button> <button id="send-signal" class="btn-danger">发送信号</button>
<p class="hint">点击按钮重置定时器</p> <p class="hint">点击按钮重置定时器</p>
</div> </div>
</section> </section>
</main> </main>
<footer> <footer>
<p>© 2025 GoodBaby</p> <p>© 2026 GoodBaby</p>
</footer> </footer>
</div> </div>