feat(ip-geo): full-chain IP 归属地 on comments, user home, center, post
This commit is contained in:
@@ -7,7 +7,7 @@ export const ipSchema = {
|
||||
ip_geo_enabled: false,
|
||||
ip_addr_sdk: 'null',
|
||||
ip_geo_cache_ttl: 86400,
|
||||
ip_geo_display: ['comment'],
|
||||
ip_geo_display: ['comment', 'user_home', 'user_center', 'post'],
|
||||
ip_geo_format: 'province_city',
|
||||
ip_geo_fallback_text: '',
|
||||
ip_addr_sdk_qq_appkey: '',
|
||||
@@ -59,13 +59,15 @@ export const ipSchema = {
|
||||
key: 'ip_geo_display',
|
||||
label: '展示位置',
|
||||
type: 'checkbox',
|
||||
default: ['comment'],
|
||||
default: ['comment', 'user_home', 'user_center', 'post'],
|
||||
options: [
|
||||
{ label: '评论区', value: 'comment' },
|
||||
{ label: '用户主页', value: 'user_home' },
|
||||
{ label: '文章页', value: 'post' },
|
||||
{ label: '用户中心', value: 'user_center' },
|
||||
{ label: '文章详细页', value: 'post' },
|
||||
],
|
||||
dependsOn: { key: 'ip_geo_enabled', value: true },
|
||||
help: '用户主页/用户中心还需在「用户 → 用户功能」开启「显示城市」;评论区还需在评论设置开启「评论城市」。',
|
||||
},
|
||||
{
|
||||
key: 'ip_geo_format',
|
||||
|
||||
@@ -9,7 +9,8 @@ export const featuresSchema = {
|
||||
user_cover_upload: true,
|
||||
user_social_links: true,
|
||||
user_desc_std: '这家伙很懒…',
|
||||
user_city_s: false,
|
||||
user_city_s: true,
|
||||
user_city_type: 'province',
|
||||
user_join_day_my_name: '本站',
|
||||
user_avatar_default: '',
|
||||
user_cover_img: '',
|
||||
@@ -30,7 +31,19 @@ export const featuresSchema = {
|
||||
{ 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: '用户未设置个人简介时显示的默认文案' },
|
||||
{ key: 'user_city_s', label: '显示城市', type: 'switch', default: false },
|
||||
{ key: 'user_city_s', label: '显示城市(IP 归属地)', type: 'switch', default: true, help: '根据用户登录 IP 在用户主页与用户中心显示归属地;需同时在「扩展 → IP归属地」启用并勾选对应展示位置' },
|
||||
{
|
||||
key: 'user_city_type',
|
||||
label: '位置精度',
|
||||
type: 'radio',
|
||||
default: 'province',
|
||||
options: [
|
||||
{ label: '省份', value: 'province' },
|
||||
{ label: '省份+城市', value: 'province_city' },
|
||||
{ label: '国家+省份', value: 'country_province' },
|
||||
],
|
||||
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: '' },
|
||||
|
||||
Reference in New Issue
Block a user