mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 01:36:30 +02:00
feat: add folder management features including creation, deletion, and organization of documents within folders
This commit is contained in:
parent
95bb522220
commit
685ad0c02d
41 changed files with 7475 additions and 4330 deletions
19
surfsense_web/atoms/documents/folder.atoms.ts
Normal file
19
surfsense_web/atoms/documents/folder.atoms.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
"use client";
|
||||
|
||||
import { atom } from "jotai";
|
||||
import { atomWithStorage } from "jotai/utils";
|
||||
|
||||
/**
|
||||
* Set of folder IDs that are currently expanded in the tree, keyed by search space ID.
|
||||
* Persisted to localStorage so expand/collapse state survives page refreshes.
|
||||
*/
|
||||
export const expandedFolderIdsAtom = atomWithStorage<Record<number, number[]>>(
|
||||
"surfsense:expandedFolderIds",
|
||||
{},
|
||||
);
|
||||
|
||||
/**
|
||||
* Folder currently being renamed (inline edit mode).
|
||||
* null means no folder is being renamed.
|
||||
*/
|
||||
export const renamingFolderIdAtom = atom<number | null>(null);
|
||||
Loading…
Add table
Add a link
Reference in a new issue