Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge #224

Merged
merged 2 commits into from
Nov 13, 2024
Merged

Merge #224

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ct/jellyfin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ if [[ ! -d /usr/lib/jellyfin ]]; then msg_error "No ${APP} Installation Found!";
msg_info "Updating ${APP} LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
apt-get --with-new-pkgs upgrade jellyfin jellyfin-server &>/dev/null
msg_ok "Updated ${APP} LXC"
exit
}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default function RootLayout({
src={`https://${analytics.url}/script.js`}
data-website-id={analytics.token}
></script>
<link rel="canonical" href={metadata.metadataBase.href} />
<link rel="manifest" href="manifest.webmanifest" />
<link rel="preconnect" href="https://api.github.com" />
</head>
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/app/scripts/_components/ScriptAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { cn } from "@/lib/utils";
import Image from "next/image";
import Link from "next/link";
import { useState } from "react";
import { basePath } from "@/config/siteConfig";

export default function ScriptAccordion({
items,
Expand Down Expand Up @@ -104,13 +105,13 @@ export default function ScriptAccordion({
>
<div className="flex items-center">
<Image
src={script.logo || "/logo.png"}
src={script.logo || `/${basePath}/logo.png`}
height={16}
width={16}
unoptimized
onError={(e) =>
((e.currentTarget as HTMLImageElement).src =
"/logo.png")
`/${basePath}/logo.png`)
}
alt={script.name}
className="mr-1 w-4 h-4 rounded-full"
Expand Down
14 changes: 11 additions & 3 deletions frontend/src/app/scripts/_components/ScriptInfoBlocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { mostPopularScripts } from "@/config/siteConfig";
import { basePath, mostPopularScripts } from "@/config/siteConfig";
import { extractDate } from "@/lib/time";
import { Category, Script } from "@/lib/types";
import { CalendarPlus } from "lucide-react";
Expand Down Expand Up @@ -92,11 +92,15 @@ export function LatestScripts({ items }: { items: Category[] }) {
<CardTitle className="flex items-center gap-3">
<div className="flex h-16 w-16 items-center justify-center rounded-lg bg-accent p-1">
<Image
src={script.logo || "/logo.png"}
src={script.logo || `/${basePath}/logo.png`}
unoptimized
height={64}
width={64}
alt=""
onError={(e) =>
((e.currentTarget as HTMLImageElement).src =
`/${basePath}/logo.png`)
}
className="h-11 w-11 object-contain"
/>
</div>
Expand Down Expand Up @@ -161,10 +165,14 @@ export function MostViewedScripts({ items }: { items: Category[] }) {
<div className="flex max-h-16 min-h-16 min-w-16 max-w-16 items-center justify-center rounded-lg bg-accent p-1">
<Image
unoptimized
src={script.logo || "/logo.png"}
src={script.logo || `/${basePath}/logo.png`}
height={64}
width={64}
alt=""
onError={(e) =>
((e.currentTarget as HTMLImageElement).src =
`/${basePath}/logo.png`)
}
className="h-11 w-11 object-contain"
/>
</div>
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/app/scripts/_components/ScriptItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Description from "./ScriptItems/Description";
import InstallCommand from "./ScriptItems/InstallCommand";
import InterFaces from "./ScriptItems/InterFaces";
import Tooltips from "./ScriptItems/Tooltips";
import { basePath } from "@/config/siteConfig";

function ScriptItem({
item,
Expand All @@ -40,10 +41,11 @@ function ScriptItem({
<div className="flex">
<Image
className="h-32 w-32 rounded-lg bg-accent/60 object-contain p-3 shadow-md"
src={item.logo || "/logo.png"}
src={item.logo || `/${basePath}/logo.png`}
width={400}
onError={(e) =>
((e.currentTarget as HTMLImageElement).src = "/logo.png")
((e.currentTarget as HTMLImageElement).src =
`/${basePath}/logo.png`)
}
height={400}
alt={item.name}
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/components/CommandMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import React from "react";
import { Badge } from "./ui/badge";
import { Button } from "./ui/button";
import { DialogTitle } from "./ui/dialog";
import { basePath } from "@/config/siteConfig";

export const formattedBadge = (type: string) => {
switch (type) {
Expand Down Expand Up @@ -102,10 +103,10 @@ export default function CommandMenu() {
>
<div className="flex gap-2" onClick={() => setOpen(false)}>
<Image
src={script.logo || "/logo.png"}
src={script.logo || `/${basePath}/logo.png`}
onError={(e) =>
((e.currentTarget as HTMLImageElement).src =
"/logo.png")
`/${basePath}/logo.png`)
}
unoptimized
width={16}
Expand Down