mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-14 21:02:49 +00:00
perf: 修复一些问题
This commit is contained in:
parent
c8b8cc578d
commit
8f4399dc2f
@ -571,9 +571,9 @@ class UsersController extends AbstractController
|
|||||||
$list->transform(function (User $userInfo) use ($user, $state) {
|
$list->transform(function (User $userInfo) use ($user, $state) {
|
||||||
$tags = [];
|
$tags = [];
|
||||||
$dep = $userInfo->getDepartmentName();
|
$dep = $userInfo->getDepartmentName();
|
||||||
$dep = array_filter(explode(",", $dep), function($item) {
|
$dep = array_values(array_filter(explode(",", $dep), function($item) {
|
||||||
return preg_match("/\(M\)$/", $item);
|
return preg_match("/\(M\)$/", $item);
|
||||||
});
|
}));
|
||||||
if ($dep) {
|
if ($dep) {
|
||||||
$tags[] = preg_replace("/\(M\)$/", "", trim($dep[0])) . Doo::translate("负责人");
|
$tags[] = preg_replace("/\(M\)$/", "", trim($dep[0])) . Doo::translate("负责人");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -115,6 +115,7 @@ class WebSocketDialog extends AbstractModel
|
|||||||
$list = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.mark_unread', 'u.silence', 'u.color', 'u.updated_at as user_at'])
|
$list = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.mark_unread', 'u.silence', 'u.color', 'u.updated_at as user_at'])
|
||||||
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
||||||
->join('web_socket_dialog_msg_reads as r', 'web_socket_dialogs.id', '=', 'r.dialog_id')
|
->join('web_socket_dialog_msg_reads as r', 'web_socket_dialogs.id', '=', 'r.dialog_id')
|
||||||
|
->where('u.userid', $userid)
|
||||||
->where('r.userid', $userid)
|
->where('r.userid', $userid)
|
||||||
->where('r.silence', 0)
|
->where('r.silence', 0)
|
||||||
->where('r.read_at')
|
->where('r.read_at')
|
||||||
|
|||||||
3
resources/assets/sass/components/report.scss
vendored
3
resources/assets/sass/components/report.scss
vendored
@ -66,7 +66,6 @@
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 12px;
|
|
||||||
padding: 20px 24px;
|
padding: 20px 24px;
|
||||||
border-bottom: 1px solid #eeeeee;
|
border-bottom: 1px solid #eeeeee;
|
||||||
@media (max-width: 500px) {
|
@media (max-width: 500px) {
|
||||||
@ -77,7 +76,7 @@
|
|||||||
.report-detail-context {
|
.report-detail-context {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 0;
|
height: 0;
|
||||||
padding: 12px 0 12px 24px;
|
padding: 24px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|||||||
@ -2,8 +2,12 @@ let themeName = window.localStorage.getItem('__system:themeConf__')
|
|||||||
if (!['dark', 'light'].includes(themeName)) {
|
if (!['dark', 'light'].includes(themeName)) {
|
||||||
let isDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
|
let isDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||||
if (/eeui/i.test(window.navigator.userAgent)) {
|
if (/eeui/i.test(window.navigator.userAgent)) {
|
||||||
|
if (typeof requireModuleJs === 'function') {
|
||||||
|
isDark = requireModuleJs("eeui").getThemeName() === 'dark'
|
||||||
|
} else {
|
||||||
isDark = /system_theme\/dark;/i.test(window.navigator.userAgent)
|
isDark = /system_theme\/dark;/i.test(window.navigator.userAgent)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
themeName = isDark ? 'dark' : 'light'
|
themeName = isDark ? 'dark' : 'light'
|
||||||
}
|
}
|
||||||
if (themeName === 'dark') {
|
if (themeName === 'dark') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user