From 4b30c8bc3b6a0172a3fb1d7fcf5baf7770986d97 Mon Sep 17 00:00:00 2001 From: sawka Date: Thu, 1 Aug 2024 12:53:49 -0700 Subject: [PATCH] move preview into own directory --- frontend/app/block/block.tsx | 2 +- frontend/app/view/{ => preview}/directorypreview.less | 2 +- frontend/app/view/{ => preview}/directorypreview.tsx | 2 +- frontend/app/view/{ => preview}/preview.less | 0 frontend/app/view/{ => preview}/preview.tsx | 6 +++--- 5 files changed, 6 insertions(+), 6 deletions(-) rename frontend/app/view/{ => preview}/directorypreview.less (99%) rename frontend/app/view/{ => preview}/directorypreview.tsx (99%) rename frontend/app/view/{ => preview}/preview.less (100%) rename frontend/app/view/{ => preview}/preview.tsx (99%) diff --git a/frontend/app/block/block.tsx b/frontend/app/block/block.tsx index 383e63e7f..f2f2547c1 100644 --- a/frontend/app/block/block.tsx +++ b/frontend/app/block/block.tsx @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { useLongClick } from "@/app/hook/useLongClick"; +import { PreviewView, makePreviewModel } from "@/app/view/preview/preview"; import { Button } from "@/element/button"; import { ErrorBoundary } from "@/element/errorboundary"; import { CenteredDiv } from "@/element/quickelems"; @@ -13,7 +14,6 @@ import * as util from "@/util/util"; import { CpuPlotView, makeCpuPlotViewModel } from "@/view/cpuplot"; import { HelpView } from "@/view/helpview"; import { PlotView } from "@/view/plotview"; -import { PreviewView, makePreviewModel } from "@/view/preview"; import { TerminalView, makeTerminalModel } from "@/view/term/term"; import { WaveAi, makeWaveAiViewModel } from "@/view/waveai"; import { WebView, makeWebViewModel } from "@/view/webview"; diff --git a/frontend/app/view/directorypreview.less b/frontend/app/view/preview/directorypreview.less similarity index 99% rename from frontend/app/view/directorypreview.less rename to frontend/app/view/preview/directorypreview.less index d6a75b5e9..4c4bc4034 100644 --- a/frontend/app/view/directorypreview.less +++ b/frontend/app/view/preview/directorypreview.less @@ -1,7 +1,7 @@ // Copyright 2024, Command Line Inc. // SPDX-License-Identifier: Apache-2.0 -@import "../mixins.less"; +@import "../../mixins.less"; .dir-table-container { display: flex; diff --git a/frontend/app/view/directorypreview.tsx b/frontend/app/view/preview/directorypreview.tsx similarity index 99% rename from frontend/app/view/directorypreview.tsx rename to frontend/app/view/preview/directorypreview.tsx index 399a970a8..3612f9333 100644 --- a/frontend/app/view/directorypreview.tsx +++ b/frontend/app/view/preview/directorypreview.tsx @@ -4,10 +4,10 @@ import { useHeight } from "@/app/hook/useHeight"; import { ContextMenuModel } from "@/app/store/contextmenu"; import { atoms, createBlock, getApi } from "@/app/store/global"; +import type { PreviewModel } from "@/app/view/preview/preview"; import * as services from "@/store/services"; import * as keyutil from "@/util/keyutil"; import * as util from "@/util/util"; -import type { PreviewModel } from "@/view/preview"; import { Column, Row, diff --git a/frontend/app/view/preview.less b/frontend/app/view/preview/preview.less similarity index 100% rename from frontend/app/view/preview.less rename to frontend/app/view/preview/preview.less diff --git a/frontend/app/view/preview.tsx b/frontend/app/view/preview/preview.tsx similarity index 99% rename from frontend/app/view/preview.tsx rename to frontend/app/view/preview/preview.tsx index 5467ca7a0..e4645441c 100644 --- a/frontend/app/view/preview.tsx +++ b/frontend/app/view/preview/preview.tsx @@ -12,9 +12,9 @@ import clsx from "clsx"; import * as jotai from "jotai"; import { loadable } from "jotai/utils"; import { useEffect, useRef } from "react"; -import { CenteredDiv } from "../element/quickelems"; -import { CodeEditor } from "./codeeditor/codeeditor"; -import { CSVView } from "./csvview"; +import { CenteredDiv } from "../../element/quickelems"; +import { CodeEditor } from "../codeeditor/codeeditor"; +import { CSVView } from "../csvview"; import { DirectoryPreview } from "./directorypreview"; import "./preview.less";