mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-09 20:26:40 +00:00
clean up sidebar
This commit is contained in:
@@ -42,7 +42,7 @@ import {
|
|||||||
FaFreebsd,
|
FaFreebsd,
|
||||||
FaWindows
|
FaWindows
|
||||||
} from "react-icons/fa";
|
} from "react-icons/fa";
|
||||||
import {
|
import {
|
||||||
SiNixos,
|
SiNixos,
|
||||||
SiKubernetes
|
SiKubernetes
|
||||||
} from "react-icons/si";
|
} from "react-icons/si";
|
||||||
@@ -513,14 +513,14 @@ WantedBy=default.target`
|
|||||||
try {
|
try {
|
||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
const timeoutId = setTimeout(() => controller.abort(), 3000);
|
const timeoutId = setTimeout(() => controller.abort(), 3000);
|
||||||
|
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`https://api.github.com/repos/fosrl/newt/releases/latest`,
|
`https://api.github.com/repos/fosrl/newt/releases/latest`,
|
||||||
{ signal: controller.signal }
|
{ signal: controller.signal }
|
||||||
);
|
);
|
||||||
|
|
||||||
clearTimeout(timeoutId);
|
clearTimeout(timeoutId);
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
t("newtErrorFetchReleases", {
|
t("newtErrorFetchReleases", {
|
||||||
|
|||||||
@@ -35,11 +35,11 @@ export default function ManagedPage() {
|
|||||||
<SettingsContainer>
|
<SettingsContainer>
|
||||||
<SettingsSection>
|
<SettingsSection>
|
||||||
<SettingsSectionBody>
|
<SettingsSectionBody>
|
||||||
<p className="text-muted-foreground mb-4">
|
<p className="mb-4">
|
||||||
<strong>{t("managedSelfHosted.introTitle")}</strong>{" "}
|
<strong>{t("managedSelfHosted.introTitle")}</strong>{" "}
|
||||||
{t("managedSelfHosted.introDescription")}
|
{t("managedSelfHosted.introDescription")}
|
||||||
</p>
|
</p>
|
||||||
<p className="text-muted-foreground mb-6">
|
<p className="mb-6">
|
||||||
{t("managedSelfHosted.introDetail")}
|
{t("managedSelfHosted.introDetail")}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
@@ -75,35 +75,6 @@ export function LayoutSidebar({
|
|||||||
<div className="px-2 pt-1">
|
<div className="px-2 pt-1">
|
||||||
{!isAdminPage && user.serverAdmin && (
|
{!isAdminPage && user.serverAdmin && (
|
||||||
<div className="pb-4">
|
<div className="pb-4">
|
||||||
{build === "oss" && (
|
|
||||||
<Link
|
|
||||||
href="/admin/managed"
|
|
||||||
className={cn(
|
|
||||||
"flex items-center rounded transition-colors text-muted-foreground hover:text-foreground text-sm w-full hover:bg-secondary/50 dark:hover:bg-secondary/20 rounded-md",
|
|
||||||
isSidebarCollapsed
|
|
||||||
? "px-2 py-2 justify-center"
|
|
||||||
: "px-3 py-1.5"
|
|
||||||
)}
|
|
||||||
title={
|
|
||||||
isSidebarCollapsed
|
|
||||||
? t("managedSelfhosted")
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
className={cn(
|
|
||||||
"flex-shrink-0",
|
|
||||||
!isSidebarCollapsed && "mr-2"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<Zap className="h-4 w-4" />
|
|
||||||
</span>
|
|
||||||
{!isSidebarCollapsed && (
|
|
||||||
<span>{t("managedSelfhosted")}</span>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
href="/admin"
|
href="/admin"
|
||||||
className={cn(
|
className={cn(
|
||||||
@@ -138,7 +109,7 @@ export function LayoutSidebar({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="p-4 space-y-4 border-t shrink-0">
|
<div className="p-4 space-y-4 shrink-0">
|
||||||
<SupporterStatus isCollapsed={isSidebarCollapsed} />
|
<SupporterStatus isCollapsed={isSidebarCollapsed} />
|
||||||
{!isSidebarCollapsed && (
|
{!isSidebarCollapsed && (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
@@ -155,28 +126,6 @@ export function LayoutSidebar({
|
|||||||
<FaGithub size={12} />
|
<FaGithub size={12} />
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="text-xs text-muted-foreground ">
|
|
||||||
<Link
|
|
||||||
href="https://docs.digpangolin.com/"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
className="flex items-center justify-center gap-1"
|
|
||||||
>
|
|
||||||
{t("documentation")}
|
|
||||||
<BookOpenText size={12} />
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
<div className="text-xs text-muted-foreground text-center">
|
|
||||||
<Link
|
|
||||||
href="https://discord.gg/HCJR8Xhme4"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
className="flex items-center justify-center gap-1"
|
|
||||||
>
|
|
||||||
Discord
|
|
||||||
<FaDiscord size={12} />
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
{env?.app?.version && (
|
{env?.app?.version && (
|
||||||
<div className="text-xs text-muted-foreground text-center">
|
<div className="text-xs text-muted-foreground text-center">
|
||||||
<Link
|
<Link
|
||||||
@@ -202,7 +151,7 @@ export function LayoutSidebar({
|
|||||||
onClick={() =>
|
onClick={() =>
|
||||||
setIsSidebarCollapsed(!isSidebarCollapsed)
|
setIsSidebarCollapsed(!isSidebarCollapsed)
|
||||||
}
|
}
|
||||||
className="cursor-pointer absolute -right-2.5 top-1/2 transform -translate-y-1/2 w-2 h-8 rounded-full flex items-center justify-center transition-all duration-200 ease-in-out hover:scale-110 group z-[60]"
|
className="cursor-pointer absolute -right-2.5 top-1/2 transform -translate-y-1/2 w-2 h-8 rounded-full flex items-center justify-center transition-all duration-200 ease-in-out hover:scale-110 group z-1"
|
||||||
aria-label={
|
aria-label={
|
||||||
isSidebarCollapsed
|
isSidebarCollapsed
|
||||||
? "Expand sidebar"
|
? "Expand sidebar"
|
||||||
|
|||||||
Reference in New Issue
Block a user