diff --git a/back/services/system.ts b/back/services/system.ts index 4dc2c8a9..ba48ae3a 100644 --- a/back/services/system.ts +++ b/back/services/system.ts @@ -183,13 +183,21 @@ export default class SystemService { ...oDoc, info: { ...oDoc.info, ...info }, }); - let targetDomain = 'dl-cdn.alpinelinux.org'; + let defaultDomain = 'https://dl-cdn.alpinelinux.org'; + let targetDomain = 'https://dl-cdn.alpinelinux.org'; + if (oDoc.info?.linuxMirror) { + defaultDomain = oDoc.info.linuxMirror; + } if (info.linuxMirror) { targetDomain = info.linuxMirror; } - const command = `sed -i 's/${ - oDoc.info?.linuxMirror || 'dl-cdn.alpinelinux.org' - }/${targetDomain}/g' /etc/apk/repositories && apk update -f`; + const command = `sed -i 's/${defaultDomain.replace( + /\//g, + '\\/', + )}/${targetDomain.replace( + /\//g, + '\\/', + )}/g' /etc/apk/repositories && apk update -f`; this.scheduleService.runTask( command, diff --git a/src/locales/en-US.json b/src/locales/en-US.json index 36df48e8..9bc2f504 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -475,5 +475,5 @@ "代理地址, 支持HTTP(S)/SOCK5": "Proxy Address, supports HTTP(S)/SOCK5", "NPM 镜像源": "NPM Mirror Source", "PyPI 镜像源": "PyPI Mirror Source", - "alpine linux 镜像源, 例如 mirrors.aliyun.com": "Alpine Linux Mirror Source, e.g. mirrors.aliyun.com" + "alpine linux 镜像源, 例如 https://mirrors.aliyun.com": "Alpine Linux Mirror Source, e.g. https://mirrors.aliyun.com" } diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json index ae7d76fb..1d3ef7a5 100644 --- a/src/locales/zh-CN.json +++ b/src/locales/zh-CN.json @@ -475,5 +475,5 @@ "代理地址, 支持HTTP(S)/SOCK5": "代理地址, 支持HTTP(S)/SOCK5", "NPM 镜像源": "NPM 镜像源", "PyPI 镜像源": "PyPI 镜像源", - "alpine linux 镜像源, 例如 mirrors.aliyun.com": "alpine linux 镜像源, 例如 mirrors.aliyun.com" + "alpine linux 镜像源, 例如 https://mirrors.aliyun.com": "alpine linux 镜像源, 例如 https://mirrors.aliyun.com" } diff --git a/src/pages/crontab/detail.tsx b/src/pages/crontab/detail.tsx index 1f1b7f87..e5bb0866 100644 --- a/src/pages/crontab/detail.tsx +++ b/src/pages/crontab/detail.tsx @@ -107,10 +107,9 @@ const CronDetailModal = ({ value={value} options={{ fontSize: 12, + minimap: { enabled: false }, lineNumbersMinChars: 3, - fontFamily: 'Source Code Pro', glyphMargin: false, - wordWrap: 'on', }} onMount={(editor, monaco) => { editorRef.current = editor; @@ -364,7 +363,7 @@ const CronDetailModal = ({
{currentCron.name} diff --git a/src/pages/crontab/index.less b/src/pages/crontab/index.less index 1529cd93..8c9d7d58 100644 --- a/src/pages/crontab/index.less +++ b/src/pages/crontab/index.less @@ -23,6 +23,7 @@ padding: 12px; max-height: calc(80vh - 57px); max-height: calc(80vh - var(--vh-offset, 57px)); + word-wrap: unset; } .ant-card-body { @@ -197,4 +198,4 @@ body[data-mode='desktop'] { .cron.pinned-cron > td { background: #f2f2f2; -} \ No newline at end of file +} diff --git a/src/pages/log/index.tsx b/src/pages/log/index.tsx index 8b376550..a9e7dd3e 100644 --- a/src/pages/log/index.tsx +++ b/src/pages/log/index.tsx @@ -266,11 +266,10 @@ const Log = () => { options={{ readOnly: true, fontSize: 12, + minimap: { enabled: false }, lineNumbersMinChars: 3, - fontFamily: 'Source Code Pro', folding: false, glyphMargin: false, - wordWrap: 'on', }} /> diff --git a/src/pages/setting/dependence.tsx b/src/pages/setting/dependence.tsx index ef93c0b1..f7342ff1 100644 --- a/src/pages/setting/dependence.tsx +++ b/src/pages/setting/dependence.tsx @@ -185,7 +185,7 @@ const Dependence = () => { {