Skip to content

Commit

Permalink
jazz-todo: almost there, needs to be updated to work with latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
progrium committed Mar 8, 2024
1 parent 8b2ec00 commit 71869d6
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 808 deletions.
28 changes: 14 additions & 14 deletions internal/app/jazz-todo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<body class="h-full font-mono font-semibold bg-gray-300">
<script type="module">
import * as auth from "/auth/api.js";
import * as jazz from "./jazz.js";
import * as jazz from "/sys/cmd/kernel/jazz/jazz.min.js";

if (!auth.isAuthenticated()) {
localStorage.setItem("auth:redirect", "/");
Expand All @@ -23,21 +23,21 @@
authSettings["domain"],
authSettings["clientId"],
auth.accessToken(),
(account) => {
if (!account.get("root")) {
account.set(
"root",
account.createMap({
todos: account.createList([]).id,
}).id
);
}
},
// (account) => {
// if (!account.get("root")) {
// account.set(
// "root",
// account.createMap({
// todos: account.createList([]).id,
// }).id
// );
// }
// },
);
console.log(node);

const space = await jazz.setupSpace(node, (space) => {
const todos = space.group.createList([]);
const space = await jazz.setupSpace(node, async (space, group) => {
const todos = group.createList([]);
space.mutate(s => {
s.set("todos", todos.id);
});
Expand All @@ -53,7 +53,7 @@

const store = new Store(node, todos, username);
window.store = store;
const inviteURL = jazz.createInviteLink(space, "admin");
const inviteURL = parent.location.href.replace(/#.*$/, "")+jazz.createInviteLinkHash(space, "admin")

m.mount(document.body, {
view: () => {
Expand Down
27 changes: 0 additions & 27 deletions internal/app/jazz-todo/jazz.js

This file was deleted.

1 change: 0 additions & 1 deletion internal/app/jazz-todo/jazz/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions internal/app/jazz-todo/jazz/Makefile

This file was deleted.

53 changes: 0 additions & 53 deletions internal/app/jazz-todo/jazz/jazz.ts

This file was deleted.

Loading

0 comments on commit 71869d6

Please sign in to comment.