Upate.
This commit is contained in:
parent
4bb1b0997a
commit
bb1f7cdb88
@ -59,31 +59,7 @@
|
||||
<script type="module">
|
||||
import { app } from "/app.js";
|
||||
import { Container } from "/container.js";
|
||||
|
||||
|
||||
{% if channel %}
|
||||
app.channelUid = '{{ channel.uid.value }}'
|
||||
let container = null
|
||||
window.getContainer = function(){
|
||||
if(container)
|
||||
return container
|
||||
container = new Container(app.channelUid,false)
|
||||
return container
|
||||
}
|
||||
|
||||
toggleContainer(){
|
||||
if(!container){
|
||||
return window.getContainer()
|
||||
|
||||
}
|
||||
window.container.terminal.element.hidden = !window.container.terminal.element.hidden
|
||||
return container
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
let prevKey = null;
|
||||
let prevKey = null;
|
||||
document.addEventListener("keydown", () => {
|
||||
if(prevKey == "Escape"){
|
||||
document.querySelector("chat-input").querySelector("textarea").value = "";
|
||||
@ -93,12 +69,7 @@
|
||||
|
||||
}
|
||||
|
||||
prevKey = event.key
|
||||
if(event.key == "." && event.ctrlKey){
|
||||
event.preventDefault();
|
||||
toggleContainer()
|
||||
|
||||
}
|
||||
prevKey = event.key
|
||||
if(event.key == "," && event.ctrlKey){
|
||||
event.preventDefault();
|
||||
let textAreas = document.querySelectorAll("textarea")
|
||||
@ -109,6 +80,12 @@
|
||||
}
|
||||
})
|
||||
|
||||
{% if channel %}
|
||||
app.channelUid = '{{ channel.uid.value }}'
|
||||
window.getContainer = function(){
|
||||
return Container(app.channelUid,false)
|
||||
}
|
||||
{% endif %}
|
||||
let installPrompt = null
|
||||
window.addEventListener("beforeinstallprompt", (e) => {
|
||||
//e.preventDefault();
|
||||
|
Loading…
Reference in New Issue
Block a user