Skip to content

Commit

Permalink
增加 log 图标样式
Browse files Browse the repository at this point in the history
  • Loading branch information
whyour committed Oct 13, 2024
1 parent 71dd82f commit 4244502
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 9 deletions.
8 changes: 4 additions & 4 deletions back/loaders/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import config from '../config';
import path from 'path';

const levelMap: Record<string, string> = {
info: '🔵',
warn: '🟡',
error: '🔴',
debug: '🔶'
info: '\ue6f5',
warn: '\ue880',
error: '\ue602',
debug: '\ue67f'
}

const customFormat = winston.format.combine(
Expand Down
6 changes: 3 additions & 3 deletions shell/preload/sitecustomize.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function run() {
file_task_before_js,
dir_scripts,
task_before,
PREV_NODE_OPTIONS
PREV_NODE_OPTIONS,
} = process.env;

try {
Expand Down Expand Up @@ -62,10 +62,10 @@ function run() {
}
} catch (error) {
if (!error.message.includes('spawnSync /bin/sh E2BIG')) {
console.log(` run task before error: `, error);
console.log(`\ue926 run task before error: `, error);
} else {
console.log(
` The environment variable is too large. It is recommended to use task_before.js instead of task_before.sh\n`,
`\ue926 The environment variable is too large. It is recommended to use task_before.js instead of task_before.sh\n`,
);
}
if (task_before) {
Expand Down
4 changes: 2 additions & 2 deletions shell/preload/sitecustomize.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ def run():
except OSError as error:
error_message = str(error)
if "Argument list too long" not in error_message:
print(f" run task before error: {error}")
print(f"\ue926 run task before error: {error}")
else:
print(
" The environment variable is too large. It is recommended to use task_before.py instead of task_before.sh\n"
"\ue926 The environment variable is too large. It is recommended to use task_before.py instead of task_before.sh\n"
)
if task_before:
print("执行前置命令结束")
Expand Down
Binary file added src/assets/fonts/log.ttf
Binary file not shown.
Binary file added src/assets/fonts/log.woff
Binary file not shown.
Binary file added src/assets/fonts/log.woff2
Binary file not shown.
16 changes: 16 additions & 0 deletions src/layouts/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
url('../assets/fonts/SourceCodePro-Regular.ttf') format('truetype');
}

@font-face {
font-family: Log;
src: url('../assets/fonts/log.woff2') format('woff2'),
url('../assets/fonts/log.woff') format('woff'),
url('../assets/fonts/log.ttf') format('truetype');
}

body {
// 禁止手机页面下拉刷新
overflow: hidden;
Expand Down Expand Up @@ -52,6 +59,11 @@ body {
width: 100%;
padding: 24px;
overflow-y: auto;
code,
span {
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo,
Courier, monospace, Log;
}
}
}

Expand All @@ -63,6 +75,10 @@ body {
}
}

1 .cm-scroller {
font-family: monospace, Log;
}

.monaco-editor:not(.rename-box) {
height: calc(100vh - 128px) !important;
height: calc(100vh - var(--vh-offset, 0px) - 128px) !important;
Expand Down

0 comments on commit 4244502

Please sign in to comment.