mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-03 02:53:56 +00:00
fix sidebar product updates spacing
This commit is contained in:
@@ -81,10 +81,10 @@ export default function ProductUpdates({
|
|||||||
|
|
||||||
const showNewVersionPopup = Boolean(
|
const showNewVersionPopup = Boolean(
|
||||||
latestVersion &&
|
latestVersion &&
|
||||||
valid(latestVersion) &&
|
valid(latestVersion) &&
|
||||||
valid(currentVersion) &&
|
valid(currentVersion) &&
|
||||||
ignoredVersionUpdate !== latestVersion &&
|
ignoredVersionUpdate !== latestVersion &&
|
||||||
gt(latestVersion, currentVersion)
|
gt(latestVersion, currentVersion)
|
||||||
);
|
);
|
||||||
|
|
||||||
const filteredUpdates = data.updates.filter(
|
const filteredUpdates = data.updates.filter(
|
||||||
@@ -103,40 +103,51 @@ export default function ProductUpdates({
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="flex flex-col gap-1">
|
<div className="flex flex-col gap-1">
|
||||||
{filteredUpdates.length > 1 && (
|
{filteredUpdates.length > 0 && (
|
||||||
<small
|
<div className="mt-3 flex flex-col gap-2">
|
||||||
className={cn(
|
{filteredUpdates.length > 1 && (
|
||||||
"text-xs text-muted-foreground flex items-center gap-1 mt-2",
|
<small
|
||||||
showMoreUpdatesText
|
className={cn(
|
||||||
? "animate-in fade-in duration-300"
|
"text-xs text-muted-foreground flex items-center gap-1",
|
||||||
: "opacity-0"
|
showMoreUpdatesText
|
||||||
|
? "animate-in fade-in duration-300"
|
||||||
|
: "opacity-0"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<BellIcon className="flex-none size-3" />
|
||||||
|
<span>
|
||||||
|
{showNewVersionPopup
|
||||||
|
? t("productUpdateMoreInfo", {
|
||||||
|
noOfUpdates:
|
||||||
|
filteredUpdates.length
|
||||||
|
})
|
||||||
|
: t("productUpdateInfo", {
|
||||||
|
noOfUpdates:
|
||||||
|
filteredUpdates.length
|
||||||
|
})}
|
||||||
|
</span>
|
||||||
|
</small>
|
||||||
)}
|
)}
|
||||||
>
|
<ProductUpdatesListPopup
|
||||||
<BellIcon className="flex-none size-3" />
|
updates={filteredUpdates}
|
||||||
<span>
|
show={filteredUpdates.length > 0}
|
||||||
{showNewVersionPopup
|
onDimissAll={() =>
|
||||||
? t("productUpdateMoreInfo", {
|
setProductUpdatesRead([
|
||||||
noOfUpdates: filteredUpdates.length
|
...productUpdatesRead,
|
||||||
})
|
...filteredUpdates.map(
|
||||||
: t("productUpdateInfo", {
|
(update) => update.id
|
||||||
noOfUpdates: filteredUpdates.length
|
)
|
||||||
})}
|
])
|
||||||
</span>
|
}
|
||||||
</small>
|
onDimiss={(id) =>
|
||||||
|
setProductUpdatesRead([
|
||||||
|
...productUpdatesRead,
|
||||||
|
id
|
||||||
|
])
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
<ProductUpdatesListPopup
|
|
||||||
updates={filteredUpdates}
|
|
||||||
show={filteredUpdates.length > 0}
|
|
||||||
onDimissAll={() =>
|
|
||||||
setProductUpdatesRead([
|
|
||||||
...productUpdatesRead,
|
|
||||||
...filteredUpdates.map((update) => update.id)
|
|
||||||
])
|
|
||||||
}
|
|
||||||
onDimiss={(id) =>
|
|
||||||
setProductUpdatesRead([...productUpdatesRead, id])
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<NewVersionAvailable
|
<NewVersionAvailable
|
||||||
|
|||||||
Reference in New Issue
Block a user