mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 22:45:25 +00:00
242 lines
5.6 KiB
JavaScript
242 lines
5.6 KiB
JavaScript
import styled from 'styled-components';
|
|
|
|
const StyledWrapper = styled.div`
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
background: ${(props) => props.theme.console.contentBg};
|
|
overflow: hidden;
|
|
|
|
.network-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 8px 16px;
|
|
background: ${(props) => props.theme.console.headerBg};
|
|
border-bottom: 1px solid ${(props) => props.theme.console.border};
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.network-title {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
color: ${(props) => props.theme.console.titleColor};
|
|
font-size: ${(props) => props.theme.font.size.base};
|
|
font-weight: 500;
|
|
|
|
.request-count {
|
|
color: ${(props) => props.theme.console.countColor};
|
|
font-size: ${(props) => props.theme.font.size.sm};
|
|
font-weight: 400;
|
|
}
|
|
}
|
|
|
|
.network-content {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
}
|
|
|
|
.network-empty {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100%;
|
|
color: ${(props) => props.theme.console.emptyColor};
|
|
text-align: center;
|
|
gap: 8px;
|
|
padding: 40px 20px;
|
|
|
|
p {
|
|
margin: 0;
|
|
font-size: ${(props) => props.theme.font.size.base};
|
|
font-weight: 500;
|
|
}
|
|
|
|
span {
|
|
font-size: ${(props) => props.theme.font.size.sm};
|
|
opacity: 0.7;
|
|
}
|
|
}
|
|
|
|
.requests-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
min-height: 0;
|
|
position: relative;
|
|
|
|
&.is-resizing {
|
|
cursor: col-resize;
|
|
user-select: none;
|
|
}
|
|
}
|
|
|
|
.requests-header {
|
|
display: grid;
|
|
flex-shrink: 0;
|
|
background: ${(props) => props.theme.console.headerBg};
|
|
border-bottom: 1px solid ${(props) => props.theme.console.border};
|
|
font-size: 10px;
|
|
color: ${(props) => props.theme.console.titleColor};
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
|
|
& > * {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.header-cell {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 4px 8px;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
|
|
&:first-child { padding-left: 16px; }
|
|
&:last-child { padding-right: 16px; }
|
|
|
|
&:hover {
|
|
color: ${(props) => props.theme.console.messageColor};
|
|
}
|
|
|
|
span {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
svg { flex-shrink: 0; }
|
|
}
|
|
}
|
|
|
|
.requests-list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
min-height: 0;
|
|
}
|
|
|
|
.request-row {
|
|
display: grid;
|
|
cursor: pointer;
|
|
transition: background-color 0.1s ease;
|
|
font-size: ${(props) => props.theme.font.size.sm};
|
|
align-items: center;
|
|
|
|
& > * {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
&:hover { background: ${(props) => props.theme.console.logHoverBg}; }
|
|
|
|
&.selected {
|
|
background: ${(props) => props.theme.console.logHoverBg};
|
|
box-shadow: inset 3px 0 0 ${(props) => props.theme.console.checkboxColor};
|
|
}
|
|
}
|
|
|
|
.col-separator {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 4px;
|
|
transform: translateX(-2px);
|
|
cursor: col-resize;
|
|
z-index: 3;
|
|
|
|
&::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 1px;
|
|
height: 100%;
|
|
background: ${(props) => props.theme.sidebar.dragbar.border};
|
|
}
|
|
|
|
&:hover::after,
|
|
&.resizing::after {
|
|
background: ${(props) => props.theme.sidebar.dragbar.activeBorder};
|
|
}
|
|
}
|
|
|
|
.request-method { padding: 2px 8px 2px 16px; }
|
|
.request-status { padding: 2px 8px; }
|
|
|
|
.method-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
font-size: 10px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.status-badge { font-size: ${(props) => props.theme.font.size.sm}; }
|
|
|
|
.request-domain {
|
|
padding: 2px 8px;
|
|
color: ${(props) => props.theme.console.messageColor};
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.request-path {
|
|
padding: 2px 8px;
|
|
color: ${(props) => props.theme.console.messageColor};
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
font-family: ui-monospace, 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
|
|
}
|
|
|
|
.request-time {
|
|
padding: 2px 8px;
|
|
color: ${(props) => props.theme.console.timestampColor};
|
|
font-family: ui-monospace, 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
|
|
font-size: ${(props) => props.theme.font.size.xs};
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.request-duration {
|
|
padding: 2px 8px;
|
|
color: ${(props) => props.theme.console.messageColor};
|
|
font-family: ui-monospace, 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
|
|
font-size: ${(props) => props.theme.font.size.xs};
|
|
text-align: right;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.text-right { text-align: right; }
|
|
|
|
.request-size {
|
|
padding: 2px 8px;
|
|
color: ${(props) => props.theme.console.messageColor};
|
|
font-family: ui-monospace, 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
|
|
font-size: ${(props) => props.theme.font.size.xs};
|
|
text-align: right;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
`;
|
|
|
|
export default StyledWrapper;
|