Skip to content

Commit

Permalink
优化:用户个人中心重构
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuchunshu committed Jun 1, 2022
1 parent 7383abe commit 9c21617
Show file tree
Hide file tree
Showing 21 changed files with 1,345 additions and 109 deletions.
19 changes: 17 additions & 2 deletions app/Languages/zh_CN/admin.php
Expand Up @@ -3,6 +3,21 @@

return [
'setting' => [
'language' => '站点默认语言'
]
'language' => '站点默认语言',
'Whether to enable rendering of twemoji' => '是否开启渲染twemoji',
'twemoji static resource library' => 'twemoji静态资源库',
'twemoji image width' => 'twemoji图片宽度',
'twemoji image height' => 'twemoji图片高度',
'Whether to enable rendering of owo expressions' => '是否开启渲染owo表情',
],
'wealth' => [
'money name' => '余额名称',
'credit name' => '积分名称',
'golds name' => '金币名称',
'exp name' => '经验名称'
],
'turn on' => '开启',
'turn off' => '关闭',
'default' => '默认: :default',
'current' => '当前: :current',
];
11 changes: 11 additions & 0 deletions app/Languages/zh_CN/user.php
Expand Up @@ -13,4 +13,15 @@
'no bio' => '这个人没有签名',
'personal website' => '个人网站',
'other information' => '其他信息',
'register time' => '注册时间',
'comment count' => '评论数量',
'topic count' => '主题数量',
'collection count' => '收藏数量',
'fans count' => '粉丝数量',
'topic tag count' => '标签数量',
'QQ' => 'QQ',
'wechat' => '微信',
'email' => '邮箱',
'website' => '网站',
'wealth' => '财富'
];
Expand Up @@ -2,49 +2,49 @@
<div class="mb-3">
<div class="row">
<div class="col-6">
<label class="form-label">是否开启渲染twemoji</label>
<label class="form-label">{{__("admin.setting.Whether to enable rendering of twemoji")}}</label>
<select class="form-control" v-model="data.contentParse_twemoji">
<option value="开启">开启</option>
<option value="关闭">关闭</option>
<option value="开启">{{__("admin.turn on")}}</option>
<option value="关闭">{{__("admin.turn off")}}</option>
</select>
<small>当前: {{get_options("contentParse_twemoji",'开启')}}</small>
</div>
<div class="col-6">
<label class="form-label">twemoji静态资源库</label>
<label class="form-label">{{__("admin.setting.twemoji static resource library")}}</label>
<select class="form-control" v-model="data.contentParse_twemoji_cdn">
<option value="https://twemoji.maxcdn.com/v/latest">maxcdn</option>
<option value="https://lib.baomitu.com/twemoji/1.4.2">baomitu</option>
<option value="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/twemoji/13.1.0">字节跳动(版本低)</option>
</select>
<small>默认: baomitu</small>
<small>{{__("admin.default",['default'=>'baomitu'])}}</small>
</div>
</div>
</div>

<div class="mb-3">
<div class="row">
<div class="col-6">
<label class="form-label">twemoji 图片宽度</label>
<label class="form-label">{{__("admin.setting.twemoji image width")}}</label>
<input type="number" class="form-control" min="1" v-model="data.contentParse_twemoji_contentParse_width">
<small>当前: {{get_options("contentParse_twemoji_contentParse_width",25)}}</small>
<small>{{__("admin.current",['current' => get_options("contentParse_twemoji_contentParse_width",25)])}}</small>
</div>
<div class="col-6">
<label class="form-label">twemoji 图片高度</label>
<label class="form-label">{{__("admin.setting.twemoji image height")}}</label>
<input type="number" class="form-control" min="1" v-model="data.contentParse_twemoji_contentParse_height">
<small>当前: {{get_options("contentParse_twemoji_contentParse_height",25)}}</small>
<small>{{__("admin.current",['current' => get_options("contentParse_twemoji_contentParse_height",25)])}}</small>
</div>
</div>
</div>

