mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-11 18:42:54 +00:00
perf: 支持自定义仪表盘欢迎词
This commit is contained in:
parent
0019c9ef41
commit
64262134c4
@ -41,7 +41,7 @@ class SystemController extends AbstractController
|
||||
* @apiParam {String} type
|
||||
* - get: 获取(默认)
|
||||
* - all: 获取所有(需要管理员权限)
|
||||
* - save: 保存设置(参数:['reg', 'reg_identity', 'reg_invite', 'temp_account_alias', 'login_code', 'password_policy', 'project_invite', 'chat_information', 'anon_message', 'voice2text', 'translation', 'e2e_message', 'auto_archived', 'archived_day', 'task_visible', 'task_default_time', 'all_group_mute', 'all_group_autoin', 'user_private_chat_mute', 'user_group_chat_mute', 'system_alias', 'image_compress', 'image_quality', 'image_save_local', 'start_home'])
|
||||
* - save: 保存设置(参数:['reg', 'reg_identity', 'reg_invite', 'temp_account_alias', 'login_code', 'password_policy', 'project_invite', 'chat_information', 'anon_message', 'voice2text', 'translation', 'e2e_message', 'auto_archived', 'archived_day', 'task_visible', 'task_default_time', 'all_group_mute', 'all_group_autoin', 'user_private_chat_mute', 'user_group_chat_mute', 'system_alias', 'system_welcome', 'image_compress', 'image_quality', 'image_save_local', 'start_home'])
|
||||
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
@ -80,6 +80,7 @@ class SystemController extends AbstractController
|
||||
'user_private_chat_mute',
|
||||
'user_group_chat_mute',
|
||||
'system_alias',
|
||||
'system_welcome',
|
||||
'image_compress',
|
||||
'image_quality',
|
||||
'image_save_local',
|
||||
@ -108,6 +109,9 @@ class SystemController extends AbstractController
|
||||
if ($all['system_alias'] == env('APP_NAME')) {
|
||||
$all['system_alias'] = '';
|
||||
}
|
||||
if ($all['system_welcome'] == '欢迎您,{username}') {
|
||||
$all['system_welcome'] = '';
|
||||
}
|
||||
$setting = Base::setting('system', Base::newTrim($all));
|
||||
} else {
|
||||
$setting = Base::setting('system');
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<span @click="goForward({name: 'manage-setting-license'})">{{warningMsg}}</span>
|
||||
</Alert>
|
||||
<div class="dashboard-wrapper" :style="wrapperStyle">
|
||||
<div class="dashboard-hello">{{$L('欢迎您,' + userInfo.nickname)}}</div>
|
||||
<div class="dashboard-hello">{{dashboardHello}}</div>
|
||||
<div v-if="systemConfig.timezoneDifference" class="dashboard-time">
|
||||
<span>{{$L('服务器时间')}}:</span>
|
||||
<span>{{$A.daytz().format('YYYY-MM-DD HH:mm:ss')}}</span>
|
||||
@ -183,6 +183,14 @@ export default {
|
||||
'max-height': 'calc(100% - 50px)'
|
||||
} : null
|
||||
},
|
||||
|
||||
dashboardHello({systemConfig, userInfo}) {
|
||||
let hello = '欢迎您,{username}';
|
||||
if (systemConfig.system_welcome) {
|
||||
hello = systemConfig.system_welcome
|
||||
}
|
||||
return this.$L(hello.replace(/\{username}/g, userInfo.nickname))
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
||||
@ -217,6 +217,12 @@
|
||||
</div>
|
||||
<div class="form-tip">{{$L('用于网页默认标题、邮件发送等')}}</div>
|
||||
</FormItem>
|
||||
<FormItem :label="$L('欢迎词')" prop="system_welcome">
|
||||
<div style="width: 220px;">
|
||||
<Input v-model="formDatum.system_welcome" :placeholder="$L('欢迎您,{username}')"/>
|
||||
</div>
|
||||
<div class="form-tip">{{$L('仪表盘欢迎词,{username} 代表用户昵称')}}</div>
|
||||
</FormItem>
|
||||
<FormItem :label="$L('图片优化')" prop="image_compress">
|
||||
<RadioGroup v-model="formDatum.image_compress">
|
||||
<Radio label="open">{{$L('开启')}}</Radio>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user