修复编辑器背景与重复的代码更新提示

dev_aliyun2
harry 5 years ago
parent 9febd93e57
commit 7696e2f8a9

@ -19,7 +19,7 @@ const SettingDrawer = (props) => {
return +fromStore('oj_fontSize') || 14;
});
const [theme, setTheme] = useState(() => {
return fromStore('oj_theme') || 'dark';
return fromStore('oj_theme') || 'vs-dark';
});
const { title, type = 'label', content = [] } = props;

@ -1,13 +1,12 @@
.monaco_editor_area {
height: 100%;
background-color: rgba(7, 15, 25, 1);
.code_title {
display: flex;
align-items: center;
background-color: rgba(18, 28, 36, 1);
color: #fff;
height: 56px;
background-color: rgba(18, 28, 36, 1);
padding: 0 20px;
.flex_strict {
@ -31,17 +30,6 @@
}
}
// .margin,
// .margin-view-overlays,
// .current-line{
// width: 40px !important;
// }
// .monaco-editor .margin-view-overlays .line-numbers{
// text-align: center;
// }
// .monaco-scrollable-element{
// left: 40px !important;
// }
}
.setting_drawer {
@ -77,18 +65,12 @@
}
.flex_has_save {
// animation: blink 3s line 3;
animation-name: blink;
animation-duration: .4s;
animation-iteration-count: 3;
}
// .monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input,
// .monaco-editor .margin,
// .minimap slider-mouseover,
// .minimap-decorations-layer{
// background:rgba(3,19,40,1) !important;
// }
@keyframes blink {
50% {
color: #fff;

@ -63,7 +63,6 @@ function RecordDetail(props) {
const handleEditorCode = (identifier, code) => {
if (identifier) {
console.log(code);
saveEditorCodeForDetail(code);
props.history.push(`/myproblems/${identifier}`);
}

@ -1,55 +1,74 @@
@import '../split_pane_resizer.scss';
.result_code_area .monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input{
.result_code_area .monaco-editor,
.monaco-editor-background,
.monaco-editor .inputarea.ime-input {
background-color: #f9f9f9 !important;
}
.result_code_area .monaco-editor .line-numbers {
color: #999 !important;
}
.result_code_area .monaco-editor .current-line~.line-numbers {
color: #0b216f !important;
}
.result_code_area .minimap-decorations-layer {
background: rgba(225, 225, 225, 0.2) !important;
}
.result_code_area .monaco-editor .margin {
background-color: #eee !important;
}
.record_detail_area {
background: #fff;
.record_detail_ctx {
padding: 0 20px;
.detail_ctx_header {
position: relative;
height: 56px;
}
.header_h2 {
line-height: 56px;
}
.header_btn {
position: absolute;
right: 0;
top: 14px;
}
.detail_ctx_status {
height: 18px;
line-height: 18px;
.status_label {
color: rgba(153, 153, 153, 1);
margin-right: 40px;
}
.status_label_error {
color: #E51C24;
}
.status_label_success {
color: #28BD8B;
}
.status_label_sub {
color: #333333;
}
.pass_case {
float: right;
margin-right: 0;
}
.pass_case_span {
margin-right: 10px;
}
@ -59,6 +78,7 @@
// height: 500px;
height: calc(100vh - 360px);
}
.result_error_area {
margin-top: 15px;
background: rgba(250, 250, 250, 1);

@ -15,11 +15,7 @@ import RightPane from './rightpane';
import { Icon } from 'antd';
import UserInfo from '../components/userInfo';
import actions from '../../../redux/actions';
<<<<<<< HEAD
import { CNotificationHOC } from 'educoder';
=======
import { fromStore, CNotificationHOC } from 'educoder';
>>>>>>> 73d555c... fix
import { withRouter } from 'react-router';
function StudentStudy(props) {
@ -28,8 +24,6 @@ function StudentStudy(props) {
const {
hack,
userInfo,
// hack_identifier,
// user_program_identifier,
restoreInitialCode,
changeUserCodeTab,
changeShowOrHideControl,
@ -75,7 +69,7 @@ function StudentStudy(props) {
changeUserCodeTab(tab);
}
}, []);
// console.log(hack, hack.modify_code)
useEffect(() => {
if (hack && hack.modify_code && hasUpdate) { // 代码更改,提示是否需要更新代码
setHasUpdate(false);

@ -52,7 +52,7 @@ const RightPane = (props) => {
clearInterval(timer);
timer = null;
saveUserCodeForInterval(identifier);
}, 10000);
}, 5000);
}
}

@ -137,6 +137,7 @@ const ojForUserReducer = (state = initialState, action) => {
} else {
curHack['code'] = '';
}
curHack['modify_code'] = false
return {
...state,
hack: Object.assign({}, state.hack, curHack),

Loading…
Cancel
Save