增加录屏回放demo
This commit is contained in:
22
web/src/components/access/AccessSSH.css
Normal file
22
web/src/components/access/AccessSSH.css
Normal file
@ -0,0 +1,22 @@
|
||||
.xterm .xterm-viewport {
|
||||
/* On OS X this is required in order for the scroll bar to appear fully opaque */
|
||||
background-color: transparent;
|
||||
overflow-y: scroll;
|
||||
cursor: default;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
--scrollbar-color: var(--highlight) var(--dark);
|
||||
--scrollbar-width: thin;
|
||||
}
|
||||
|
||||
.xterm-viewport::-webkit-scrollbar {
|
||||
background-color: var(--dark);
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.xterm-viewport::-webkit-scrollbar-thumb {
|
||||
background: var(--highlight);
|
||||
}
|
@ -6,6 +6,7 @@ import {wsServer} from "../../common/constants";
|
||||
import "./Console.css"
|
||||
import {getToken} from "../../utils/utils";
|
||||
import {FitAddon} from 'xterm-addon-fit';
|
||||
import "./Access.css"
|
||||
|
||||
class AccessSSH extends Component {
|
||||
|
||||
@ -33,10 +34,10 @@ class AccessSSH extends Component {
|
||||
let term = new Terminal({
|
||||
fontFamily: 'monaco, Consolas, "Lucida Console", monospace',
|
||||
fontSize: 14,
|
||||
theme: {
|
||||
background: '#1b1b1b',
|
||||
lineHeight: 17
|
||||
},
|
||||
// theme: {
|
||||
// background: '#1b1b1b',
|
||||
// lineHeight: 17
|
||||
// },
|
||||
rightClickSelectsWord: true,
|
||||
});
|
||||
|
||||
|
2563
web/src/components/session/asciinema-player.css
Normal file
2563
web/src/components/session/asciinema-player.css
Normal file
File diff suppressed because it is too large
Load Diff
1213
web/src/components/session/asciinema-player.js
Normal file
1213
web/src/components/session/asciinema-player.js
Normal file
File diff suppressed because one or more lines are too long
19
web/src/components/session/asciinema.html
Normal file
19
web/src/components/session/asciinema.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<link rel="stylesheet" type="text/css" href="asciinema-player.css"/>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<asciinema-player src="./903dfd65-838c-453f-9866-eadd5725321b.cast"></asciinema-player>
|
||||
<script src="asciinema-player.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user