feat(user): add local avatar management flow

This commit is contained in:
kate522 committed 2026-07-29 13:35:17 +08:00
1 parent 1b4ba8938a
commit e94437ef60
20 files changed
+289 -186

No files matched your search

@@ -2,7 +2,7 @@ export const commonSchema = {
key: 'global.common',
title: '常用功能',
icon: 'fas fa-cog',
description: '管理站点常用开关、懒加载、头像源与备案信息等基础配置。',
description: '管理站点常用开关、懒加载与备案信息等基础配置。',
defaults: {
comment_enabled: true,
lazyload_enabled: true,
@@ -17,7 +17,6 @@ export const commonSchema = {
lazyload_cover: true,
lazyload_other: true,
lazyload_widget: true,
avatar_source: 'cn.cravatar.com',
icp_filing: '',
footer_text: '',
},
@@ -67,25 +66,6 @@ export const commonSchema = {
{ key: 'lazyload_widget', label: '小工具图片懒加载', type: 'switch', default: true, dependsOn: { key: 'lazyload_enabled', value: true } },
],
},
{
key: 'avatar',
title: '头像服务',
icon: 'fas fa-user-circle',
fields: [
{
key: 'avatar_source',
label: '头像源',
type: 'select',
default: 'cn.cravatar.com',
options: [
{ label: 'Cravatar (推荐)', value: 'cn.cravatar.com' },
{ label: 'Gravatar 中国', value: 'cn.gravatar.com' },
{ label: 'Gravatar 国际', value: 'gravatar.com' },
],
help: 'Cravatar 是国内最快的头像服务,推荐使用',
},
],
},
{
key: 'filing',
title: '备案信息',
@@ -5,14 +5,12 @@ export const featuresSchema = {
description: '配置用户中心和个人主页的功能模块。',
defaults: {
user_center_tabs: 'profile,posts,comments,favorites,vip,credits,auth',
user_avatar_upload: true,
user_cover_upload: true,
user_social_links: true,
user_desc_std: '这家伙很懒…',
user_city_s: true,
user_city_type: 'province',
user_join_day_my_name: '本站',
user_avatar_default: '',
user_cover_img: '',
user_rewrite_slug: 'user',
user_follow_s: true,
@@ -27,7 +25,6 @@ export const featuresSchema = {
icon: 'fas fa-user-shield',
fields: [
{ key: 'user_center_tabs', label: '用户中心 Tab', type: 'input', default: 'profile,posts,comments,favorites,vip,credits,auth', help: '逗号分隔。auth=官方认证;vip、订单和认证会按功能开关自动注入' },
{ key: 'user_avatar_upload', label: '头像上传', type: 'switch', default: true },
{ key: 'user_cover_upload', label: '封面上传', type: 'switch', default: true },
{ key: 'user_social_links', label: '社交链接', type: 'switch', default: true },
{ key: 'user_desc_std', label: '默认签名', type: 'input', default: '这家伙很懒…', help: '用户未设置个人简介时显示的默认文案' },
@@ -45,7 +42,6 @@ export const featuresSchema = {
dependsOn: { key: 'user_city_s', value: true },
},
{ key: 'user_join_day_my_name', label: '站名', type: 'input', default: '本站', help: '用于「已加入 X 天」显示中的站点名称' },
{ key: 'user_avatar_default', label: '默认头像', type: 'media', default: '' },
{ key: 'user_cover_img', label: '默认封面', type: 'media', default: '' },
{ key: 'user_rewrite_slug', label: '用户页 slug', type: 'input', default: 'user' },
{ key: 'user_follow_s', label: '启用关注功能', type: 'switch', default: true },