This commit is contained in:
Zhi Wang 2022-01-17 06:52:09 -05:00
parent 3ad5c51c1f
commit d85073e1e5
11 changed files with 18 additions and 15 deletions

View File

Before

Width:  |  Height:  |  Size: 597 B

After

Width:  |  Height:  |  Size: 597 B

View File

Before

Width:  |  Height:  |  Size: 678 B

After

Width:  |  Height:  |  Size: 678 B

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

1
assets/img/keyboard.svg Normal file
View File

@ -0,0 +1 @@
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="keyboard" class="svg-inline--fa fa-keyboard fa-w-18" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"></path></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 474 B

View File

Before

Width:  |  Height:  |  Size: 371 B

After

Width:  |  Height:  |  Size: 371 B

1
assets/img/view.svg Normal file
View File

@ -0,0 +1 @@
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="eye" class="svg-inline--fa fa-eye fa-w-18" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"></path></svg>

After

Width:  |  Height:  |  Size: 556 B

View File

@ -23,7 +23,7 @@
<nav class="navbar navbar-dark bg-dark shadow-sm navbar-xs">
<div class="container-fluid">
<a class="navbar-brand mx-auto" href="https://github.com/syssecfsu/witty" target="_blank">
<img src="/assets/logo.svg" style="margin-right: 0.5rem;" height="32" class="d-inline-block align-text-top">
<img src="/assets/img/logo.svg" style="margin-right: 0.5rem;" height="32" class="d-inline-block align-text-top">
WiTTY: Web-based interactive TTY
</a>
<a class="btn btn-primary btn-sm float-end" href="/new"
@ -59,8 +59,9 @@
<u>{{.Id}}</u>
</p>
<a class="btn btn-outline-success btn-sm float-end" href="/view/{{.Id}}" target="_blank"
role="button">View
Session</a>
role="button">
<img src="/assets/img/view.svg" height="18px">
</a>
</div>
</div>
{{end}}
@ -81,13 +82,13 @@
</p>
<div class="btn-toolbar float-end" role="toolbar" aria-label="records buttons">
<a class="btn btn-outline-success btn-sm m-1" href="/replay/{{.Fname}}" target="_blank" role="button">
<img src="/assets/play.svg" height="18px">
<img src="/assets/img/play.svg" height="18px">
</a>
<a class="btn btn-outline-success btn-sm m-1" href="/records/{{.Fname}}" role="button" download>
<img src="/assets/download.svg" height="18px">
<img src="/assets/img/download.svg" height="18px">
</a>
<button type="button" class="btn btn-outline-success btn-sm m-1" onclick="del_btn({{.Fname}})">
<img src="/assets/delete.svg" height="18px">
<img src="/assets/img/delete.svg" height="18px">
</button>
</div>
</div>

View File

@ -20,10 +20,10 @@
<body>
<header>
<nav class="navbar navbar-dark bg-dark shadow-sm navbar-xs">
<nav class="navbar navbar-light bg-light shadow-sm navbar-xs">
<div class="container-fluid">
<a class="navbar-brand mx-auto" href="https://github.com/syssecfsu/witty" target="_blank">
<img src="/assets/logo.svg" style="margin-right: 0.5rem;" height="28"
<img src="/assets/img/view.svg" style="margin-right: 0.5rem;" height="32"
class="d-inline-block align-text-top">
replay terminal
</a>
@ -38,7 +38,7 @@
</div>
<div class="d-flex align-items-center">
<button type="button" class="btn btn-primary btn-sm" style="margin-right: 3px;" onclick="playbtn()">
<img src="/assets/play.svg" id="play-btn" height="18px">
<img src="/assets/img/play.svg" id="play-btn" height="18px">
</button>
<input type="range" class="form-range" min="0" max="100" id="replay-control"
onchange="console.log(this.value)">
@ -57,7 +57,7 @@
function playbtn() {
if (icon.src.includes("play")) {
icon.src = "/assets/pause.svg"
icon.src = "/assets/img/pause.svg"
pause = false
replay_session(term, path, rc.value,
function () {
@ -67,11 +67,11 @@
rc.value = percent
},
function () {
icon.src = "/assets/play.svg"
icon.src = "/assets/img/play.svg"
rc.value = 0
})
} else {
icon.src = "/assets/play.svg"
icon.src = "/assets/img/play.svg"
pause = true
}
}

View File

@ -20,10 +20,10 @@
<body>
<header>
<nav class="navbar navbar-dark bg-dark shadow-sm navbar-xs">
<nav class="navbar navbar-light bg-light shadow-sm navbar-xs">
<div class="container-fluid">
<a class="navbar-brand mx-auto" href="https://github.com/syssecfsu/witty" target="_blank">
<img src="/assets/logo.svg" style="margin-right: 0.5rem;" height="28" class="d-inline-block align-text-top">
<img src="/assets/img/{{.logo}}.svg" style="margin-right: 0.5rem;" height="32" class="d-inline-block align-text-top">
{{.title}}
</a>
<button type="button" id="record_onoff" class="btn btn-primary btn-sm float-end" value="Record"
@ -33,7 +33,7 @@
</header>
<div style="margin-top: 3em;">
<div style="margin-top: 2em;">
<div id="terminal">
<div id="terminal_view"></div>
</div>