Browse Source

chore: 注释掉项目设置弹窗的图片嵌入选项,移除顶部导航的保存和打开项目按钮

1.  将ProjectSetupModal中的图片嵌入配置区块临时注释
2.  从Header组件中删除重复的保存工作流和打开项目按钮
feature/group
huangmin 1 month ago
parent
commit
da38d85d98
  1. 70
      src/components/Header.tsx
  2. 4
      src/components/ProjectSetupModal.tsx

70
src/components/Header.tsx

@ -330,22 +330,6 @@ export function Header() {
/> />
</svg> </svg>
</button> </button>
<button
onClick={() => setShowWorkflowSaveModal(true)}
className="p-1.5 text-neutral-400 hover:text-neutral-200 hover:bg-neutral-800 rounded transition-colors"
title={t("header.saveWorkflow")}
>
<svg
className="w-4 h-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={1.7}
>
<path strokeLinecap="round" strokeLinejoin="round" d="M12 16.5V4.5m0 0-4 4m4-4 4 4" />
<path strokeLinecap="round" strokeLinejoin="round" d="M4.5 14.25v3.75A1.5 1.5 0 0 0 6 19.5h12a1.5 1.5 0 0 0 1.5-1.5v-3.75" />
</svg>
</button>
{saveDirectoryPath && !isBrowserFileSystemPath(saveDirectoryPath) && ( {saveDirectoryPath && !isBrowserFileSystemPath(saveDirectoryPath) && (
<button <button
onClick={handleOpenDirectory} onClick={handleOpenDirectory}
@ -367,25 +351,6 @@ export function Header() {
</svg> </svg>
</button> </button>
)} )}
<button
onClick={handleOpenFile}
className="p-1.5 text-neutral-400 hover:text-neutral-200 hover:bg-neutral-800 rounded transition-colors"
title={t("header.openProject")}
>
<svg
className="w-4 h-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={2}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"
/>
</svg>
</button>
</div> </div>
{settingsButtons} {settingsButtons}
@ -416,41 +381,6 @@ export function Header() {
/> />
</svg> </svg>
</button> </button>
<button
onClick={() => setShowWorkflowSaveModal(true)}
className="p-1.5 text-neutral-400 hover:text-neutral-200 hover:bg-neutral-800 rounded transition-colors"
title={t("header.saveWorkflow")}
>
<svg
className="w-4 h-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={1.7}
>
<path strokeLinecap="round" strokeLinejoin="round" d="M12 16.5V4.5m0 0-4 4m4-4 4 4" />
<path strokeLinecap="round" strokeLinejoin="round" d="M4.5 14.25v3.75A1.5 1.5 0 0 0 6 19.5h12a1.5 1.5 0 0 0 1.5-1.5v-3.75" />
</svg>
</button>
<button
onClick={handleOpenFile}
className="p-1.5 text-neutral-400 hover:text-neutral-200 hover:bg-neutral-800 rounded transition-colors"
title={t("header.openProject")}
>
<svg
className="w-4 h-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={2}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"
/>
</svg>
</button>
</div> </div>
{settingsButtons} {settingsButtons}

4
src/components/ProjectSetupModal.tsx

@ -595,7 +595,7 @@ export function ProjectSetupModal({
</p> </p>
</div> </div>
<div className="pt-2 border-t border-neutral-700"> {/* <div className="pt-2 border-t border-neutral-700">
<label className="flex items-center justify-between gap-3 cursor-pointer"> <label className="flex items-center justify-between gap-3 cursor-pointer">
<div> <div>
<span className="text-sm text-neutral-200">{t("project.embedImages")}</span> <span className="text-sm text-neutral-200">{t("project.embedImages")}</span>
@ -613,7 +613,7 @@ export function ProjectSetupModal({
<span className={`inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform ${!externalStorage ? "translate-x-[18px]" : "translate-x-[3px]"}`} /> <span className={`inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform ${!externalStorage ? "translate-x-[18px]" : "translate-x-[3px]"}`} />
</button> </button>
</label> </label>
</div> </div> */}
<div className="pt-2 border-t border-neutral-700"> <div className="pt-2 border-t border-neutral-700">
<label className="flex items-center justify-between gap-3 cursor-pointer"> <label className="flex items-center justify-between gap-3 cursor-pointer">

Loading…
Cancel
Save