feat: Update log display messages for clarity; enhance log navigation styles and layout
This commit is contained in:
@@ -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,6 +47,7 @@ const LogList: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Tabs */}
|
{/* Tabs */}
|
||||||
|
<div className="log-nav-container">
|
||||||
<div className="log-nav-wrapper">
|
<div className="log-nav-wrapper">
|
||||||
{["all", "info", "warning", "error"].map((type) => (
|
{["all", "info", "warning", "error"].map((type) => (
|
||||||
<button
|
<button
|
||||||
@@ -58,10 +60,15 @@ const LogList: React.FC = () => {
|
|||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
<button title="clear-btn" className="clear-button" onClick={clear}>
|
||||||
|
clear
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Log Entries */}
|
{/* Log Entries */}
|
||||||
<div className="log-entry-wrapper">
|
<div className="log-entry-wrapper">
|
||||||
{filteredLogs.map((log) => (
|
{filteredLogs.length > 0 ? (
|
||||||
|
filteredLogs.map((log) => (
|
||||||
<div key={log.id} className={`log-entry ${log.type}`}>
|
<div key={log.id} className={`log-entry ${log.type}`}>
|
||||||
<div className="log-icon">{GetLogIcon(log.type)}</div>
|
<div className="log-icon">{GetLogIcon(log.type)}</div>
|
||||||
<div className="log-entry-message-container">
|
<div className="log-entry-message-container">
|
||||||
@@ -71,7 +78,10 @@ const LogList: React.FC = () => {
|
|||||||
</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>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
gap: 6px;
|
gap: 6px;
|
||||||
.icon {
|
.icon {
|
||||||
@include flex-center;
|
@include flex-center;
|
||||||
scale: .8;
|
scale: 0.8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +48,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.log-nav-container {
|
||||||
|
@include flex-space-between;
|
||||||
|
align-items: flex-end;
|
||||||
.log-nav-wrapper {
|
.log-nav-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
@@ -63,6 +65,18 @@
|
|||||||
color: var(--text-button-color);
|
color: var(--text-button-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.clear-button{
|
||||||
|
margin: 0 6px;
|
||||||
|
padding: 4px 12px;
|
||||||
|
color: var(--text-disabled);
|
||||||
|
border-radius: #{$border-radius-large};
|
||||||
|
&:hover{
|
||||||
|
font-weight: 300;
|
||||||
|
color: var(--text-color);
|
||||||
|
background: var(--background-color-solid-gradient);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.log-entry-wrapper {
|
.log-entry-wrapper {
|
||||||
height: calc(100% - 80px);
|
height: calc(100% - 80px);
|
||||||
@@ -108,5 +122,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.no-log{
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user