<div class="mb-3">
<div class="row">
<div class="col-3">
<label class="form-label">是否开启渲染 owo表情</label>
<label class="form-label">{{__("admin.setting.Whether to enable rendering of owo expressions")}}</label>
<select class="form-control" v-model="data.contentParse_owo">
<option value="开启">开启</option>
<option value="关闭">关闭</option>
<option value="开启">{{__("admin.turn on")}}</option>
<option value="关闭">{{__("admin.turn off")}}</option>
</select>
<small>当前: {{get_options("contentParse_owo",'开启')}}</small>
<small>{{__("admin.current",['current' => get_options("contentParse_owo",'开启')])}}</small>
</div>
<div class="col-3">
<label class="form-label">是否开启 owo 文字表情渲染</label>
Expand Down
100 changes: 100 additions & 0 deletions app/Plugins/User/bootstrap.php
Expand Up @@ -46,3 +46,103 @@
</svg>',
'view' => 'App::user.setting.backgroundImg'
]);


Itf()->add('users_settings',1,[
'name' => '自定义代码',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-settings" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<desc>Download more icon variants from https://tabler-icons.io/i/settings</desc>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z"></path>
<circle cx="12" cy="12" r="3"></circle>
</svg>',
'view' => 'User::setting.user.code'
]);




Itf_Setting()->add(
171,
"财富设置",
"wealth",
"User::setting.admin.wealth");


Itf()->add('users_home_menu',1,[
'name' => '概览',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<desc>Download more icon variants from https://tabler-icons.io/i/user</desc>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<circle cx="12" cy="7" r="4"></circle>
<path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path>
</svg>',
'view' => 'User::home.overview',
'quanxian' => null,
]);

Itf()->add('users_home_menu',2,[
'name' => '主题',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-note" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<desc>Download more icon variants from https://tabler-icons.io/i/note</desc>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<line x1="13" y1="20" x2="20" y2="13"></line>
<path d="M13 20v-6a1 1 0 0 1 1 -1h6v-7a2 2 0 0 0 -2 -2h-12a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7"></path>
</svg>',
'view' => 'User::home.topic',
'quanxian' => null,
]);

Itf()->add('users_home_menu',3,[
'name' => '评论',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-message-dots" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<desc>Download more icon variants from https://tabler-icons.io/i/message-dots</desc>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M4 21v-13a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-9l-4 4"></path>
<line x1="12" y1="11" x2="12" y2="11.01"></line>
<line x1="8" y1="11" x2="8" y2="11.01"></line>
<line x1="16" y1="11" x2="16" y2="11.01"></line>
</svg>',
'view' => 'User::home.comment',
'quanxian' => null,
]);

Itf()->add('users_home_menu',4,[
'name' => '关注',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-users" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<desc>Download more icon variants from https://tabler-icons.io/i/users</desc>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<circle cx="9" cy="7" r="4"></circle>
<path d="M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path>
<path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
<path d="M21 21v-2a4 4 0 0 0 -3 -3.85"></path>
</svg>',
'view' => 'User::home.following',
'quanxian' => null,
]);


Itf()->add('users_home_menu',5,[
'name' => '粉丝',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-users" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<desc>Download more icon variants from https://tabler-icons.io/i/users</desc>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<circle cx="9" cy="7" r="4"></circle>
<path d="M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path>
<path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
<path d="M21 21v-2a4 4 0 0 0 -3 -3.85"></path>
</svg>',
'view' => 'User::home.fans',
'quanxian' => null,
]);

Itf()->add('users_home_menu',6,[
'name' => '收藏',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-star" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<desc>Download more icon variants from https://tabler-icons.io/i/star</desc>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z"></path>
</svg>',
'view' => 'User::home.collections',
'quanxian' => null,
]);

0 comments on commit 9c21617

Please sign in to comment.