forked from retoor/devplacepy
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
880e993ed8 |
File diff suppressed because one or more lines are too long
@@ -115,6 +115,7 @@ devii-terminal.devii-state-fullscreen .devii-window {
|
||||
}
|
||||
|
||||
devii-terminal.devii-state-normal .devii-window {
|
||||
resize: both;
|
||||
}
|
||||
devii-terminal.devii-state-normal .devii-titlebar {
|
||||
cursor: move;
|
||||
|
||||
@@ -172,6 +172,7 @@
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
.poll-option[disabled] {
|
||||
@@ -182,6 +183,10 @@
|
||||
border-color: var(--border-light);
|
||||
}
|
||||
|
||||
.poll-option:not([disabled]):active {
|
||||
background-color: var(--bg-card-hover);
|
||||
}
|
||||
|
||||
.poll-option.chosen {
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
@@ -86,7 +86,6 @@ export class DeviiTerminal {
|
||||
}
|
||||
|
||||
_canOpenOnGesture() {
|
||||
if (this.element && this.element.state !== "closed") return false;
|
||||
if (document.querySelector(".modal-overlay.visible")) return false;
|
||||
if (document.querySelector(".dialog-overlay.visible")) return false;
|
||||
if (document.querySelector(".context-menu.visible")) return false;
|
||||
|
||||
@@ -5,7 +5,8 @@ import { OptimisticAction } from "./OptimisticAction.js";
|
||||
export class PollManager extends OptimisticAction {
|
||||
constructor() {
|
||||
super();
|
||||
document.addEventListener("click", (event) => this.onClick(event));
|
||||
this.container = null;
|
||||
document.addEventListener("pointerdown", (event) => this.onClick(event));
|
||||
document.addEventListener("submit", (event) => this.onSubmit(event), true);
|
||||
}
|
||||
|
||||
@@ -42,7 +43,8 @@ export class PollManager extends OptimisticAction {
|
||||
}
|
||||
const pollUid = poll.dataset.pollUid;
|
||||
const optionUid = option.dataset.optionUid;
|
||||
await this.submit(`/polls/${pollUid}/vote`, { option_uid: optionUid }, null, (result) => this.render(poll, result));
|
||||
this.container = poll;
|
||||
await this.submit(`/polls/${pollUid}/vote`, { option_uid: optionUid }, this.container, (result) => this.render(poll, result));
|
||||
}
|
||||
|
||||
render(poll, result) {
|
||||
|
||||
@@ -297,8 +297,8 @@ export default class FloatingWindow extends Component {
|
||||
if (!this.geometry) return;
|
||||
const g = this.geometry;
|
||||
const safeHeight = this._safeViewport.height;
|
||||
g.width = Math.max(320, Math.min(g.width, window.innerWidth - 16));
|
||||
g.height = Math.max(220, Math.min(g.height, safeHeight - 16));
|
||||
g.width = Math.min(g.width, window.innerWidth - 16);
|
||||
g.height = Math.min(g.height, safeHeight - 16);
|
||||
g.left = Math.max(8, Math.min(g.left, window.innerWidth - g.width - 8));
|
||||
g.top = Math.max(8, Math.min(g.top, safeHeight - g.height - 8));
|
||||
}
|
||||
@@ -409,8 +409,8 @@ export default class FloatingWindow extends Component {
|
||||
this._ro = new ResizeObserver(() => {
|
||||
if (this.state === "normal" && this.geometry && !this._drag) {
|
||||
const rect = this.win.getBoundingClientRect();
|
||||
this.geometry.width = Math.max(320, Math.round(rect.width));
|
||||
this.geometry.height = Math.max(220, Math.round(rect.height));
|
||||
this.geometry.width = Math.round(rect.width);
|
||||
this.geometry.height = Math.round(rect.height);
|
||||
this._persistGeometry();
|
||||
}
|
||||
this._syncControls();
|
||||
|
||||
Reference in New Issue
Block a user