feat: Update log display messages for clarity; enhance log navigation styles and layout
This commit is contained in:
parent
135633ef7a
commit
06fa09bb42
|
@ -38,7 +38,7 @@ const Footer: React.FC = () => {
|
||||||
<span className="log-message">{lastLog.message}</span>
|
<span className="log-message">{lastLog.message}</span>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
"No logs yet."
|
"There are no logs to display at the moment."
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,6 +23,7 @@ const LogList: React.FC = () => {
|
||||||
className="log-list-container"
|
className="log-list-container"
|
||||||
onClick={() => setIsLogListVisible(false)}
|
onClick={() => setIsLogListVisible(false)}
|
||||||
>
|
>
|
||||||
|
{/* eslint-disable-next-line */}
|
||||||
<div
|
<div
|
||||||
className="log-list-wrapper"
|
className="log-list-wrapper"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
|
@ -46,32 +47,41 @@ const LogList: React.FC = () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Tabs */}
|
{/* Tabs */}
|
||||||
<div className="log-nav-wrapper">
|
<div className="log-nav-container">
|
||||||
{["all", "info", "warning", "error"].map((type) => (
|
<div className="log-nav-wrapper">
|
||||||
<button
|
{["all", "info", "warning", "error"].map((type) => (
|
||||||
title="log-type"
|
<button
|
||||||
key={type}
|
title="log-type"
|
||||||
className={`log-nav ${selectedTab === type ? "active" : ""}`}
|
key={type}
|
||||||
onClick={() => setSelectedTab(type as any)}
|
className={`log-nav ${selectedTab === type ? "active" : ""}`}
|
||||||
>
|
onClick={() => setSelectedTab(type as any)}
|
||||||
{`${type.charAt(0).toUpperCase() + type.slice(1)} Logs`}
|
>
|
||||||
</button>
|
{`${type.charAt(0).toUpperCase() + type.slice(1)} Logs`}
|
||||||
))}
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
<button title="clear-btn" className="clear-button" onClick={clear}>
|
||||||
|
clear
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Log Entries */}
|
{/* Log Entries */}
|
||||||
<div className="log-entry-wrapper">
|
<div className="log-entry-wrapper">
|
||||||
{filteredLogs.map((log) => (
|
{filteredLogs.length > 0 ? (
|
||||||
<div key={log.id} className={`log-entry ${log.type}`}>
|
filteredLogs.map((log) => (
|
||||||
<div className="log-icon">{GetLogIcon(log.type)}</div>
|
<div key={log.id} className={`log-entry ${log.type}`}>
|
||||||
<div className="log-entry-message-container">
|
<div className="log-icon">{GetLogIcon(log.type)}</div>
|
||||||
<div className="log-entry-message">{log.message}</div>
|
<div className="log-entry-message-container">
|
||||||
<div className="message-time">
|
<div className="log-entry-message">{log.message}</div>
|
||||||
{formatTimestamp(log.timestamp)}
|
<div className="message-time">
|
||||||
|
{formatTimestamp(log.timestamp)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
))
|
||||||
))}
|
) : (
|
||||||
|
<div className="no-log">There are no logs to display at the moment.</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,9 +28,9 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
.icon{
|
.icon {
|
||||||
@include flex-center;
|
@include flex-center;
|
||||||
scale: .8;
|
scale: 0.8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,24 +43,38 @@
|
||||||
svg {
|
svg {
|
||||||
scale: 1.6;
|
scale: 1.6;
|
||||||
}
|
}
|
||||||
&:hover{
|
&:hover {
|
||||||
background: var(--background-color);
|
background: var(--background-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.log-nav-container {
|
||||||
|
@include flex-space-between;
|
||||||
|
align-items: flex-end;
|
||||||
|
.log-nav-wrapper {
|
||||||
|
display: flex;
|
||||||
|
gap: 6px;
|
||||||
|
|
||||||
.log-nav-wrapper {
|
.log-nav {
|
||||||
display: flex;
|
padding: 8px 16px;
|
||||||
gap: 6px;
|
border-radius: 19px;
|
||||||
|
}
|
||||||
|
|
||||||
.log-nav {
|
.log-nav.active {
|
||||||
padding: 8px 16px;
|
background-color: var(--background-color-accent);
|
||||||
border-radius: 19px;
|
color: var(--text-button-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.clear-button{
|
||||||
.log-nav.active {
|
margin: 0 6px;
|
||||||
background-color: var(--background-color-accent);
|
padding: 4px 12px;
|
||||||
color: var(--text-button-color);
|
color: var(--text-disabled);
|
||||||
|
border-radius: #{$border-radius-large};
|
||||||
|
&:hover{
|
||||||
|
font-weight: 300;
|
||||||
|
color: var(--text-color);
|
||||||
|
background: var(--background-color-solid-gradient);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +112,7 @@
|
||||||
text-wrap: nowrap;
|
text-wrap: nowrap;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.log-entry-message{
|
.log-entry-message {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,5 +122,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.no-log{
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue