Federation Refactoring & Architecture Improvements (#930)
* initial commit * add lists * update permissions * fix waypoint create * needs_full_sync for activitypub trails * fixes build issues * fix list get * further CSRF protection * update API docs * adds rate limiter * fix tiptap mentions * a bit more cleanup of main.go * Fix migration order * fixes reviewed notes * require context for activitpub server calls * improve hashing for identifier * fix copy paste error * fix sync trail/list issues * fix summit log/comment duplicates * adaptions after trail merge * fix dockerignore --------- Co-authored-by: Christian Beutel <> Co-authored-by: slothful-vassal <89943360+slothful-vassal@users.noreply.github.com>
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
error = "",
|
||||
placeholder = "",
|
||||
extraClasses = "",
|
||||
searchListPosition = "absolute"
|
||||
searchListPosition = "absolute",
|
||||
}: Props = $props();
|
||||
|
||||
const fontSizes: SelectItem[] = [
|
||||
@@ -87,7 +87,9 @@
|
||||
return [
|
||||
"a",
|
||||
mergeAttributes(
|
||||
{ href: `/profile/@${options.HTMLAttributes["data-label"]}` },
|
||||
{
|
||||
href: `/profile/@${options.HTMLAttributes["data-label"]}`,
|
||||
},
|
||||
options.HTMLAttributes,
|
||||
),
|
||||
options.renderText?.({
|
||||
@@ -141,8 +143,9 @@
|
||||
if (!box) {
|
||||
return;
|
||||
}
|
||||
|
||||
searchListElement.style.position = searchListPosition;
|
||||
|
||||
searchListElement.style.position =
|
||||
searchListPosition;
|
||||
searchListElement.style.top = `${box.bottom + window.scrollY + 4}px`;
|
||||
searchListElement.style.left = `${box.left + window.scrollX}px`;
|
||||
searchListElement.style.zIndex = "1001";
|
||||
@@ -179,12 +182,12 @@
|
||||
|
||||
onKeyDown(props) {
|
||||
if (props.event.key === "Escape") {
|
||||
this.onExit?.({} as unknown as any)
|
||||
this.onExit?.({} as unknown as any);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false
|
||||
return false;
|
||||
},
|
||||
onExit() {
|
||||
unmount(component);
|
||||
@@ -315,7 +318,7 @@
|
||||
})
|
||||
.run();
|
||||
|
||||
modal.closeModal();
|
||||
modal.closeModal();
|
||||
} catch (e) {
|
||||
if (
|
||||
e instanceof ZodError &&
|
||||
|
||||
@@ -547,16 +547,19 @@
|
||||
clusterPopup.on("close", () => {
|
||||
unHighlightCluster(false);
|
||||
});
|
||||
map.on("mousemove", unHighlightClusterDistanceNotifier)
|
||||
map.on("mousemove", unHighlightClusterDistanceNotifier);
|
||||
}
|
||||
|
||||
function unHighlightClusterDistanceNotifier(e: M.MapMouseEvent) {
|
||||
if (!clusterPopup || !map) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
if (map.project(clusterPopup.getLngLat()).dist(map.project(e.lngLat)) > 60) {
|
||||
if (
|
||||
map.project(clusterPopup.getLngLat()).dist(map.project(e.lngLat)) >
|
||||
60
|
||||
) {
|
||||
clusterPopup.remove();
|
||||
map.off("mousemove", unHighlightClusterDistanceNotifier)
|
||||
map.off("mousemove", unHighlightClusterDistanceNotifier);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -129,9 +129,8 @@
|
||||
|
||||
async function fetchComments() {
|
||||
commentsLoading = true;
|
||||
const trailId = trail.iri ? trail.iri : trail.id!;
|
||||
try {
|
||||
await comments_index(trailId, handle);
|
||||
await comments_index(trail.id!);
|
||||
} catch (e) {
|
||||
show_toast({
|
||||
type: "error",
|
||||
|
||||
Reference in New Issue
Block a user