From a1666da23b2bb75f5bb0c5eb974464af4a2cebed Mon Sep 17 00:00:00 2001 From: oda <934854676@qq.com> Date: Fri, 12 Jul 2024 15:06:21 +0800 Subject: [PATCH] mod: refactor, rename components --- src/ui/obsidian/help-page/basic-tutorial.tsx | 6 ++-- ...an-tasks.tsx => fix-orphan-tasks-view.tsx} | 6 ++-- ...ect-filter.tsx => project-filter-view.tsx} | 2 +- src/ui/react-view/react-manage-page.tsx | 32 +++++++++---------- .../{tag-filter.tsx => tag-filter-view.tsx} | 2 +- ...ow-filter.tsx => workflow-filter-view.tsx} | 2 +- 6 files changed, 25 insertions(+), 25 deletions(-) rename src/ui/react-view/{fix-orphan-tasks.tsx => fix-orphan-tasks-view.tsx} (96%) rename src/ui/react-view/{project-filter.tsx => project-filter-view.tsx} (98%) rename src/ui/react-view/{tag-filter.tsx => tag-filter-view.tsx} (99%) rename src/ui/react-view/{workflow-filter.tsx => workflow-filter-view.tsx} (99%) diff --git a/src/ui/obsidian/help-page/basic-tutorial.tsx b/src/ui/obsidian/help-page/basic-tutorial.tsx index 82dbaf7..a6f5b8b 100644 --- a/src/ui/obsidian/help-page/basic-tutorial.tsx +++ b/src/ui/obsidian/help-page/basic-tutorial.tsx @@ -11,7 +11,7 @@ import {usePluginSettings} from "../../../settings/settings"; import {ObsidianIconView} from "../../react-view/obsidian-icon-view"; import {Icon_ManagePage} from "../manage-page-view"; import {DataTable} from "../../pure-react/view-template/data-table"; -import {WorkflowTypeLegend} from "../../react-view/workflow-filter"; +import {WorkflowTypeLegend} from "../../react-view/workflow-filter-view"; import {HashTagView} from "../../common/hash-tag-view"; import { Tag_Prefix_Step, @@ -30,8 +30,8 @@ import { import {InlineCodeView} from "../../common/inline-code-view"; import {MarkdownFrontMatterView} from "../../common/markdown-front-matter-view"; import {FileNavView} from "../../common/file-nav-view"; -import {ProjectFilterName_All} from "../../react-view/project-filter"; -import {OrphanTaskButtonAndPanel} from "../../react-view/fix-orphan-tasks"; +import {ProjectFilterName_All} from "../../react-view/project-filter-view"; +import {OrphanTaskButtonAndPanel} from "../../react-view/fix-orphan-tasks-view"; import {Desc_ManagePage, HelpPage_Template, HelpPage_UserManual} from "./help-page-view"; import {centerChildrenVertStyle} from "../../pure-react/style-def"; diff --git a/src/ui/react-view/fix-orphan-tasks.tsx b/src/ui/react-view/fix-orphan-tasks-view.tsx similarity index 96% rename from src/ui/react-view/fix-orphan-tasks.tsx rename to src/ui/react-view/fix-orphan-tasks-view.tsx index c7616a5..65bd80e 100644 --- a/src/ui/react-view/fix-orphan-tasks.tsx +++ b/src/ui/react-view/fix-orphan-tasks-view.tsx @@ -5,10 +5,10 @@ import {TwiceConfirmButton} from "../pure-react/view-template/twice-confirm-butt import {ObsidianIconView} from "./obsidian-icon-view"; import {getDefaultTableStyleGetters, OdaTaskSummaryCell} from "./task-table-view"; import {ProjectView} from "./project-view"; -import {ClickableWorkflowView} from "./workflow-filter"; +import {ClickableWorkflowView} from "./workflow-filter-view"; import {DataTable} from "../pure-react/view-template/data-table"; import React, {useState} from "react"; -import {ProjectFilterName_All} from "./project-filter"; +import {ProjectFilterName_All} from "./project-filter-view"; import {OdaPmTask} from "../../data-model/OdaPmTask"; import {warningColor} from "../pure-react/style-def"; @@ -103,7 +103,7 @@ export function OrphanTaskButtonAndPanel(props: { ; } -export function FixOrphanTasks({db}: { db?: OdaPmDb }) { +export function FixOrphanTasksView({db}: { db?: OdaPmDb }) { const orphanTasks = db?.orphanTasks || []; if (orphanTasks.length === 0) return <>; return diff --git a/src/ui/react-view/project-filter.tsx b/src/ui/react-view/project-filter-view.tsx similarity index 98% rename from src/ui/react-view/project-filter.tsx rename to src/ui/react-view/project-filter-view.tsx index 21b4f44..c6196a3 100644 --- a/src/ui/react-view/project-filter.tsx +++ b/src/ui/react-view/project-filter-view.tsx @@ -39,7 +39,7 @@ const AllProjectsOption = { optionValue: ProjectFilterOptionValue_All } as OptionValueType; -export function ProjectFilter(props: { +export function ProjectFilterView(props: { allProjects: OdaPmProject[], dropdownProjects: OdaPmProject[], handleSetDisplayNames: (names: string[]) => void, diff --git a/src/ui/react-view/react-manage-page.tsx b/src/ui/react-view/react-manage-page.tsx index 57889e3..1691816 100644 --- a/src/ui/react-view/react-manage-page.tsx +++ b/src/ui/react-view/react-manage-page.tsx @@ -8,11 +8,11 @@ import {Evt_DbReloaded, Evt_JumpTask, Evt_JumpWorkflow, Evt_ManagePageReRender} import {devLog} from "../../utils/env-util"; import {OdaPmTask} from "../../data-model/OdaPmTask"; import {TaskTableView} from "./task-table-view"; -import {WorkflowFilter} from "./workflow-filter"; -import {TagFilter} from "./tag-filter"; -import {ProjectFilter, ProjectFilterOptionValue_All} from "./project-filter"; +import {WorkflowFilterView} from "./workflow-filter-view"; +import {TagFilterView} from "./tag-filter-view"; +import {ProjectFilterOptionValue_All, ProjectFilterView} from "./project-filter-view"; import {HStack} from "../pure-react/view-template/h-stack"; -import {FixOrphanTasks} from "./fix-orphan-tasks"; +import {FixOrphanTasksView} from "./fix-orphan-tasks-view"; import {ModuleFilter} from "./module-filter"; function isInAnyProject(projectTask: I_OdaPmProjectTask, displayPrjNames: string[]) { @@ -231,25 +231,25 @@ export function ReactManagePage({eventCenter}: { return (
- - - - + + {getSettings()?.manage_page_header_as_module && } - void,