|
|
|
@ -4,11 +4,11 @@
|
|
|
|
|
* @Github:
|
|
|
|
|
* @Date: 2019-11-27 15:02:52
|
|
|
|
|
* @LastEditors: tangjiang
|
|
|
|
|
* @LastEditTime: 2019-12-20 17:33:21
|
|
|
|
|
* @LastEditTime: 2019-12-20 19:06:48
|
|
|
|
|
*/
|
|
|
|
|
import './index.scss';
|
|
|
|
|
import React, { useState, useRef, useEffect } from 'react';
|
|
|
|
|
import { Drawer, Modal, Icon, Badge } from 'antd';
|
|
|
|
|
import { Drawer, Tooltip, Badge } from 'antd';
|
|
|
|
|
import { fromStore, CNotificationHOC } from 'educoder';
|
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
import MonacoEditor from '@monaco-editor/react';
|
|
|
|
@ -138,16 +138,44 @@ function MyMonacoEditor (props, ref) {
|
|
|
|
|
{/* 未保存时 ? '学员初始代码文件' : main.x */}
|
|
|
|
|
<span className='flex_strict' style={{ color: '#ddd'}}>{identifier ? language ? maps[language.toLowerCase()] : '' : '学员初始代码文件'}</span>
|
|
|
|
|
<span className={_classnames}>{hadCodeUpdate ? '已保存' : ''}</span>
|
|
|
|
|
<Badge
|
|
|
|
|
className="flex_normal"
|
|
|
|
|
style={{ color: '#666'}}
|
|
|
|
|
dot={notice}
|
|
|
|
|
onClick={handleUpdateNotice}
|
|
|
|
|
{/* <Tooltip
|
|
|
|
|
style={{ background: 'gold' }}
|
|
|
|
|
className="tooltip_style"
|
|
|
|
|
title="通知"
|
|
|
|
|
placement="bottom"
|
|
|
|
|
> */}
|
|
|
|
|
<Tooltip
|
|
|
|
|
placement="bottom"
|
|
|
|
|
title="通知"
|
|
|
|
|
>
|
|
|
|
|
<Icon type="bell" />
|
|
|
|
|
</Badge>
|
|
|
|
|
<span onClick={handleRestoreCode} className="flex_normal" style={{ display: identifier ? 'inline-block' : 'none'}}>{renderRestore}</span>
|
|
|
|
|
<MyIcon className='code-icon' type="iconshezhi" onClick={handleShowDrawer}/>
|
|
|
|
|
<Badge
|
|
|
|
|
className="flex_normal"
|
|
|
|
|
style={{ color: '#666'}}
|
|
|
|
|
dot={notice}
|
|
|
|
|
onClick={handleUpdateNotice}
|
|
|
|
|
>
|
|
|
|
|
{/* <Icon type="bell" /> */}
|
|
|
|
|
<MyIcon type="iconxiaoxi1" />
|
|
|
|
|
</Badge>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
<Tooltip
|
|
|
|
|
placement="bottom"
|
|
|
|
|
title="重置"
|
|
|
|
|
>
|
|
|
|
|
<MyIcon
|
|
|
|
|
className="flex_normal"
|
|
|
|
|
onClick={handleRestoreCode}
|
|
|
|
|
type="iconzaicizairu"
|
|
|
|
|
style={{ display: identifier ? 'inline-block' : 'none'}}
|
|
|
|
|
/>
|
|
|
|
|
{/* <span onClick={handleRestoreCode} className="flex_normal" style={{ display: identifier ? 'inline-block' : 'none'}}>{renderRestore}</span> */}
|
|
|
|
|
</Tooltip>
|
|
|
|
|
<Tooltip
|
|
|
|
|
placement="bottom"
|
|
|
|
|
title="设置"
|
|
|
|
|
>
|
|
|
|
|
<MyIcon className='code-icon' type="iconshezhi" onClick={handleShowDrawer}/>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</div>
|
|
|
|
|
<MonacoEditor
|
|
|
|
|
height={height}
|
|
|
|
|