Skip to content

Commit f94f354

Browse files
BboyAkersdawsontoth
authored andcommitted
chore: Restructured folders in /applications. Removed unused files
1 parent 3840506 commit f94f354

File tree

11 files changed

+25
-140
lines changed

11 files changed

+25
-140
lines changed

src/features/instance/applications/editor/components/ApplicationsSidebar/EmptyApplicationsView.tsx renamed to src/features/instance/applications/components/ApplicationsSidebar/EmptyApplicationsView.tsx

File renamed without changes.

src/features/instance/applications/editor/components/ApplicationsSidebar/FileTreeExplorer/FileMenu.tsx renamed to src/features/instance/applications/components/ApplicationsSidebar/FileTreeExplorer/FileMenu.tsx

File renamed without changes.

src/features/instance/applications/editor/components/ApplicationsSidebar/FileTreeExplorer/FileMenuActionButtons.tsx renamed to src/features/instance/applications/components/ApplicationsSidebar/FileTreeExplorer/FileMenuActionButtons.tsx

File renamed without changes.

src/features/instance/applications/editor/components/ApplicationsSidebar/FileTreeExplorer/filetree.css renamed to src/features/instance/applications/components/ApplicationsSidebar/FileTreeExplorer/filetree.css

File renamed without changes.

src/features/instance/applications/editor/components/ApplicationsSidebar/FileTreeExplorer/index.tsx renamed to src/features/instance/applications/components/ApplicationsSidebar/FileTreeExplorer/index.tsx

File renamed without changes.

src/features/instance/applications/editor/components/ApplicationsSidebar/index.tsx renamed to src/features/instance/applications/components/ApplicationsSidebar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { EmptyApplicationsView } from '@/features/instance/applications/editor/components/ApplicationsSidebar/EmptyApplicationsView';
2-
import { FileTreeExplorer } from '@/features/instance/applications/editor/components/ApplicationsSidebar/FileTreeExplorer';
1+
import { EmptyApplicationsView } from '@/features/instance/applications/components/ApplicationsSidebar/EmptyApplicationsView';
2+
import { FileTreeExplorer } from '@/features/instance/applications/components/ApplicationsSidebar/FileTreeExplorer';
33
import { GetComponentsResponse } from '@/features/instance/operations/queries/getComponents';
44
import { FileMenuActionButtons } from './FileTreeExplorer/FileMenuActionButtons';
55

src/features/instance/applications/editor/components/TextEditorView/index.tsx renamed to src/features/instance/applications/components/TextEditorView/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { Editor } from '@monaco-editor/react';
77
import { useParams } from '@tanstack/react-router';
88
import { ImportIcon, PlusIcon, Save } from 'lucide-react';
99
import { useEffect, useState } from 'react';
10-
import { useEditorView } from '../../../hooks/useEditorView';
11-
import { NewProjectModal } from '../../../modals/NewProjectModal';
10+
import { useEditorView } from '@/features/instance/applications/hooks/useEditorView';
11+
import { NewProjectModal } from '@/features/instance/applications/modals/NewProjectModal';
1212

1313
function parseFileExtension(filename: string) {
1414
const parts = (filename || '')?.split('.');

src/features/instance/applications/editor/index.tsx

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
1-
import { Button } from '@/components/ui/button';
2-
import { Link } from '@tanstack/react-router';
3-
import { Edit, FolderPlus } from 'lucide-react';
1+
import { useInstanceClientIdParams } from '@/config/useInstanceClient';
2+
import { EditorViewProvider } from '@/features/instance/applications/context/EditorViewProvider';
3+
import { ApplicationsSidebar } from '@/features/instance/applications/components/ApplicationsSidebar';
4+
import { getComponentsQueryOptions } from '@/features/instance/operations/queries/getComponents';
5+
import { useSuspenseQuery } from '@tanstack/react-query';
6+
import { TextEditorView } from './components/TextEditorView';
7+
8+
export function ApplicationsEditor() {
9+
const instanceParams = useInstanceClientIdParams();
10+
const { data: getComponentsQueryData } = useSuspenseQuery(getComponentsQueryOptions(instanceParams));
411

5-
export function ApplicationsIndex() {
612
return (
7-
<div className="flex flex-col justify-center gap-4 min-h-[calc(80vh-theme(spacing.20))]">
8-
<h1 className="text-2xl font-bold text-center text-white">Applications</h1>
9-
<div className="flex flex-col items-center justify-center gap-8 md:flex-row">
10-
<Link to="editor" className="w-full max-w-80">
11-
<Button className="w-full py-10 text-lg" variant="positiveOutline">
12-
<Edit />
13-
Edit Applications
14-
</Button>
15-
</Link>
16-
<Link to="new" className="w-full max-w-80">
17-
<Button className="w-full py-10 text-lg" variant="positiveOutline">
18-
<FolderPlus />
19-
Create/Import A New Application
20-
</Button>
21-
</Link>
13+
<EditorViewProvider>
14+
<div className="grid grid-cols-1 gap-4 md:grid-cols-12 h-[calc(100vh-theme(spacing.32))]">
15+
<section className="h-0 min-h-full col-span-1 overflow-y-scroll text-white md:col-span-4 lg:col-span-3">
16+
<ApplicationsSidebar fileTreeQueryData={getComponentsQueryData} />
17+
</section>
18+
<section className="h-full col-span-1 text-white md:col-span-8 lg:col-span-9">
19+
<TextEditorView />
20+
</section>
2221
</div>
23-
</div>
22+
</EditorViewProvider>
2423
);
2524
}
26-
27-

src/features/instance/applications/new/index.tsx

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)