mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-02 19:00:49 +08:00
fix(logs): make error log panel scrollable
This commit is contained in:
@@ -170,6 +170,13 @@
|
|||||||
overscroll-behavior: contain;
|
overscroll-behavior: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.errorPanel {
|
||||||
|
height: 480px;
|
||||||
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
overscroll-behavior: contain;
|
||||||
|
}
|
||||||
|
|
||||||
.loadMoreBanner {
|
.loadMoreBanner {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -397,4 +404,8 @@
|
|||||||
.logPanel {
|
.logPanel {
|
||||||
height: 360px;
|
height: 360px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.errorPanel {
|
||||||
|
height: 360px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -882,32 +882,34 @@ export function LogsPage() {
|
|||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{errorLogs.length === 0 ? (
|
<div className={styles.errorPanel}>
|
||||||
<div className="hint">{t('logs.error_logs_empty')}</div>
|
{errorLogs.length === 0 ? (
|
||||||
) : (
|
<div className="hint">{t('logs.error_logs_empty')}</div>
|
||||||
<div className="item-list">
|
) : (
|
||||||
{errorLogs.map((item) => (
|
<div className="item-list">
|
||||||
<div key={item.name} className="item-row">
|
{errorLogs.map((item) => (
|
||||||
<div className="item-meta">
|
<div key={item.name} className="item-row">
|
||||||
<div className="item-title">{item.name}</div>
|
<div className="item-meta">
|
||||||
<div className="item-subtitle">
|
<div className="item-title">{item.name}</div>
|
||||||
{item.size ? `${(item.size / 1024).toFixed(1)} KB` : ''}{' '}
|
<div className="item-subtitle">
|
||||||
{item.modified ? formatUnixTimestamp(item.modified) : ''}
|
{item.size ? `${(item.size / 1024).toFixed(1)} KB` : ''}{' '}
|
||||||
|
{item.modified ? formatUnixTimestamp(item.modified) : ''}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="item-actions">
|
||||||
|
<Button
|
||||||
|
variant="secondary"
|
||||||
|
size="sm"
|
||||||
|
onClick={() => downloadErrorLog(item.name)}
|
||||||
|
>
|
||||||
|
{t('logs.error_logs_download')}
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="item-actions">
|
))}
|
||||||
<Button
|
</div>
|
||||||
variant="secondary"
|
)}
|
||||||
size="sm"
|
</div>
|
||||||
onClick={() => downloadErrorLog(item.name)}
|
|
||||||
>
|
|
||||||
{t('logs.error_logs_download')}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</Card>
|
</Card>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user