Upate.
This commit is contained in:
		
							parent
							
								
									4bb1b0997a
								
							
						
					
					
						commit
						bb1f7cdb88
					
				@ -59,30 +59,6 @@
 | 
			
		||||
  <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;
 | 
			
		||||
      document.addEventListener("keydown", () => {
 | 
			
		||||
        if(prevKey == "Escape"){
 | 
			
		||||
@ -94,11 +70,6 @@
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        prevKey = event.key 
 | 
			
		||||
        if(event.key == "." && event.ctrlKey){
 | 
			
		||||
            event.preventDefault();
 | 
			
		||||
            toggleContainer()
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
        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