Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@tauri-apps/plugin-opener": "^2.5.3",
"@tauri-apps/plugin-process": "^2.3.1",
"@tauri-apps/plugin-updater": "^2.10.0",
"lucide-react": "^1.7.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 8 additions & 30 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { listen, type UnlistenFn } from "@tauri-apps/api/event";
import { getCurrentWindow } from "@tauri-apps/api/window";
import { openUrl, revealItemInDir } from "@tauri-apps/plugin-opener";
import { useEffect, useRef, useState } from "react";
import { Copy, FishingHook, Folder, FolderTree, GitBranch, HousePlus, Settings } from "lucide-react";
import { Input, Textarea, Select } from "./components/FormControls";
import groveMark from "./assets/grove-mark.svg";
import alacrittyIcon from "./assets/launcher-icons/alacritty.svg";
Expand Down Expand Up @@ -116,12 +117,7 @@ const createInitialForm = (repo?: RepoSnapshot): CreateFormState => ({
autoStartLaunchers: [],
});

const copySvg = (
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
</svg>
);
const copySvg = <Copy size={14} />;

function relativeTime(iso: string, t: Translations): string {
const diff = Date.now() - new Date(iso).getTime();
Expand Down Expand Up @@ -620,9 +616,7 @@ export default function App({ repoPath }: { repoPath: string }) {
</div>
{repo && (
<div className="topbar-path" title={repo.repoRoot}>
<svg width="11" height="11" viewBox="0 0 16 16" fill="none" style={{ flexShrink: 0, opacity: 0.55 }}>
<path d="M1.5 2.5h4.8l1.6 2H14.5v9h-13z" stroke="currentColor" strokeWidth="1.3" strokeLinejoin="round"/>
</svg>
<Folder className="topbar-path-icon" size={11} />
<span className="topbar-path-text">{repo.repoRoot}</span>
</div>
)}
Expand All @@ -636,20 +630,15 @@ export default function App({ repoPath }: { repoPath: string }) {
className={`sidebar-tab${view === "repository" ? " active" : ""}`}
onClick={() => setView("repository")}
>
<svg className="sidebar-tab-icon" width="16" height="16" viewBox="0 0 16 16" fill="none">
<rect x="2" y="2" width="12" height="12" rx="2" stroke="currentColor" strokeWidth="1.3"/>
<path d="M5.5 6h5M5.5 8.5h3.5" stroke="currentColor" strokeWidth="1.2" strokeLinecap="round"/>
</svg>
<HousePlus className="sidebar-tab-icon" size={16} />
<span className="sidebar-tab-label">{t.tabRepository}</span>
</button>
<button
className={`sidebar-tab${view === "worktrees" ? " active" : ""}`}
onClick={() => setView("worktrees")}
disabled={!repo}
>
<svg className="sidebar-tab-icon" width="16" height="16" viewBox="0 0 16 16" fill="none">
<path d="M8 2v12M8 5l-4 3M8 5l4 3M8 9l-3 2.5M8 9l3 2.5" stroke="currentColor" strokeWidth="1.3" strokeLinecap="round" strokeLinejoin="round"/>
</svg>
<FolderTree className="sidebar-tab-icon" size={16} />
<span className="sidebar-tab-label">{t.tabWorktrees}</span>
{repo && <span className="sidebar-tab-badge">{repo.worktrees.length}</span>}
</button>
Expand All @@ -658,21 +647,15 @@ export default function App({ repoPath }: { repoPath: string }) {
onClick={() => setView("hooks")}
disabled={!repo}
>
<svg className="sidebar-tab-icon" width="16" height="16" viewBox="0 0 16 16" fill="none">
<path d="M6 2v7a3 3 0 0 0 6 0V7" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round"/>
<path d="M12 8.5V7.5a1.5 1.5 0 0 0-3 0v1" stroke="currentColor" strokeWidth="1.3" strokeLinecap="round"/>
</svg>
<FishingHook className="sidebar-tab-icon" size={16} />
<span className="sidebar-tab-label">{t.hooks}</span>
{hookCount > 0 && <span className="sidebar-tab-badge">{hookCount}</span>}
</button>
<button
className={`sidebar-tab${view === "settings" ? " active" : ""}`}
onClick={() => setView("settings")}
>
<svg className="sidebar-tab-icon" width="16" height="16" viewBox="0 0 16 16" fill="none">
<path d="M6.2 1.2L9.8 1.2 9.3 3.2 11.5 4.5 13 3.1 14.8 6.2 12.8 6.7 12.8 9.3 14.8 9.8 13 12.9 11.5 11.5 9.3 12.8 9.8 14.8 6.2 14.8 6.7 12.8 4.5 11.5 3.1 12.9 1.2 9.8 3.2 9.3 3.2 6.7 1.2 6.2 3.1 3.1 4.5 4.5 6.7 3.2Z" stroke="currentColor" strokeWidth="1.1" strokeLinejoin="round"/>
<circle cx="8" cy="8" r="2.2" stroke="currentColor" strokeWidth="1.1"/>
</svg>
<Settings className="sidebar-tab-icon" size={16} />
<span className="sidebar-tab-label">{t.settings}</span>
{updateInfo && <span className="sidebar-tab-badge" />}
</button>
Expand Down Expand Up @@ -1099,12 +1082,7 @@ function WorktreeListItem({
>
<div className="worktree-list-item-info">
<div className="worktree-list-item-branch" title={worktree.branch ?? t.detachedShort}>
<svg className="worktree-icon" width="14" height="14" viewBox="0 0 16 16" fill="none">
<circle cx="5" cy="4" r="1.6" stroke="currentColor" strokeWidth="1.3"/>
<circle cx="5" cy="12" r="1.6" stroke="currentColor" strokeWidth="1.3"/>
<circle cx="11.5" cy="7" r="1.6" stroke="currentColor" strokeWidth="1.3"/>
<path d="M5 5.6v4.8M5 7.5c0-1.2.8-2.1 2-2.1h2.9" stroke="currentColor" strokeWidth="1.3" strokeLinecap="round"/>
</svg>
<GitBranch className="worktree-icon" size={14} />
{worktree.branch ?? t.detachedShort}
</div>
<div
Expand Down
5 changes: 2 additions & 3 deletions src/components/HooksModal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
import { ChevronRight } from "lucide-react";
import { Textarea, Select } from "./FormControls";
import { ModalShell } from "./ModalShell";
import { Alert } from "./Alert";
Expand Down Expand Up @@ -211,9 +212,7 @@ export function HooksModal({
return (
<section key={event} className="hook-group">
<div className="hook-group-header" onClick={() => toggleExpand(event)}>
<svg className={`hook-group-chevron${isOpen ? " expanded" : ""}`} viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<path d="M6 4l4 4-4 4" />
</svg>
<ChevronRight className={`hook-group-chevron${isOpen ? " expanded" : ""}`} size={16} />
<span className="hook-group-event">{event}</span>
<span className="hook-group-count">
{steps.length} {steps.length === 1 ? "step" : "steps"}
Expand Down
7 changes: 5 additions & 2 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,11 @@ pre {
-webkit-app-region: drag;
}

.topbar-path-icon {
flex-shrink: 0;
opacity: 0.55;
}

.topbar-path-text {
overflow: hidden;
text-overflow: ellipsis;
Expand Down Expand Up @@ -1802,8 +1807,6 @@ textarea {

.hook-group-chevron {
flex-shrink: 0;
width: 16px;
height: 16px;
color: var(--ink-ghost);
transition: transform 160ms ease;
}
Expand Down
Loading