Floating draggable buttons, selectable terminal, cancel top-right
This commit is contained in:
@@ -7,14 +7,14 @@
|
||||
<style>
|
||||
*{box-sizing:border-box;margin:0;padding:0}
|
||||
body{font-family:system-ui;background:#1a1a2e;color:#eee;display:flex;flex-direction:column;height:100dvh;padding:0}
|
||||
#output{flex:1;width:100%;background:#0f0f1a;padding:.5rem;overflow-y:auto;font-family:monospace;font-size:.7rem;white-space:pre-wrap;color:#ccc}
|
||||
#output{flex:1;width:100%;background:#0f0f1a;padding:.5rem;overflow-y:auto;font-family:monospace;font-size:.7rem;white-space:pre-wrap;color:#ccc;-webkit-user-select:text;user-select:text}
|
||||
#bottom{width:100%;padding:.4rem;background:#16213e;display:flex;gap:.4rem;align-items:center}
|
||||
#status{font-size:.75rem;color:#aaa;padding:0 .4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:40%}
|
||||
#textinput{flex:1;padding:.5rem;border-radius:6px;border:1px solid #333;background:#0f0f1a;color:#eee;font-size:.9rem}
|
||||
.fab{position:fixed;border-radius:50%;border:none;color:#fff;font-size:.7rem;cursor:pointer;touch-action:none;user-select:none;z-index:100;display:flex;align-items:center;justify-content:center;text-align:center;box-shadow:0 2px 8px rgba(0,0,0,.5)}
|
||||
#btn{width:70px;height:70px;background:#16213e;bottom:4rem;right:1rem;font-size:.8rem}
|
||||
#btn.recording{background:#e94560;transform:scale(1.1)}
|
||||
#cancelBtn{width:50px;height:50px;background:#e94560;bottom:4rem;left:1rem;font-size:.65rem}
|
||||
#cancelBtn{width:50px;height:50px;background:#e94560;top:1rem;right:1rem;font-size:.65rem}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -69,6 +69,9 @@ function send(blob, ext){
|
||||
}
|
||||
|
||||
function pollOutput(){
|
||||
// Don't update if user has text selected (iOS copy flow)
|
||||
const sel = window.getSelection();
|
||||
if(sel && sel.toString().length > 0) return;
|
||||
fetch('/output').then(r=>r.json()).then(d=>{
|
||||
const atBottom=output.scrollHeight-output.scrollTop-output.clientHeight<50;
|
||||
output.textContent=d.output;
|
||||
|
||||
Reference in New Issue
Block a user