Files: mobile upload button, no-collective empty state; nav chat/approvals icons
This commit is contained in:
parent
3f61d11072
commit
b984d6842f
2 changed files with 20 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useCallback, useEffect, useState } from "react";
|
import { useCallback, useEffect, useState } from "react";
|
||||||
|
import Link from "next/link";
|
||||||
import { Button, Input } from "../../../components/ui/primitives";
|
import { Button, Input } from "../../../components/ui/primitives";
|
||||||
import { OfflineBadge } from "../../../components/ui/offline-badge";
|
import { OfflineBadge } from "../../../components/ui/offline-badge";
|
||||||
import { EmptyState } from "../../../components/brand/empty-state";
|
import { EmptyState } from "../../../components/brand/empty-state";
|
||||||
|
|
@ -262,7 +263,24 @@ export default function FilesPage(): React.ReactElement {
|
||||||
{actionError !== null && <p role="alert" className="mb-3 text-sm text-danger">{actionError}</p>}
|
{actionError !== null && <p role="alert" className="mb-3 text-sm text-danger">{actionError}</p>}
|
||||||
{notice !== null && <p role="status" className="mb-3 text-sm text-live">{notice}</p>}
|
{notice !== null && <p role="status" className="mb-3 text-sm text-live">{notice}</p>}
|
||||||
|
|
||||||
<UploadDropzone groupId={groupId} live={live} onUploaded={handleUploaded} />
|
{groupId === "" ? (
|
||||||
|
<div className="mb-4 rounded-lg border border-border-subtle bg-surface p-4">
|
||||||
|
<p className="mb-3 text-sm text-text-dim">
|
||||||
|
{t({
|
||||||
|
en: "Uploads live inside a collective. Create one first — then this becomes your upload and library space.",
|
||||||
|
es: "Las subidas viven dentro de un colectivo. Crea uno primero y este espacio será tu zona de subidas y biblioteca.",
|
||||||
|
})}
|
||||||
|
</p>
|
||||||
|
<Link
|
||||||
|
href="/more"
|
||||||
|
className="inline-flex items-center gap-2 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-white hover:bg-accent-hover"
|
||||||
|
>
|
||||||
|
{t({ en: "Create a collective", es: "Crear un colectivo" })} ›
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<UploadDropzone groupId={groupId} live={live} onUploaded={handleUploaded} />
|
||||||
|
)}
|
||||||
|
|
||||||
<div className="mb-4 flex flex-wrap items-center gap-2">
|
<div className="mb-4 flex flex-wrap items-center gap-2">
|
||||||
<Input
|
<Input
|
||||||
|
|
|
||||||
|
|
@ -132,13 +132,12 @@ export function UploadDropzone({ groupId, live, onUploaded }: {
|
||||||
{!disabled && (
|
{!disabled && (
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="outline"
|
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
inputRef.current?.click();
|
inputRef.current?.click();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t({ en: "Browse files", es: "Buscar archivos" })}
|
+ {t({ en: "Upload a file", es: "Subir un archivo" })}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue