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
|
|
@ -115,8 +115,8 @@
|
|||
<div
|
||||
id="essays-list"
|
||||
data-feed
|
||||
data-precheck="!!document.body.dataset.user && document.body.dataset.user.indexOf( 'topics.essays.read' ) !== -1"
|
||||
data-source="/api/topics/${ document.body.dataset.topic }/events?type=essay,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.essay' ) !== -1"
|
||||
data-source="/api/events?type=essay,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"
|
||||
|
|
@ -126,7 +126,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) => {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
<div class="new-essay-container" data-requires-permission="topics.essays.create">
|
||||
<div class="new-essay-container" data-requires-permission="events.create.essay">
|
||||
<label>
|
||||
<input type="checkbox" collapse-toggle />
|
||||
<i class="icon plus" style="display: inline-block; margin-right: 0.5rem"></i>
|
||||
|
|
@ -31,8 +31,8 @@
|
|||
<form
|
||||
data-smart="true"
|
||||
method="POST"
|
||||
action="/api/events"
|
||||
class="essay-creation-form collapsible"
|
||||
url="/api/topics/${ document.body.dataset.topic }/events"
|
||||
style="
|
||||
margin-top: 1rem
|
||||
width: 100%;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue