refactor: first pass on getting the client back into working order
(still broken, but loading as a baseline)
This commit is contained in:
parent
a5707e2f81
commit
afeb6f75e8
23 changed files with 358 additions and 322 deletions
|
|
@ -148,8 +148,8 @@
|
|||
<div
|
||||
id="blurbs-list"
|
||||
data-feed
|
||||
data-precheck="!!document.body.dataset.user && document.body.dataset.user.indexOf( 'topics.blurbs.read' ) !== -1"
|
||||
data-source="/api/topics/${ document.body.dataset.topic }/events?type=blurb,reaction&limit=100&sort=newest&wait=true&after_id=${ feed.__newest_id ?? 'able-able-able-able-able-able-able-able-able-able' }"
|
||||
data-precheck="!!document.body.dataset.user && document.body.dataset.user.indexOf( 'events.read.blurb' ) !== -1"
|
||||
data-source="/api/events?type=blurb,reaction&limit=100&sort=newest&wait=true&after_id=${ feed.__newest_id ?? 'able-able-able-able-able-able-able-able-able-able' }"
|
||||
data-longpolling="true"
|
||||
data-reverse="true"
|
||||
data-insert="prepend"
|
||||
|
|
@ -159,7 +159,6 @@
|
|||
{
|
||||
const feed = document.currentScript.closest("[data-feed]");
|
||||
|
||||
APP.on("topic_changed", () => { feed.__reset && feed.__reset(); });
|
||||
APP.on("user_logged_in", () => { feed.__reset && feed.__reset(); });
|
||||
|
||||
feed.__target_element = (item) => {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
<div class="new-blurb-container" data-requires-permission="topics.blurbs.create">
|
||||
<div class="new-blurb-container" data-requires-permission="events.create.blurb">
|
||||
<label>
|
||||
<input type="checkbox" collapse-toggle />
|
||||
<i class="icon plus" style="display: inline-block; margin-right: 0.5rem"></i>
|
||||
|
|
@ -33,6 +33,7 @@
|
|||
</label>
|
||||
<form
|
||||
data-smart="true"
|
||||
action="/api/events"
|
||||
method="POST"
|
||||
class="blurb-creation-form collapsible"
|
||||
style="
|
||||
|
|
@ -40,7 +41,6 @@
|
|||
width: 100%;
|
||||
transition: all 0.5s;
|
||||
"
|
||||
url="/api/topics/${ document.body.dataset.topic }/events"
|
||||
on_reply="async (event) => { await document.getElementById( 'blurbs-list' ).__render(event); document.getElementById(event.id)?.classList.remove('sending'); }"
|
||||
on_parsed="async (event) => { await document.getElementById( 'blurbs-list' ).__render(event); document.getElementById(event.id)?.classList.add('sending'); }"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue