fix: ui fixes in transcript nav
This commit is contained in:
@@ -13,7 +13,7 @@ const views = [
|
|||||||
|
|
||||||
export function TranscriptionsNav({ currentView }: { currentView: string }) {
|
export function TranscriptionsNav({ currentView }: { currentView: string }) {
|
||||||
return (
|
return (
|
||||||
<div className="flex gap-2 border-b border-border pb-3">
|
<div className="flex gap-2 border-b border-border pb-3 overflow-x-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden">
|
||||||
{views.map((v) => {
|
{views.map((v) => {
|
||||||
const Icon = v.icon;
|
const Icon = v.icon;
|
||||||
const isActive = currentView === v.key;
|
const isActive = currentView === v.key;
|
||||||
@@ -22,7 +22,7 @@ export function TranscriptionsNav({ currentView }: { currentView: string }) {
|
|||||||
key={v.key}
|
key={v.key}
|
||||||
href={`/transcriptions?view=${v.key}`}
|
href={`/transcriptions?view=${v.key}`}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors",
|
"flex shrink-0 items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors",
|
||||||
isActive
|
isActive
|
||||||
? "bg-primary/10 text-primary"
|
? "bg-primary/10 text-primary"
|
||||||
: "text-muted-foreground hover:bg-muted hover:text-foreground",
|
: "text-muted-foreground hover:bg-muted hover:text-foreground",
|
||||||
|
|||||||
@@ -344,9 +344,18 @@ function Caption({
|
|||||||
<div className="text-sm text-foreground leading-relaxed">
|
<div className="text-sm text-foreground leading-relaxed">
|
||||||
<p
|
<p
|
||||||
ref={pRef}
|
ref={pRef}
|
||||||
|
onClick={
|
||||||
|
showToggle
|
||||||
|
? (e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
onToggle();
|
||||||
|
}
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
className={cn(
|
className={cn(
|
||||||
"font-[family-name:var(--font-title)] break-words",
|
"font-[family-name:var(--font-title)] break-words",
|
||||||
!expanded && "line-clamp-3",
|
!expanded && "line-clamp-3",
|
||||||
|
showToggle && "cursor-pointer",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
“{text}”
|
“{text}”
|
||||||
|
|||||||
Reference in New Issue
Block a user