Merge pull request #166 from hitosea/pro

fix:分享功能,补充头像判断
This commit is contained in:
kuaifan 2023-06-11 13:44:18 +08:00 committed by kuaifan
commit 27d69e90fa
21 changed files with 51 additions and 53 deletions

View File

@ -1834,7 +1834,7 @@ class UsersController extends AbstractController
$lists[] = [
'type' => 'children',
'url' => Base::fillUrl("api/users/share/list") . "?pid=" . $file['id'],
'icon' => $file['share'] == 1 ? url("/images/file/light/folder-share.png") : url("/images/file/light/folder.png"),
'icon' => $file['share'] == 1 ? url("images/file/light/folder-share.png") : url("images/file/light/folder.png"),
'extend' => ['upload_file_id' => $file['id']],
'name' => $file['name'],
];
@ -1845,29 +1845,23 @@ class UsersController extends AbstractController
$lists[] = [
'type' => 'children',
'url' => Base::fillUrl("api/users/share/list") . "?pid=0",
'icon' => url("/images/file/light/folder.png"),
'icon' => url("images/file/light/folder.png"),
'extend' => ['upload_file_id' => 0],
'name' => '全部文件',
'name' => Doo::translate('文件'),
];
$dialogList = (new WebSocketDialog)->getDialogList($user->userid);
foreach ($dialogList['data'] as $dialog) {
if($dialog['type'] == 'user'){
if ($dialog['avatar']) {
$avatar = url($dialog['avatar']);
} else if ($dialog['type'] == 'user') {
$avatar = User::getAvatar($dialog['dialog_user']['userid'], $dialog['userimg'], $dialog['email'], $dialog['name']);
} else {
switch ( $dialog['group_type'] ) {
case 'department':
$avatar = url("images/avatar/default_department.png");
break;
case 'project':
$avatar = url("images/avatar/default_project.png");
break;
case 'task':
$avatar = url("images/avatar/default_task.png");
break;
default:
$avatar = url("images/avatar/default_people.png");
break;
}
$avatar = match ($dialog['group_type']) {
'department' => url("images/avatar/default_group_department.png"),
'project' => url("images/avatar/default_group_project.png"),
'task' => url("images/avatar/default_group_task.png"),
default => url("images/avatar/default_group_people.png"),
};
}
$lists[] = [
'type' => 'item',

View File

@ -468,3 +468,5 @@ Api接口文档
结束时间 无效的时间格式
开始时间不能大于结束时间
找不到符合条件的子节点
文件

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]

View File

@ -1188,7 +1188,9 @@ export default {
onFullBeforeClose() {
return new Promise(resolve => {
if (this.$refs.editorFull?.firstChild) {
this.$refs.editor.firstChild.innerHTML = this.$refs.editorFull.firstChild.innerHTML
}
resolve()
})
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

@ -1 +1 @@
Subproject commit 769222641cae4431d379b31aeea77a775a5d9149
Subproject commit 8bee1e094aae5ba291d4c4a3fe600dcf41023aaf