-
Notifications
You must be signed in to change notification settings - Fork 96
revamp repo page #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
revamp repo page #220
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a9da451
wip repo table
msukkari d1e3f35
new repo page
msukkari 9bad697
add indicator for when feedback is applied in repo page
msukkari cd35376
add repo button
msukkari 45db317
fetch connection data in one query
msukkari 58f171f
fix styling
msukkari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
"use client" | ||
|
||
import { Button } from "@/components/ui/button" | ||
import { PlusCircle } from "lucide-react" | ||
import { | ||
Dialog, | ||
DialogContent, | ||
DialogHeader, | ||
DialogTitle, | ||
DialogDescription, | ||
DialogClose, | ||
DialogFooter, | ||
} from "@/components/ui/dialog" | ||
import { useState } from "react" | ||
import { ConnectionList } from "../connections/components/connectionList" | ||
import { useDomain } from "@/hooks/useDomain" | ||
import Link from "next/link"; | ||
|
||
export function AddRepoButton() { | ||
const [isOpen, setIsOpen] = useState(false) | ||
const domain = useDomain() | ||
|
||
return ( | ||
<> | ||
<Button | ||
onClick={() => setIsOpen(true)} | ||
variant="ghost" | ||
size="icon" | ||
className="h-8 w-8 ml-2 text-muted-foreground hover:text-foreground transition-colors" | ||
> | ||
<PlusCircle className="h-4 w-4" /> | ||
</Button> | ||
|
||
<Dialog open={isOpen} onOpenChange={setIsOpen}> | ||
<DialogContent className="sm:max-w-[800px] max-h-[90vh] flex flex-col p-0 gap-0 overflow-hidden"> | ||
<DialogHeader className="px-6 py-4 border-b"> | ||
<DialogTitle className="text-xl font-semibold">Add a New Repository</DialogTitle> | ||
<DialogDescription className="text-sm text-muted-foreground mt-1"> | ||
Repositories are added to Sourcebot using <span className="text-primary">connections</span>. To add a new repo, add it to an existing connection or create a new one. | ||
</DialogDescription> | ||
</DialogHeader> | ||
<div className="flex-1 overflow-y-auto p-6"> | ||
<ConnectionList className="w-full" /> | ||
</div> | ||
<DialogFooter className="flex justify-between items-center border-t p-4 px-6"> | ||
<Button asChild variant="default" className="bg-primary hover:bg-primary/90"> | ||
<Link href={`/${domain}/connections`}>Add new connection</Link> | ||
</Button> | ||
<DialogClose asChild> | ||
<Button variant="outline">Close</Button> | ||
</DialogClose> | ||
</DialogFooter> | ||
</DialogContent> | ||
</Dialog> | ||
</> | ||
) | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.