mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-11 02:12:53 +00:00
no message
This commit is contained in:
parent
c39fc80c02
commit
9a69f3b019
@ -3,6 +3,7 @@
|
||||
namespace App\Events;
|
||||
|
||||
use App\Models\WebSocket;
|
||||
use App\Module\Base;
|
||||
use Cache;
|
||||
use Hhxsv5\LaravelS\Swoole\Events\WorkerStartInterface;
|
||||
use Swoole\Http\Server;
|
||||
@ -19,6 +20,11 @@ class WorkerStartEvent implements WorkerStartInterface
|
||||
if (isset($server->startMsecTime) && Cache::get("swooleServerStartMsecTime") != $server->startMsecTime) {
|
||||
Cache::forever("swooleServerStartMsecTime", $server->startMsecTime);
|
||||
WebSocket::query()->delete();
|
||||
//
|
||||
$all = Base::json2array(Cache::get("User::online:all"));
|
||||
foreach ($all as $userid) {
|
||||
Cache::forget("User::online:" . $userid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -194,6 +194,12 @@ class WebSocketService implements WebSocketHandlerInterface
|
||||
Cache::put("User::fd:" . $fd, "on", Carbon::now()->addDay());
|
||||
Cache::put("User::online:" . $userid, "on", Carbon::now()->addDay());
|
||||
//
|
||||
$all = Base::json2array(Cache::get("User::online:all"));
|
||||
if (!isset($all[$userid])) {
|
||||
$all[$userid] = $userid;
|
||||
Cache::forever("User::online:all", Base::array2json($all));
|
||||
}
|
||||
//
|
||||
WebSocket::updateInsert([
|
||||
'key' => md5($fd . '@' . $userid)
|
||||
], [
|
||||
|
||||
16
resources/assets/sass/dark.scss
vendored
16
resources/assets/sass/dark.scss
vendored
@ -133,13 +133,13 @@ body.dark-mode-reverse {
|
||||
.task-item {
|
||||
.task-progress {
|
||||
.task-time {
|
||||
&.overdue {
|
||||
color: #ed4014;
|
||||
&.today {
|
||||
color: #ff9900;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&.today {
|
||||
color: #ff9900;
|
||||
&.overdue {
|
||||
color: #ed4014;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
@ -156,13 +156,13 @@ body.dark-mode-reverse {
|
||||
> div {
|
||||
&.row-time {
|
||||
.task-time {
|
||||
&.overdue {
|
||||
color: #ed4014;
|
||||
&.today {
|
||||
color: #ff9900;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&.today {
|
||||
color: #ff9900;
|
||||
&.overdue {
|
||||
color: #ed4014;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
@ -544,20 +544,20 @@
|
||||
border-radius: 3px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
&.overdue,
|
||||
&.today {
|
||||
color: #ffffff;
|
||||
}
|
||||
&.today,
|
||||
&.overdue {
|
||||
font-weight: 600;
|
||||
background-color: #ed4014;
|
||||
border-color: #ed4014;
|
||||
color: #ffffff;
|
||||
}
|
||||
&.today {
|
||||
font-weight: 500;
|
||||
background-color: #ff9900;
|
||||
border-color: #ff9900;
|
||||
}
|
||||
&.overdue {
|
||||
font-weight: 600;
|
||||
background-color: #ed4014;
|
||||
border-color: #ed4014;
|
||||
}
|
||||
.taskfont {
|
||||
margin-right: 3px;
|
||||
font-size: 12px;
|
||||
@ -864,24 +864,24 @@
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
&.overdue,
|
||||
&.today {
|
||||
&.today,
|
||||
&.overdue {
|
||||
color: #ffffff;
|
||||
padding: 0 4px;
|
||||
border: 1px solid transparent;
|
||||
font-size: 13px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
&.overdue {
|
||||
font-weight: 600;
|
||||
background-color: #ed4014;
|
||||
border-color: #ed4014;
|
||||
}
|
||||
&.today {
|
||||
font-weight: 500;
|
||||
background-color: #ff9900;
|
||||
border-color: #ff9900;
|
||||
}
|
||||
&.overdue {
|
||||
font-weight: 600;
|
||||
background-color: #ed4014;
|
||||
border-color: #ed4014;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -380,14 +380,14 @@
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
cursor: pointer;
|
||||
&.overdue {
|
||||
font-weight: 600;
|
||||
color: #ed4014;
|
||||
}
|
||||
&.today {
|
||||
font-weight: 500;
|
||||
color: #ff9900;
|
||||
}
|
||||
&.overdue {
|
||||
font-weight: 600;
|
||||
color: #ed4014;
|
||||
}
|
||||
}
|
||||
.clock {
|
||||
margin: 3px 2px;
|
||||
|
||||
@ -257,12 +257,12 @@
|
||||
font-style: normal;
|
||||
margin-left: 4px;
|
||||
}
|
||||
&.overdue {
|
||||
color: #ed4014;
|
||||
}
|
||||
&.today {
|
||||
color: #ff9900;
|
||||
}
|
||||
&.overdue {
|
||||
color: #ed4014;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user