forked from Gitlink/forgeplus-react
merge
This commit is contained in:
commit
ec3724d61d
File diff suppressed because it is too large
Load Diff
|
|
@ -4,6 +4,7 @@ import marked, { getTocContent, cleanToc, getMathExpressions, resetMathExpressio
|
|||
import 'code-prettify';
|
||||
import dompurify from 'dompurify';
|
||||
import { getEmoji } from '../forge/Main/emoji';
|
||||
import { emojiList } from '../common/util/emoji';
|
||||
import axios from 'axios';
|
||||
import imgError from '../images/img-error.png'
|
||||
|
||||
|
|
@ -69,6 +70,25 @@ export default ({
|
|||
rs = rs.replace(matchStr[i],getEmoji(matchStr[i]));
|
||||
}
|
||||
}
|
||||
|
||||
if(rs){
|
||||
for(let i = 0;i<emojiList.length;i++){
|
||||
if(rs.indexOf(emojiList[i].code)>=0){
|
||||
const reg = '/\\'+emojiList[i].code+'/g'
|
||||
switch(emojiList[i].index){
|
||||
case 1:
|
||||
rs = rs.replace(eval(reg), `<img style="width:24px;" src="https://testforum.trustie.net/editormd/emoji/${emojiList[i].name}.png"/>`)
|
||||
case 2:
|
||||
rs = rs.replace(eval(reg), `<img style="width:24px;" src="https://twemoji.maxcdn.com/36x36/${emojiList[i].name}.png"/>`)
|
||||
case 3:
|
||||
rs = rs.replace(eval(reg), `<i class="fa fa-emoji fa-${emojiList[i].name}"></i>`)
|
||||
case 4:
|
||||
rs = rs.replace(eval(reg), `<i class="${emojiList[i].name}"></i>`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(owner && projectsId && issues && issues.length>0){
|
||||
for(var x=0;x<issues.length;x++){
|
||||
let item = issues[x];
|
||||
|
|
|
|||
|
|
@ -851,4 +851,19 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.editormd-emoji-dialog {
|
||||
.editormd-dialog-mask {
|
||||
display: none !important;
|
||||
}
|
||||
.editormd-tab-box {
|
||||
.editormd-grid-table {
|
||||
.editormd-grid-table-row {
|
||||
.selected {
|
||||
background-color: #708cff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@ import SelectBranch from '../../../forge/Branch/Select';
|
|||
import './index.scss';
|
||||
|
||||
function Pages(props) {
|
||||
const {current_user, history, form, projectDetail, defaultBranch, isManager} = props;
|
||||
const {current_user, history, form, projectDetail, defaultBranch, isManager, mygetHelmetapi:{site_page_deploy_domain}} = props;
|
||||
const { owner , projectsId } = props.match.params;
|
||||
const {id_card_verify} = current_user;
|
||||
const { getFieldDecorator, validateFieldsAndScroll } = form;
|
||||
|
|
@ -126,7 +126,7 @@ function Pages(props) {
|
|||
/>
|
||||
)}
|
||||
<span style={{wordBreak: 'break-all'}}>
|
||||
http://{current_user.login}.kingchan.cn/{tag}
|
||||
http://{current_user.login}.{site_page_deploy_domain}/{tag}
|
||||
</span>
|
||||
</Form.Item>
|
||||
<Form.Item name="建站工具" label="建站工具">
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import 'codemirror/lib/codemirror.css';
|
|||
import './css/newquestion.css';
|
||||
const $ = window.$
|
||||
|
||||
const mdIcons = ["bold", "italic", "del", "|", "list-ul", "list-ol", "|", "code", "code-block", "link", "|", "image", "table", '|', "line-break", "watch", "clear", "fullscreen"];
|
||||
const mdIconsHasLatex = ["bold", "italic", "del", "|", "list-ul", "list-ol", "|", "code", "code-block", "link", "|", "inline-latex", "latex", '|', "image", "table", '|', "line-break", "watch", "clear", "fullscreen"];
|
||||
const mdIcons = ["bold", "italic", "del", "|", "list-ul", "list-ol", "|", "code", "code-block", "link", "|", "image", "table", '|', "line-break", "watch", "clear", "emoji", "fullscreen"];
|
||||
const mdIconsHasLatex = ["bold", "italic", "del", "|", "list-ul", "list-ol", "|", "code", "code-block", "link", "|", "inline-latex", "latex", '|', "image", "table", '|', "line-break", "watch", "clear","emoji", "fullscreen"];
|
||||
|
||||
const NULL_CH = '▁';
|
||||
|
||||
|
|
@ -339,7 +339,7 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla
|
|||
syncScrolling: "single",
|
||||
tex: true,
|
||||
tocm: true,
|
||||
emoji: !!emoji,
|
||||
emoji: true,
|
||||
taskList: true,
|
||||
codeFold: true,
|
||||
searchReplace: true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue