diff --git a/src/renderer/src/components/AppDetail/AppDetail.tsx b/src/renderer/src/components/AppDetail/AppDetail.tsx index a9447ea..8433fed 100644 --- a/src/renderer/src/components/AppDetail/AppDetail.tsx +++ b/src/renderer/src/components/AppDetail/AppDetail.tsx @@ -17,8 +17,7 @@ import { ArrowLeft, } from "lucide-react"; import { createStyles } from "antd-style"; -import { useAppStore } from "@renderer/stores"; -import { useDomainStore } from "@renderer/stores"; +import { useAppStore, useDomainStore, useSessionStore } from "@renderer/stores"; import { CodeViewer } from "../CodeViewer"; import { FileConfigResponse, isFileResource } from "@shared/types/kintone"; import { getDisplayName, getFileKey } from "@shared/utils/fileDisplay"; @@ -51,6 +50,7 @@ const useStyles = createStyles(({ token, css }) => ({ flex: 1; overflow: auto; padding: ${token.paddingMD}px; + padding-top: ${token.paddingXS}px; `, loading: css` display: flex; @@ -129,8 +129,9 @@ const useStyles = createStyles(({ token, css }) => ({ `, // Back button - no border, left aligned with text backButton: css` - padding: 0; - margin-bottom: ${token.marginMD}px; + padding: ${token.marginSM}px 0; + padding-left: ${token.marginXS}px; + margin-bottom: ${token.marginXS}px; display: flex; align-items: center; justify-content: flex-start; @@ -152,14 +153,7 @@ const AppDetail: React.FC = () => { const { currentDomain } = useDomainStore(); const { currentApp, selectedAppId, loading, setCurrentApp, setLoading } = useAppStore(); - - // View mode: 'list' shows file sections, 'code' shows code viewer - const [viewMode, setViewMode] = React.useState<"list" | "code">("list"); - const [selectedFile, setSelectedFile] = React.useState<{ - type: "js" | "css"; - fileKey: string; - name: string; - } | null>(null); + const { viewMode, selectedFile, setViewMode, setSelectedFile } = useSessionStore(); // Download state: track which file is being downloaded const [downloadingKey, setDownloadingKey] = React.useState( @@ -463,7 +457,7 @@ const AppDetail: React.FC = () => {

{currentApp.name}

- {currentApp.appId} + ID: {currentApp.appId}