diff --git a/spug_web/src/components/ACEditor.js b/spug_web/src/components/ACEditor.js index 9449c37..4a3da2d 100644 --- a/spug_web/src/components/ACEditor.js +++ b/spug_web/src/components/ACEditor.js @@ -15,6 +15,7 @@ export default function (props) { theme="tomorrow" fontSize={13} tabSize={2} + style={{fontFamily: 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei'}} {...props} /> ) diff --git a/spug_web/src/index.css b/spug_web/src/index.css index 5c577d2..1847b84 100644 --- a/spug_web/src/index.css +++ b/spug_web/src/index.css @@ -1,20 +1,27 @@ @import '~antd/dist/antd.css'; body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", - "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + overflow: hidden; +} + +div::-webkit-scrollbar, textarea::-webkit-scrollbar { + width: 6px; +} + +div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { + border-radius: 6px; + background: rgba(0, 0, 0, .2); } code { - font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", - monospace; + font-family: source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace, PingFang SC, Microsoft YaHei; } /* Common CSS style */ .none { - display: none; + display: none; } \ No newline at end of file diff --git a/spug_web/src/layout/layout.module.less b/spug_web/src/layout/layout.module.less index 45bec76..c5dc395 100644 --- a/spug_web/src/layout/layout.module.less +++ b/spug_web/src/layout/layout.module.less @@ -74,6 +74,10 @@ overflow-y: scroll; } +.content::-webkit-scrollbar { + width: 0; +} + .sider { height: 100%; width: 208px; @@ -83,7 +87,10 @@ .menus { overflow: auto; + } + .menus::-webkit-scrollbar { + width: 0; } .logo { diff --git a/spug_web/src/pages/alarm/alarm/Table.js b/spug_web/src/pages/alarm/alarm/Table.js index e1294c9..869428a 100644 --- a/spug_web/src/pages/alarm/alarm/Table.js +++ b/spug_web/src/pages/alarm/alarm/Table.js @@ -91,7 +91,6 @@ class ComTable extends React.Component { pagination={{ showSizeChanger: true, showLessItems: true, - hideOnSinglePage: true, showTotal: total => `共 ${total} 条`, pageSizeOptions: ['10', '20', '50', '100'] }} diff --git a/spug_web/src/pages/alarm/contact/Table.js b/spug_web/src/pages/alarm/contact/Table.js index f88aa15..321f220 100644 --- a/spug_web/src/pages/alarm/contact/Table.js +++ b/spug_web/src/pages/alarm/contact/Table.js @@ -50,7 +50,6 @@ class ComTable extends React.Component { pagination={{ showSizeChanger: true, showLessItems: true, - hideOnSinglePage: true, showTotal: total => `共 ${total} 条`, pageSizeOptions: ['10', '20', '50', '100'] }}> diff --git a/spug_web/src/pages/alarm/group/Table.js b/spug_web/src/pages/alarm/group/Table.js index 0ee46ac..2b19ffa 100644 --- a/spug_web/src/pages/alarm/group/Table.js +++ b/spug_web/src/pages/alarm/group/Table.js @@ -72,7 +72,6 @@ class ComTable extends React.Component { pagination={{ showSizeChanger: true, showLessItems: true, - hideOnSinglePage: true, showTotal: total => `共 ${total} 条`, pageSizeOptions: ['10', '20', '50', '100'] }}> diff --git a/spug_web/src/pages/config/app/Table.js b/spug_web/src/pages/config/app/Table.js index c091fe3..5a73b3f 100644 --- a/spug_web/src/pages/config/app/Table.js +++ b/spug_web/src/pages/config/app/Table.js @@ -59,7 +59,6 @@ class ComTable extends React.Component { pagination={{ showSizeChanger: true, showLessItems: true, - hideOnSinglePage: true, showTotal: total => `共 ${total} 条`, pageSizeOptions: ['10', '20', '50', '100'] }}> diff --git a/spug_web/src/pages/config/environment/Table.js b/spug_web/src/pages/config/environment/Table.js index a846846..cd7666f 100644 --- a/spug_web/src/pages/config/environment/Table.js +++ b/spug_web/src/pages/config/environment/Table.js @@ -54,7 +54,6 @@ function ComTable() { pagination={{ showSizeChanger: true, showLessItems: true, - hideOnSinglePage: true, showTotal: total => `共 ${total} 条`, pageSizeOptions: ['10', '20', '50', '100'] }}> diff --git a/spug_web/src/pages/config/service/Table.js b/spug_web/src/pages/config/service/Table.js index 2c77405..52c8bc0 100644 --- a/spug_web/src/pages/config/service/Table.js +++ b/spug_web/src/pages/config/service/Table.js @@ -55,7 +55,6 @@ class ComTable extends React.Component { pagination={{ showSizeChanger: true, showLessItems: true, - hideOnSinglePage: true, showTotal: total => `共 ${total} 条`, pageSizeOptions: ['10', '20', '50', '100'] }}> diff --git a/spug_web/src/pages/dashboard/LoginActive.js b/spug_web/src/pages/dashboard/LoginActive.js index 5362b60..d26fe29 100644 --- a/spug_web/src/pages/dashboard/LoginActive.js +++ b/spug_web/src/pages/dashboard/LoginActive.js @@ -35,7 +35,7 @@ export default function () { {ip !== null && setIp(null)}>{ip}} )}> - ( + ( {item.created_at} setName(item.nickname)}>{item.nickname} diff --git a/spug_web/src/pages/dashboard/index.module.css b/spug_web/src/pages/dashboard/index.module.css index 283210d..8e2a85b 100644 --- a/spug_web/src/pages/dashboard/index.module.css +++ b/spug_web/src/pages/dashboard/index.module.css @@ -1,25 +1,30 @@ :global(.ant-card-extra) { - padding: 12px 0; + padding: 12px 0; } .spanButton { - cursor: pointer; - margin-right: 24px; - color: rgba(0, 0, 0, .65); + cursor: pointer; + margin-right: 24px; + color: rgba(0, 0, 0, .65); } .spanButtonActive { - cursor: pointer; - margin-right: 24px; - color: #1890ff; + cursor: pointer; + margin-right: 24px; + color: #1890ff; } .spanButton:hover { - color: #1890ff; + color: #1890ff; } .spanText { - cursor: pointer; - color: #1890ff; - padding: 0 4px; + cursor: pointer; + color: #1890ff; + padding: 0 4px; +} + +.loginActive { + height: 329px; + overflow: auto; } \ No newline at end of file diff --git a/spug_web/src/pages/deploy/app/Table.js b/spug_web/src/pages/deploy/app/Table.js index 93c119b..a08d289 100644 --- a/spug_web/src/pages/deploy/app/Table.js +++ b/spug_web/src/pages/deploy/app/Table.js @@ -135,7 +135,6 @@ function ComTable() { pagination={{ showSizeChanger: true, showLessItems: true, - hideOnSinglePage: true, showTotal: total => `共 ${total} 条`, pageSizeOptions: ['10', '20', '50', '100'] }}> diff --git a/spug_web/src/pages/deploy/repository/Console.js b/spug_web/src/pages/deploy/repository/Console.js index 0863c81..39be659 100644 --- a/spug_web/src/pages/deploy/repository/Console.js +++ b/spug_web/src/pages/deploy/repository/Console.js @@ -71,6 +71,7 @@ export default observer(function Console() { function initialTerm() { const fitPlugin = new FitAddon() term.loadAddon(fitPlugin) + term.setOption('fontFamily', 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei') term.setOption('theme', {background: '#fafafa', foreground: '#000', selection: '#999'}) term.open(el.current) term.fit = () => fitPlugin.fit() diff --git a/spug_web/src/pages/deploy/repository/Table.js b/spug_web/src/pages/deploy/repository/Table.js index 069f26d..1977a0d 100644 --- a/spug_web/src/pages/deploy/repository/Table.js +++ b/spug_web/src/pages/deploy/repository/Table.js @@ -81,7 +81,6 @@ function ComTable() { pagination={{ showSizeChanger: true, showLessItems: true, - hideOnSinglePage: true, showTotal: total => `共 ${total} 条`, pageSizeOptions: ['10', '20', '50', '100'] }}> diff --git a/spug_web/src/pages/deploy/request/OutView.js b/spug_web/src/pages/deploy/request/OutView.js index 5e692c6..1833974 100644 --- a/spug_web/src/pages/deploy/request/OutView.js +++ b/spug_web/src/pages/deploy/request/OutView.js @@ -14,6 +14,7 @@ function OutView(props) { setTimeout(() => { const fitPlugin = new FitAddon() const term = new Terminal({disableStdin: true}) + term.setOption('fontFamily', 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei') term.loadAddon(fitPlugin) term.setOption('theme', {background: '#fff', foreground: '#000', selection: '#999'}) term.open(el.current) diff --git a/spug_web/src/pages/deploy/request/Table.js b/spug_web/src/pages/deploy/request/Table.js index 7edc112..aadd75d 100644 --- a/spug_web/src/pages/deploy/request/Table.js +++ b/spug_web/src/pages/deploy/request/Table.js @@ -179,7 +179,6 @@ function ComTable() { pagination={{ showSizeChanger: true, showLessItems: true, - hideOnSinglePage: true, showTotal: total => `共 ${total} 条`, pageSizeOptions: ['10', '20', '50', '100'] }}/> diff --git a/spug_web/src/pages/exec/task/Output.js b/spug_web/src/pages/exec/task/Output.js index c9548b1..8e85ffa 100644 --- a/spug_web/src/pages/exec/task/Output.js +++ b/spug_web/src/pages/exec/task/Output.js @@ -31,6 +31,7 @@ function OutView(props) { gCurrent = current const fitPlugin = new FitAddon() term.setOption('disableStdin', false) + term.setOption('fontFamily', 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei') term.setOption('theme', {background: '#f0f0f0', foreground: '#000', selection: '#999', cursor: '#f0f0f0'}) term.loadAddon(fitPlugin) term.open(el.current) diff --git a/spug_web/src/pages/exec/template/Table.js b/spug_web/src/pages/exec/template/Table.js index a54565d..b5cbda9 100644 --- a/spug_web/src/pages/exec/template/Table.js +++ b/spug_web/src/pages/exec/template/Table.js @@ -57,7 +57,6 @@ class ComTable extends React.Component { pagination={{ showSizeChanger: true, showLessItems: true, - hideOnSinglePage: true, showTotal: total => `共 ${total} 条`, pageSizeOptions: ['10', '20', '50', '100'] }}> diff --git a/spug_web/src/pages/host/Group.js b/spug_web/src/pages/host/Group.js index 42a7815..6fa99cf 100644 --- a/spug_web/src/pages/host/Group.js +++ b/spug_web/src/pages/host/Group.js @@ -166,7 +166,7 @@ export default observer(function () { onChange={setDraggable} checkedChildren="排版" unCheckedChildren="浏览"/> - + )}> diff --git a/spug_web/src/pages/monitor/Table.js b/spug_web/src/pages/monitor/Table.js index 0553a28..fc6f0d3 100644 --- a/spug_web/src/pages/monitor/Table.js +++ b/spug_web/src/pages/monitor/Table.js @@ -69,7 +69,6 @@ class ComTable extends React.Component { pagination={{ showSizeChanger: true, showLessItems: true, - hideOnSinglePage: true, showTotal: total => `共 ${total} 条`, pageSizeOptions: ['10', '20', '50', '100'] }}> diff --git a/spug_web/src/pages/schedule/Table.js b/spug_web/src/pages/schedule/Table.js index 6ae1ac2..cb5eaa6 100644 --- a/spug_web/src/pages/schedule/Table.js +++ b/spug_web/src/pages/schedule/Table.js @@ -145,7 +145,6 @@ class ComTable extends React.Component { pagination={{ showSizeChanger: true, showLessItems: true, - hideOnSinglePage: true, showTotal: total => `共 ${total} 条`, pageSizeOptions: ['10', '20', '50', '100'] }} diff --git a/spug_web/src/pages/ssh/Terminal.js b/spug_web/src/pages/ssh/Terminal.js index 26400dd..fd0eb80 100644 --- a/spug_web/src/pages/ssh/Terminal.js +++ b/spug_web/src/pages/ssh/Terminal.js @@ -18,6 +18,7 @@ function WebSSH(props) { useEffect(() => { const fitPlugin = new FitAddon(); term.loadAddon(fitPlugin); + term.setOption('fontFamily', 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei') term.open(container.current); term.write('WebSocket connecting ... '); const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:'; diff --git a/spug_web/src/pages/system/account/Table.js b/spug_web/src/pages/system/account/Table.js index 671f723..73fd1e6 100644 --- a/spug_web/src/pages/system/account/Table.js +++ b/spug_web/src/pages/system/account/Table.js @@ -112,7 +112,6 @@ class ComTable extends React.Component { pagination={{ showSizeChanger: true, showLessItems: true, - hideOnSinglePage: true, showTotal: total => `共 ${total} 条`, pageSizeOptions: ['10', '20', '50', '100'] }} diff --git a/spug_web/src/pages/system/role/HostPerm.js b/spug_web/src/pages/system/role/HostPerm.js index 54f73cd..bb9ba57 100644 --- a/spug_web/src/pages/system/role/HostPerm.js +++ b/spug_web/src/pages/system/role/HostPerm.js @@ -56,14 +56,7 @@ export default observer(function () { confirmLoading={loading} onOk={handleSubmit}>
- - 授权访问主机组  - - - - - }> + {groups.map((id, index) => (
`共 ${total} 条`, pageSizeOptions: ['10', '20', '50', '100'] }}