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;
|
namespace App\Events;
|
||||||
|
|
||||||
use App\Models\WebSocket;
|
use App\Models\WebSocket;
|
||||||
|
use App\Module\Base;
|
||||||
use Cache;
|
use Cache;
|
||||||
use Hhxsv5\LaravelS\Swoole\Events\WorkerStartInterface;
|
use Hhxsv5\LaravelS\Swoole\Events\WorkerStartInterface;
|
||||||
use Swoole\Http\Server;
|
use Swoole\Http\Server;
|
||||||
@ -19,6 +20,11 @@ class WorkerStartEvent implements WorkerStartInterface
|
|||||||
if (isset($server->startMsecTime) && Cache::get("swooleServerStartMsecTime") != $server->startMsecTime) {
|
if (isset($server->startMsecTime) && Cache::get("swooleServerStartMsecTime") != $server->startMsecTime) {
|
||||||
Cache::forever("swooleServerStartMsecTime", $server->startMsecTime);
|
Cache::forever("swooleServerStartMsecTime", $server->startMsecTime);
|
||||||
WebSocket::query()->delete();
|
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::fd:" . $fd, "on", Carbon::now()->addDay());
|
||||||
Cache::put("User::online:" . $userid, "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([
|
WebSocket::updateInsert([
|
||||||
'key' => md5($fd . '@' . $userid)
|
'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-item {
|
||||||
.task-progress {
|
.task-progress {
|
||||||
.task-time {
|
.task-time {
|
||||||
&.overdue {
|
&.today {
|
||||||
color: #ed4014;
|
color: #ff9900;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.today {
|
&.overdue {
|
||||||
color: #ff9900;
|
color: #ed4014;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -156,13 +156,13 @@ body.dark-mode-reverse {
|
|||||||
> div {
|
> div {
|
||||||
&.row-time {
|
&.row-time {
|
||||||
.task-time {
|
.task-time {
|
||||||
&.overdue {
|
&.today {
|
||||||
color: #ed4014;
|
color: #ff9900;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.today {
|
&.overdue {
|
||||||
color: #ff9900;
|
color: #ed4014;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -544,20 +544,20 @@
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
&.overdue,
|
&.today,
|
||||||
&.today {
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
&.overdue {
|
&.overdue {
|
||||||
font-weight: 600;
|
color: #ffffff;
|
||||||
background-color: #ed4014;
|
|
||||||
border-color: #ed4014;
|
|
||||||
}
|
}
|
||||||
&.today {
|
&.today {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
background-color: #ff9900;
|
background-color: #ff9900;
|
||||||
border-color: #ff9900;
|
border-color: #ff9900;
|
||||||
}
|
}
|
||||||
|
&.overdue {
|
||||||
|
font-weight: 600;
|
||||||
|
background-color: #ed4014;
|
||||||
|
border-color: #ed4014;
|
||||||
|
}
|
||||||
.taskfont {
|
.taskfont {
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@ -864,24 +864,24 @@
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
&.overdue,
|
&.today,
|
||||||
&.today {
|
&.overdue {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
&.overdue {
|
|
||||||
font-weight: 600;
|
|
||||||
background-color: #ed4014;
|
|
||||||
border-color: #ed4014;
|
|
||||||
}
|
|
||||||
&.today {
|
&.today {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
background-color: #ff9900;
|
background-color: #ff9900;
|
||||||
border-color: #ff9900;
|
border-color: #ff9900;
|
||||||
}
|
}
|
||||||
|
&.overdue {
|
||||||
|
font-weight: 600;
|
||||||
|
background-color: #ed4014;
|
||||||
|
border-color: #ed4014;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -380,14 +380,14 @@
|
|||||||
height: 26px;
|
height: 26px;
|
||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
&.overdue {
|
|
||||||
font-weight: 600;
|
|
||||||
color: #ed4014;
|
|
||||||
}
|
|
||||||
&.today {
|
&.today {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #ff9900;
|
color: #ff9900;
|
||||||
}
|
}
|
||||||
|
&.overdue {
|
||||||
|
font-weight: 600;
|
||||||
|
color: #ed4014;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.clock {
|
.clock {
|
||||||
margin: 3px 2px;
|
margin: 3px 2px;
|
||||||
|
|||||||
@ -257,12 +257,12 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
&.overdue {
|
|
||||||
color: #ed4014;
|
|
||||||
}
|
|
||||||
&.today {
|
&.today {
|
||||||
color: #ff9900;
|
color: #ff9900;
|
||||||
}
|
}
|
||||||
|
&.overdue {
|
||||||
|
color: #ed4014;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user