@vetta-org/theme-ui 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +735 -7
- package/src/action-approval/AppearanceActionPickerView.tsx +2 -78
- package/src/action-approval/AppearanceApprovalDrawerView.tsx +2 -9
- package/src/action-approval/BatchTasksApprovalFrameView.tsx +4 -1
- package/src/action-approval/GenericActionApprovalView.tsx +2 -9
- package/src/action-approval/ManageActionApprovalFrameView.tsx +4 -1
- package/src/action-approval/NavigationOpenApprovalView.tsx +2 -9
- package/src/action-approval/SchedulerActionApprovalDialogView.tsx +3 -1
- package/src/action-approval/SchedulerEditApprovalDrawerView.tsx +3 -10
- package/src/action-approval/index.ts +0 -1
- package/src/activity/ActivityPanel.tsx +13 -10
- package/src/activity/ActivityPanelFrame.test.tsx +32 -0
- package/src/activity/ActivityPanelFrame.tsx +3 -2
- package/src/activity/BackgroundTasksTabPanelView.tsx +1 -1
- package/src/activity/BrowserPanelView.tsx +48 -49
- package/src/activity/DebugTabPanelView.tsx +1 -1
- package/src/activity/MarkdownPreviewView.tsx +56 -59
- package/src/activity/PluginTabPickerView.tsx +5 -3
- package/src/activity/PortsTabPanelView.tsx +911 -0
- package/src/activity/ToolCallsSubTabView.tsx +1 -1
- package/src/activity/WorkflowTabPanelView.tsx +1 -1
- package/src/activity/index.ts +9 -0
- package/src/app/AppBackground.tsx +1 -1
- package/src/app/AppBootLoadingView.tsx +4 -2
- package/src/app-shell/DefaultWindowControls.tsx +1 -1
- package/src/app-shell/PageHeaderActionGroup.tsx +1 -1
- package/src/app-shell/PageHeaderContent.tsx +36 -7
- package/src/app-shell/PageHeaderFrame.tsx +15 -3
- package/src/app-shell/PageHeaderSidebarTrigger.tsx +1 -1
- package/src/app-shell/PageHeaderTitle.tsx +1 -1
- package/src/app-shell/WindowControlButton.tsx +1 -1
- package/src/app-shell/header-crowding.test.ts +62 -0
- package/src/app-shell/header-crowding.tsx +137 -0
- package/src/appearance/BackgroundImageFrame.tsx +1 -1
- package/src/appearance/CenterSliceImageFrame.tsx +1 -1
- package/src/appearance/CornerImageFrame.tsx +1 -1
- package/src/appearance/HorizontalSliceImageFrame.tsx +1 -1
- package/src/appearance/NineSliceImageFrame.tsx +1 -1
- package/src/appearance/ThemeSurface.tsx +1 -1
- package/src/batch-tasks/BatchProjectFoldersFieldView.tsx +2 -1
- package/src/batch-tasks/BatchTaskProjectActionsView.test.tsx +97 -0
- package/src/batch-tasks/BatchTaskProjectActionsView.tsx +45 -35
- package/src/batch-tasks/batchTaskUi.tsx +0 -29
- package/src/bottom-panel/BottomPanelView.test.tsx +43 -0
- package/src/bottom-panel/BottomPanelView.tsx +222 -0
- package/src/bottom-panel/index.ts +26 -0
- package/src/chat/AgentAvatarView.tsx +1 -1
- package/src/chat/AnnotationViews.tsx +107 -0
- package/src/chat/AskUserQuestionView.tsx +18 -11
- package/src/chat/AssistantMessageView.tsx +48 -13
- package/src/chat/AtPanelView.test.tsx +61 -0
- package/src/chat/AtPanelView.tsx +63 -38
- package/src/chat/BashTerminalCard.tsx +1 -2
- package/src/chat/ChatHeaderActionsView.tsx +74 -18
- package/src/chat/CompactionStepView.test.tsx +34 -0
- package/src/chat/CompactionStepView.tsx +85 -0
- package/src/chat/ExecutionModeSelectorView.tsx +20 -5
- package/src/chat/HeaderActionBarView.tsx +731 -0
- package/src/chat/HeaderActionOverflowMenu.tsx +137 -0
- package/src/chat/InlineModelPicker.test.tsx +81 -0
- package/src/chat/InlineModelPicker.tsx +201 -0
- package/src/chat/InlineTokenChip.tsx +2 -68
- package/src/chat/InputBarBackground.tsx +1 -1
- package/src/chat/InputBarPlaceholder.tsx +26 -3
- package/src/chat/LiveThinkingView.tsx +51 -37
- package/src/chat/MessageBoundaryViews.tsx +21 -0
- package/src/chat/MessageFeedContext.tsx +13 -5
- package/src/chat/MessageFeedLayoutView.tsx +28 -3
- package/src/chat/MessageFeedView.test.tsx +81 -0
- package/src/chat/MessageFeedView.tsx +72 -152
- package/src/chat/MessageInputView.tsx +1 -1
- package/src/chat/MessageLayoutView.tsx +1 -1
- package/src/chat/MessageSelectionContextMenuView.tsx +4 -1
- package/src/chat/MessageTimelineView.tsx +1 -1
- package/src/chat/MessageView.tsx +1 -1
- package/src/chat/MessageVisualView.tsx +1 -1
- package/src/chat/ModelConfiguration.tsx +283 -0
- package/src/chat/ModelSelectorTrigger.tsx +63 -0
- package/src/chat/ModelSelectorView.tsx +1037 -223
- package/src/chat/NewSession.ts +1 -37
- package/src/chat/NewSessionPicker.tsx +3 -2
- package/src/chat/ProjectSelectorView.tsx +3 -2
- package/src/chat/ReasoningStepSlider.tsx +61 -0
- package/src/chat/RemoteSessionBadgeView.tsx +24 -0
- package/src/chat/SkillPromptAreaView.tsx +5 -19
- package/src/chat/TeamMemberReplyCardView.test.tsx +33 -0
- package/src/chat/TeamMemberReplyCardView.tsx +133 -0
- package/src/chat/TextBlockView.tsx +7 -770
- package/src/chat/TodoProgress.tsx +25 -53
- package/src/chat/TodoStatusBarView.tsx +14 -5
- package/src/chat/UserMessageView.tsx +113 -33
- package/src/chat/header-action-narrow.test.ts +21 -0
- package/src/chat/header-action-narrow.ts +38 -0
- package/src/chat/index.ts +32 -27
- package/src/chat/markdown-link.ts +7 -279
- package/src/chat/send-button.css +4 -22
- package/src/chat/streaming-reveal.test.ts +218 -0
- package/src/chat/streaming-reveal.ts +13 -0
- package/src/file-explorer/ConfirmDeleteDialogView.tsx +2 -1
- package/src/file-explorer/FileContextMenuView.tsx +44 -11
- package/src/file-explorer/FileExplorerSettingsView.tsx +97 -0
- package/src/file-explorer/FileTreeCreateRow.tsx +1 -1
- package/src/file-explorer/FileTreeNodeView.tsx +59 -18
- package/src/file-explorer/FileTreeView.tsx +236 -129
- package/src/file-explorer/file-tree-dom.ts +23 -0
- package/src/file-explorer/file-tree-rows.test.ts +74 -0
- package/src/file-explorer/file-tree-rows.ts +168 -0
- package/src/file-explorer/index.ts +17 -0
- package/src/file-explorer/types.ts +3 -0
- package/src/file-explorer/useFileTreeMarqueeSelection.ts +24 -16
- package/src/file-preview/FilePreviewDialogView.tsx +2 -2
- package/src/file-preview/FilePreviewView.tsx +12 -2
- package/src/file-preview/TextFileEditorView.tsx +2 -1
- package/src/index.ts +1 -0
- package/src/knowledge/KnowledgeHowItWorksDialogView.tsx +1 -1
- package/src/layout/AppFrame.tsx +3 -2
- package/src/layout/MainContentFrame.tsx +7 -2
- package/src/layout/ResizeHandle.tsx +68 -17
- package/src/layout/SidebarDock.tsx +75 -19
- package/src/layout/SidebarOverlay.tsx +1 -1
- package/src/layout/index.ts +1 -1
- package/src/layout/resize-handle-axis.test.ts +51 -0
- package/src/live-indicators.test.ts +43 -0
- package/src/markdown/CodeBlock.tsx +123 -0
- package/src/markdown/InlineTokenChip.tsx +68 -0
- package/src/markdown/MarkdownContent.tsx +411 -0
- package/src/markdown/MarkdownImage.tsx +51 -0
- package/src/markdown/MathFormula.tsx +46 -0
- package/src/markdown/MermaidBlock.tsx +43 -0
- package/src/markdown/RichCodeBlock.tsx +127 -0
- package/src/markdown/SvgPreview.tsx +45 -0
- package/src/markdown/WebsiteIcon.tsx +94 -0
- package/src/markdown/builtin-renderers.tsx +43 -0
- package/src/markdown/definition.tsx +49 -0
- package/src/markdown/host.tsx +18 -0
- package/src/markdown/index.ts +11 -0
- package/src/markdown/inline-tokens.ts +187 -0
- package/src/markdown/markdown-link.ts +279 -0
- package/src/markdown/math-client.ts +116 -0
- package/src/markdown/math-render.ts +23 -0
- package/src/markdown/math-syntax.ts +80 -0
- package/src/markdown/math.worker.ts +16 -0
- package/src/markdown/nodes.ts +15 -0
- package/src/markdown/preview-policy.ts +43 -0
- package/src/markdown/rich-labels.ts +49 -0
- package/src/markdown/rich-syntax.ts +93 -0
- package/src/markdown/stable-blocks.test.ts +90 -0
- package/src/markdown/stable-blocks.ts +124 -0
- package/src/markdown/streaming-reveal.ts +297 -0
- package/src/markdown/streaming.test.ts +57 -0
- package/src/markdown/streaming.ts +211 -0
- package/src/markdown/use-render-snapshot.ts +24 -0
- package/src/markdown/use-rich-visibility.ts +24 -0
- package/src/overlays/CommandMenuRow.tsx +38 -9
- package/src/overlays/CommandMenuView.tsx +77 -117
- package/src/overlays/ConfirmDialogView.tsx +25 -20
- package/src/overlays/ReleaseNoteMarkdown.tsx +29 -0
- package/src/overlays/SplashOptionRow.tsx +46 -0
- package/src/overlays/SplashPanel.tsx +85 -0
- package/src/overlays/SplashParts.tsx +213 -0
- package/src/overlays/UpdateCheckerView.tsx +34 -18
- package/src/overlays/UpdateRestartDialogView.tsx +139 -54
- package/src/overlays/command-menu-types.ts +2 -0
- package/src/overlays/command-menu.css +1 -20
- package/src/overlays/index.ts +14 -1
- package/src/plugin-ui/index.ts +8 -0
- package/src/project/ConversationTagDotsView.tsx +1 -1
- package/src/project/ConversationTagEditorDialogView.tsx +4 -1
- package/src/project/DefaultConversationSectionView.tsx +4 -4
- package/src/project/DefaultSessionListView.tsx +5 -31
- package/src/project/DefaultSessionRowView.tsx +106 -55
- package/src/project/ManageSessionsSplashView.tsx +439 -0
- package/src/project/NewProjectDialogView.tsx +3 -10
- package/src/project/ProjectContextMenuView.tsx +30 -139
- package/src/project/ProjectDetailPageView.test.tsx +140 -0
- package/src/project/ProjectDetailPageView.tsx +372 -165
- package/src/project/ProjectGroupView.tsx +1 -1
- package/src/project/ProjectRowView.tsx +29 -12
- package/src/project/ProjectSessionsView.tsx +25 -47
- package/src/project/QuickScrollOverlay.tsx +1 -1
- package/src/project/SessionContextMenuView.tsx +15 -7
- package/src/project/SessionRowMoreButton.tsx +50 -0
- package/src/project/SessionRowView.tsx +106 -63
- package/src/project/SessionTitleMarquee.tsx +54 -0
- package/src/project/SidebarProjectDisclosure.tsx +60 -0
- package/src/project/SidebarProjectsSectionView.tsx +6 -1
- package/src/project/index.ts +12 -0
- package/src/project/session-row-transition.ts +9 -0
- package/src/project/types.ts +4 -2
- package/src/project/useActiveSessionAutoScroll.ts +10 -4
- package/src/registry.ts +0 -2
- package/src/scheduler/AutomationDetailPaneView.tsx +68 -0
- package/src/scheduler/AutomationPageView.tsx +118 -121
- package/src/scheduler/ExecutionHistoryView.tsx +7 -5
- package/src/scheduler/TaskListView.tsx +52 -201
- package/src/scheduler/index.ts +7 -12
- package/src/settings/AchievementSettingsView.tsx +0 -1
- package/src/settings/AppshotSettingsView.tsx +0 -1
- package/src/settings/BuiltinMcpSectionView.tsx +1 -1
- package/src/settings/EnvironmentGitRowView.tsx +156 -0
- package/src/settings/EnvironmentSettingsView.tsx +25 -3
- package/src/settings/GeneralSettingsView.tsx +17 -20
- package/src/settings/ImChannelGuideDialogView.tsx +2 -2
- package/src/settings/ImFeishuDialogView.tsx +1 -1
- package/src/settings/ImLegacyImportBannerView.tsx +1 -1
- package/src/settings/ImLogDrawerView.tsx +2 -1
- package/src/settings/JsonConfigInputView.tsx +171 -0
- package/src/settings/ModelsFetchedModelsDrawerView.tsx +292 -0
- package/src/settings/ModelsProvidersSectionView.tsx +26 -23
- package/src/settings/MotionSelect.tsx +9 -7
- package/src/settings/NotificationSettingsView.tsx +79 -0
- package/src/settings/PermissionsSettingsView.tsx +3 -7
- package/src/settings/PresetProviderModelsListView.tsx +141 -24
- package/src/settings/PresetProviderRowView.tsx +205 -182
- package/src/settings/ProxySettingsSectionView.tsx +182 -0
- package/src/settings/QrBindDialogView.tsx +1 -1
- package/src/settings/QuickPanelSettingsSectionView.tsx +0 -2
- package/src/settings/RemoteMcpSectionView.tsx +1 -1
- package/src/settings/SettingChrome.tsx +2 -2
- package/src/settings/SettingsAiAssistButtonView.tsx +9 -119
- package/src/settings/SettingsFormFields.tsx +4 -7
- package/src/settings/SettingsSidebarView.tsx +64 -3
- package/src/settings/ShortcutRecorderView.test.tsx +108 -0
- package/src/settings/ShortcutRecorderView.tsx +15 -9
- package/src/settings/ShortcutsSettingsView.tsx +1 -1
- package/src/settings/SpaceEditorDialogView.tsx +120 -0
- package/src/settings/SpacesSettingsView.tsx +105 -0
- package/src/settings/WebhookEndpointListView.tsx +4 -5
- package/src/settings/index.ts +41 -29
- package/src/shared/ActivityStatusDot.tsx +69 -0
- package/src/shared/AvatarStackView.tsx +13 -13
- package/src/shared/BotAvatar.tsx +11 -9
- package/src/shared/CodeBlockCopyButton.tsx +1 -1
- package/src/shared/ContextMenuView.tsx +4 -11
- package/src/shared/MarkdownTable.tsx +2 -2
- package/src/shared/SyntaxHighlightedCode.tsx +0 -0
- package/src/shared/TabBar.outline.test.tsx +59 -0
- package/src/shared/TabBar.tsx +22 -17
- package/src/shared/VettaKbd.test.tsx +52 -0
- package/src/shared/VettaKbd.tsx +81 -0
- package/src/shared/connected-tab-outline.test.ts +2 -2
- package/src/shared/connected-tab-outline.ts +2 -1
- package/src/shared/index.ts +6 -0
- package/src/shared/kbd-keys.test.ts +61 -0
- package/src/shared/kbd-keys.ts +253 -0
- package/src/shared/provider-icon/icons.ts +4 -2
- package/src/shared/provider-icon/index.tsx +1 -1
- package/src/shared/provider-icon/magpie.svg +1 -0
- package/src/sidebar/AddProjectMenuTriggerView.tsx +25 -15
- package/src/sidebar/DefaultSidebar.tsx +3 -1
- package/src/sidebar/MessageCenterDialogView.tsx +3 -2
- package/src/sidebar/MessageCenterEmptyState.tsx +1 -1
- package/src/sidebar/MessageCenterTabs.tsx +1 -1
- package/src/sidebar/MessageCenterToolbarButton.tsx +1 -1
- package/src/sidebar/MessageCenterTriggerView.tsx +2 -2
- package/src/sidebar/ProjectsPanelEmptyState.tsx +26 -7
- package/src/sidebar/SessionStatusIcon.tsx +16 -1
- package/src/sidebar/SettingsMenuThemeSection.tsx +1 -1
- package/src/sidebar/SettingsMenuTriggerView.test.tsx +42 -0
- package/src/sidebar/SettingsMenuTriggerView.tsx +28 -50
- package/src/sidebar/ShowMoreSessionsButton.tsx +1 -1
- package/src/sidebar/SidebarFilterSelectView.tsx +8 -16
- package/src/sidebar/SidebarNavBadgeView.tsx +1 -1
- package/src/sidebar/SidebarNavIcon.tsx +1 -1
- package/src/sidebar/SidebarNavItemButton.tsx +1 -1
- package/src/sidebar/SidebarNavMorePanel.tsx +19 -7
- package/src/sidebar/SidebarNavigation.tsx +24 -15
- package/src/sidebar/SidebarPanel.tsx +11 -2
- package/src/sidebar/SidebarSectionTriggerLabel.tsx +20 -0
- package/src/sidebar/SidebarTopBar.tsx +10 -7
- package/src/sidebar/WaitingPulseBadge.tsx +19 -0
- package/src/sidebar/index.ts +1 -16
- package/src/skills/index.ts +0 -19
- package/src/skills/skill-icon.tsx +4 -8
- package/src/styles.css +24 -6
- package/src/chat/DefaultSceneCarousel.tsx +0 -113
- package/src/chat/SceneCard.tsx +0 -138
- package/src/scheduler/HistoryDrawerView.tsx +0 -149
- package/src/scheduler/TaskFormDialogView.tsx +0 -60
- package/src/settings/SubscriptionActionsView.tsx +0 -63
- package/src/settings/SubscriptionCardsView.tsx +0 -212
- package/src/settings/TeamDetailView.tsx +0 -148
- package/src/settings/TeamDialogsView.tsx +0 -151
- package/src/settings/TeamListView.tsx +0 -57
- package/src/settings/TeamSettingsView.tsx +0 -51
- package/src/settings/TokenActivityChartView.tsx +0 -286
- package/src/settings/UsageStatsView.tsx +0 -101
- package/src/settings/shouldCloseEmptyApiKeyEditor.test.ts +0 -135
- package/src/settings/shouldCloseEmptyApiKeyEditor.ts +0 -40
- package/src/settings/token-activity.test.ts +0 -195
- package/src/settings/token-activity.ts +0 -320
- package/src/sidebar/AddProjectMenuItem.tsx +0 -21
- package/src/sidebar/AddProjectMenuPopoverView.tsx +0 -52
- package/src/sidebar/NotificationMessageListView.tsx +0 -136
- package/src/sidebar/SettingsMenuAccountSection.tsx +0 -32
- package/src/sidebar/SettingsMenuQuotaSection.tsx +0 -45
- package/src/skills/SceneCardView.tsx +0 -194
- package/src/skills/SkillCardView.tsx +0 -186
- package/src/skills/SkillDetailDialogView.tsx +0 -138
- package/src/skills/SkillTagGroupView.tsx +0 -56
- package/src/skills/SkillToggleSwitch.tsx +0 -31
|
@@ -1,219 +1,70 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { cn } from "@vetta-org/ui";
|
|
2
|
+
import type { JSX } from "react";
|
|
3
|
+
|
|
4
|
+
/** active 已开启、running 运行中、paused 已暂停、suspended 目标失效而暂停、done 一次性任务已完成。 */
|
|
5
|
+
export type TaskListItemTone = "active" | "running" | "paused" | "suspended" | "done";
|
|
3
6
|
|
|
4
7
|
export interface TaskListItemView {
|
|
5
|
-
readonly cron: string;
|
|
6
|
-
readonly enabled: boolean;
|
|
7
|
-
readonly executionModeLabel: string;
|
|
8
8
|
readonly id: string;
|
|
9
|
-
readonly isOnce: boolean;
|
|
10
|
-
readonly isRunning: boolean;
|
|
11
|
-
readonly isSelected: boolean;
|
|
12
|
-
readonly lastRunLabel: string;
|
|
13
|
-
readonly lastRunStatus: "success" | "failed" | null;
|
|
14
9
|
readonly name: string;
|
|
15
|
-
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export interface TaskListViewLabels {
|
|
21
|
-
readonly delete: string;
|
|
22
|
-
readonly edit: string;
|
|
23
|
-
readonly enable: string;
|
|
24
|
-
readonly failed: string;
|
|
25
|
-
readonly once: string;
|
|
26
|
-
readonly pause: string;
|
|
27
|
-
readonly runNow: string;
|
|
28
|
-
readonly success: string;
|
|
10
|
+
/** 第二行,如「每天 9:00 · 下次运行 18 小时后」。 */
|
|
11
|
+
readonly subtitle: string;
|
|
12
|
+
readonly tone: TaskListItemTone;
|
|
13
|
+
readonly isSelected: boolean;
|
|
29
14
|
}
|
|
30
15
|
|
|
31
16
|
export interface TaskListViewProps {
|
|
32
17
|
readonly items: readonly TaskListItemView[];
|
|
33
|
-
|
|
34
|
-
readonly
|
|
35
|
-
readonly onEditTask: (taskId: string) => void;
|
|
36
|
-
readonly onRunTask: (taskId: string) => void;
|
|
18
|
+
/** 筛选或搜索后为空时的提示;无任务时由页面展示推荐模板,传 undefined 即不显示。 */
|
|
19
|
+
readonly emptyLabel?: string;
|
|
37
20
|
readonly onSelectTask: (id: string) => void;
|
|
38
|
-
readonly onToggleTask: (taskId: string) => void;
|
|
39
21
|
}
|
|
40
22
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
23
|
+
const TONE_ICON: Record<TaskListItemTone, string> = {
|
|
24
|
+
active: "icon-[mdi--circle-outline] text-primary",
|
|
25
|
+
running: "icon-[mdi--progress-clock] text-primary",
|
|
26
|
+
paused: "icon-[mdi--pause-circle-outline] text-muted-foreground/60",
|
|
27
|
+
suspended: "icon-[mdi--alert-circle-outline] text-amber-500",
|
|
28
|
+
done: "icon-[mdi--check-circle-outline] text-muted-foreground/60",
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** 单行列表:状态圆点 + 名称 + 计划摘要。只有背景色过渡,没有位移或缩放动画。 */
|
|
32
|
+
export function TaskListView({ items, emptyLabel, onSelectTask }: TaskListViewProps): JSX.Element {
|
|
33
|
+
if (items.length === 0) {
|
|
34
|
+
return emptyLabel ? (
|
|
35
|
+
<p className="px-3 py-8 text-center text-[13px] text-muted-foreground/60">{emptyLabel}</p>
|
|
36
|
+
) : (
|
|
37
|
+
<></>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
50
40
|
return (
|
|
51
|
-
<
|
|
52
|
-
className="grid grid-cols-3 gap-4"
|
|
53
|
-
initial="hidden"
|
|
54
|
-
animate="show"
|
|
55
|
-
variants={{
|
|
56
|
-
hidden: {},
|
|
57
|
-
show: { transition: { staggerChildren: 0.05 } },
|
|
58
|
-
}}
|
|
59
|
-
>
|
|
41
|
+
<ul className="flex flex-col gap-1">
|
|
60
42
|
{items.map((item) => (
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
<span className="relative inline-flex h-2 w-2">
|
|
78
|
-
{item.isRunning && (
|
|
79
|
-
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-60" />
|
|
43
|
+
<li key={item.id}>
|
|
44
|
+
<button
|
|
45
|
+
type="button"
|
|
46
|
+
aria-current={item.isSelected ? "true" : undefined}
|
|
47
|
+
onClick={() => onSelectTask(item.id)}
|
|
48
|
+
className={cn(
|
|
49
|
+
"flex w-full items-start gap-3 rounded-lg px-3 py-2.5 text-left transition-colors",
|
|
50
|
+
item.isSelected ? "bg-primary/10" : "hover:bg-accent/50",
|
|
51
|
+
)}
|
|
52
|
+
>
|
|
53
|
+
<span aria-hidden="true" className={cn(TONE_ICON[item.tone], "mt-0.5 h-4 w-4 shrink-0")} />
|
|
54
|
+
<span className="min-w-0 flex-1">
|
|
55
|
+
<span
|
|
56
|
+
className={cn(
|
|
57
|
+
"block truncate text-[14px]",
|
|
58
|
+
item.tone === "paused" || item.tone === "done" ? "text-muted-foreground" : "text-foreground",
|
|
80
59
|
)}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
item.isRunning ? "bg-emerald-500" : item.enabled ? "bg-primary" : "bg-muted-foreground/40"
|
|
84
|
-
}`}
|
|
85
|
-
/>
|
|
60
|
+
>
|
|
61
|
+
{item.name}
|
|
86
62
|
</span>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
{item.statusLabel}
|
|
92
|
-
{item.isOnce && ` · ${labels.once}`}
|
|
93
|
-
</p>
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
<div
|
|
97
|
-
className={`flex items-center gap-0.5 transition-opacity duration-200 ${
|
|
98
|
-
item.isSelected ? "opacity-100" : "opacity-0 group-hover:opacity-100"
|
|
99
|
-
}`}
|
|
100
|
-
>
|
|
101
|
-
<ActionButton
|
|
102
|
-
icon="icon-[mdi--play]"
|
|
103
|
-
title={labels.runNow}
|
|
104
|
-
onClick={(event) => {
|
|
105
|
-
event.stopPropagation();
|
|
106
|
-
onRunTask(item.id);
|
|
107
|
-
}}
|
|
108
|
-
/>
|
|
109
|
-
<ActionButton
|
|
110
|
-
icon={item.enabled ? "icon-[mdi--pause]" : "icon-[mdi--play-outline]"}
|
|
111
|
-
title={item.enabled ? labels.pause : labels.enable}
|
|
112
|
-
onClick={(event) => {
|
|
113
|
-
event.stopPropagation();
|
|
114
|
-
onToggleTask(item.id);
|
|
115
|
-
}}
|
|
116
|
-
/>
|
|
117
|
-
<ActionButton
|
|
118
|
-
icon="icon-[mdi--pencil-outline]"
|
|
119
|
-
title={labels.edit}
|
|
120
|
-
onClick={(event) => {
|
|
121
|
-
event.stopPropagation();
|
|
122
|
-
onEditTask(item.id);
|
|
123
|
-
}}
|
|
124
|
-
/>
|
|
125
|
-
<ActionButton
|
|
126
|
-
icon="icon-[mdi--delete-outline]"
|
|
127
|
-
title={labels.delete}
|
|
128
|
-
variant="danger"
|
|
129
|
-
onClick={(event) => {
|
|
130
|
-
event.stopPropagation();
|
|
131
|
-
onDeleteTask(item.id);
|
|
132
|
-
}}
|
|
133
|
-
/>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
|
|
137
|
-
<div className="relative mt-4 flex items-center gap-2 rounded-xl border border-border/30 bg-background/40 px-3 py-2.5">
|
|
138
|
-
<div className="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-primary/10 ring-1 ring-inset ring-primary/15">
|
|
139
|
-
<span className="icon-[mdi--clock-time-eight-outline] h-3.5 w-3.5 text-primary" />
|
|
140
|
-
</div>
|
|
141
|
-
<div className="min-w-0 flex-1">
|
|
142
|
-
<p className="truncate text-[12px] font-medium text-foreground">{item.scheduleLabel}</p>
|
|
143
|
-
<p className="mt-0.5 truncate font-mono text-[10px] text-muted-foreground/50">{item.cron}</p>
|
|
144
|
-
</div>
|
|
145
|
-
</div>
|
|
146
|
-
|
|
147
|
-
<div className="relative mt-3 flex-1">
|
|
148
|
-
<p className="line-clamp-2 text-[12px] leading-relaxed text-muted-foreground/70">{item.prompt}</p>
|
|
149
|
-
</div>
|
|
150
|
-
|
|
151
|
-
<div className="relative mt-4 flex flex-wrap items-center gap-1.5 border-t border-border/30 pt-3 text-[11px]">
|
|
152
|
-
<MetaPill icon="icon-[mdi--shield-outline]" text={item.executionModeLabel} />
|
|
153
|
-
<div className="ml-auto flex items-center gap-1.5">
|
|
154
|
-
{item.lastRunStatus && (
|
|
155
|
-
<span
|
|
156
|
-
className={`flex h-5 items-center gap-1 rounded-full px-2 text-[10px] font-medium ${
|
|
157
|
-
item.lastRunStatus === "success"
|
|
158
|
-
? "bg-emerald-500/10 text-emerald-400"
|
|
159
|
-
: "bg-destructive/10 text-destructive"
|
|
160
|
-
}`}
|
|
161
|
-
>
|
|
162
|
-
<span
|
|
163
|
-
className={`h-3 w-3 ${
|
|
164
|
-
item.lastRunStatus === "success" ? "icon-[mdi--check-circle]" : "icon-[mdi--alert-circle]"
|
|
165
|
-
}`}
|
|
166
|
-
/>
|
|
167
|
-
{item.lastRunStatus === "success" ? labels.success : labels.failed}
|
|
168
|
-
</span>
|
|
169
|
-
)}
|
|
170
|
-
<span className="flex items-center gap-1 text-muted-foreground/50">
|
|
171
|
-
<span className="icon-[mdi--history] h-3 w-3" />
|
|
172
|
-
{item.lastRunLabel}
|
|
173
|
-
</span>
|
|
174
|
-
</div>
|
|
175
|
-
</div>
|
|
176
|
-
</motion.div>
|
|
63
|
+
<span className="mt-0.5 block truncate text-[12px] text-muted-foreground/70">{item.subtitle}</span>
|
|
64
|
+
</span>
|
|
65
|
+
</button>
|
|
66
|
+
</li>
|
|
177
67
|
))}
|
|
178
|
-
</
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function MetaPill({ icon, text }: { readonly icon: string; readonly text: string }): JSX.Element {
|
|
183
|
-
return (
|
|
184
|
-
<span className="flex h-5 items-center gap-1 rounded-full bg-accent/40 px-2 text-[10px] text-muted-foreground/70">
|
|
185
|
-
<span className={`${icon} h-3 w-3 opacity-70`} />
|
|
186
|
-
<span className="max-w-[110px] truncate">{text}</span>
|
|
187
|
-
</span>
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function ActionButton({
|
|
192
|
-
icon,
|
|
193
|
-
title,
|
|
194
|
-
variant,
|
|
195
|
-
onClick,
|
|
196
|
-
}: {
|
|
197
|
-
readonly icon: string;
|
|
198
|
-
readonly title: string;
|
|
199
|
-
readonly variant?: "danger";
|
|
200
|
-
readonly onClick: (event: MouseEvent) => void;
|
|
201
|
-
}): JSX.Element {
|
|
202
|
-
return (
|
|
203
|
-
<motion.button
|
|
204
|
-
type="button"
|
|
205
|
-
title={title}
|
|
206
|
-
onClick={onClick}
|
|
207
|
-
whileHover={{ scale: 1.04 }}
|
|
208
|
-
whileTap={{ scale: 0.94 }}
|
|
209
|
-
transition={{ type: "spring", stiffness: 400, damping: 22 }}
|
|
210
|
-
className={`flex h-7 w-7 items-center justify-center rounded-lg transition-colors duration-150 ${
|
|
211
|
-
variant === "danger"
|
|
212
|
-
? "text-muted-foreground/60 hover:bg-destructive/10 hover:text-destructive"
|
|
213
|
-
: "text-muted-foreground/60 hover:bg-primary/10 hover:text-primary"
|
|
214
|
-
}`}
|
|
215
|
-
>
|
|
216
|
-
<span className={`${icon} text-[14px]`} />
|
|
217
|
-
</motion.button>
|
|
68
|
+
</ul>
|
|
218
69
|
);
|
|
219
70
|
}
|
package/src/scheduler/index.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export type {
|
|
2
|
+
AutomationDetailPaneViewProps,
|
|
3
|
+
AutomationDetailStatusTone,
|
|
4
|
+
} from "./AutomationDetailPaneView";
|
|
5
|
+
export { AutomationDetailPaneView } from "./AutomationDetailPaneView";
|
|
6
|
+
export type {
|
|
7
|
+
AutomationFilterTab,
|
|
2
8
|
AutomationPageViewLabels,
|
|
3
9
|
AutomationPageViewProps,
|
|
4
10
|
AutomationRecommendationItem,
|
|
@@ -12,19 +18,8 @@ export type {
|
|
|
12
18
|
} from "./ExecutionHistoryView";
|
|
13
19
|
export { ExecutionHistoryView } from "./ExecutionHistoryView";
|
|
14
20
|
export type {
|
|
15
|
-
|
|
16
|
-
HistoryDrawerViewLabels,
|
|
17
|
-
HistoryDrawerViewProps,
|
|
18
|
-
} from "./HistoryDrawerView";
|
|
19
|
-
export { HistoryDrawerView } from "./HistoryDrawerView";
|
|
20
|
-
export type {
|
|
21
|
-
TaskFormDialogViewLabels,
|
|
22
|
-
TaskFormDialogViewProps,
|
|
23
|
-
} from "./TaskFormDialogView";
|
|
24
|
-
export { TaskFormDialogView } from "./TaskFormDialogView";
|
|
25
|
-
export type {
|
|
21
|
+
TaskListItemTone,
|
|
26
22
|
TaskListItemView,
|
|
27
|
-
TaskListViewLabels,
|
|
28
23
|
TaskListViewProps,
|
|
29
24
|
} from "./TaskListView";
|
|
30
25
|
export { TaskListView } from "./TaskListView";
|
|
@@ -143,7 +143,7 @@ function BuiltinMcpCard({
|
|
|
143
143
|
<div className="mt-auto flex justify-end pt-1">
|
|
144
144
|
{added ? (
|
|
145
145
|
discover ? (
|
|
146
|
-
<Button variant="
|
|
146
|
+
<Button variant="field" disabled className="opacity-80">
|
|
147
147
|
<span className="icon-[mdi--check] h-3.5 w-3.5 text-emerald-400" />
|
|
148
148
|
{labels.added}
|
|
149
149
|
</Button>
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import { SettingRow } from "./SettingChrome";
|
|
3
|
+
|
|
4
|
+
export type EnvironmentGitInstallGuideView =
|
|
5
|
+
| { readonly kind: "xcode-clt" }
|
|
6
|
+
| { readonly kind: "managed-download"; readonly version: string }
|
|
7
|
+
| { readonly kind: "package-manager"; readonly command: string | null }
|
|
8
|
+
| { readonly kind: "manual" };
|
|
9
|
+
|
|
10
|
+
export interface EnvironmentGitStatusView {
|
|
11
|
+
readonly available: boolean;
|
|
12
|
+
readonly source?: "managed" | "system";
|
|
13
|
+
readonly version?: string;
|
|
14
|
+
readonly install: EnvironmentGitInstallGuideView;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface EnvironmentGitViewLabels {
|
|
18
|
+
readonly copied: string;
|
|
19
|
+
readonly copy: string;
|
|
20
|
+
readonly description: string;
|
|
21
|
+
readonly detecting: string;
|
|
22
|
+
readonly download: string;
|
|
23
|
+
readonly installManaged: string;
|
|
24
|
+
readonly installXcode: string;
|
|
25
|
+
readonly installing: string;
|
|
26
|
+
readonly managedHint: string;
|
|
27
|
+
readonly managedSuffix: string;
|
|
28
|
+
readonly manualHint: string;
|
|
29
|
+
readonly missing: string;
|
|
30
|
+
readonly packageManagerFallback: string;
|
|
31
|
+
readonly packageManagerHint: string;
|
|
32
|
+
readonly ready: string;
|
|
33
|
+
readonly redetect: string;
|
|
34
|
+
readonly xcodeHint: string;
|
|
35
|
+
readonly xcodeLaunched: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface EnvironmentGitRowViewProps {
|
|
39
|
+
readonly busy: "detect" | "install" | null;
|
|
40
|
+
readonly commandCopied: boolean;
|
|
41
|
+
readonly installerLaunched: boolean;
|
|
42
|
+
readonly labels: EnvironmentGitViewLabels;
|
|
43
|
+
readonly onCopyCommand: (command: string) => void;
|
|
44
|
+
readonly onInstall: () => void;
|
|
45
|
+
readonly onOpenDownload: () => void;
|
|
46
|
+
readonly onRedetect: () => void;
|
|
47
|
+
readonly status: EnvironmentGitStatusView;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const BUTTON_CLASS =
|
|
51
|
+
"flex items-center gap-1.5 rounded-lg border border-input bg-secondary px-3 py-1.5 text-[12px] text-foreground transition-colors hover:bg-accent disabled:opacity-50";
|
|
52
|
+
const LINK_CLASS = "text-primary underline-offset-2 hover:underline";
|
|
53
|
+
|
|
54
|
+
function GitInstallHint({
|
|
55
|
+
commandCopied,
|
|
56
|
+
installerLaunched,
|
|
57
|
+
labels,
|
|
58
|
+
onCopyCommand,
|
|
59
|
+
onOpenDownload,
|
|
60
|
+
status,
|
|
61
|
+
}: EnvironmentGitRowViewProps): JSX.Element {
|
|
62
|
+
const guide = status.install;
|
|
63
|
+
if (guide.kind === "xcode-clt") {
|
|
64
|
+
return <p>{installerLaunched ? labels.xcodeLaunched : labels.xcodeHint}</p>;
|
|
65
|
+
}
|
|
66
|
+
if (guide.kind === "managed-download") {
|
|
67
|
+
return (
|
|
68
|
+
<p>
|
|
69
|
+
{labels.managedHint}{" "}
|
|
70
|
+
<button type="button" className={LINK_CLASS} onClick={onOpenDownload}>
|
|
71
|
+
{labels.download}
|
|
72
|
+
</button>
|
|
73
|
+
</p>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
if (guide.kind === "package-manager" && guide.command) {
|
|
77
|
+
const { command } = guide;
|
|
78
|
+
return (
|
|
79
|
+
<div className="space-y-2">
|
|
80
|
+
<p>{labels.packageManagerHint}</p>
|
|
81
|
+
<div className="flex items-center gap-2">
|
|
82
|
+
<code className="min-w-0 flex-1 truncate rounded-md bg-muted px-2.5 py-1.5 font-mono text-[12px] text-foreground">
|
|
83
|
+
{command}
|
|
84
|
+
</code>
|
|
85
|
+
<button type="button" className={BUTTON_CLASS} onClick={() => onCopyCommand(command)}>
|
|
86
|
+
<span className="icon-[mdi--content-copy] h-3.5 w-3.5 text-muted-foreground" />
|
|
87
|
+
{commandCopied ? labels.copied : labels.copy}
|
|
88
|
+
</button>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
return (
|
|
94
|
+
<p>
|
|
95
|
+
{guide.kind === "package-manager" ? labels.packageManagerFallback : labels.manualHint}{" "}
|
|
96
|
+
<button type="button" className={LINK_CLASS} onClick={onOpenDownload}>
|
|
97
|
+
{labels.download}
|
|
98
|
+
</button>
|
|
99
|
+
</p>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** Git 行:可用时显示版本与来源,缺失时给出当前平台的安装引导。 */
|
|
104
|
+
export function EnvironmentGitRowView(props: EnvironmentGitRowViewProps): JSX.Element {
|
|
105
|
+
const { busy, labels, onInstall, onRedetect, status } = props;
|
|
106
|
+
const guide = status.install;
|
|
107
|
+
const installLabel =
|
|
108
|
+
guide.kind === "xcode-clt" ? labels.installXcode : guide.kind === "managed-download" ? labels.installManaged : null;
|
|
109
|
+
const readyText = [labels.ready, status.version, status.source === "managed" ? labels.managedSuffix : null]
|
|
110
|
+
.filter(Boolean)
|
|
111
|
+
.join(" · ");
|
|
112
|
+
|
|
113
|
+
return (
|
|
114
|
+
<>
|
|
115
|
+
<SettingRow title="Git" description={labels.description} border={false}>
|
|
116
|
+
<div className="flex items-center gap-3">
|
|
117
|
+
<div className="flex items-center gap-1.5">
|
|
118
|
+
<span
|
|
119
|
+
className={
|
|
120
|
+
status.available
|
|
121
|
+
? "icon-[mdi--check-circle] h-4 w-4 text-emerald-500"
|
|
122
|
+
: "icon-[mdi--alert-circle-outline] h-4 w-4 text-amber-500"
|
|
123
|
+
}
|
|
124
|
+
/>
|
|
125
|
+
<span className={`text-[12px] ${status.available ? "text-emerald-500" : "text-amber-500"}`}>
|
|
126
|
+
{status.available ? readyText : busy === "install" ? labels.installing : labels.missing}
|
|
127
|
+
</span>
|
|
128
|
+
</div>
|
|
129
|
+
{!status.available && installLabel && (
|
|
130
|
+
<button type="button" disabled={busy !== null} onClick={onInstall} className={BUTTON_CLASS}>
|
|
131
|
+
{busy === "install" ? (
|
|
132
|
+
<span className="icon-[mdi--loading] h-3.5 w-3.5 animate-spin" />
|
|
133
|
+
) : (
|
|
134
|
+
<span className="icon-[mdi--download-outline] h-3.5 w-3.5 text-muted-foreground" />
|
|
135
|
+
)}
|
|
136
|
+
{installLabel}
|
|
137
|
+
</button>
|
|
138
|
+
)}
|
|
139
|
+
{!status.available && (
|
|
140
|
+
<button type="button" disabled={busy !== null} onClick={onRedetect} className={BUTTON_CLASS}>
|
|
141
|
+
<span
|
|
142
|
+
className={`icon-[mdi--refresh] h-3.5 w-3.5 text-muted-foreground ${busy === "detect" ? "animate-spin" : ""}`}
|
|
143
|
+
/>
|
|
144
|
+
{busy === "detect" ? labels.detecting : labels.redetect}
|
|
145
|
+
</button>
|
|
146
|
+
)}
|
|
147
|
+
</div>
|
|
148
|
+
</SettingRow>
|
|
149
|
+
{!status.available && (
|
|
150
|
+
<div className="px-5 pb-4 text-[12px] leading-relaxed text-muted-foreground">
|
|
151
|
+
<GitInstallHint {...props} />
|
|
152
|
+
</div>
|
|
153
|
+
)}
|
|
154
|
+
</>
|
|
155
|
+
);
|
|
156
|
+
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import { Button } from "@vetta-org/ui";
|
|
1
2
|
import type { JSX, ReactNode } from "react";
|
|
3
|
+
import {
|
|
4
|
+
type EnvironmentGitRowViewProps,
|
|
5
|
+
EnvironmentGitRowView,
|
|
6
|
+
type EnvironmentGitStatusView,
|
|
7
|
+
type EnvironmentGitViewLabels,
|
|
8
|
+
} from "./EnvironmentGitRowView";
|
|
2
9
|
import { SettingRow, SettingSection, type SettingSectionMeta } from "./SettingChrome";
|
|
3
10
|
|
|
4
11
|
export type EnvironmentRuntimeKindView = "node" | "python";
|
|
@@ -14,6 +21,7 @@ export interface EnvironmentSettingsViewLabels {
|
|
|
14
21
|
readonly fetch: string;
|
|
15
22
|
readonly fetchAgain: string;
|
|
16
23
|
readonly fetching: string;
|
|
24
|
+
readonly git: EnvironmentGitViewLabels;
|
|
17
25
|
readonly loading: string;
|
|
18
26
|
readonly notReady: string;
|
|
19
27
|
readonly npmRegistry: string;
|
|
@@ -26,6 +34,7 @@ export interface EnvironmentSettingsViewLabels {
|
|
|
26
34
|
readonly sections: {
|
|
27
35
|
readonly mirrors: string;
|
|
28
36
|
readonly runtime: string;
|
|
37
|
+
readonly tools: string;
|
|
29
38
|
};
|
|
30
39
|
readonly title: string;
|
|
31
40
|
}
|
|
@@ -33,6 +42,8 @@ export interface EnvironmentSettingsViewLabels {
|
|
|
33
42
|
export interface EnvironmentSettingsViewProps {
|
|
34
43
|
readonly busy: EnvironmentRuntimeKindView | null;
|
|
35
44
|
readonly error: string | null;
|
|
45
|
+
/** Git 行的交互状态与回调;状态与文案分别来自 status.git 与 labels.git。 */
|
|
46
|
+
readonly git: Omit<EnvironmentGitRowViewProps, "labels" | "status">;
|
|
36
47
|
readonly headerAction?: ReactNode;
|
|
37
48
|
readonly labels: EnvironmentSettingsViewLabels;
|
|
38
49
|
readonly mirrors?: {
|
|
@@ -41,10 +52,12 @@ export interface EnvironmentSettingsViewProps {
|
|
|
41
52
|
} | null;
|
|
42
53
|
readonly onReinstall: (kind: EnvironmentRuntimeKindView) => void;
|
|
43
54
|
readonly runtimeSection: SettingSectionMeta;
|
|
55
|
+
readonly toolsSection: SettingSectionMeta;
|
|
44
56
|
readonly mirrorsSection: SettingSectionMeta;
|
|
45
57
|
readonly status: {
|
|
46
58
|
readonly node: EnvironmentRuntimeStatusView;
|
|
47
59
|
readonly python: EnvironmentRuntimeStatusView;
|
|
60
|
+
readonly git: EnvironmentGitStatusView;
|
|
48
61
|
} | null;
|
|
49
62
|
}
|
|
50
63
|
|
|
@@ -94,11 +107,10 @@ function RuntimeCard({
|
|
|
94
107
|
<span className={`text-[12px] ${stateClass}`}>{stateText}</span>
|
|
95
108
|
</div>
|
|
96
109
|
{status.supported && (
|
|
97
|
-
<
|
|
110
|
+
<Button variant="field"
|
|
98
111
|
type="button"
|
|
99
112
|
disabled={busy}
|
|
100
113
|
onClick={onReinstall}
|
|
101
|
-
className="flex items-center gap-1.5 rounded-lg border border-input bg-secondary px-3 py-1.5 text-[12px] text-foreground transition-colors hover:bg-accent disabled:opacity-50"
|
|
102
114
|
>
|
|
103
115
|
{busy ? (
|
|
104
116
|
<span className="icon-[mdi--loading] h-3.5 w-3.5 animate-spin" />
|
|
@@ -106,7 +118,7 @@ function RuntimeCard({
|
|
|
106
118
|
<span className="icon-[mdi--download-outline] h-3.5 w-3.5 text-muted-foreground" />
|
|
107
119
|
)}
|
|
108
120
|
{status.ready ? labels.fetchAgain : labels.fetch}
|
|
109
|
-
</
|
|
121
|
+
</Button>
|
|
110
122
|
)}
|
|
111
123
|
</div>
|
|
112
124
|
</SettingRow>
|
|
@@ -116,6 +128,7 @@ function RuntimeCard({
|
|
|
116
128
|
export function EnvironmentSettingsView({
|
|
117
129
|
busy,
|
|
118
130
|
error,
|
|
131
|
+
git,
|
|
119
132
|
headerAction,
|
|
120
133
|
labels,
|
|
121
134
|
mirrors,
|
|
@@ -123,6 +136,7 @@ export function EnvironmentSettingsView({
|
|
|
123
136
|
onReinstall,
|
|
124
137
|
runtimeSection,
|
|
125
138
|
status,
|
|
139
|
+
toolsSection,
|
|
126
140
|
}: EnvironmentSettingsViewProps): JSX.Element {
|
|
127
141
|
return (
|
|
128
142
|
<div className="mx-auto w-full max-w-[680px] px-8 pt-2 pb-4">
|
|
@@ -163,6 +177,14 @@ export function EnvironmentSettingsView({
|
|
|
163
177
|
)}
|
|
164
178
|
</SettingSection>
|
|
165
179
|
|
|
180
|
+
<SettingSection title={labels.sections.tools} section={toolsSection}>
|
|
181
|
+
{status ? (
|
|
182
|
+
<EnvironmentGitRowView {...git} labels={labels.git} status={status.git} />
|
|
183
|
+
) : (
|
|
184
|
+
<div className="px-5 py-4 text-[12px] text-muted-foreground">{labels.loading}</div>
|
|
185
|
+
)}
|
|
186
|
+
</SettingSection>
|
|
187
|
+
|
|
166
188
|
<SettingSection title={labels.sections.mirrors} section={mirrorsSection}>
|
|
167
189
|
<SettingRow title={labels.npmRegistry} description={labels.npmRegistryDescription} border>
|
|
168
190
|
<span className="text-[12px] text-muted-foreground">{mirrors?.npmRegistry ?? "—"}</span>
|