perf: 优化代码
This commit is contained in:
@@ -76,15 +76,15 @@ const Logs = () => {
|
|||||||
const timestamp = extractTimestamp(message);
|
const timestamp = extractTimestamp(message);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: `${accountId}-${index}`,
|
id: `${accountId}-${index}`,
|
||||||
accountId,
|
accountId,
|
||||||
accountName,
|
accountName,
|
||||||
index: index + 1,
|
index: index + 1,
|
||||||
timestamp,
|
timestamp,
|
||||||
timestampValue: parseTimestampValue(timestamp),
|
timestampValue: parseTimestampValue(timestamp),
|
||||||
content: stripTimestamp(message),
|
content: stripTimestamp(message),
|
||||||
raw: message,
|
raw: message,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.sort((left, right) => {
|
.sort((left, right) => {
|
||||||
@@ -287,7 +287,7 @@ const Logs = () => {
|
|||||||
<Show
|
<Show
|
||||||
when={allLogs().length > 0}
|
when={allLogs().length > 0}
|
||||||
fallback={
|
fallback={
|
||||||
<div class="flex h-full items-center justify-center rounded-[26px] border border-dashed border-white/10 bg-white/[0.03] px-6 text-slate-500">
|
<div class="flex h-full items-center justify-center rounded-[26px] border border-dashed border-white/10 bg-white/3 px-6 text-slate-500">
|
||||||
暂无日志输出
|
暂无日志输出
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -295,7 +295,7 @@ const Logs = () => {
|
|||||||
<div class="space-y-1">
|
<div class="space-y-1">
|
||||||
<For each={allLogs()}>
|
<For each={allLogs()}>
|
||||||
{(log) => (
|
{(log) => (
|
||||||
<div class="rounded-lg px-3 py-2 transition hover:bg-white/[0.04]">
|
<div class="rounded-lg px-3 py-2 transition hover:bg-white/4">
|
||||||
{/* 头部 */}
|
{/* 头部 */}
|
||||||
<div class="flex items-center justify-between text-[11px] text-slate-400">
|
<div class="flex items-center justify-between text-[11px] text-slate-400">
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user