chore: 更新版本号至0.0.8并优化管理界面代码格式

- 将package.json版本从0.0.7更新至0.0.8
- 统一API响应消息为中文"保存成功!"
- 优化Vue组件代码缩进和格式,提升可读性
- 移除冗余的CSS注释代码
This commit is contained in:
anghunk
2026-01-29 17:40:13 +08:00
parent 602a900453
commit 12ef5ec9e2
4 changed files with 251 additions and 239 deletions

View File

@@ -33,7 +33,9 @@
</label> </label>
</div> </div>
<div class="form-item"> <div class="form-item">
<label class="form-label">头像前缀默认https://gravatar.com/avatar</label> <label class="form-label"
>头像前缀默认https://gravatar.com/avatar</label
>
<input v-model="avatarPrefix" class="form-input" type="text" /> <input v-model="avatarPrefix" class="form-input" type="text" />
</div> </div>
<h3 class="card-title">安全设置</h3> <h3 class="card-title">安全设置</h3>
@@ -113,7 +115,9 @@
<input v-model="enableArticleLike" type="checkbox" /> <input v-model="enableArticleLike" type="checkbox" />
<span class="slider" /> <span class="slider" />
</label> </label>
<div class="form-hint">开启后评论区顶部会显示的文章点赞喜欢按钮</div> <div class="form-hint">
开启后评论区顶部会显示的文章点赞喜欢按钮
</div>
</div> </div>
<div class="form-item"> <div class="form-item">
<label class="form-label">开启评论点赞功能</label> <label class="form-label">开启评论点赞功能</label>
@@ -162,7 +166,11 @@
<div class="form-item"> <div class="form-item">
<label class="form-label">邮件服务商</label> <label class="form-label">邮件服务商</label>
<select v-model="smtpProvider" class="form-input" @change="onProviderChange"> <select
v-model="smtpProvider"
class="form-input"
@change="onProviderChange"
>
<option value="qq">QQ 邮箱</option> <option value="qq">QQ 邮箱</option>
<option value="custom">自定义 SMTP</option> <option value="custom">自定义 SMTP</option>
</select> </select>
@@ -171,7 +179,11 @@
<div v-if="smtpProvider === 'custom'"> <div v-if="smtpProvider === 'custom'">
<div class="form-item"> <div class="form-item">
<label class="form-label">SMTP 服务器</label> <label class="form-label">SMTP 服务器</label>
<input v-model="smtpHost" class="form-input" placeholder="smtp.example.com" /> <input
v-model="smtpHost"
class="form-input"
placeholder="smtp.example.com"
/>
</div> </div>
<div class="form-item"> <div class="form-item">
<label class="form-label">SMTP 端口</label> <label class="form-label">SMTP 端口</label>
@@ -223,8 +235,8 @@
<div class="form-item"> <div class="form-item">
<label class="form-label">管理员通知模板 (HTML)</label> <label class="form-label">管理员通知模板 (HTML)</label>
<div class="form-hint"> <div class="form-hint">
可用变量${commentAuthor} (评论人昵称), ${postTitle} (文章标题), ${postUrl} 可用变量${commentAuthor} (评论人昵称), ${postTitle} (文章标题),
(文章链接), ${commentContent} (评论内容) ${postUrl} (文章链接), ${commentContent} (评论内容)
</div> </div>
<textarea <textarea
v-model="templateAdmin" v-model="templateAdmin"
@@ -237,9 +249,9 @@
<div class="form-item"> <div class="form-item">
<label class="form-label">回复通知模板 (HTML)</label> <label class="form-label">回复通知模板 (HTML)</label>
<div class="form-hint"> <div class="form-hint">
可用变量${toName} (接收人昵称), ${replyAuthor} (回复人昵称), ${postTitle} 可用变量${toName} (接收人昵称), ${replyAuthor} (回复人昵称),
(文章标题), ${postUrl} (文章链接), ${parentComment} (原评论), ${replyContent} ${postTitle} (文章标题), ${postUrl} (文章链接), ${parentComment} (原评论),
(回复内容) ${replyContent} (回复内容)
</div> </div>
<textarea <textarea
v-model="templateReply" v-model="templateReply"
@@ -707,7 +719,7 @@ onMounted(() => {
} }
.card-body { .card-body {
padding-top: 4px; /* padding-top: 4px; */
} }
.card-subtitle { .card-subtitle {
@@ -727,7 +739,7 @@ onMounted(() => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 6px; gap: 6px;
margin-bottom: 12px; margin: 10px 0;
} }
.form-label { .form-label {

View File

@@ -31,7 +31,7 @@ export const updateFeatureSettings = async (c: Context<{ Bindings: Bindings }>)
enableArticleLike enableArticleLike
}); });
return c.json({ message: 'Saved successfully' }); return c.json({ message: '保存成功!' });
} catch (e: any) { } catch (e: any) {
return c.json({ message: e.message || 'Failed to save feature settings' }, 500); return c.json({ message: e.message || 'Failed to save feature settings' }, 500);
} }

View File

@@ -73,7 +73,7 @@ PUT /admin/settings/feature
```json ```json
{ {
"message": "Saved successfully" "message": "保存成功!"
} }
``` ```

View File

@@ -1,6 +1,6 @@
{ {
"name": "cwd", "name": "cwd",
"version": "0.0.7", "version": "0.0.8",
"license": "Apache-2.0", "license": "Apache-2.0",
"repository": { "repository": {
"type": "git", "type": "git",