Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
feb1963aad |
File diff suppressed because one or more lines are too long
@@ -172,7 +172,6 @@
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
touch-action: manipulation;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.poll-option[disabled] {
|
.poll-option[disabled] {
|
||||||
@@ -183,10 +182,6 @@
|
|||||||
border-color: var(--border-light);
|
border-color: var(--border-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
.poll-option:not([disabled]):active {
|
|
||||||
background-color: var(--bg-card-hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
.poll-option.chosen {
|
.poll-option.chosen {
|
||||||
border-color: var(--accent);
|
border-color: var(--accent);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ import { OptimisticAction } from "./OptimisticAction.js";
|
|||||||
export class PollManager extends OptimisticAction {
|
export class PollManager extends OptimisticAction {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.container = null;
|
document.addEventListener("click", (event) => this.onClick(event));
|
||||||
document.addEventListener("pointerdown", (event) => this.onClick(event));
|
|
||||||
document.addEventListener("submit", (event) => this.onSubmit(event), true);
|
document.addEventListener("submit", (event) => this.onSubmit(event), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,8 +42,7 @@ export class PollManager extends OptimisticAction {
|
|||||||
}
|
}
|
||||||
const pollUid = poll.dataset.pollUid;
|
const pollUid = poll.dataset.pollUid;
|
||||||
const optionUid = option.dataset.optionUid;
|
const optionUid = option.dataset.optionUid;
|
||||||
this.container = poll;
|
await this.submit(`/polls/${pollUid}/vote`, { option_uid: optionUid }, null, (result) => this.render(poll, result));
|
||||||
await this.submit(`/polls/${pollUid}/vote`, { option_uid: optionUid }, this.container, (result) => this.render(poll, result));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render(poll, result) {
|
render(poll, result) {
|
||||||
|
|||||||
+2
-1
@@ -4,7 +4,8 @@ version = "1.0.0"
|
|||||||
description = "DevPlace - The Developer Social Network"
|
description = "DevPlace - The Developer Social Network"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fastapi",
|
"fastapi>=0.110.0",
|
||||||
|
"starlette>=0.37.0",
|
||||||
"uvicorn[standard]",
|
"uvicorn[standard]",
|
||||||
"jinja2",
|
"jinja2",
|
||||||
"python-multipart",
|
"python-multipart",
|
||||||
|
|||||||
Reference in New Issue
Block a user