mirror of
https://github.com/colanode/colanode.git
synced 2025-12-29 00:25:03 +01:00
Move contexts into renderer folder
This commit is contained in:
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import Axios from 'axios';
|
||||
import { Login } from '@/components/accounts/login';
|
||||
import { AppLoading } from '@/components/app-loading';
|
||||
import { AccountContext } from '@/contexts/account';
|
||||
import { AxiosContext } from '@/contexts/axios';
|
||||
import { AccountContext } from '@/renderer/contexts/account';
|
||||
import { AxiosContext } from '@/renderer/contexts/axios';
|
||||
import { Outlet } from 'react-router-dom';
|
||||
import { AccountLogout } from '@/components/accounts/account-logout';
|
||||
import { DelayedComponent } from '@/components/ui/delayed-component';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
CommandItem,
|
||||
CommandList,
|
||||
} from '@/components/ui/command';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import { useQuery } from '@/renderer/hooks/use-query';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Spinner } from '@/components/ui/spinner';
|
||||
import { NodeCollaboratorRoleDropdown } from '@/components/collaborators/node-collaborator-role-dropdown';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { toast } from '@/components/ui/use-toast';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface NodeCollaboratorCreate {
|
||||
id: string;
|
||||
|
||||
@@ -18,7 +18,7 @@ import { Icon } from '@/components/ui/icon';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
import { useQuery } from '@/renderer/hooks/use-query';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface NodeCollaboratorSearchProps {
|
||||
excluded: string[];
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Avatar } from '@/components/ui/avatar';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { NodeCollaboratorRoleDropdown } from '@/components/collaborators/node-collaborator-role-dropdown';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface NodeCollaboratorProps {
|
||||
nodeId: string;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Separator } from '@/components/ui/separator';
|
||||
import { NodeCollaborator } from '@/components/collaborators/node-collaborator';
|
||||
import { NodeCollaboratorCreate } from '@/components/collaborators/node-collaborator-create';
|
||||
import { useQuery } from '@/renderer/hooks/use-query';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface NodeCollaboratorsProps {
|
||||
id: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import {
|
||||
RecordNode,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { useInfiniteQuery } from '@/renderer/hooks/use-infinite-query';
|
||||
import {
|
||||
BoardViewNode,
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
ViewFilter,
|
||||
} from '@/types/databases';
|
||||
import { BoardViewCard } from '@/components/databases/boards/board-view-card';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
const RECORDS_PER_PAGE = 50;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { BoardViewNode } from '@/types/databases';
|
||||
import { ViewTabs } from '@/components/databases/view-tabs';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { BoardViewColumn } from '@/components/databases/boards/board-view-column';
|
||||
import { ViewSearchBar } from '@/components/databases/search/view-search-bar';
|
||||
import { ViewSortButton } from '@/components/databases/search/view-sort-button';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import { RecordNode } from '@/types/databases';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ import { DayPicker, DayProps } from 'react-day-picker';
|
||||
import { CalendarViewDay } from '@/components/databases/calendars/calendar-view-day';
|
||||
import { CalendarViewNode, FieldNode, ViewFilter } from '@/types/databases';
|
||||
import { useInfiniteQuery } from '@/renderer/hooks/use-infinite-query';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { filterRecords } from '@/lib/databases';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
const RECORDS_PER_PAGE = 50;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { CalendarViewNode } from '@/types/databases';
|
||||
import { ViewTabs } from '@/components/databases/view-tabs';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { CalendarViewGrid } from '@/components/databases/calendars/calendar-view-grid';
|
||||
import { ViewSearchBar } from '@/components/databases/search/view-search-bar';
|
||||
import { ViewSortButton } from '@/components/databases/search/view-sort-button';
|
||||
|
||||
@@ -3,7 +3,7 @@ import { LocalNode } from '@/types/nodes';
|
||||
import { useQuery } from '@/renderer/hooks/use-query';
|
||||
import { Database } from '@/components/databases/database';
|
||||
import { DatabaseViews } from '@/components/databases/database-views';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface DatabaseContainerNodeProps {
|
||||
node: LocalNode;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { DatabaseViewsContext } from '@/contexts/database-views';
|
||||
import { DatabaseViewsContext } from '@/renderer/contexts/database-views';
|
||||
import { ViewNode } from '@/types/databases';
|
||||
import { View } from '@/components/databases/view';
|
||||
import { ScrollArea } from '@/components/ui/scroll-area';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { DatabaseContext } from '@/contexts/database';
|
||||
import { DatabaseContext } from '@/renderer/contexts/database';
|
||||
import { DatabaseNode } from '@/types/databases';
|
||||
|
||||
interface DatabaseProps {
|
||||
|
||||
@@ -18,13 +18,13 @@ import {
|
||||
PopoverContent,
|
||||
PopoverTrigger,
|
||||
} from '@/components/ui/popover';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { FieldDataTypeSelect } from '@/components/databases/fields/field-type-select';
|
||||
import { FieldAttrs } from '@/components/databases/fields/field-attrs';
|
||||
import { Spinner } from '@/components/ui/spinner';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
const formSchema = z.object({
|
||||
name: z.string(),
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from '@/components/ui/alert-dialog';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface FieldDeleteDialogProps {
|
||||
id: string;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { FieldNode } from '@/types/databases';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface FieldRenameInputProps {
|
||||
field: FieldNode;
|
||||
|
||||
@@ -12,7 +12,7 @@ import { Icon } from '@/components/ui/icon';
|
||||
import { MultiSelectFieldNode, SelectFieldNode } from '@/types/databases';
|
||||
import { getRandomSelectOptionColor } from '@/lib/databases';
|
||||
import { SelectOptionSettingsPopover } from '@/components/databases/fields/select-option-settings-popover';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
|
||||
interface SelectFieldOptionsProps {
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from '@/components/ui/alert-dialog';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface SelectOptionDeleteDialogProps {
|
||||
id: string;
|
||||
|
||||
@@ -13,7 +13,7 @@ import { SelectOptionNode } from '@/types/databases';
|
||||
import { SelectOptionDeleteDialog } from '@/components/databases/fields/select-option-delete-dialog';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface SelectOptionSettingsPopoverProps {
|
||||
option: SelectOptionNode;
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { getFieldIcon, booleanFieldFilterOperators } from '@/lib/databases';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
interface ViewBooleanFieldFilterProps {
|
||||
field: BooleanFieldNode;
|
||||
|
||||
@@ -15,7 +15,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { getFieldIcon, dateFieldFilterOperators } from '@/lib/databases';
|
||||
import { DatePicker } from '@/components/ui/date-picker';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
interface ViewCreatedAtFieldFilterProps {
|
||||
field: CreatedAtFieldNode;
|
||||
|
||||
@@ -15,7 +15,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { getFieldIcon, dateFieldFilterOperators } from '@/lib/databases';
|
||||
import { DatePicker } from '@/components/ui/date-picker';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
interface ViewDateFieldFilterProps {
|
||||
field: DateFieldNode;
|
||||
|
||||
@@ -15,7 +15,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { getFieldIcon, emailFieldFilterOperators } from '@/lib/databases';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
interface ViewEmailFieldFilterProps {
|
||||
field: EmailFieldNode;
|
||||
|
||||
@@ -13,9 +13,9 @@ import {
|
||||
CommandItem,
|
||||
CommandList,
|
||||
} from '@/components/ui/command';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { getFieldIcon } from '@/lib/databases';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
interface ViewFilterAddPopoverProps {
|
||||
children: React.ReactNode;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { ViewFilterAddPopover } from '@/components/databases/search/view-filter-add-popover';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
export const ViewFilterButton = () => {
|
||||
const viewSearch = useViewSearch();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { ViewTextFieldFilter } from '@/components/databases/search/view-text-field-filter';
|
||||
import { ViewNumberFieldFilter } from '@/components/databases/search/view-number-field-filter';
|
||||
import { ViewEmailFieldFilter } from '@/components/databases/search/view-email-field-filter';
|
||||
@@ -12,7 +12,7 @@ import { ViewDateFieldFilter } from '@/components/databases/search/view-date-fie
|
||||
import { ViewCreatedAtFieldFilter } from '@/components/databases/search/view-created-at-field-fitler';
|
||||
import { ViewFilterAddPopover } from '@/components/databases/search/view-filter-add-popover';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
export const ViewFilters = () => {
|
||||
const database = useDatabase();
|
||||
|
||||
@@ -16,7 +16,7 @@ import { Icon } from '@/components/ui/icon';
|
||||
import { getFieldIcon, selectFieldFilterOperators } from '@/lib/databases';
|
||||
import { SelectFieldOptions } from '@/components/databases/fields/select-field-options';
|
||||
import { SelectOptionBadge } from '@/components/databases/fields/select-option-badge';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
interface ViewMultiSelectFieldFilterProps {
|
||||
field: MultiSelectFieldNode;
|
||||
|
||||
@@ -15,7 +15,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { getFieldIcon, numberFieldFilterOperators } from '@/lib/databases';
|
||||
import { SmartNumberInput } from '@/components/ui/smart-number-input';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
interface ViewNumberFieldFilterProps {
|
||||
field: NumberFieldNode;
|
||||
|
||||
@@ -15,7 +15,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { phoneFieldFilterOperators } from '@/lib/databases';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
interface ViewPhoneFieldFilterProps {
|
||||
field: PhoneFieldNode;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { ViewSorts } from '@/components/databases/search/view-sorts';
|
||||
import { ViewFilters } from '@/components/databases/search/view-filters';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
export const ViewSearchBar = () => {
|
||||
const viewSearch = useViewSearch();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React from 'react';
|
||||
import { ViewSearchContext } from '@/contexts/view-search';
|
||||
import { ViewSearchContext } from '@/renderer/contexts/view-search';
|
||||
import { ViewFieldFilter, ViewFilter, ViewSort } from '@/types/databases';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { NeuronId } from '@/lib/id';
|
||||
import { getFieldFilterOperators } from '@/lib/databases';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface ViewSearchProviderProps {
|
||||
id: string;
|
||||
|
||||
@@ -16,7 +16,7 @@ import { Icon } from '@/components/ui/icon';
|
||||
import { getFieldIcon, selectFieldFilterOperators } from '@/lib/databases';
|
||||
import { SelectFieldOptions } from '@/components/databases/fields/select-field-options';
|
||||
import { SelectOptionBadge } from '@/components/databases/fields/select-option-badge';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
interface ViewSelectFieldFilterProps {
|
||||
field: SelectFieldNode;
|
||||
|
||||
@@ -13,9 +13,9 @@ import {
|
||||
CommandItem,
|
||||
CommandList,
|
||||
} from '@/components/ui/command';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { getFieldIcon, isSortableField } from '@/lib/databases';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
interface ViewSortAddPopoverProps {
|
||||
children: React.ReactNode;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { ViewSortAddPopover } from '@/components/databases/search/view-sort-add-popover';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
export const ViewSortButton = () => {
|
||||
const viewSearch = useViewSearch();
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
import React from 'react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { SortDirections } from '@/lib/constants';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
interface ViewSortProps {
|
||||
sort: ViewSort;
|
||||
|
||||
@@ -6,10 +6,10 @@ import {
|
||||
} from '@/components/ui/popover';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { ViewSortRow } from '@/components/databases/search/view-sort-row';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { ViewSortAddPopover } from '@/components/databases/search/view-sort-add-popover';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
export const ViewSorts = () => {
|
||||
const database = useDatabase();
|
||||
|
||||
@@ -15,7 +15,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { getFieldIcon, textFieldFilterOperators } from '@/lib/databases';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
interface ViewTextFieldFilterProps {
|
||||
field: TextFieldNode;
|
||||
|
||||
@@ -15,7 +15,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { urlFieldFilterOperators } from '@/lib/databases';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
|
||||
interface ViewUrlFieldFilterProps {
|
||||
field: UrlFieldNode;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import { BooleanFieldNode, RecordNode } from '@/types/databases';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface TableViewBooleanCellProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { RecordNode, DateFieldNode } from '@/types/databases';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { DatePicker } from '@/components/ui/date-picker';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface TableViewDateCellProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { RecordNode, EmailFieldNode } from '@/types/databases';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface TableViewEmailCellProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from '@/components/ui/popover';
|
||||
import { SelectFieldOptions } from '@/components/databases/fields/select-field-options';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface TableViewMultiSelectCellProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { RecordNode } from '@/types/databases';
|
||||
import { NumberFieldNode } from '@/types/databases';
|
||||
import { SmartNumberInput } from '@/components/ui/smart-number-input';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface TableViewNumberCellProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { RecordNode, PhoneFieldNode } from '@/types/databases';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface TableViewPhoneCellProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from '@/components/ui/popover';
|
||||
import { SelectFieldOptions } from '@/components/databases/fields/select-field-options';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface TableViewSelectCellProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { RecordNode, TextFieldNode } from '@/types/databases';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface TableViewTextCellProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface TableViewUrlCellProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React from 'react';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { TableViewRow } from '@/components/databases/tables/table-view-row';
|
||||
import { TableViewEmptyPlaceholder } from '@/components/databases/tables/table-view-empty-placeholder';
|
||||
import { TableViewLoadMoreRow } from '@/components/databases/tables/table-view-load-more-row';
|
||||
import { useInfiniteQuery } from '@/renderer/hooks/use-infinite-query';
|
||||
import { useViewSearch } from '@/contexts/view-search';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useViewSearch } from '@/renderer/contexts/view-search';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
const RECORDS_PER_PAGE = 50;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
import { FieldDeleteDialog } from '@/components/databases/fields/field-delete-dialog';
|
||||
import { FieldRenameInput } from '@/components/databases/fields/field-rename-input';
|
||||
import { useTableView } from '@/contexts/table-view';
|
||||
import { useTableView } from '@/renderer/contexts/table-view';
|
||||
|
||||
interface TableViewFieldHeaderProps {
|
||||
field: FieldNode;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useTableView } from '@/contexts/table-view';
|
||||
import { useTableView } from '@/renderer/contexts/table-view';
|
||||
import { TableViewNameHeader } from '@/components/databases/tables/table-view-name-header';
|
||||
import { TableViewFieldHeader } from '@/components/databases/tables/table-view-field-header';
|
||||
import { FieldCreatePopover } from '@/components/databases/fields/field-create-popover';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import isHotkey from 'is-hotkey';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import { Spinner } from '@/components/ui/spinner';
|
||||
import { RecordNode } from '@/types/databases';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from '@/components/ui/popover';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { useTableView } from '@/contexts/table-view';
|
||||
import { useTableView } from '@/renderer/contexts/table-view';
|
||||
import { useDrop } from 'react-dnd';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
export const TableViewRecordCreateRow = () => {
|
||||
const workspace = useWorkspace();
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { TableViewNameCell } from '@/components/databases/tables/table-view-name-cell';
|
||||
import { TableViewFieldCell } from '@/components/databases/tables/table-view-field-cell';
|
||||
import { RecordNode } from '@/types/databases';
|
||||
import { useTableView } from '@/contexts/table-view';
|
||||
import { useTableView } from '@/renderer/contexts/table-view';
|
||||
|
||||
interface TableViewRowProps {
|
||||
index: number;
|
||||
|
||||
@@ -5,9 +5,9 @@ import {
|
||||
PopoverTrigger,
|
||||
} from '@/components/ui/popover';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { useTableView } from '@/contexts/table-view';
|
||||
import { useTableView } from '@/renderer/contexts/table-view';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { getFieldIcon } from '@/lib/databases';
|
||||
import {
|
||||
@@ -19,7 +19,7 @@ import { FieldDeleteDialog } from '@/components/databases/fields/field-delete-di
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { ViewDeleteDialog } from '@/components/databases/view-delete-dialog';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
export const TableViewSettingsPopover = () => {
|
||||
const workspace = useWorkspace();
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import { TableViewHeader } from '@/components/databases/tables/table-view-header';
|
||||
import { TableViewBody } from '@/components/databases/tables/table-view-body';
|
||||
import { TableViewRecordCreateRow } from '@/components/databases/tables/table-view-record-create-row';
|
||||
import { TableViewContext } from '@/contexts/table-view';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { TableViewContext } from '@/renderer/contexts/table-view';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { compareString } from '@/lib/utils';
|
||||
import { FieldDataType, TableViewNode } from '@/types/databases';
|
||||
import { ViewTabs } from '@/components/databases/view-tabs';
|
||||
@@ -15,7 +15,7 @@ import { ViewSearchBar } from '@/components/databases/search/view-search-bar';
|
||||
import { ViewFilterButton } from '@/components/databases/search/view-filter-button';
|
||||
import { ViewSortButton } from '@/components/databases/search/view-sort-button';
|
||||
import { ViewSearchProvider } from '@/components/databases/search/view-search-provider';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface TableViewProps {
|
||||
node: TableViewNode;
|
||||
|
||||
@@ -23,11 +23,11 @@ import { useForm } from 'react-hook-form';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { FieldSelect } from '@/components/databases/fields/field-select';
|
||||
import { toast } from '@/components/ui/use-toast';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
const formSchema = z.object({
|
||||
name: z.string().min(3, 'Name must be at least 3 characters long.'),
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from '@/components/ui/alert-dialog';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface ViewDeleteDialogProps {
|
||||
id: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { ViewTab } from '@/components/databases/view-tab';
|
||||
import { ViewCreateButton } from '@/components/databases/view-create-button';
|
||||
import { useDatabaseViews } from '@/contexts/database-views';
|
||||
import { useDatabaseViews } from '@/renderer/contexts/database-views';
|
||||
|
||||
export const ViewTabs = () => {
|
||||
const databaseViews = useDatabaseViews();
|
||||
|
||||
@@ -50,7 +50,7 @@ import {
|
||||
|
||||
import { EditorBubbleMenu } from '@/editor/menu/bubble-menu';
|
||||
import { LocalNode } from '@/types/nodes';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import { EditorObserver } from '@/editor/observer';
|
||||
|
||||
interface DocumentEditorProps {
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { LocalNode } from '@/types/nodes';
|
||||
import { DocumentEditor } from '@/components/documents/document-editor';
|
||||
import { useQuery } from '@/renderer/hooks/use-query';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface DocumentProps {
|
||||
node: LocalNode;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { Emoji } from '@/lib/emojis';
|
||||
import { EmojiElement } from '@/components/emojis/emoji-element';
|
||||
import { useEmojiPicker } from '@/contexts/emoji-picker';
|
||||
import { useEmojiPicker } from '@/renderer/contexts/emoji-picker';
|
||||
|
||||
interface EmojiPickerItemProps {
|
||||
emoji: Emoji;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { EmojiSkinToneSelector } from '@/components/emojis/emoji-skin-tone-selector';
|
||||
import { Emoji } from '@/lib/emojis';
|
||||
import { EmojiPickerContext } from '@/contexts/emoji-picker';
|
||||
import { EmojiPickerContext } from '@/renderer/contexts/emoji-picker';
|
||||
import { EmojiPickerBrowser } from '@/components/emojis/emoji-picker-browser';
|
||||
import { EmojiPickerSearch } from '@/components/emojis/emoji-picker-search';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { MessageEditor } from '@/components/messages/message-editor';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface MessageCreateProps {
|
||||
conversationId: string;
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface MessageDeleteButtonProps {
|
||||
id: string;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { InView } from 'react-intersection-observer';
|
||||
import { Message } from '@/components/messages/message';
|
||||
import { useInfiniteQuery } from '@/renderer/hooks/use-infinite-query';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import { compareString } from '@/lib/utils';
|
||||
|
||||
interface MessageListProps {
|
||||
|
||||
@@ -14,7 +14,7 @@ import { NodeRenderer } from '@/editor/renderers/node';
|
||||
import { MessageNode } from '@/types/messages';
|
||||
import { MessageReactions } from '@/components/messages/message-reactions';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface MessageProps {
|
||||
message: MessageNode;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { RecordNode } from '@/types/databases';
|
||||
import { RecordName } from '@/components/records/record-name';
|
||||
import { useDatabase } from '@/contexts/database';
|
||||
import { useDatabase } from '@/renderer/contexts/database';
|
||||
import { RecordField } from '@/components/records/record-field';
|
||||
import { RecordFieldValue } from '@/components/records/record-field-value';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { RecordAttributes } from '@/components/records/record-attributes';
|
||||
import { ScrollArea } from '@/components/ui/scroll-area';
|
||||
import { Document } from '@/components/documents/document';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface RecordContainerNodeProps {
|
||||
node: LocalNode;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { RecordNode } from '@/types/databases';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface RecordNameProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import { BooleanFieldNode, RecordNode } from '@/types/databases';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface RecordBooleanValueProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { RecordNode, EmailFieldNode } from '@/types/databases';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface RecordEmailValueProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from '@/components/ui/popover';
|
||||
import { SelectFieldOptions } from '@/components/databases/fields/select-field-options';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface RecordMultiSelectValueProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { RecordNode } from '@/types/databases';
|
||||
import { NumberFieldNode } from '@/types/databases';
|
||||
import { SmartNumberInput } from '@/components/ui/smart-number-input';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface RecordNumberValueProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { RecordNode, PhoneFieldNode } from '@/types/databases';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface RecordPhoneValueProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from '@/components/ui/popover';
|
||||
import { SelectFieldOptions } from '@/components/databases/fields/select-field-options';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface RecordSelectValueProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { RecordNode, TextFieldNode } from '@/types/databases';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface RecordTextValueProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface RecordUrlValueProps {
|
||||
record: RecordNode;
|
||||
|
||||
@@ -23,7 +23,7 @@ import { Spinner } from '@/components/ui/spinner';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
const formSchema = z.object({
|
||||
name: z.string().min(3, 'Name must be at least 3 characters long.'),
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { BreadcrumbNode } from '@/types/workspaces';
|
||||
import { SmartTextInput } from '@/components/ui/smart-text-input';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface BreadcrumbItemEditorProps {
|
||||
node: BreadcrumbNode;
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
PopoverTrigger,
|
||||
} from '@/components/ui/popover';
|
||||
import { NodeTypes } from '@/lib/constants';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import { BreadcrumbItem } from '@/components/workspaces/containers/breadcrumb-item';
|
||||
import { BreadcrumbItemEditor } from '@/components/workspaces/containers/breadcrumb-item-editor';
|
||||
import { useQuery } from '@/renderer/hooks/use-query';
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Spinner } from '@/components/ui/spinner';
|
||||
import { DatabaseContainerNode } from '@/components/databases/database-container-node';
|
||||
import { useQuery } from '@/renderer/hooks/use-query';
|
||||
import { RecordContainerNode } from '@/components/records/record-container-node';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
export const Container = () => {
|
||||
const workspace = useWorkspace();
|
||||
|
||||
@@ -7,7 +7,7 @@ import { ChannelContainerNode } from '@/components/channels/channel-container-no
|
||||
import { PageContainerNode } from '@/components/pages/page-container-node';
|
||||
import { DatabaseContainerNode } from '@/components/databases/database-container-node';
|
||||
import { RecordContainerNode } from '@/components/records/record-container-node';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface ModalContentProps {
|
||||
nodeId: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface ModalHeaderProps {
|
||||
nodeId: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import { SidebarChatNode } from '@/types/workspaces';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { ChatCreatePopover } from '@/components/chats/chat-create-popover';
|
||||
import { useQuery } from '@/renderer/hooks/use-query';
|
||||
import { SidebarChatItem } from '@/components/workspaces/sidebars/sidebar-chat-item';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
export const SidebarChats = () => {
|
||||
const workspace = useWorkspace();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import {
|
||||
Popover,
|
||||
PopoverContent,
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
} from '@/components/ui/popover';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
import { useAccount } from '@/contexts/account';
|
||||
import { useAccount } from '@/renderer/contexts/account';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
export const SidebarHeader = () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import { SidebarNode } from '@/types/workspaces';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { SpaceCreateButton } from '@/components/spaces/space-create-button';
|
||||
import { SidebarSpaceItem } from '@/components/workspaces/sidebars/sidebar-space-item';
|
||||
import { useQuery } from '@/renderer/hooks/use-query';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
export const SidebarSpaces = () => {
|
||||
const workspace = useWorkspace();
|
||||
|
||||
@@ -16,7 +16,7 @@ import { Input } from '@/components/ui/input';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { toast } from '@/components/ui/use-toast';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useAccount } from '@/contexts/account';
|
||||
import { useAccount } from '@/renderer/contexts/account';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
const formSchema = z.object({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useAccount } from '@/contexts/account';
|
||||
import { useAccount } from '@/renderer/contexts/account';
|
||||
|
||||
export const WorkspaceRedirect = (): React.ReactNode => {
|
||||
const account = useAccount();
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Dialog, DialogContent } from '@/components/ui/dialog';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
import { WorkspaceUpdate } from '@/components/workspaces/workspace-update';
|
||||
import { WorkspaceUsers } from '@/components/workspaces/workspace-users';
|
||||
import { VisuallyHidden } from '@radix-ui/react-visually-hidden';
|
||||
|
||||
@@ -16,7 +16,7 @@ import { Input } from '@/components/ui/input';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { toast } from '@/components/ui/use-toast';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
const formSchema = z.object({
|
||||
name: z.string().min(3, 'Name must be at least 3 characters long.'),
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { Spinner } from '@/components/ui/spinner';
|
||||
import { toast } from '@/components/ui/use-toast';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
export const WorkspaceUserInvite = () => {
|
||||
const workspace = useWorkspace();
|
||||
|
||||
@@ -10,7 +10,7 @@ import { Spinner } from '@/components/ui/spinner';
|
||||
import { Icon } from '@/components/ui/icon';
|
||||
import { useMutation } from '@/renderer/hooks/use-mutation';
|
||||
import { toast } from '@/components/ui/use-toast';
|
||||
import { useWorkspace } from '@/contexts/workspace';
|
||||
import { useWorkspace } from '@/renderer/contexts/workspace';
|
||||
|
||||
interface WorkspaceRoleItem {
|
||||
name: string;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user