用户功能设置收口与废弃后台链路清理
This commit is contained in:
1 parent
081eb0870d
commit
86692ff3f9
59 files changed
+506
-1767
No files matched your search
@@ -1,47 +1,48 @@
|
||||
const themeRoot = typeof window !== 'undefined' && window.aksrtAdminData?.themeUri
|
||||
? String(window.aksrtAdminData.themeUri).replace(/\/$/, '')
|
||||
: ''
|
||||
|
||||
export const featuresSchema = {
|
||||
key: 'users.features',
|
||||
title: '用户功能',
|
||||
icon: 'fa fas fa-user',
|
||||
description: '配置用户中心和个人主页的功能模块。',
|
||||
description: '配置用户头像、封面和默认签名。',
|
||||
defaults: {
|
||||
user_center_tabs: 'profile,level,posts,comments,favorites,vip,credits,revenue,auth',
|
||||
user_desc_std: '这家伙很懒…',
|
||||
user_city_s: true,
|
||||
user_city_type: 'province',
|
||||
user_join_day_my_name: '本站',
|
||||
user_cover_img: '',
|
||||
user_rewrite_slug: 'user',
|
||||
user_follow_s: true,
|
||||
user_online_s: true,
|
||||
user_last_active_s: true,
|
||||
avatar_upload_s: true,
|
||||
avatar_external: '',
|
||||
avatar_default_img: `${themeRoot}/assets/img/avatar-default.png`,
|
||||
user_cover_upload_s: true,
|
||||
user_cover_img: `${themeRoot}/assets/img/user_t.jpg`,
|
||||
user_desc_std: '这家伙很懒,什么都没有写...',
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'center',
|
||||
title: '用户中心',
|
||||
icon: 'fa fas fa-user',
|
||||
key: 'profile-media',
|
||||
title: '用户资料',
|
||||
icon: 'fa fas fa-user-circle',
|
||||
fields: [
|
||||
{ key: 'user_center_tabs', label: '用户中心 Tab', type: 'input', default: 'profile,level,comments,favorites,vip,credits,revenue,auth', help: '逗号分隔。level=我的等级;creator=创作中心;revenue=推广收益中心;auth=官方认证;等级、VIP、订单、创作中心、收益中心和认证会按功能开关自动注入' },
|
||||
{ key: 'user_desc_std', label: '默认签名', type: 'input', default: '这家伙很懒…', help: '用户未设置个人简介时显示的默认文案' },
|
||||
{ key: 'user_city_s', label: '显示城市(IP 归属地)', type: 'switch', default: true, help: '根据用户登录 IP 在用户主页与用户中心显示归属地;需同时在「扩展 → IP归属地」启用并勾选对应展示位置' },
|
||||
{ key: 'avatar_upload_s', label: '允许用户上传头像', type: 'switch', default: true },
|
||||
{
|
||||
key: 'user_city_type',
|
||||
label: '位置精度',
|
||||
key: 'avatar_external',
|
||||
label: '外部头像源',
|
||||
type: 'radio',
|
||||
default: 'province',
|
||||
default: '',
|
||||
options: [
|
||||
{ label: '省份', value: 'province' },
|
||||
{ label: '省份+城市', value: 'province_city' },
|
||||
{ label: '国家+省份', value: 'country_province' },
|
||||
{ label: '关闭', value: '' },
|
||||
{ label: 'Gravatar', value: 'gravatar' },
|
||||
{ label: 'WeAvatar', value: 'weavatar' },
|
||||
{ label: 'Cravatar', value: 'cravatar' },
|
||||
{ label: '极客族 Gravatar 服务', value: 'geekzu' },
|
||||
{ label: 'loli Gravatar 服务', value: 'loli' },
|
||||
{ label: 'sep.cc Gravatar 服务', value: 'sep' },
|
||||
{ label: 'v2ex Gravatar 服务', value: 'v2ex' },
|
||||
],
|
||||
dependsOn: { key: 'user_city_s', value: true },
|
||||
help: '启用后,用户没有自定义头像时按邮箱获取外部头像。',
|
||||
},
|
||||
{ key: 'user_join_day_my_name', label: '站名', type: 'input', default: '本站', help: '用于「已加入 X 天」显示中的站点名称' },
|
||||
{ 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 },
|
||||
{ key: 'user_online_s', label: '显示在线状态', type: 'switch', default: true },
|
||||
{ key: 'user_last_active_s', label: '显示最后活跃', type: 'switch', default: true },
|
||||
{ key: 'avatar_default_img', label: '用户默认头像', type: 'media', default: `${themeRoot}/assets/img/avatar-default.png`, help: '建议尺寸 100×100。' },
|
||||
{ key: 'user_cover_upload_s', label: '允许用户上传封面', type: 'switch', default: true },
|
||||
{ key: 'user_cover_img', label: '用户默认封面', type: 'media', default: `${themeRoot}/assets/img/user_t.jpg`, help: '建议尺寸 1000×400;用户未设置封面时显示此图。' },
|
||||
{ key: 'user_desc_std', label: '用户默认签名', type: 'input', default: '这家伙很懒,什么都没有写...', help: '用户未设置个人简介时显示的默认文案。' },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -7,7 +7,6 @@ import { oauthSchema } from './oauth.js'
|
||||
import { notificationsSchema } from './notifications.js'
|
||||
import { creditsSchema } from './credits.js'
|
||||
import { featuresSchema } from './features.js'
|
||||
import { signinSchema } from './signin.js'
|
||||
import { verifySchema } from './verify.js'
|
||||
import { levelSchema } from './level.js'
|
||||
import { badgeSchema } from './badge.js'
|
||||
@@ -21,7 +20,6 @@ export const usersSchemas = {
|
||||
notifications: notificationsSchema,
|
||||
credits: creditsSchema,
|
||||
features: featuresSchema,
|
||||
signin: signinSchema,
|
||||
verify: verifySchema,
|
||||
level: levelSchema,
|
||||
badge: badgeSchema,
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
export const signinSchema = {
|
||||
key: 'users.signin',
|
||||
title: '签到奖励',
|
||||
icon: 'fa fas fa-calendar-check',
|
||||
description: '配置签到规则、连续签到奖励和签到页面。',
|
||||
defaults: {
|
||||
signin_enabled: true,
|
||||
signin_reward: 1,
|
||||
signin_consecutive_bonus: true,
|
||||
signin_consecutive_days: 7,
|
||||
signin_bonus_reward: 5,
|
||||
},
|
||||
groups: [
|
||||
{
|
||||
key: 'rules',
|
||||
title: '签到规则',
|
||||
icon: 'fa fas fa-calendar',
|
||||
fields: [
|
||||
{ key: 'signin_enabled', label: '启用签到', type: 'switch', default: true },
|
||||
{ key: 'signin_reward', label: '每日签到奖励', type: 'number', default: 1, min: 0, max: 100, dependsOn: { key: 'signin_enabled', value: true } },
|
||||
{ key: 'signin_consecutive_bonus', label: '连续签到加成', type: 'switch', default: true, dependsOn: { key: 'signin_enabled', value: true } },
|
||||
{ key: 'signin_consecutive_days', label: '加成周期 (天)', type: 'number', default: 7, min: 2, max: 30, dependsOn: { key: 'signin_consecutive_bonus', value: true } },
|
||||
{ key: 'signin_bonus_reward', label: '周期奖励', type: 'number', default: 5, min: 1, max: 100, dependsOn: { key: 'signin_consecutive_bonus', value: true } },
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in new issue
Block a user