webui: fix layout for firefox, flash the message only
This commit is contained in:
parent
6aadae62aa
commit
2117d030d0
31
webui.go
31
webui.go
@ -25,8 +25,6 @@ html, body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
position: relative;
|
|
||||||
}
|
}
|
||||||
.banner {
|
.banner {
|
||||||
height: 48px;
|
height: 48px;
|
||||||
@ -64,6 +62,12 @@ html, body {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
||||||
|
transition: background-color 0.5s ease-out;
|
||||||
|
}
|
||||||
|
#state.alert {
|
||||||
|
background: lightyellow;
|
||||||
|
transition: initial;
|
||||||
}
|
}
|
||||||
.banner button {
|
.banner button {
|
||||||
float: right;
|
float: right;
|
||||||
@ -72,23 +76,15 @@ html, body {
|
|||||||
margin: 8px 8px 8px 0;
|
margin: 8px 8px 8px 0;
|
||||||
}
|
}
|
||||||
textarea {
|
textarea {
|
||||||
position: absolute;
|
border: 0;
|
||||||
left: 0;
|
margin: 0;
|
||||||
right: 0;
|
height: calc(100% - 64px);
|
||||||
top: 48px;
|
width: calc(100% - 16px);
|
||||||
bottom: 0;
|
padding: 8px 8px 4px 8px;
|
||||||
|
|
||||||
resize: none;
|
resize: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
|
||||||
border: 0;
|
|
||||||
background: #fff;
|
|
||||||
transition: background-color 0.5s ease-out;
|
|
||||||
}
|
|
||||||
textarea.alert {
|
|
||||||
background: lightyellow;
|
|
||||||
transition: initial;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 400px) {
|
@media screen and (max-width: 400px) {
|
||||||
@ -115,7 +111,6 @@ The assistant gives helpful, detailed, and polite answers to the human's questio
|
|||||||
|
|
||||||
### Human: What is the capital city of New Zealand?
|
### Human: What is the capital city of New Zealand?
|
||||||
### Assistant:</textarea>
|
### Assistant:</textarea>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function main() {
|
function main() {
|
||||||
const conversationID = "` + uuid.New().String() + `";
|
const conversationID = "` + uuid.New().String() + `";
|
||||||
@ -182,8 +177,8 @@ function main() {
|
|||||||
$main.value += decoder.decode(singleReadResult.value);
|
$main.value += decoder.decode(singleReadResult.value);
|
||||||
$main.scrollTop = $main.scrollHeight;
|
$main.scrollTop = $main.scrollHeight;
|
||||||
|
|
||||||
$main.className = 'alert';
|
$state.className = 'alert';
|
||||||
setTimeout(() => { $main.className = ''; }, 1);
|
setTimeout(() => { $state.className = ''; }, 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user