mirror of https://github.com/openspug/spug
U 优化页面下展示效果
parent
23ef656ac8
commit
183b071b12
|
@ -13,7 +13,7 @@ import 'ace-builds/src-noconflict/mode-python';
|
||||||
import 'ace-builds/src-noconflict/theme-tomorrow';
|
import 'ace-builds/src-noconflict/theme-tomorrow';
|
||||||
|
|
||||||
export default function (props) {
|
export default function (props) {
|
||||||
const style = {fontFamily: 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei', ...props.style}
|
const style = {fontFamily: 'Source Code Pro, Courier New, Courier, Monaco, monospace, PingFang SC, Microsoft YaHei', ...props.style}
|
||||||
return (
|
return (
|
||||||
<Editor
|
<Editor
|
||||||
theme="tomorrow"
|
theme="tomorrow"
|
||||||
|
|
|
@ -10,6 +10,7 @@ body {
|
||||||
|
|
||||||
div::-webkit-scrollbar, textarea::-webkit-scrollbar {
|
div::-webkit-scrollbar, textarea::-webkit-scrollbar {
|
||||||
width: 6px;
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb {
|
div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb {
|
||||||
|
@ -18,7 +19,7 @@ div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb {
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
font-family: source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace, PingFang SC, Microsoft YaHei;
|
font-family: Source Code Pro, Menlo, Monaco, Consolas, Courier New, monospace, Courier, PingFang SC, Microsoft YaHei;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-form-item-extra {
|
.ant-form-item-extra {
|
||||||
|
|
|
@ -76,6 +76,7 @@
|
||||||
|
|
||||||
.content::-webkit-scrollbar {
|
.content::-webkit-scrollbar {
|
||||||
width: 0;
|
width: 0;
|
||||||
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sider {
|
.sider {
|
||||||
|
@ -91,6 +92,7 @@
|
||||||
|
|
||||||
.menus::-webkit-scrollbar {
|
.menus::-webkit-scrollbar {
|
||||||
width: 0;
|
width: 0;
|
||||||
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
|
|
|
@ -71,7 +71,7 @@ export default observer(function Console() {
|
||||||
function initialTerm() {
|
function initialTerm() {
|
||||||
const fitPlugin = new FitAddon()
|
const fitPlugin = new FitAddon()
|
||||||
term.loadAddon(fitPlugin)
|
term.loadAddon(fitPlugin)
|
||||||
term.setOption('fontFamily', 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei')
|
term.setOption('fontFamily', 'Source Code Pro, Courier New, Courier, Monaco, monospace, PingFang SC, Microsoft YaHei')
|
||||||
term.setOption('theme', {background: '#fafafa', foreground: '#000', selection: '#999'})
|
term.setOption('theme', {background: '#fafafa', foreground: '#000', selection: '#999'})
|
||||||
term.open(el.current)
|
term.open(el.current)
|
||||||
term.fit = () => fitPlugin.fit()
|
term.fit = () => fitPlugin.fit()
|
||||||
|
|
|
@ -14,7 +14,7 @@ function OutView(props) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const fitPlugin = new FitAddon()
|
const fitPlugin = new FitAddon()
|
||||||
const term = new Terminal({disableStdin: true})
|
const term = new Terminal({disableStdin: true})
|
||||||
term.setOption('fontFamily', 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei')
|
term.setOption('fontFamily', 'Source Code Pro, Courier New, Courier, Monaco, monospace, PingFang SC, Microsoft YaHei')
|
||||||
term.loadAddon(fitPlugin)
|
term.loadAddon(fitPlugin)
|
||||||
term.setOption('theme', {background: '#fff', foreground: '#000', selection: '#999'})
|
term.setOption('theme', {background: '#fff', foreground: '#000', selection: '#999'})
|
||||||
term.open(el.current)
|
term.open(el.current)
|
||||||
|
|
|
@ -31,7 +31,7 @@ function OutView(props) {
|
||||||
gCurrent = current
|
gCurrent = current
|
||||||
const fitPlugin = new FitAddon()
|
const fitPlugin = new FitAddon()
|
||||||
term.setOption('disableStdin', false)
|
term.setOption('disableStdin', false)
|
||||||
term.setOption('fontFamily', 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei')
|
term.setOption('fontFamily', 'Source Code Pro, Courier New, Courier, Monaco, monospace, PingFang SC, Microsoft YaHei')
|
||||||
term.setOption('theme', {background: '#f0f0f0', foreground: '#000', selection: '#999', cursor: '#f0f0f0'})
|
term.setOption('theme', {background: '#f0f0f0', foreground: '#000', selection: '#999', cursor: '#f0f0f0'})
|
||||||
term.loadAddon(fitPlugin)
|
term.loadAddon(fitPlugin)
|
||||||
term.open(el.current)
|
term.open(el.current)
|
||||||
|
|
|
@ -234,7 +234,7 @@ class FileManager extends React.Component {
|
||||||
pagination={false}
|
pagination={false}
|
||||||
columns={this.columns}
|
columns={this.columns}
|
||||||
scroll={{y: scrollY}}
|
scroll={{y: scrollY}}
|
||||||
bodyStyle={{fontFamily: "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace"}}
|
style={{fontFamily: 'Source Code Pro, Courier New, Courier, Monaco, monospace, PingFang SC, Microsoft YaHei'}}
|
||||||
dataSource={objects}/>
|
dataSource={objects}/>
|
||||||
</Drawer>
|
</Drawer>
|
||||||
)
|
)
|
||||||
|
|
|
@ -18,7 +18,7 @@ function WebSSH(props) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fitPlugin = new FitAddon();
|
const fitPlugin = new FitAddon();
|
||||||
term.loadAddon(fitPlugin);
|
term.loadAddon(fitPlugin);
|
||||||
term.setOption('fontFamily', 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei')
|
term.setOption('fontFamily', 'Source Code Pro, Courier New, Courier, Monaco, monospace, PingFang SC, Microsoft YaHei')
|
||||||
term.open(container.current);
|
term.open(container.current);
|
||||||
term.write('WebSocket connecting ... ');
|
term.write('WebSocket connecting ... ');
|
||||||
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||||
|
|
Loading…
Reference in New Issue