s
This commit is contained in:
parent
5499904cef
commit
1c01b29be7
31 changed files with 1725 additions and 53 deletions
|
|
@ -182,7 +182,7 @@ onBeforeUnmount(() => {
|
|||
:class="
|
||||
hasTriggerSlot
|
||||
? 'cursor-help rounded-sm'
|
||||
: 'h-5 w-5 justify-center rounded-full border border-stroke-interactive/80 bg-surface-card-muted/80 text-[11px] font-semibold text-ink-secondary transition hover:bg-action-secondary-hover-bg'
|
||||
: 'h-5 w-5 justify-center rounded-full border border-stroke-interactive/80 bg-surface-card-muted/80 text-xs font-semibold text-ink-secondary transition hover:bg-action-secondary-hover-bg'
|
||||
"
|
||||
:aria-label="text"
|
||||
@mouseenter="openTooltip"
|
||||
|
|
@ -200,7 +200,7 @@ onBeforeUnmount(() => {
|
|||
role="tooltip"
|
||||
:style="tooltipStyle"
|
||||
:class="sideClass"
|
||||
class="pointer-events-none fixed z-[90] w-64 max-w-[calc(100vw-2rem)] rounded-lg border border-stroke-default bg-surface-card/95 px-2.5 py-2 text-xs leading-relaxed text-ink-secondary shadow-lg"
|
||||
class="pointer-events-none fixed z-50 w-auto max-w-xs rounded-lg border border-stroke-default bg-surface-card/95 px-2.5 py-2 text-xs leading-relaxed text-ink-secondary shadow-lg"
|
||||
>
|
||||
{{ text }}
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
import { apiRequest } from "@/lib/api/client";
|
||||
|
||||
export interface DisplayIdentifier {
|
||||
kind: string;
|
||||
value: string;
|
||||
label: string;
|
||||
url: string | null;
|
||||
confidence_score: number;
|
||||
}
|
||||
|
||||
export interface AdminDbIntegrityCheck {
|
||||
name: string;
|
||||
count: number;
|
||||
|
|
@ -34,6 +42,7 @@ export interface AdminPdfQueueItem {
|
|||
publication_id: number;
|
||||
title: string;
|
||||
doi: string | null;
|
||||
display_identifier: DisplayIdentifier | null;
|
||||
pdf_url: string | null;
|
||||
status: string;
|
||||
attempt_count: number;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,14 @@ import { apiRequest } from "@/lib/api/client";
|
|||
|
||||
export type PublicationMode = "all" | "unread" | "latest";
|
||||
|
||||
export interface DisplayIdentifier {
|
||||
kind: string;
|
||||
value: string;
|
||||
label: string;
|
||||
url: string | null;
|
||||
confidence_score: number;
|
||||
}
|
||||
|
||||
export interface PublicationItem {
|
||||
publication_id: number;
|
||||
scholar_profile_id: number;
|
||||
|
|
@ -12,6 +20,7 @@ export interface PublicationItem {
|
|||
venue_text: string | null;
|
||||
pub_url: string | null;
|
||||
doi: string | null;
|
||||
display_identifier: DisplayIdentifier | null;
|
||||
pdf_url: string | null;
|
||||
pdf_status: "untracked" | "queued" | "running" | "resolved" | "failed";
|
||||
pdf_attempt_count: number;
|
||||
|
|
|
|||
|
|
@ -748,8 +748,14 @@ watch(
|
|||
<td>
|
||||
<div class="grid gap-1">
|
||||
<span class="font-medium text-ink-primary">{{ item.title }}</span>
|
||||
<a v-if="item.doi" :href="`https://doi.org/${item.doi}`" target="_blank" rel="noreferrer" class="link-inline text-xs">
|
||||
DOI: {{ item.doi }}
|
||||
<a
|
||||
v-if="item.display_identifier?.url"
|
||||
:href="item.display_identifier.url"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
class="link-inline text-xs"
|
||||
>
|
||||
{{ item.display_identifier.label }}
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -169,11 +169,15 @@ function publicationPrimaryUrl(item: PublicationItem): string | null {
|
|||
return item.pub_url || item.pdf_url;
|
||||
}
|
||||
|
||||
function publicationDoiUrl(item: PublicationItem): string | null {
|
||||
if (!item.doi) {
|
||||
function publicationIdentifierUrl(item: PublicationItem): string | null {
|
||||
if (!item.display_identifier?.url) {
|
||||
return null;
|
||||
}
|
||||
return `https://doi.org/${item.doi}`;
|
||||
return item.display_identifier.url;
|
||||
}
|
||||
|
||||
function publicationIdentifierLabel(item: PublicationItem): string | null {
|
||||
return item.display_identifier?.label ?? null;
|
||||
}
|
||||
|
||||
const selectedScholarName = computed(() => {
|
||||
|
|
@ -1043,14 +1047,14 @@ watch(
|
|||
</a>
|
||||
<span v-else class="block truncate font-medium" :title="item.title">{{ item.title }}</span>
|
||||
<a
|
||||
v-if="publicationDoiUrl(item)"
|
||||
:href="publicationDoiUrl(item) || ''"
|
||||
v-if="publicationIdentifierUrl(item)"
|
||||
:href="publicationIdentifierUrl(item) || ''"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
class="link-inline block truncate text-xs"
|
||||
:title="`DOI: ${item.doi}`"
|
||||
:title="publicationIdentifierLabel(item) || ''"
|
||||
>
|
||||
DOI: {{ item.doi }}
|
||||
{{ publicationIdentifierLabel(item) }}
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue