@@ -15,7 +15,7 @@ from app.schema.researcher import (
|
|||||||
ResearcherWithPublicationsSchema,
|
ResearcherWithPublicationsSchema,
|
||||||
)
|
)
|
||||||
from app.services.normalizer import PublicationNormalizer
|
from app.services.normalizer import PublicationNormalizer
|
||||||
from app.services.orcid_client import get_works_summary, get_work_detail
|
from app.services.orcid_client import get_display_name, get_works_summary, get_work_detail
|
||||||
from app.schema.publication import PublicationSchema
|
from app.schema.publication import PublicationSchema
|
||||||
from app.db.models import PublicationDownload
|
from app.db.models import PublicationDownload
|
||||||
from app.security.jwt import get_optional_current_researcher
|
from app.security.jwt import get_optional_current_researcher
|
||||||
@@ -159,6 +159,16 @@ def build_search_response(orcid_id: str, db: Session, current: Researcher | None
|
|||||||
db.add(researcher)
|
db.add(researcher)
|
||||||
db.flush()
|
db.flush()
|
||||||
|
|
||||||
|
# Si todavía no conocemos el nombre del investigador (por ejemplo, recién
|
||||||
|
# creado al sincronizarse desde el buscador), lo resolvemos contra el
|
||||||
|
# endpoint `/record` público de ORCID. No tocamos un nombre ya existente
|
||||||
|
# para no pisar valores establecidos por el flujo de autenticación.
|
||||||
|
if not researcher.name:
|
||||||
|
display_name = get_display_name(orcid_id)
|
||||||
|
if display_name:
|
||||||
|
researcher.name = display_name
|
||||||
|
db.flush()
|
||||||
|
|
||||||
publications = _upsert_researcher_publications(researcher, orcid_id, db)
|
publications = _upsert_researcher_publications(researcher, orcid_id, db)
|
||||||
publications_out = _decorate_downloaded_by_me(db=db, current=current, publications=publications)
|
publications_out = _decorate_downloaded_by_me(db=db, current=current, publications=publications)
|
||||||
stats = build_researcher_stats(publications_out)
|
stats = build_researcher_stats(publications_out)
|
||||||
|
|||||||
@@ -148,3 +148,50 @@ def get_works_summary(orcid_id: str) -> dict:
|
|||||||
def get_work_detail(orcid_id: str, put_code: int) -> dict | None:
|
def get_work_detail(orcid_id: str, put_code: int) -> dict | None:
|
||||||
client = ORCIDClient()
|
client = ORCIDClient()
|
||||||
return client.fetch_work_detail(orcid_id, put_code)
|
return client.fetch_work_detail(orcid_id, put_code)
|
||||||
|
|
||||||
|
|
||||||
|
def get_record(orcid_id: str) -> dict:
|
||||||
|
client = ORCIDClient()
|
||||||
|
return client.fetch_record(orcid_id)
|
||||||
|
|
||||||
|
|
||||||
|
def extract_display_name(record: dict | None) -> str | None:
|
||||||
|
"""
|
||||||
|
Devuelve un nombre legible a partir de la respuesta de `/record` de ORCID.
|
||||||
|
|
||||||
|
Prioriza `credit-name` (el nombre tal y como el investigador prefiere mostrarlo);
|
||||||
|
si no está disponible, compone `given-names` + `family-name`.
|
||||||
|
"""
|
||||||
|
if not record:
|
||||||
|
return None
|
||||||
|
|
||||||
|
name = (record.get("person") or {}).get("name") or {}
|
||||||
|
|
||||||
|
credit = name.get("credit-name")
|
||||||
|
if isinstance(credit, dict):
|
||||||
|
credit_value = credit.get("value")
|
||||||
|
if credit_value:
|
||||||
|
return credit_value
|
||||||
|
|
||||||
|
given_obj = name.get("given-names")
|
||||||
|
family_obj = name.get("family-name")
|
||||||
|
given = given_obj.get("value") if isinstance(given_obj, dict) else None
|
||||||
|
family = family_obj.get("value") if isinstance(family_obj, dict) else None
|
||||||
|
|
||||||
|
full = " ".join(part for part in (given, family) if part)
|
||||||
|
return full or None
|
||||||
|
|
||||||
|
|
||||||
|
def get_display_name(orcid_id: str) -> str | None:
|
||||||
|
"""
|
||||||
|
Obtiene el nombre público del investigador desde ORCID.
|
||||||
|
|
||||||
|
Devuelve `None` (sin propagar la excepción) si la API de ORCID no responde
|
||||||
|
o el `record` no contiene un nombre utilizable, para no romper el flujo de
|
||||||
|
búsqueda cuando solo falla la resolución del nombre.
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
record = get_record(orcid_id)
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
return extract_display_name(record)
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>orcid-system</title>
|
<title>ORCID2SWORD</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
import { Link, useNavigate } from "react-router-dom";
|
import { Link, useNavigate } from "react-router-dom";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { ArrowLeftIcon, LayersIcon, LogoutIcon, UserCheckIcon } from "../ui/Icons";
|
import { LogoutIcon, UserCheckIcon } from "../ui/Icons";
|
||||||
import { useAuth } from "../../contexts/AuthContext";
|
import { useAuth } from "../../contexts/AuthContext";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Institutional navy header used across all views.
|
* Institutional navy header used across all views.
|
||||||
*
|
*
|
||||||
* Variants:
|
* Brand: ORCID2SWORD — "2" in orcid-green, rest in white.
|
||||||
* - `landing` → logo + full product name.
|
* Authenticated users see their name (or "Mi Perfil") + logout button.
|
||||||
* - `dashboard` → back button to `/` + auth indicator + logout (if logged in).
|
|
||||||
* - `group` → back button to `/` + group label + auth indicator.
|
|
||||||
*/
|
*/
|
||||||
export function AppHeader({ variant = "landing" }) {
|
export function AppHeader({ variant = "landing" }) {
|
||||||
const { isAuthenticated, userOrcidId, logout } = useAuth();
|
const { isAuthenticated, userOrcidId, userName, logout } = useAuth();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
function handleLogout() {
|
function handleLogout() {
|
||||||
@@ -23,82 +21,42 @@ export function AppHeader({ variant = "landing" }) {
|
|||||||
navigate("/");
|
navigate("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (variant === "dashboard" || variant === "group") {
|
const profileLabel = userName ?? "Mi Perfil";
|
||||||
return (
|
const profileHref = userOrcidId ? `/dashboard/${userOrcidId}` : "/";
|
||||||
<header className="flex h-14 items-center gap-4 bg-brand-primary px-7 text-white">
|
|
||||||
<Link
|
|
||||||
to="/"
|
|
||||||
className="inline-flex items-center gap-1.5 rounded-md bg-white/10 px-2.5 py-1.5 text-[13px] transition-colors hover:bg-white/20"
|
|
||||||
>
|
|
||||||
<ArrowLeftIcon />
|
|
||||||
Inicio
|
|
||||||
</Link>
|
|
||||||
<div className="flex-1" />
|
|
||||||
{isAuthenticated && (
|
|
||||||
<div className="flex items-center gap-3">
|
|
||||||
{userOrcidId && (
|
|
||||||
<Link
|
|
||||||
to={`/dashboard/${userOrcidId}`}
|
|
||||||
className="inline-flex items-center gap-1.5 rounded-md bg-white/10 px-2.5 py-1.5 text-[13px] transition-colors hover:bg-white/20"
|
|
||||||
>
|
|
||||||
<UserCheckIcon size={13} />
|
|
||||||
Mi perfil
|
|
||||||
</Link>
|
|
||||||
)}
|
|
||||||
<span className="inline-flex items-center gap-1.5 rounded-full bg-white/10 px-2.5 py-1 text-[12px] text-white/80">
|
|
||||||
<UserCheckIcon size={13} />
|
|
||||||
Sesión activa
|
|
||||||
</span>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={handleLogout}
|
|
||||||
className="inline-flex items-center gap-1.5 rounded-md bg-white/10 px-2.5 py-1.5 text-[13px] transition-colors hover:bg-white/20"
|
|
||||||
>
|
|
||||||
<LogoutIcon />
|
|
||||||
Cerrar sesión
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<span className="text-[13px] text-white/60">
|
|
||||||
{variant === "group" ? "Búsqueda grupal · ORCID" : "Sistema ORCID · SWORD"}
|
|
||||||
</span>
|
|
||||||
</header>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header className="flex items-center gap-3 bg-brand-primary px-8 py-3.5">
|
<header className="bg-brand-primary">
|
||||||
<div className="flex h-8 w-8 items-center justify-center rounded-md bg-white/15 text-white">
|
<div className="mx-auto flex h-14 max-w-7xl items-center px-4">
|
||||||
<LayersIcon />
|
{/* Brand — always navigates home */}
|
||||||
</div>
|
|
||||||
<span className="text-sm font-medium tracking-wide text-white">
|
|
||||||
Sistema de Integración ORCID · SWORD
|
|
||||||
</span>
|
|
||||||
{isAuthenticated && (
|
|
||||||
<div className="ml-auto flex items-center gap-2">
|
|
||||||
{userOrcidId && (
|
|
||||||
<Link
|
<Link
|
||||||
to={`/dashboard/${userOrcidId}`}
|
to="/"
|
||||||
className="inline-flex items-center gap-1.5 rounded-md bg-white/10 px-2.5 py-1.5 text-[13px] transition-colors hover:bg-white/20"
|
className="text-[15px] font-bold tracking-tight text-white transition-opacity hover:opacity-90"
|
||||||
|
>
|
||||||
|
ORCID<span className="text-orcid-green">2</span>SWORD
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
<div className="flex-1" />
|
||||||
|
|
||||||
|
{isAuthenticated && (
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<Link
|
||||||
|
to={profileHref}
|
||||||
|
className="inline-flex items-center gap-1.5 rounded-md bg-white/10 px-3 py-1.5 text-[13px] text-white transition-colors hover:bg-white/20"
|
||||||
>
|
>
|
||||||
<UserCheckIcon size={13} />
|
<UserCheckIcon size={13} />
|
||||||
Mi perfil
|
{profileLabel}
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
|
||||||
<span className="inline-flex items-center gap-1.5 rounded-full bg-white/10 px-2.5 py-1 text-[12px] text-white/80">
|
|
||||||
<UserCheckIcon size={13} />
|
|
||||||
Sesión activa
|
|
||||||
</span>
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={handleLogout}
|
onClick={handleLogout}
|
||||||
className="inline-flex items-center gap-1.5 rounded-md bg-white/10 px-2.5 py-1.5 text-[13px] transition-colors hover:bg-white/20"
|
className="inline-flex items-center gap-1.5 rounded-md bg-white/10 px-3 py-1.5 text-[13px] text-white transition-colors hover:bg-white/20"
|
||||||
>
|
>
|
||||||
<LogoutIcon />
|
<LogoutIcon />
|
||||||
Cerrar sesión
|
Cerrar sesión
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,21 @@ function extractOrcidFromToken(token) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function extractNameFromToken(token) {
|
||||||
|
if (!token) return null;
|
||||||
|
try {
|
||||||
|
const payloadBase64 = token.split(".")[1];
|
||||||
|
if (!payloadBase64) return null;
|
||||||
|
const payloadJson = atob(payloadBase64.replace(/-/g, "+").replace(/_/g, "/"));
|
||||||
|
const payload = JSON.parse(payloadJson);
|
||||||
|
if (payload?.name) return payload.name;
|
||||||
|
const parts = [payload?.given_name, payload?.family_name].filter(Boolean);
|
||||||
|
return parts.length > 0 ? parts.join(" ") : null;
|
||||||
|
} catch {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides JWT-based authentication state throughout the app.
|
* Provides JWT-based authentication state throughout the app.
|
||||||
*
|
*
|
||||||
@@ -82,6 +97,7 @@ export function AuthProvider({ children }) {
|
|||||||
token,
|
token,
|
||||||
isAuthenticated: Boolean(token),
|
isAuthenticated: Boolean(token),
|
||||||
userOrcidId: extractOrcidFromToken(token),
|
userOrcidId: extractOrcidFromToken(token),
|
||||||
|
userName: extractNameFromToken(token),
|
||||||
storeToken,
|
storeToken,
|
||||||
logout,
|
logout,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -168,45 +168,48 @@ export function LandingPage() {
|
|||||||
<div className="flex min-h-screen flex-col bg-surface-tertiary">
|
<div className="flex min-h-screen flex-col bg-surface-tertiary">
|
||||||
<AppHeader variant="landing" />
|
<AppHeader variant="landing" />
|
||||||
|
|
||||||
<main className="flex flex-1 items-center justify-center p-12 sm:p-6">
|
<main className="flex flex-1 flex-col items-center px-4 py-12">
|
||||||
<div className="w-full max-w-[520px]">
|
<div className="w-full max-w-7xl">
|
||||||
<div className="mb-10 text-center">
|
|
||||||
<div className="mx-auto mb-5 flex h-[72px] w-[72px] items-center justify-center rounded-2xl bg-brand-primary shadow-[0_4px_24px_rgba(11,61,107,0.18)]">
|
{/* ── Hero ── */}
|
||||||
<DocumentIcon size={36} className="text-white" />
|
<div className="mb-12 text-center">
|
||||||
|
<div className="mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-2xl bg-brand-primary shadow-[0_4px_24px_rgba(11,61,107,0.18)]">
|
||||||
|
<DocumentIcon size={32} className="text-white" />
|
||||||
</div>
|
</div>
|
||||||
<h1 className="mb-2 text-[28px] font-semibold tracking-tight text-ink-primary">
|
<h1 className="mb-3 text-[32px] font-bold tracking-tight text-ink-primary md:text-[40px]">
|
||||||
Repositorio Institucional
|
Tu producción científica,{" "}
|
||||||
|
<span className="text-brand-primary">siempre al día.</span>
|
||||||
</h1>
|
</h1>
|
||||||
<p className="text-[15px] leading-relaxed text-ink-secondary">
|
<p className="mx-auto max-w-xl text-[16px] leading-relaxed text-ink-secondary">
|
||||||
Conecta tu perfil ORCID y deposita tus publicaciones
|
Sincroniza tu perfil ORCID y deposita tus publicaciones
|
||||||
automáticamente en el repositorio institucional vía protocolo
|
automáticamente vía SWORD.
|
||||||
SWORD.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Main card */}
|
{/* ── Two-column grid ── */}
|
||||||
<div className="rounded-2xl border border-surface-border/60 bg-surface-primary p-8">
|
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-8">
|
||||||
|
|
||||||
|
{/* ── Left: individual search + login ── */}
|
||||||
|
<div className="flex flex-col rounded-2xl border border-surface-border/60 bg-surface-primary p-8">
|
||||||
{isAuthenticated ? (
|
{isAuthenticated ? (
|
||||||
<div className="flex items-center justify-between rounded-xl border border-green-200 bg-green-50 px-4 py-2.5 text-sm text-green-800">
|
<div className="flex items-center justify-between rounded-xl border border-green-200 bg-green-50 px-4 py-3 text-sm text-green-800">
|
||||||
<span className="font-medium">Sesión activa</span>
|
<span className="font-medium">Sesión activa</span>
|
||||||
<span className="text-xs text-green-600">
|
<span className="text-xs text-green-600">
|
||||||
Verás publicaciones nuevas marcadas en el dashboard
|
Verás publicaciones nuevas marcadas en el dashboard
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<>
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={handleOrcidLogin}
|
onClick={handleOrcidLogin}
|
||||||
disabled={loginLoading}
|
disabled={loginLoading}
|
||||||
className="flex w-full items-center justify-center gap-2.5 rounded-xl bg-orcid-green px-5 py-3 text-[15px] font-semibold tracking-wide text-orcid-green-dark transition-opacity enabled:hover:opacity-95 disabled:cursor-not-allowed disabled:opacity-75"
|
className="flex w-full items-center justify-center gap-2.5 rounded-xl bg-orcid-green px-5 py-3.5 text-[15px] font-semibold tracking-wide text-orcid-green-dark transition-opacity enabled:hover:opacity-95 disabled:cursor-not-allowed disabled:opacity-75"
|
||||||
>
|
>
|
||||||
{loginLoading ? <Spinner size={17} /> : <OrcidLogo />}
|
{loginLoading ? <Spinner size={17} /> : <OrcidLogo />}
|
||||||
{loginLoading
|
{loginLoading
|
||||||
? "Abriendo ventana de ORCID..."
|
? "Abriendo ventana de ORCID..."
|
||||||
: "Iniciar sesión con ORCID"}
|
: "Iniciar sesión con ORCID"}
|
||||||
</button>
|
</button>
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="my-6 flex items-center gap-3">
|
<div className="my-6 flex items-center gap-3">
|
||||||
@@ -217,8 +220,8 @@ export function LandingPage() {
|
|||||||
<div className="h-px flex-1 bg-surface-border" />
|
<div className="h-px flex-1 bg-surface-border" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div className="flex flex-col gap-2">
|
||||||
<label className="mb-2 block text-[13px] font-medium text-ink-secondary">
|
<label className="text-[13px] font-medium text-ink-secondary">
|
||||||
ORCID iD
|
ORCID iD
|
||||||
</label>
|
</label>
|
||||||
<div className="flex gap-2.5">
|
<div className="flex gap-2.5">
|
||||||
@@ -231,7 +234,7 @@ export function LandingPage() {
|
|||||||
onChange={handleOrcidChange}
|
onChange={handleOrcidChange}
|
||||||
onKeyDown={handleKeyDown}
|
onKeyDown={handleKeyDown}
|
||||||
maxLength={19}
|
maxLength={19}
|
||||||
className={`w-full rounded-lg py-2.5 pl-10 pr-3.5 font-mono text-[15px] tracking-wider text-ink-primary outline-none transition-colors ${
|
className={`w-full rounded-lg py-3 pl-10 pr-3.5 font-mono text-[15px] tracking-wider text-ink-primary outline-none transition-colors ${
|
||||||
error
|
error
|
||||||
? "border border-border-danger"
|
? "border border-border-danger"
|
||||||
: "border border-surface-border-strong focus:border-brand-accent"
|
: "border border-surface-border-strong focus:border-brand-accent"
|
||||||
@@ -245,7 +248,7 @@ export function LandingPage() {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={handleValidate}
|
onClick={handleValidate}
|
||||||
disabled={validating || loginLoading || !orcidInput}
|
disabled={validating || loginLoading || !orcidInput}
|
||||||
className={`inline-flex items-center gap-2 whitespace-nowrap rounded-lg px-5 py-2.5 text-sm font-medium transition-colors ${
|
className={`inline-flex items-center gap-2 whitespace-nowrap rounded-lg px-5 py-3 text-sm font-medium transition-colors ${
|
||||||
orcidInput
|
orcidInput
|
||||||
? "bg-brand-primary text-white enabled:hover:bg-brand-primary-hover"
|
? "bg-brand-primary text-white enabled:hover:bg-brand-primary-hover"
|
||||||
: "bg-surface-secondary text-ink-tertiary"
|
: "bg-surface-secondary text-ink-tertiary"
|
||||||
@@ -256,11 +259,11 @@ export function LandingPage() {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{error && (
|
{error && (
|
||||||
<p className="mt-2 text-xs leading-relaxed text-ink-danger">
|
<p className="text-xs leading-relaxed text-ink-danger">
|
||||||
{error}
|
{error}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
<p className="mt-2 text-xs text-ink-tertiary">
|
<p className="text-xs text-ink-tertiary">
|
||||||
{isAuthenticated
|
{isAuthenticated
|
||||||
? "Busca un investigador o usa «Cerrar sesión» arriba."
|
? "Busca un investigador o usa «Cerrar sesión» arriba."
|
||||||
: "Pulsa «Iniciar sesión» para autenticarte, o «Buscar» de forma anónima."}
|
: "Pulsa «Iniciar sesión» para autenticarte, o «Buscar» de forma anónima."}
|
||||||
@@ -268,28 +271,28 @@ export function LandingPage() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Group search card */}
|
{/* ── Right: group search ── */}
|
||||||
<div className="mt-4 rounded-2xl border border-surface-border/60 bg-surface-primary p-6">
|
<div className="flex flex-col rounded-2xl border border-surface-border/60 bg-surface-primary p-8">
|
||||||
<div className="mb-3 flex items-center gap-2">
|
<div className="mb-3 flex items-center gap-2">
|
||||||
<UsersIcon size={17} className="text-brand-accent" />
|
<UsersIcon size={18} className="text-brand-accent" />
|
||||||
<h2 className="text-[14px] font-semibold text-ink-primary">
|
<h2 className="text-[15px] font-semibold text-ink-primary">
|
||||||
Búsqueda grupal de investigadores
|
Búsqueda grupal de investigadores
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<p className="mb-3 text-xs leading-relaxed text-ink-secondary">
|
<p className="mb-4 text-[13px] leading-relaxed text-ink-secondary">
|
||||||
Pega varios ORCID iDs separados por comas, espacios o saltos de
|
Pega varios ORCID iDs separados por comas, espacios o saltos de
|
||||||
línea para buscar y comparar varios investigadores a la vez.
|
línea para buscar y comparar varios investigadores a la vez.
|
||||||
</p>
|
</p>
|
||||||
<textarea
|
<textarea
|
||||||
rows={3}
|
rows={5}
|
||||||
placeholder={"0000-0002-1825-0097\n0000-0001-5000-0007, 0000-0003-4321-9876"}
|
placeholder={"0000-0002-1825-0097\n0000-0001-5000-0007\n0000-0003-4321-9876"}
|
||||||
value={groupInput}
|
value={groupInput}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setGroupInput(e.target.value);
|
setGroupInput(e.target.value);
|
||||||
if (groupError) setGroupError("");
|
if (groupError) setGroupError("");
|
||||||
}}
|
}}
|
||||||
onKeyDown={handleGroupKeyDown}
|
onKeyDown={handleGroupKeyDown}
|
||||||
className={`w-full resize-none rounded-lg border px-3.5 py-2.5 font-mono text-[13px] text-ink-primary outline-none transition-colors ${
|
className={`w-full flex-1 resize-none rounded-lg border px-3.5 py-3 font-mono text-[13px] text-ink-primary outline-none transition-colors ${
|
||||||
groupError
|
groupError
|
||||||
? "border-border-danger"
|
? "border-border-danger"
|
||||||
: "border-surface-border-strong focus:border-brand-accent"
|
: "border-surface-border-strong focus:border-brand-accent"
|
||||||
@@ -302,7 +305,7 @@ export function LandingPage() {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={handleGroupSearch}
|
onClick={handleGroupSearch}
|
||||||
disabled={groupLoading || !groupInput.trim()}
|
disabled={groupLoading || !groupInput.trim()}
|
||||||
className={`mt-3 inline-flex w-full items-center justify-center gap-2 rounded-lg px-5 py-2.5 text-sm font-medium transition-colors ${
|
className={`mt-4 inline-flex w-full items-center justify-center gap-2 rounded-lg px-5 py-3 text-sm font-medium transition-colors ${
|
||||||
groupInput.trim()
|
groupInput.trim()
|
||||||
? "bg-brand-primary text-white enabled:hover:bg-brand-primary-hover"
|
? "bg-brand-primary text-white enabled:hover:bg-brand-primary-hover"
|
||||||
: "bg-surface-secondary text-ink-tertiary"
|
: "bg-surface-secondary text-ink-tertiary"
|
||||||
@@ -313,18 +316,20 @@ export function LandingPage() {
|
|||||||
{groupLoading ? "Preparando..." : "Buscar investigadores"}
|
{groupLoading ? "Preparando..." : "Buscar investigadores"}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Info chips */}
|
{/* ── Info chips ── */}
|
||||||
<div className="mt-6 flex flex-wrap justify-center gap-4">
|
<div className="mt-8 flex flex-wrap justify-center gap-4">
|
||||||
{["ORCID OAuth 2.0", "SWORD v2", "DSpace · EPrints"].map((label) => (
|
{["ORCID OAuth 2.0", "SWORD v2", "DSpace · EPrints"].map((label) => (
|
||||||
<span
|
<span
|
||||||
key={label}
|
key={label}
|
||||||
className="rounded-full border border-surface-border/60 bg-surface-secondary px-3 py-1 text-xs text-ink-tertiary"
|
className="rounded-full border border-surface-border/60 bg-surface-secondary px-3.5 py-1.5 text-xs text-ink-tertiary"
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
</span>
|
</span>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user