diff --git a/8691.async.js b/8691.async.js index c2e71bd113..6f3a38a61a 100644 --- a/8691.async.js +++ b/8691.async.js @@ -629,10 +629,15 @@ var monaco = null; } }; (0,react.useEffect)(function () { + var _instance$updateOptio; + var instance = editor.current.instance; if (timeRef.current) clearTimeout(timeRef.current); timeRef.current = setTimeout(function () { setCodeValue(); }, 500); + instance === null || instance === void 0 ? void 0 : (_instance$updateOptio = instance.updateOptions) === null || _instance$updateOptio === void 0 ? void 0 : _instance$updateOptio.call(instance, { + lineNumbersMinChars: Math.max(Math.floor(Math.log10(value.split(/\r\n|\r|\n/g).length)) + 3, 5) + }); }, [value, init, editor.current]); (0,react.useEffect)(function () { if (errorLine && editor.current && editor.current.instance) { @@ -966,6 +971,7 @@ function DiffEditor(_ref2) { useShadows: false, horizontal: 'hidden', lineNumbers: 'off', + wordWrap: "off", ignoreTrimWhitespace: false, 'semanticHighlighting.enabled': true, followsCaret: true, diff --git a/color.less b/color.less index 3ae438e89d..f0c2d7ea39 100644 --- a/color.less +++ b/color.less @@ -563,10 +563,10 @@ a.ant-btn-disabled:active > a:only-child::after {background: transparent;} .ant-comment-actions > li > span {color: @text-color-secondary;} .ant-comment-actions > li > span:hover {color: #595959;} .ant-picker-status-error.ant-picker, .ant-picker-status-error.ant-picker:not([disabled]):hover {background-color: #fff;border-color: @error-color;} -.ant-picker-status-error.ant-picker-focused, .ant-picker-status-error.ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(90, 12, 107, 0.2);border-right-width: 1px;} +.ant-picker-status-error.ant-picker-focused, .ant-picker-status-error.ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(177, 207, 92, 0.2);border-right-width: 1px;} .ant-picker-status-error.ant-picker .ant-picker-active-bar {background: color(~`colorPalette("@{error-color}", 5)`);} .ant-picker-status-warning.ant-picker, .ant-picker-status-warning.ant-picker:not([disabled]):hover {background-color: #fff;border-color: @warning-color;} -.ant-picker-status-warning.ant-picker-focused, .ant-picker-status-warning.ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(86, 242, 39, 0.2);border-right-width: 1px;} +.ant-picker-status-warning.ant-picker-focused, .ant-picker-status-warning.ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(85, 63, 127, 0.2);border-right-width: 1px;} .ant-picker-status-warning.ant-picker .ant-picker-active-bar {background: color(~`colorPalette("@{warning-color}", 5)`);} .ant-picker {color: @text-color;background: #fff;border: 1px solid @border-color-base;border-radius: 2px;} .ant-picker:hover, .ant-picker-focused {border-color: color(~`colorPalette("@{primary-color}", 5)`);border-right-width: 1px;} @@ -788,16 +788,16 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .anticon.ant-input-clear-icon:hover, .ant-input-clear-icon:hover {color: @text-color-secondary;} .anticon.ant-input-clear-icon:active, .ant-input-clear-icon:active {color: @text-color;} .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input, .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover {background: #fff;border-color: @error-color;} -.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus, .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(90, 12, 107, 0.2);border-right-width: 1px;} +.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus, .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(177, 207, 92, 0.2);border-right-width: 1px;} .ant-input-status-error .ant-input-prefix {color: @error-color;} .ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input, .ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover {background: #fff;border-color: @warning-color;} -.ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus, .ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(86, 242, 39, 0.2);border-right-width: 1px;} +.ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus, .ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(85, 63, 127, 0.2);border-right-width: 1px;} .ant-input-status-warning .ant-input-prefix {color: @warning-color;} .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper, .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:hover {background: #fff;border-color: @error-color;} -.ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus, .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(90, 12, 107, 0.2);border-right-width: 1px;} +.ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus, .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(177, 207, 92, 0.2);border-right-width: 1px;} .ant-input-affix-wrapper-status-error .ant-input-prefix {color: @error-color;} .ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper, .ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:hover {background: #fff;border-color: @warning-color;} -.ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus, .ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(86, 242, 39, 0.2);border-right-width: 1px;} +.ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus, .ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(85, 63, 127, 0.2);border-right-width: 1px;} .ant-input-affix-wrapper-status-warning .ant-input-prefix {color: @warning-color;} .ant-input-group-wrapper-status-error .ant-input-group-addon {color: @error-color;border-color: @error-color;} .ant-input-group-wrapper-status-warning .ant-input-group-addon {color: @warning-color;border-color: @warning-color;} @@ -894,16 +894,16 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-input-number-affix-wrapper > div.ant-input-number {border: none;} .ant-input-number-affix-wrapper > div.ant-input-number.ant-input-number-focused {box-shadow: none !important;} .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number, .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:hover {background: #fff;border-color: @error-color;} -.ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:focus, .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(90, 12, 107, 0.2);border-right-width: 1px;} +.ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:focus, .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(177, 207, 92, 0.2);border-right-width: 1px;} .ant-input-number-status-error .ant-input-number-prefix {color: @error-color;} .ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number, .ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:hover {background: #fff;border-color: @warning-color;} -.ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:focus, .ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(86, 242, 39, 0.2);border-right-width: 1px;} +.ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:focus, .ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(85, 63, 127, 0.2);border-right-width: 1px;} .ant-input-number-status-warning .ant-input-number-prefix {color: @warning-color;} .ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper, .ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:hover {background: #fff;border-color: @error-color;} -.ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus, .ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(90, 12, 107, 0.2);border-right-width: 1px;} +.ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus, .ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(177, 207, 92, 0.2);border-right-width: 1px;} .ant-input-number-affix-wrapper-status-error .ant-input-number-prefix {color: @error-color;} .ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper, .ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:hover {background: #fff;border-color: @warning-color;} -.ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus, .ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(86, 242, 39, 0.2);border-right-width: 1px;} +.ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus, .ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(85, 63, 127, 0.2);border-right-width: 1px;} .ant-input-number-affix-wrapper-status-warning .ant-input-number-prefix {color: @warning-color;} .ant-input-number-group-wrapper-status-error .ant-input-number-group-addon {color: @error-color;border-color: @error-color;} .ant-input-number-group-wrapper-status-warning .ant-input-number-group-addon {color: @warning-color;border-color: @warning-color;} @@ -1024,10 +1024,10 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-list-grid .ant-col > .ant-list-item {border-bottom: none;} .ant-list-bordered {border: 1px solid @border-color-base;border-radius: 2px;} .ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions, .ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:hover {background: #fff;border-color: @error-color;} -.ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:focus, .ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(90, 12, 107, 0.2);border-right-width: 1px;} +.ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:focus, .ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(177, 207, 92, 0.2);border-right-width: 1px;} .ant-mentions-status-error .ant-input-prefix {color: @error-color;} .ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions, .ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:hover {background: #fff;border-color: @warning-color;} -.ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:focus, .ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(86, 242, 39, 0.2);border-right-width: 1px;} +.ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:focus, .ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(85, 63, 127, 0.2);border-right-width: 1px;} .ant-mentions-status-warning .ant-input-prefix {color: @warning-color;} .ant-mentions {color: @text-color;background-color: #fff;background-image: none;border: 1px solid @border-color-base;border-radius: 2px;} .ant-mentions::placeholder {color: #bfbfbf;} @@ -1360,9 +1360,9 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-select-multiple .ant-select-selection-item-remove {color: inherit;color: @text-color-secondary;} .ant-select-multiple .ant-select-selection-item-remove:hover {color: rgba(0, 0, 0, 0.75);} .ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer) .ant-select-selector {background-color: #fff;border-color: @error-color !important;} -.ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-open .ant-select-selector, .ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(90, 12, 107, 0.2);border-right-width: 1px;} +.ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-open .ant-select-selector, .ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(177, 207, 92, 0.2);border-right-width: 1px;} .ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer) .ant-select-selector {background-color: #fff;border-color: @warning-color !important;} -.ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-open .ant-select-selector, .ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(86, 242, 39, 0.2);border-right-width: 1px;} +.ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-open .ant-select-selector, .ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(85, 63, 127, 0.2);border-right-width: 1px;} .ant-select {color: @text-color;} .ant-select:not(.ant-select-customize-input) .ant-select-selector {background-color: #fff;border: 1px solid @border-color-base;border-radius: 2px;} .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {border-color: color(~`colorPalette("@{primary-color}", 5)`);box-shadow: 0 0 0 2px fade(@primary-color, 20%);border-right-width: 1px;} @@ -1658,7 +1658,7 @@ tr.ant-table-expanded-row:hover > td {background: #fbfbfb;} .ant-tag-green-inverse {color: #fff;background: #52c41a;border-color: #52c41a;} .ant-tag-blue {color: #096dd9;background: #e6f7ff;border-color: #91d5ff;} .ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;} -.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{layout-header-background}", 1)`);border-color: #adc6ff;} +.ant-tag-geekblue {color: #1d39c4;background: #f0f5ff;border-color: #adc6ff;} .ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;} .ant-tag-purple {color: #531dab;background: #f9f0ff;border-color: #d3adf7;} .ant-tag-purple-inverse {color: #fff;background: #722ed1;border-color: #722ed1;} diff --git a/js/public.js b/js/public.js index b385f22459..397fd31de2 100644 --- a/js/public.js +++ b/js/public.js @@ -105,6 +105,9 @@ window.addEventListener("storage", function (e) { var isShowError = false; function showNetworkError(){ + if(/mobile/i.test(navigator.userAgent)){ + return; + } if(isShowError) return; var arr = []; var dom = document.createElement("div"); diff --git a/p__Classrooms__Lists__Exercise__Detail__index.async.js b/p__Classrooms__Lists__Exercise__Detail__index.async.js index 1cd781022b..8feb83dc58 100644 --- a/p__Classrooms__Lists__Exercise__Detail__index.async.js +++ b/p__Classrooms__Lists__Exercise__Detail__index.async.js @@ -2976,10 +2976,15 @@ var monaco = null; } }; (0,react.useEffect)(function () { + var _instance$updateOptio; + var instance = editor.current.instance; if (timeRef.current) clearTimeout(timeRef.current); timeRef.current = setTimeout(function () { setCodeValue(); }, 500); + instance === null || instance === void 0 ? void 0 : (_instance$updateOptio = instance.updateOptions) === null || _instance$updateOptio === void 0 ? void 0 : _instance$updateOptio.call(instance, { + lineNumbersMinChars: Math.max(Math.floor(Math.log10(value.split(/\r\n|\r|\n/g).length)) + 3, 5) + }); }, [value, init, editor.current]); (0,react.useEffect)(function () { if (errorLine && editor.current && editor.current.instance) { @@ -3313,6 +3318,7 @@ function DiffEditor(_ref2) { useShadows: false, horizontal: 'hidden', lineNumbers: 'off', + wordWrap: "off", ignoreTrimWhitespace: false, 'semanticHighlighting.enabled': true, followsCaret: true, diff --git a/p__MyProblem__index.async.js b/p__MyProblem__index.async.js index bf06cb559c..259ec1f1c3 100644 --- a/p__MyProblem__index.async.js +++ b/p__MyProblem__index.async.js @@ -4415,7 +4415,11 @@ function ActionBar(_ref8) { onClick: onSyncCode, children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", { src: notice, - alt: "notice" + alt: "notice", + style: { + height: 13, + transform: 'translateY(-2px)' + } }) }) : null, /*#__PURE__*/(0,jsx_runtime.jsx)("a", { title: "\u6062\u590D\u521D\u59CB\u4EE3\u7801", diff --git a/p__Paperlibrary__EditPaper__index.async.js b/p__Paperlibrary__EditPaper__index.async.js index b5eafd8889..cca6684255 100644 --- a/p__Paperlibrary__EditPaper__index.async.js +++ b/p__Paperlibrary__EditPaper__index.async.js @@ -1452,10 +1452,15 @@ var monaco = null; } }; (0,react.useEffect)(function () { + var _instance$updateOptio; + var instance = editor.current.instance; if (timeRef.current) clearTimeout(timeRef.current); timeRef.current = setTimeout(function () { setCodeValue(); }, 500); + instance === null || instance === void 0 ? void 0 : (_instance$updateOptio = instance.updateOptions) === null || _instance$updateOptio === void 0 ? void 0 : _instance$updateOptio.call(instance, { + lineNumbersMinChars: Math.max(Math.floor(Math.log10(value.split(/\r\n|\r|\n/g).length)) + 3, 5) + }); }, [value, init, editor.current]); (0,react.useEffect)(function () { if (errorLine && editor.current && editor.current.instance) { @@ -1789,6 +1794,7 @@ function DiffEditor(_ref2) { useShadows: false, horizontal: 'hidden', lineNumbers: 'off', + wordWrap: "off", ignoreTrimWhitespace: false, 'semanticHighlighting.enabled': true, followsCaret: true, diff --git a/p__Paths__Detail__id.async.js b/p__Paths__Detail__id.async.js index a4ca6ca69c..12f5fa1e3b 100644 --- a/p__Paths__Detail__id.async.js +++ b/p__Paths__Detail__id.async.js @@ -5176,10 +5176,15 @@ var monaco = null; } }; (0,react.useEffect)(function () { + var _instance$updateOptio; + var instance = editor.current.instance; if (timeRef.current) clearTimeout(timeRef.current); timeRef.current = setTimeout(function () { setCodeValue(); }, 500); + instance === null || instance === void 0 ? void 0 : (_instance$updateOptio = instance.updateOptions) === null || _instance$updateOptio === void 0 ? void 0 : _instance$updateOptio.call(instance, { + lineNumbersMinChars: Math.max(Math.floor(Math.log10(value.split(/\r\n|\r|\n/g).length)) + 3, 5) + }); }, [value, init, editor.current]); (0,react.useEffect)(function () { if (errorLine && editor.current && editor.current.instance) { @@ -5513,6 +5518,7 @@ function DiffEditor(_ref2) { useShadows: false, horizontal: 'hidden', lineNumbers: 'off', + wordWrap: "off", ignoreTrimWhitespace: false, 'semanticHighlighting.enabled': true, followsCaret: true, diff --git a/p__Shixuns__Edit__body__Level__Challenges__EditPracticeSetting__index.async.js b/p__Shixuns__Edit__body__Level__Challenges__EditPracticeSetting__index.async.js index 002a9cf112..b4e6dac879 100644 --- a/p__Shixuns__Edit__body__Level__Challenges__EditPracticeSetting__index.async.js +++ b/p__Shixuns__Edit__body__Level__Challenges__EditPracticeSetting__index.async.js @@ -815,7 +815,7 @@ var PracticeFileType; PracticeFileType["PicturePath"] = "picture_path"; })(PracticeFileType || (PracticeFileType = {})); var EditPracticeSetting = function EditPracticeSetting(_ref) { - var _shixunsDetail$detail, _shixunsDetail$detail2, _shixunsDetail$detail3, _shixunsDetail$detail4, _shixunsDetail$detail5, _shixunsDetail$detail6, _shixunsDetail$detail7, _shixunsDetail$detail8; + var _shixunsDetail$detail, _shixunsDetail$detail2, _shixunsDetail$detail3, _shixunsDetail$detail4, _shixunsDetail$detail5, _shixunsDetail$detail6; var shixunsDetail = _ref.shixunsDetail, dispatch = _ref.dispatch, practiceSetting = _ref.practiceSetting; @@ -865,7 +865,7 @@ var EditPracticeSetting = function EditPracticeSetting(_ref) { isshows = _useState18[0], setisshows = _useState18[1]; var params = (0,_umi_production_exports.useParams)(); - var changeKeys = ["test_set_rules", "go_back_url", "next_challenge", "position", "name", "chooses", "st", "id", "path", "exec_path", "show_type", "original_picture_path", "expect_picture_path", "picture_path", "test_set_rules_expression", "web_route", "test_set_score", "test_set_average", "exec_time", "ignore_space", "with_code_file", "unity_3d", "unity_3d_routes", "unity_3d_result", "has_web_route", "test_sets", 'is_file', "hide_task_pass"]; + var changeKeys = ["test_set_rules", "go_back_url", "next_challenge", "position", "name", "chooses", "st", "id", "path", "exec_path", "show_type", "original_picture_path", "expect_picture_path", "picture_path", "test_set_rules_expression", "web_route", "test_set_score", "test_set_average", "exec_time", "ignore_space", "with_code_file", "unity_3d", "unity_3d_routes", "unity_3d_result", "has_web_route", "test_sets", 'is_file']; (0,react.useEffect)(function () { getPracticeData(); }, []); @@ -1350,32 +1350,7 @@ var EditPracticeSetting = function EditPracticeSetting(_ref) { placeholder: "\u8BF7\u9009\u62E9\u7248\u672C\u5E93\u4E2D\u7684\u4EE3\u7801\u6587\u4EF6\u3002\u4F8B\uFF1A src/step1/HelloWorld.java" }) })] - }), /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { - children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default.Item */.Z.Item, { - label: "\u9690\u85CF\u8FC7\u5173\u4EFB\u52A1:", - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, { - name: "hide_task_pass", - noStyle: true, - valuePropName: "checked", - children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {}) - }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { - className: "font14 c-light-black", - children: "\uFF08\u52FE\u9009\u540E\u5B66\u5458\u9875\u9762\u5C06\u9690\u85CF\u8FC7\u5173\u4EFB\u52A1\uFF09" - })] - }), formValue.unity_3d && ((_shixunsDetail$detail5 = shixunsDetail.detail) === null || _shixunsDetail$detail5 === void 0 ? void 0 : _shixunsDetail$detail5.identity) < 3 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, { - name: "unity_3d_routes", - label: "\u8DEF\u5F84:", - rules: [{ - required: true, - message: "必填项:不能为空" - }], - children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { - bordered: false, - disabled: ((_shixunsDetail$detail6 = shixunsDetail.detail) === null || _shixunsDetail$detail6 === void 0 ? void 0 : _shixunsDetail$detail6.shixun_status) === 2, - placeholder: "\u8BF7\u9009\u62E9\u7248\u672C\u5E93\u4E2D\u7684\u4EE3\u7801\u6587\u4EF6\u3002\u4F8B\uFF1A src/step1/HelloWorld.java" - }) - })] - }), formValue.unity_3d && ((_shixunsDetail$detail7 = shixunsDetail.detail) === null || _shixunsDetail$detail7 === void 0 ? void 0 : _shixunsDetail$detail7.identity) < 3 && /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, { + }), formValue.unity_3d && ((_shixunsDetail$detail5 = shixunsDetail.detail) === null || _shixunsDetail$detail5 === void 0 ? void 0 : _shixunsDetail$detail5.identity) < 3 && /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, { children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, { name: "with_code_file", label: "\u662F\u5426\u9700\u8981\u4EE3\u7801\u8BC4\u6D4B:", @@ -2089,7 +2064,7 @@ var EditPracticeSetting = function EditPracticeSetting(_ref) { }, 2), /*#__PURE__*/(0,jsx_runtime.jsx)(Loading/* default */.Z, { loading: loading }), /*#__PURE__*/(0,jsx_runtime.jsx)(UploadFile/* default */.ZP, { - rootIdentifier: shixunsDetail === null || shixunsDetail === void 0 ? void 0 : (_shixunsDetail$detail8 = shixunsDetail.detail) === null || _shixunsDetail$detail8 === void 0 ? void 0 : _shixunsDetail$detail8.root_identifier, + rootIdentifier: shixunsDetail === null || shixunsDetail === void 0 ? void 0 : (_shixunsDetail$detail6 = shixunsDetail.detail) === null || _shixunsDetail$detail6 === void 0 ? void 0 : _shixunsDetail$detail6.root_identifier, visible: showUploadFile, onClose: function onClose() { return setShowUploadFile(false); diff --git a/p__Shixuns__Edit__body__Level__Challenges__NewPractice__index.async.js b/p__Shixuns__Edit__body__Level__Challenges__NewPractice__index.async.js index 2a75ed1c00..8e979c392b 100644 --- a/p__Shixuns__Edit__body__Level__Challenges__NewPractice__index.async.js +++ b/p__Shixuns__Edit__body__Level__Challenges__NewPractice__index.async.js @@ -112,6 +112,10 @@ var es_select = __webpack_require__(34041); var radio_style = __webpack_require__(83822); // EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 4 modules var es_radio = __webpack_require__(29924); +// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/style/index.js + 1 modules +var checkbox_style = __webpack_require__(82000); +// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/index.js + 2 modules +var es_checkbox = __webpack_require__(32808); // EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js + 1 modules var input_style = __webpack_require__(69463); // EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 5 modules @@ -276,6 +280,8 @@ var AddTags = function AddTags(_ref) { + + @@ -285,7 +291,7 @@ var mappingDifficulty = { 3: [700, 800, 900, 1000] }; var NewPractice = function NewPractice(_ref) { - var _formValue$subject, _shixunsDetail$detail2, _shixunsDetail$detail3; + var _formValue$subject, _shixunsDetail$detail2, _shixunsDetail$detail3, _shixunsDetail$detail4, _shixunsDetail$detail5; var shixunsDetail = _ref.shixunsDetail, dispatch = _ref.dispatch, practiceSetting = _ref.practiceSetting; @@ -321,6 +327,7 @@ var NewPractice = function NewPractice(_ref) { var changeData = (0,react.useRef)({ subject: '', difficulty: 1, + hide_task_pass: false, score: 100, task_pass: (0,utils/* formatCodemirrorValue */.S)(challengesNew.task_pass_default) }); @@ -378,7 +385,8 @@ var NewPractice = function NewPractice(_ref) { subject: res.subject, difficulty: res.difficulty, score: res.score, - task_pass: res.task_pass + task_pass: res.task_pass, + hide_task_pass: res.hide_task_pass }; } case 5: @@ -397,7 +405,8 @@ var NewPractice = function NewPractice(_ref) { difficulty: res.difficulty, score: res.score, challenge_tag: res.tags, - task_pass: res.task_pass + task_pass: res.task_pass, + hide_task_pass: res.hide_task_pass }; var scores = mappingDifficulty[res.difficulty]; setScoreList(scores); @@ -624,6 +633,28 @@ var NewPractice = function NewPractice(_ref) { watch: true, defaultValue: isEdit ? editData === null || editData === void 0 ? void 0 : editData.task_pass : challengesNew.task_pass_default }, params.challengesId || '3') + }), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, { + label: "\u9690\u85CF\u4EFB\u52A1\u8981\u6C42:", + name: "hide_task_pass", + valuePropName: "checked", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "", + children: "\u52FE\u9009\u540E\u5B66\u5458\u9875\u9762\u5C06\u9690\u85CF\u4EFB\u52A1\u8981\u6C42" + }) + }) + }), formValue.unity_3d && ((_shixunsDetail$detail2 = shixunsDetail.detail) === null || _shixunsDetail$detail2 === void 0 ? void 0 : _shixunsDetail$detail2.identity) < 3 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, { + name: "unity_3d_routes", + label: "\u8DEF\u5F84:", + rules: [{ + required: true, + message: "必填项:不能为空" + }], + children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { + bordered: false, + disabled: ((_shixunsDetail$detail3 = shixunsDetail.detail) === null || _shixunsDetail$detail3 === void 0 ? void 0 : _shixunsDetail$detail3.shixun_status) === 2, + placeholder: "\u8BF7\u9009\u62E9\u7248\u672C\u5E93\u4E2D\u7684\u4EE3\u7801\u6587\u4EF6\u3002\u4F8B\uFF1A src/step1/HelloWorld.java" + }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, { initialValue: 1, name: "difficulty", @@ -633,7 +664,7 @@ var NewPractice = function NewPractice(_ref) { message: "请选择难度系数" }], children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, { - disabled: ((_shixunsDetail$detail2 = shixunsDetail.detail) === null || _shixunsDetail$detail2 === void 0 ? void 0 : _shixunsDetail$detail2.shixun_status) === 2, + disabled: ((_shixunsDetail$detail4 = shixunsDetail.detail) === null || _shixunsDetail$detail4 === void 0 ? void 0 : _shixunsDetail$detail4.shixun_status) === 2, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, { value: 1, children: "\u7B80\u5355" @@ -685,7 +716,7 @@ var NewPractice = function NewPractice(_ref) { message: "请选择奖励经验值" }], children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select/* default */.Z, { - disabled: ((_shixunsDetail$detail3 = shixunsDetail.detail) === null || _shixunsDetail$detail3 === void 0 ? void 0 : _shixunsDetail$detail3.shixun_status) === 2, + disabled: ((_shixunsDetail$detail5 = shixunsDetail.detail) === null || _shixunsDetail$detail5 === void 0 ? void 0 : _shixunsDetail$detail5.shixun_status) === 2, bordered: false, getPopupContainer: function getPopupContainer(trigger) { return trigger.parentNode; diff --git a/p__Shixuns__Edit__index.async.js b/p__Shixuns__Edit__index.async.js index 7421e6ff9f..c940916727 100644 --- a/p__Shixuns__Edit__index.async.js +++ b/p__Shixuns__Edit__index.async.js @@ -3484,10 +3484,15 @@ var monaco = null; } }; (0,react.useEffect)(function () { + var _instance$updateOptio; + var instance = editor.current.instance; if (timeRef.current) clearTimeout(timeRef.current); timeRef.current = setTimeout(function () { setCodeValue(); }, 500); + instance === null || instance === void 0 ? void 0 : (_instance$updateOptio = instance.updateOptions) === null || _instance$updateOptio === void 0 ? void 0 : _instance$updateOptio.call(instance, { + lineNumbersMinChars: Math.max(Math.floor(Math.log10(value.split(/\r\n|\r|\n/g).length)) + 3, 5) + }); }, [value, init, editor.current]); (0,react.useEffect)(function () { if (errorLine && editor.current && editor.current.instance) { @@ -3821,6 +3826,7 @@ function DiffEditor(_ref2) { useShadows: false, horizontal: 'hidden', lineNumbers: 'off', + wordWrap: "off", ignoreTrimWhitespace: false, 'semanticHighlighting.enabled': true, followsCaret: true, diff --git a/p__tasks__index.async.js b/p__tasks__index.async.js index 30935f9f69..4169976dc7 100644 --- a/p__tasks__index.async.js +++ b/p__tasks__index.async.js @@ -3502,10 +3502,15 @@ var monaco = null; } }; (0,react.useEffect)(function () { + var _instance$updateOptio; + var instance = editor.current.instance; if (timeRef.current) clearTimeout(timeRef.current); timeRef.current = setTimeout(function () { setCodeValue(); }, 500); + instance === null || instance === void 0 ? void 0 : (_instance$updateOptio = instance.updateOptions) === null || _instance$updateOptio === void 0 ? void 0 : _instance$updateOptio.call(instance, { + lineNumbersMinChars: Math.max(Math.floor(Math.log10(value.split(/\r\n|\r|\n/g).length)) + 3, 5) + }); }, [value, init, editor.current]); (0,react.useEffect)(function () { if (errorLine && editor.current && editor.current.instance) { @@ -3839,6 +3844,7 @@ function DiffEditor(_ref2) { useShadows: false, horizontal: 'hidden', lineNumbers: 'off', + wordWrap: "off", ignoreTrimWhitespace: false, 'semanticHighlighting.enabled': true, followsCaret: true, @@ -12185,7 +12191,7 @@ function VncTimer(_ref4) { } ;// CONCATENATED MODULE: ./src/pages/tasks/choose-repository/index.less?modules // extracted by mini-css-extract-plugin -/* harmony default export */ var choose_repositorymodules = ({"test-set-container":"test-set-container___JHp4n","resize-y-bar":"resize-y-bar___rdi2n","code-area-container":"code-area-container___Wrs1J","xterm-panel":"xterm-panel___Qp8NN","xterm-rows":"xterm-rows___NHMLJ","xterm":"xterm___JuxUK","xterm-screen":"xterm-screen___jNWY5","navs":"navs___isstg","arrow-right":"arrow-right___k6W52","arrow-down":"arrow-down___RJ_Vp","flex-container":"flex-container___fcvlY","iconfont":"iconfont___x63vg","active":"active___tIrbA","action-bar-container":"action-bar-container___WBAJU","action-bar":"action-bar___gNMCV","right-panel":"right-panel___n2hmC","action-container":"action-container___GNaac","setting-drawer":"setting-drawer___UAqT2","oj":"oj___BBHzQ"}); +/* harmony default export */ var choose_repositorymodules = ({"test-set-container":"test-set-container___JHp4n","resize-y-bar":"resize-y-bar___rdi2n","code-area-container":"code-area-container___Wrs1J","xterm-panel":"xterm-panel___Qp8NN","xterm-rows":"xterm-rows___NHMLJ","xterm":"xterm___JuxUK","xterm-screen":"xterm-screen___jNWY5","navs":"navs___isstg","arrow-right":"arrow-right___k6W52","arrow-down":"arrow-down___RJ_Vp","flex-container":"flex-container___fcvlY","iconfont":"iconfont___x63vg","active":"active___tIrbA","action-bar-container":"action-bar-container___WBAJU","action-bar":"action-bar___gNMCV","right-panel":"right-panel___n2hmC","action-container":"action-container___GNaac","setting-drawer":"setting-drawer___UAqT2","oj":"oj___BBHzQ","spinning":"spinning___Klii0"}); ;// CONCATENATED MODULE: ./src/pages/tasks/choose-repository/topics/index.less // extracted by mini-css-extract-plugin @@ -15024,7 +15030,8 @@ var HorizontalTabs = function HorizontalTabs(_ref) { _ref$paths = _ref.paths, paths = _ref$paths === void 0 ? [] : _ref$paths, activePath = _ref.activePath, - onChangePath = _ref.onChangePath; + onChangePath = _ref.onChangePath, + codeLoading = _ref.codeLoading; var _useState = (0,react.useState)(false), _useState2 = slicedToArray_default()(_useState, 2), visible = _useState2[0], @@ -15298,6 +15305,7 @@ var HorizontalTabs = function HorizontalTabs(_ref) { onOpenChange: function onOpenChange(e) { setOpen(e); }, + disabled: codeLoading, menu: { items: (_compact = (0,lodash.compact)(paths)) === null || _compact === void 0 ? void 0 : _compact.map(function (e) { return { @@ -16302,7 +16310,8 @@ function code_repository_reducer(state, action) { setTabs: setTabs, value: tabActiveParams, onChange: handleTabsChange, - codeUpdate: lastedUpdateTime !== 0 + codeUpdate: lastedUpdateTime !== 0, + codeLoading: codeLoading }), /*#__PURE__*/(0,jsx_runtime.jsx)(action_bar, objectSpread2_default()({}, actionBarOption))] }), tabs.map(function (item) { var _taskData$challenge, _taskData$challenge2; diff --git a/p__tasks__index.chunk.css b/p__tasks__index.chunk.css index ce5bd507c9..e05823183d 100644 --- a/p__tasks__index.chunk.css +++ b/p__tasks__index.chunk.css @@ -3785,6 +3785,14 @@ span.CodeMirror-selectedtext { color: #597a8f; border: 1px solid #597a8f; } +.spinning___Klii0 { + height: 100%; +} +.spinning___Klii0 > div { + height: 100%; + display: flex; + flex-direction: column; +} /* stylelint-disable no-duplicate-selectors */ /* stylelint-disable */ /* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */