tasks-free.openapps.xyz

Source

This app’s code and revision history are public. Download a copy or explore the files below.

Public
The app’s code and revision history are public.
Owned app · rev 9b0d0f7b9a93
Run it yourself
Take the whole tree and run it on your own machine. The download needs no account. Cloning needs a sign-in.
Download .zip
bounded clone f6f2112e77bc8c011e38c83a
A copy you download is not bounded. The guarantees this app runs under - declared egress, proven invariants, writes that fail closed - live in the runtime serving this page, not in the files. What you get is auditable source you can read and run, with no runtime guarantees attached.
← All files
src/main.tsx
// Tasks' entry. "/" keeps the static landing and mounts the board maker and "Your boards" into it.
// "/b/<id>" is a board, "/b/<id>/c/<cardId>" a card on it, "/b/<id>/admin#k=<key>" the admin link.
import { useEffect } from "react";
import { createRoot } from "react-dom/client";
import { usePath } from "./lib/router";
import { Toaster, Announcer } from "./ui";
import { CreateBoard, YourBoards } from "./Home";
import { BoardPage } from "./BoardPage";
import "./styles.css";

const LANDING_TITLE = document.title;

function App() {
  const path = usePath();
  const m = path.match(/^\/b\/([A-Za-z0-9]{8,32})(?:\/c\/([A-Za-z0-9]{8,32})|\/(admin))?\/?$/);
  document.body.classList.toggle("app-mode", Boolean(m));
  useEffect(() => { if (!m) document.title = LANDING_TITLE; }, [Boolean(m)]); // eslint-disable-line react-hooks/exhaustive-deps
  return (
    <>
      {m && <BoardPage key={m[1]} boardId={m[1]} cardId={m[2] ?? null} admin={Boolean(m[3])} />}
      <Toaster />
      <Announcer />
    </>
  );
}

createRoot(document.getElementById("app")!).render(<App />);
const createSlot = document.getElementById("start");
if (createSlot) createRoot(createSlot).render(<CreateBoard />);
const yoursSlot = document.getElementById("your-boards");
if (yoursSlot) createRoot(yoursSlot).render(<YourBoards />);

if (import.meta.env.PROD && "serviceWorker" in navigator) {
  window.addEventListener("load", () => void navigator.serviceWorker.register("/sw.js").catch(() => null));
}

const head = document.querySelector(".site-head");
const onScroll = () => head?.classList.toggle("scrolled", window.scrollY > 4);
window.addEventListener("scroll", onScroll, { passive: true });
onScroll();

Change history

Point OpenApps links to openapps.free
9b0d0f7b9a · 18 hours ago
Bind agent address in policy
25f84633c0 · 19 hours ago
Use OpenApps service URLs and add contribution strip
07519eb348 · 19 hours ago
Bounded source sync
3296872001 · 1 day ago
Bounded source sync
ac8d2f5d18 · 1 day ago
Bounded source sync
2a5b08a001 · 1 day ago
Bounded source sync
d2242ddf34 · 1 day ago