From 42445029494658382616468ba6f9726b535051da Mon Sep 17 00:00:00 2001 From: whyour Date: Sun, 13 Oct 2024 21:24:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20log=20=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/loaders/logger.ts | 8 ++++---- shell/preload/sitecustomize.js | 6 +++--- shell/preload/sitecustomize.py | 4 ++-- src/assets/fonts/log.ttf | Bin 0 -> 2004 bytes src/assets/fonts/log.woff | Bin 0 -> 1592 bytes src/assets/fonts/log.woff2 | Bin 0 -> 1056 bytes src/layouts/index.less | 16 ++++++++++++++++ 7 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 src/assets/fonts/log.ttf create mode 100644 src/assets/fonts/log.woff create mode 100644 src/assets/fonts/log.woff2 diff --git a/back/loaders/logger.ts b/back/loaders/logger.ts index 73cc878212d..94b4d460999 100644 --- a/back/loaders/logger.ts +++ b/back/loaders/logger.ts @@ -4,10 +4,10 @@ import config from '../config'; import path from 'path'; const levelMap: Record = { - info: '🔵', - warn: '🟡', - error: '🔴', - debug: '🔶' + info: '\ue6f5', + warn: '\ue880', + error: '\ue602', + debug: '\ue67f' } const customFormat = winston.format.combine( diff --git a/shell/preload/sitecustomize.js b/shell/preload/sitecustomize.js index 00624687f14..6dfc7095812 100644 --- a/shell/preload/sitecustomize.js +++ b/shell/preload/sitecustomize.js @@ -29,7 +29,7 @@ function run() { file_task_before_js, dir_scripts, task_before, - PREV_NODE_OPTIONS + PREV_NODE_OPTIONS, } = process.env; try { @@ -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) { diff --git a/shell/preload/sitecustomize.py b/shell/preload/sitecustomize.py index 8c2f469ae20..50d0e8f7690 100644 --- a/shell/preload/sitecustomize.py +++ b/shell/preload/sitecustomize.py @@ -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("执行前置命令结束") diff --git a/src/assets/fonts/log.ttf b/src/assets/fonts/log.ttf new file mode 100644 index 0000000000000000000000000000000000000000..5f7b44c5e90b2752e50bf7cfcb5bca877f7a6077 GIT binary patch literal 2004 zcmZ`)ZETZO6h8Ofeyn5dTGkJ?R@SZS`%;ieKi0-DOSjRX47M>4Fk$K#8=GN_v5^c} z!utbAh-4X<7(+BMpoB;u5fY*iv?2ZyBtb&d9}cv6J#UZ1K)(6gv?-Wh{oAvgpoU! zJ8@!^nVbkLdupR1_)O%VAQA*EF8kV?IAug-u_TX1mU5TV#sk&0 zJk@;YOlRkrL(Q|2X>$>*D0Msi%+K>>RE4@dZl~E4s8-e7sKgQp6+=AY@yG#AzH+Fz z*kZL=hK4LQtEISjNMf&qULdCB<$P-aq1IbCi&B1vEXd_|xa?JaN1dJhHFKX;vnqaP z=KgJ|-e&S{wos#(;H}WivGb|U zpgJ(KJ3SnLB8=&Skb!se0@K+&%J3EJg1m{$6|H0Uwz3P4A4|_o_L$f4*X15qEFO)x zT}~Xa!fsZ&-IbELKQAjWfo8k^oNgwY$Ifnanm}Ho4s=ud&f_H-I2*%^8!e!um+=tB1s#YkA*Nktr#p0C2lpR-8#cV=nJTWDpm^@CmClcptErya;k|l^aoY?rcM9oHCJ_A{ZiL` Jzvww4`VW$Pc%uLS literal 0 HcmV?d00001 diff --git a/src/assets/fonts/log.woff b/src/assets/fonts/log.wo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(- zEKyWjdyxD|yMS=$;Pu_yNi7O-C`!=PuB23ugUgiOWf}(_gXhWP@a%ciLN_r%5+o0b zXUcDigJetzOV%M}0p8lOk}YKQ;; literal 0 HcmV?d00001 diff --git a/src/assets/fonts/log.woff2 b/src/assets/fonts/log.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..5e0bddf75864bb3449eecf794c74a34d8524d441 GIT binary patch literal 1056 zcmV+*1mF92Pew8T0RR9100bZa3;+NC00-Cr00Yqg0RR9100000000000000000000 z0000YWFsyHU;tbShb)CZ0X7081567l00bZffqVxb8}0?jK41*SP^*_TNU-Syr%K&U z@=}OzdFT4=H^)uzfO%gpKN-sHXk~R)@QJ>WClEcldF$7<=!F7qD&-v{ zXe=*K&<`%hVfJr@V~Pfp;g72yGaH-Mwz&WU49lWDLGy$IZ5X?tB`yT40Gt65JvRYR z!H)@ohEX^OO@J|gvG9-s@gM<11OZAUCc{`kQG>$`MaP-}fGr4NiTl8WVg3s=`Mu#V zV+wi$uW7!4QcJNAD@3_k*%N3GOd>jo6&XMqVdasAMGbZC2z?bT4Tk}84(}WS01NaD zgpw)+B!DNfA>oN)+Zbn$`HT77vPtjT6=n|EwdN!EP4#r~S$2CkZ8MYeL}y|FU*H{x zUSOZvax)8M2rvX3nJUj9p|06G*w`pXPqhki6^`Skv8!F(U5H5A5sX`i(C@M_US_x~ z6|>!1Huqx7=iOVibTunBU0bxmYcBPhYvFa8rxH_|u!+&m&TbnR4i0k^b)uyr{?l=l z%}*4a%ia3m^T!+pH$`5U3W~&O1tp% z=5cFzxo-Ndf=Au*e8imxWk5dUXUEQ+%C0}RDz=5365FpljqA`kw`sC8NgCwI+PG$O z$lPBTk&|07m6C2%Mf*=FnbbkwGsZ)P0q81&G0N| zr&%%)6BWESVFO4O@2&-f|JY2RJD1vmK6;d6zPUp-#Oc#>COhkX zEelIA@CS^N$2~Rg=l|>0WN+)OefE}gePBy@p`clpH7z$cJQ6$b?RPwMCnO}mW3Se$ zcz@f{bm~D){fjA$8c)+E70mQ*qWY0*vDH*FrS@;vGp&8(~h;4i=b3DN!IS16!V4b%(R z;?9s1VYM2#RIS7<<|StAi2Ll~2JgD1;+QY?{nubPa=T5JYs aa97gddB^C1{Q(PfG$~xiRG1+H69546LEz5- literal 0 HcmV?d00001 diff --git a/src/layouts/index.less b/src/layouts/index.less index dc40501fe22..66a08da5ef4 100644 --- a/src/layouts/index.less +++ b/src/layouts/index.less @@ -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; @@ -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; + } } } @@ -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;