chore: Enhancement + New Feature (#185)

* wip

* wip page

* chore: style

* wip pages

* wip pages

* chore: toggle

* chore: link

* feat: topic search

* chore: page section

* refactor: apply tailwind class ordering

* fix: handle loggedIn user for guest route

* feat: folder & image schema

* chore: move utils to shared

* refactor: tailwind class ordering

* feat: img ext for editor

* refactor: remove qa

* fix: tanstack start

* fix: wrong import

* chore: use toast

* chore: schema
This commit is contained in:
Aslam
2024-10-18 21:18:20 +07:00
committed by GitHub
parent c93c634a77
commit a440828f8c
158 changed files with 2808 additions and 1064 deletions

View File

@@ -4,6 +4,7 @@ import { PersonalLinkLists } from "./personal-link"
import { ListOfTopics } from "./master/topic"
import { ListOfTasks } from "./task"
import { JournalEntryLists } from "./journal"
import { FolderLists, ImageLists } from "./folder"
declare module "jazz-tools" {
interface Profile {
@@ -12,6 +13,7 @@ declare module "jazz-tools" {
}
export class UserRoot extends CoMap {
version = co.optional.number
name = co.string
username = co.string
avatar = co.optional.string
@@ -28,6 +30,9 @@ export class UserRoot extends CoMap {
tasks = co.ref(ListOfTasks)
journalEntries = co.ref(JournalEntryLists)
folders = co.ref(FolderLists)
images = co.ref(ImageLists)
}
export class LaAccount extends Account {
@@ -38,9 +43,6 @@ export class LaAccount extends Account {
this: LaAccount,
creationProps?: { name: string; avatarUrl?: string },
) {
// since we dont have a custom AuthProvider yet.
// and still using the DemoAuth. the creationProps will only accept name.
// so just do default profile create provided by jazz-tools
super.migrate(creationProps)
if (!this._refs.root && creationProps) {
@@ -62,6 +64,11 @@ export class LaAccount extends Account {
tasks: ListOfTasks.create([], { owner: this }),
journalEntries: JournalEntryLists.create([], { owner: this }),
folders: FolderLists.create([], { owner: this }),
images: ImageLists.create([], { owner: this }),
version: 1,
},
{ owner: this },
)
@@ -72,3 +79,6 @@ export class LaAccount extends Account {
export * from "./master/topic"
export * from "./personal-link"
export * from "./personal-page"
export * from "./task"
export * from "./journal"
export * from "./folder"