feat : update
This commit is contained in:
@@ -75,7 +75,7 @@ export default async function StructuredEditorPage({
|
|||||||
<ArrowLeftIcon />
|
<ArrowLeftIcon />
|
||||||
</Button>
|
</Button>
|
||||||
<div className="relative size-16 shrink-0 overflow-hidden rounded-lg border">
|
<div className="relative size-16 shrink-0 overflow-hidden rounded-lg border">
|
||||||
<Image src={guide.coverUrl} alt={guide.name} fill className="object-cover" />
|
<Image src={guide.coverUrl} alt={guide.name} fill sizes="64px" className="object-cover" />
|
||||||
</div>
|
</div>
|
||||||
<div className="min-w-0">
|
<div className="min-w-0">
|
||||||
<p className="text-sm text-muted-foreground">{guide.name}</p>
|
<p className="text-sm text-muted-foreground">{guide.name}</p>
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ const sections = [
|
|||||||
{ slug: "team", title: "Team Calc", description: "ตัวละคร 4 ตัว Damage share, DPS และ Combo" },
|
{ slug: "team", title: "Team Calc", description: "ตัวละคร 4 ตัว Damage share, DPS และ Combo" },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function GuideOverviewPage({ params }: { params: Promise<{ character: string }> }) {
|
export default async function GuideOverviewPage({ params }: { params: Promise<{ character: string }> }) {
|
||||||
await connection();
|
await connection();
|
||||||
if (!(await getAdminSession())) redirect("/admin/login");
|
if (!(await getAdminSession())) redirect("/admin/login");
|
||||||
@@ -42,7 +44,7 @@ export default async function GuideOverviewPage({ params }: { params: Promise<{
|
|||||||
<ArrowLeftIcon />
|
<ArrowLeftIcon />
|
||||||
</Button>
|
</Button>
|
||||||
<div className="relative size-16 overflow-hidden rounded-lg border">
|
<div className="relative size-16 overflow-hidden rounded-lg border">
|
||||||
<Image src={guide.coverUrl} alt={guide.name} fill className="object-cover" />
|
<Image src={guide.coverUrl} alt={guide.name} fill sizes="64px" className="object-cover" />
|
||||||
</div>
|
</div>
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<p className="text-sm text-muted-foreground">เลือกส่วนที่ต้องการแก้ไข</p>
|
<p className="text-sm text-muted-foreground">เลือกส่วนที่ต้องการแก้ไข</p>
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import {
|
|||||||
} from "@/lib/catalog/sync";
|
} from "@/lib/catalog/sync";
|
||||||
import { listGuideCards } from "@/lib/guides/queries";
|
import { listGuideCards } from "@/lib/guides/queries";
|
||||||
|
|
||||||
|
export const instant = false;
|
||||||
|
|
||||||
export default async function AdminPage() {
|
export default async function AdminPage() {
|
||||||
await connection();
|
await connection();
|
||||||
if (!(await getAdminSession())) redirect("/admin/login");
|
if (!(await getAdminSession())) redirect("/admin/login");
|
||||||
|
|||||||
@@ -451,6 +451,7 @@ function CatalogPicker({
|
|||||||
src={selected.imageUrl}
|
src={selected.imageUrl}
|
||||||
alt=""
|
alt=""
|
||||||
fill
|
fill
|
||||||
|
sizes="40px"
|
||||||
className="object-contain"
|
className="object-contain"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -491,6 +492,7 @@ function CatalogPicker({
|
|||||||
src={item.imageUrl}
|
src={item.imageUrl}
|
||||||
alt=""
|
alt=""
|
||||||
fill
|
fill
|
||||||
|
sizes="32px"
|
||||||
className="object-contain"
|
className="object-contain"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -1336,6 +1338,7 @@ function WeaponEditor({ guide, weapons, characters, initial }: EditorBase) {
|
|||||||
src={selectedWeapon.imageUrl}
|
src={selectedWeapon.imageUrl}
|
||||||
alt=""
|
alt=""
|
||||||
fill
|
fill
|
||||||
|
sizes="40px"
|
||||||
className="object-contain"
|
className="object-contain"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -3840,7 +3843,7 @@ function ExtraCatalogItemsEditor({
|
|||||||
<CardContent className="flex items-center gap-3">
|
<CardContent className="flex items-center gap-3">
|
||||||
{item ? (
|
{item ? (
|
||||||
<div className={cn("relative size-12 shrink-0 overflow-hidden rounded-md", rarityGradientClass(item.rarity))}>
|
<div className={cn("relative size-12 shrink-0 overflow-hidden rounded-md", rarityGradientClass(item.rarity))}>
|
||||||
<Image src={item.imageUrl} alt="" fill className="object-contain" />
|
<Image src={item.imageUrl} alt="" fill sizes="48px" className="object-contain" />
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ export function MaterialPoster({
|
|||||||
src={characterArtUrl}
|
src={characterArtUrl}
|
||||||
alt={character.name}
|
alt={character.name}
|
||||||
fill
|
fill
|
||||||
|
unoptimized
|
||||||
sizes={`${artworkImageSize}px`}
|
sizes={`${artworkImageSize}px`}
|
||||||
quality={POSTER_IMAGE_QUALITY}
|
quality={POSTER_IMAGE_QUALITY}
|
||||||
className="object-contain object-center"
|
className="object-contain object-center"
|
||||||
@@ -158,6 +159,7 @@ export function MaterialPoster({
|
|||||||
src={characterArtUrl}
|
src={characterArtUrl}
|
||||||
alt=""
|
alt=""
|
||||||
fill
|
fill
|
||||||
|
unoptimized
|
||||||
sizes={`${artworkImageSize}px`}
|
sizes={`${artworkImageSize}px`}
|
||||||
quality={POSTER_IMAGE_QUALITY}
|
quality={POSTER_IMAGE_QUALITY}
|
||||||
className="object-contain object-center"
|
className="object-contain object-center"
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ export function StructuredGuideShell({
|
|||||||
src={guide.coverUrl}
|
src={guide.coverUrl}
|
||||||
alt={guide.name}
|
alt={guide.name}
|
||||||
fill
|
fill
|
||||||
|
sizes="44px"
|
||||||
className="object-cover"
|
className="object-cover"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -217,6 +218,7 @@ function GuideOverview({
|
|||||||
src={guide.coverUrl}
|
src={guide.coverUrl}
|
||||||
alt={`ไกด์ ${guide.name}`}
|
alt={`ไกด์ ${guide.name}`}
|
||||||
fill
|
fill
|
||||||
|
sizes="(min-width: 1280px) 600px, (min-width: 1024px) calc(50vw - 44px), calc(100vw - 32px)"
|
||||||
priority
|
priority
|
||||||
className="object-cover"
|
className="object-cover"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -276,6 +276,7 @@ function TeamCard({
|
|||||||
alt={member.character.name}
|
alt={member.character.name}
|
||||||
fill
|
fill
|
||||||
loading={exporting ? "eager" : undefined}
|
loading={exporting ? "eager" : undefined}
|
||||||
|
sizes="(min-width: 1280px) 184px, (min-width: 640px) 16vw, 25vw"
|
||||||
className="object-contain"
|
className="object-contain"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -304,6 +305,7 @@ function TeamCard({
|
|||||||
alt={member.weapon.name}
|
alt={member.weapon.name}
|
||||||
fill
|
fill
|
||||||
loading={exporting ? "eager" : undefined}
|
loading={exporting ? "eager" : undefined}
|
||||||
|
sizes="(min-width: 1280px) 86px, (min-width: 640px) 8vw, 12.5vw"
|
||||||
className="object-contain p-1"
|
className="object-contain p-1"
|
||||||
/>
|
/>
|
||||||
<Kbd className="absolute top-0 right-0 h-3 min-w-3 bg-transparent p-0 text-white">
|
<Kbd className="absolute top-0 right-0 h-3 min-w-3 bg-transparent p-0 text-white">
|
||||||
|
|||||||
Reference in New Issue
Block a user