Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20757d104d |
File diff suppressed because one or more lines are too long
@@ -172,7 +172,6 @@
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
.poll-option[disabled] {
|
||||
@@ -183,10 +182,6 @@
|
||||
border-color: var(--border-light);
|
||||
}
|
||||
|
||||
.poll-option:not([disabled]):active {
|
||||
background-color: var(--bg-card-hover);
|
||||
}
|
||||
|
||||
.poll-option.chosen {
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@ import { OptimisticAction } from "./OptimisticAction.js";
|
||||
export class PollManager extends OptimisticAction {
|
||||
constructor() {
|
||||
super();
|
||||
this.container = null;
|
||||
document.addEventListener("pointerdown", (event) => this.onClick(event));
|
||||
document.addEventListener("click", (event) => this.onClick(event));
|
||||
document.addEventListener("submit", (event) => this.onSubmit(event), true);
|
||||
}
|
||||
|
||||
@@ -43,8 +42,7 @@ export class PollManager extends OptimisticAction {
|
||||
}
|
||||
const pollUid = poll.dataset.pollUid;
|
||||
const optionUid = option.dataset.optionUid;
|
||||
this.container = poll;
|
||||
await this.submit(`/polls/${pollUid}/vote`, { option_uid: optionUid }, this.container, (result) => this.render(poll, result));
|
||||
await this.submit(`/polls/${pollUid}/vote`, { option_uid: optionUid }, null, (result) => this.render(poll, result));
|
||||
}
|
||||
|
||||
render(poll, result) {
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<a class="skip-link" href="#main-content">Skip to main content</a>
|
||||
<nav class="topnav" aria-label="Primary">
|
||||
<div class="topnav-inner">
|
||||
<a href="/feed" class="topnav-logo">Dev<span>Place</span></a>
|
||||
<a href="/" class="topnav-logo">Dev<span>Place</span></a>
|
||||
<div class="topnav-links">
|
||||
<a href="/" class="topnav-link {{ nav_active(request, '/') }}"><span class="icon">🏠</span> Home</a>
|
||||
<a href="/feed" class="topnav-link {{ nav_active(request, '/feed') }}"><span class="icon">📝</span> Posts</a>
|
||||
|
||||
Reference in New Issue
Block a user