mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-14 21:02:49 +00:00
no message
This commit is contained in:
parent
df917001d3
commit
4c5c071b21
@ -47,8 +47,7 @@ class FileController extends AbstractController
|
||||
{
|
||||
$user = User::auth();
|
||||
//
|
||||
$data = Request::all();
|
||||
$pid = intval($data['pid']);
|
||||
$pid = intval(Request::input('pid'));
|
||||
//
|
||||
return Base::retSuccess('success', (new File)->getFileList($user, $pid));
|
||||
}
|
||||
|
||||
@ -111,6 +111,8 @@ class File extends AbstractModel
|
||||
* 获取文件列表
|
||||
* @param user $user
|
||||
* @param int $pid
|
||||
* @param string $type
|
||||
* @param bool $isGetparent
|
||||
* @return array
|
||||
*/
|
||||
public function getFileList($user, int $pid, $type = "all", $isGetparent = true)
|
||||
@ -118,7 +120,7 @@ class File extends AbstractModel
|
||||
$permission = 1000;
|
||||
$userids = $user->isTemp() ? [$user->userid] : [0, $user->userid];
|
||||
$builder = File::wherePid($pid)
|
||||
->when($type=='dir',function($q){
|
||||
->when($type == 'dir', function ($q) {
|
||||
$q->whereType('folder');
|
||||
});
|
||||
if ($pid > 0) {
|
||||
@ -134,7 +136,7 @@ class File extends AbstractModel
|
||||
//
|
||||
if ($pid > 0) {
|
||||
// 遍历获取父级
|
||||
if($isGetparent){
|
||||
if ($isGetparent) {
|
||||
while ($pid > 0) {
|
||||
$file = File::whereId($pid)->first();
|
||||
if (empty($file)) {
|
||||
@ -172,8 +174,8 @@ class File extends AbstractModel
|
||||
->whereIn('file_users.userid', $userids)
|
||||
->groupBy('files.id')
|
||||
->take(100)
|
||||
->when($type=='dir',function($q){
|
||||
$q->where('files.type','folder');
|
||||
->when($type == 'dir', function ($q) {
|
||||
$q->where('files.type', 'folder');
|
||||
})
|
||||
->get();
|
||||
if ($list->isNotEmpty()) {
|
||||
|
||||
1
electron/electron.js
vendored
1
electron/electron.js
vendored
@ -351,6 +351,7 @@ function createChildWindow(args) {
|
||||
browser = preloadWindow;
|
||||
preloadWindow = null;
|
||||
isPreload = true;
|
||||
options.title && browser.setTitle(options.title);
|
||||
options.parent && browser.setParentWindow(options.parent);
|
||||
browser.setSize(options.width, options.height);
|
||||
browser.setMinimumSize(options.minWidth, options.minHeight);
|
||||
|
||||
@ -530,7 +530,7 @@ export default {
|
||||
},
|
||||
|
||||
searchLoading({tabActive, loadDialogs, dialogSearchLoad, contactsLoad}) {
|
||||
if (tabActive==='dialog') {
|
||||
if (tabActive === 'dialog') {
|
||||
return loadDialogs > 0 || dialogSearchLoad > 0
|
||||
} else {
|
||||
return contactsLoad > 0
|
||||
@ -696,7 +696,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.$nextTick(_ => {
|
||||
$A.scrollToView(this.$refs.navList?.querySelector('.active'), { behavior: "auto", block: "nearest", inline: "nearest" });
|
||||
$A.scrollToView(this.$refs.navList?.querySelector('.active'), {behavior: "auto", block: "nearest", inline: "nearest"});
|
||||
})
|
||||
},
|
||||
|
||||
@ -895,7 +895,7 @@ export default {
|
||||
}).then(({data}) => {
|
||||
const msgIds = [];
|
||||
const lists = [];
|
||||
this.dialogList.forEach(h=>{
|
||||
this.dialogList.forEach(h => {
|
||||
lists.push(h);
|
||||
msgIds.push(h.search_msg_id)
|
||||
});
|
||||
@ -989,7 +989,7 @@ export default {
|
||||
formatDraft(value) {
|
||||
return value?.replace(/<img[^>]*>/gi, `[${$A.L('图片')}]`)
|
||||
.replace(/<[^>]*>/g, '')
|
||||
.replace(/ /g, ' ')|| null
|
||||
.replace(/ /g, ' ') || null
|
||||
},
|
||||
|
||||
formatTodoNum(num) {
|
||||
@ -1004,7 +1004,7 @@ export default {
|
||||
},
|
||||
|
||||
showProfessionDesc(dialog_user) {
|
||||
if (dialog_user) {
|
||||
if (dialog_user && dialog_user.profession) {
|
||||
return `[${dialog_user.profession}]`
|
||||
}
|
||||
return ''
|
||||
|
||||
1
resources/assets/sass/pages/common.scss
vendored
1
resources/assets/sass/pages/common.scss
vendored
@ -877,6 +877,7 @@ body.window-portrait {
|
||||
margin-right: 4px;
|
||||
}
|
||||
> em {
|
||||
display: inline-block;
|
||||
margin-right: 4px;
|
||||
cursor: pointer;
|
||||
color: #2b85e4;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user