Skip to content

Commit cf15117

Browse files
authored
Merge pull request #115 from 2skydev/dev
v0.0.23
2 parents e49ac7d + 63f4355 commit cf15117

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

src/renderer/src/components/LogViewer/LogViewer.styled.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const Root = styled.div`
1111
width: auto !important;
1212
1313
.ReactVirtualized__Grid__innerScrollContainer {
14-
overflow-x: auto !important;
14+
overflow: initial !important;
1515
max-width: initial !important;
1616
}
1717
}

src/renderer/src/components/LogViewer/LogViewer.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,23 @@ const LogViewer = ({ className, path, lines: _lines }: LogViewerProps) => {
4444
{/* @ts-ignore 라이브러리 내부 타입 오류 무시 */}
4545
<List
4646
width={500}
47-
height={300}
47+
height={280}
4848
rowCount={lines.length}
4949
rowHeight={({ index }) => {
5050
return 20 * lines[index].split('\n').length + 10
5151
}}
5252
rowRenderer={({ index, key, style }) => {
5353
let line = lines[index]
54+
5455
const date = line.match(/^\[([0-9\-._:\s]+)\]/)?.[1]
5556
const status = line.match(
5657
/^\[[0-9\-._:\s]+\] \[(info|debug|log|warn|error|verbose)\]/,
5758
)?.[1]
5859

5960
const color = statusColors[status!]
6061

61-
line = line.replace(/^\[[0-9\-._:\s]+\] /, '')
62-
line = line.replace(/^\[(info|debug|log|warn|error|verbose)\] /, '')
62+
line = line.replace(/^\[[0-9\-._:\s]+\]\s+/, '')
63+
line = line.replace(/^\[(info|debug|log|warn|error|verbose)\]\s+/, '')
6364

6465
return (
6566
<div
@@ -85,17 +86,17 @@ const LogViewer = ({ className, path, lines: _lines }: LogViewerProps) => {
8586
{dayjs(date).fromNow()}
8687
</div>
8788
<Divider type="vertical" style={{ borderColor: color, margin: '0 .6rem' }} />
88-
<div className="selectable" style={{ width: '2.5rem' }}>
89+
<div className="selectable" style={{ width: '3.3rem' }}>
8990
{status}
9091
</div>
9192
<Divider type="vertical" style={{ borderColor: color, margin: '0 .6rem' }} />
9293
</div>
9394

9495
<div>
9596
{line.split('\n').map((text, i) => (
96-
<div key={i} className="selectable" style={{ height: 20 }}>
97+
<pre key={i} className="selectable" style={{ height: 20 }}>
9798
{text}
98-
</div>
99+
</pre>
99100
))}
100101
</div>
101102
</div>

src/renderer/src/styles/init.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ export const Init = memo(createGlobalStyle`
2828
border: 1px solid transparent;
2929
}
3030
31+
*::-webkit-scrollbar-corner,
32+
*::-webkit-scrollbar-button {
33+
display: none;
34+
}
35+
3136
*::selection {
3237
background: ${props => props.theme.colors.primary};
3338
}

0 commit comments

Comments
 (0)