mirror of
https://github.com/block/buzz.git
synced 2026-11-01 23:11:58 +00:00
feat(desktop): clarify repository hosting and availability
Distinguish Buzz-hosted repositories from linked GitHub repositories, provide a safe local clone flow for public GitHub remotes, and replace misleading empty states with actionable availability feedback. Signed-off-by: Thomas Petersen <thomasp@squareup.com>
This commit is contained in:
@@ -614,6 +614,7 @@ export function RepositoryFilesPanel({
|
||||
profiles,
|
||||
fallbackAuthorPubkey,
|
||||
sourceControls,
|
||||
unavailableMessage,
|
||||
}: {
|
||||
files: ProjectRepoFile[];
|
||||
snapshot: ProjectRepoSnapshot | null | undefined;
|
||||
@@ -623,6 +624,7 @@ export function RepositoryFilesPanel({
|
||||
fallbackAuthorPubkey?: string;
|
||||
/** Branch picker + remote/local toggle rendered in the panel header. */
|
||||
sourceControls?: RepoSourceHeaderControls;
|
||||
unavailableMessage?: string;
|
||||
}) {
|
||||
const [currentPath, setCurrentPath] = React.useState("");
|
||||
const [selectedFile, setSelectedFile] =
|
||||
@@ -679,11 +681,13 @@ export function RepositoryFilesPanel({
|
||||
// remote/local toggle must stay reachable when one source fails to load.
|
||||
const stateMessage = isLoading
|
||||
? "Loading repository files…"
|
||||
: error
|
||||
? "Could not load the repository file tree."
|
||||
: files.length === 0
|
||||
? "No files have been pushed yet."
|
||||
: null;
|
||||
: unavailableMessage
|
||||
? unavailableMessage
|
||||
: error
|
||||
? "Could not load the repository file tree."
|
||||
: files.length === 0
|
||||
? "No files have been pushed yet."
|
||||
: null;
|
||||
if (stateMessage) {
|
||||
if (!sourceControls) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user