增加 log 图标样式

This commit is contained in:
whyour 2024-10-13 21:24:17 +08:00
parent 71dd82f74e
commit 4244502949
7 changed files with 25 additions and 9 deletions

View File

@ -4,10 +4,10 @@ import config from '../config';
import path from 'path'; import path from 'path';
const levelMap: Record<string, string> = { const levelMap: Record<string, string> = {
info: '🔵', info: '\ue6f5',
warn: '🟡', warn: '\ue880',
error: '🔴', error: '\ue602',
debug: '🔶' debug: '\ue67f'
} }
const customFormat = winston.format.combine( const customFormat = winston.format.combine(

View File

@ -29,7 +29,7 @@ function run() {
file_task_before_js, file_task_before_js,
dir_scripts, dir_scripts,
task_before, task_before,
PREV_NODE_OPTIONS PREV_NODE_OPTIONS,
} = process.env; } = process.env;
try { try {
@ -62,10 +62,10 @@ function run() {
} }
} catch (error) { } catch (error) {
if (!error.message.includes('spawnSync /bin/sh E2BIG')) { if (!error.message.includes('spawnSync /bin/sh E2BIG')) {
console.log(` run task before error: `, error); console.log(`\ue926 run task before error: `, error);
} else { } else {
console.log( 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) { if (task_before) {

View File

@ -72,10 +72,10 @@ def run():
except OSError as error: except OSError as error:
error_message = str(error) error_message = str(error)
if "Argument list too long" not in error_message: 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: else:
print( 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: if task_before:
print("执行前置命令结束") print("执行前置命令结束")

BIN
src/assets/fonts/log.ttf Normal file

Binary file not shown.

BIN
src/assets/fonts/log.woff Normal file

Binary file not shown.

BIN
src/assets/fonts/log.woff2 Normal file

Binary file not shown.

View File

@ -8,6 +8,13 @@
url('../assets/fonts/SourceCodePro-Regular.ttf') format('truetype'); 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 { body {
// 禁止手机页面下拉刷新 // 禁止手机页面下拉刷新
overflow: hidden; overflow: hidden;
@ -52,6 +59,11 @@ body {
width: 100%; width: 100%;
padding: 24px; padding: 24px;
overflow-y: auto; overflow-y: auto;
code,
span {
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo,
Courier, monospace, Log;
}
} }
} }
@ -63,6 +75,10 @@ body {
} }
} }
.ͼ1 .cm-scroller {
font-family: monospace, Log;
}
.monaco-editor:not(.rename-box) { .monaco-editor:not(.rename-box) {
height: calc(100vh - 128px) !important; height: calc(100vh - 128px) !important;
height: calc(100vh - var(--vh-offset, 0px) - 128px) !important; height: calc(100vh - var(--vh-offset, 0px) - 128px) !important;