feat : overhual [no ci]
This commit is contained in:
@@ -30,7 +30,7 @@ export function AdminHeader() {
|
||||
className="mr-auto flex min-h-11 items-center gap-3 rounded-lg font-heading font-semibold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
||||
>
|
||||
<Image src="/icon.png" alt="" width={36} height={36} className="size-9 object-contain" />
|
||||
<span className="hidden sm:inline">{exportText("watermark")}</span>
|
||||
<span className="hidden sm:inline">Buzz Guide</span>
|
||||
</Link>
|
||||
<LanguageDropdown />
|
||||
<nav aria-label="Admin navigation" className="flex items-center gap-1">
|
||||
|
||||
@@ -121,15 +121,15 @@ function SortableBleedingLayer({ layer, onChange, onRemove }: { layer: BleedingL
|
||||
items={blendModeItems}
|
||||
value={selectedMode}
|
||||
onValueChange={(value) => value && onChange({ blendMode: value.value })}
|
||||
itemToStringLabel={(item) => t(item.label)}
|
||||
itemToStringLabel={(item) => item.label}
|
||||
itemToStringValue={(item) => item.value}
|
||||
filter={(item, query) => `${t(item.label)} ${item.label} ${item.value}`.toLowerCase().includes(query.trim().toLowerCase())}
|
||||
filter={(item, query) => `${item.label} ${item.value}`.toLowerCase().includes(query.trim().toLowerCase())}
|
||||
>
|
||||
<ComboboxInput className="w-full" placeholder={t("เลือก Blend mode…")} />
|
||||
<ComboboxContent>
|
||||
<ComboboxEmpty>{t("ไม่พบ Blend mode")}</ComboboxEmpty>
|
||||
<ComboboxList>
|
||||
{(item) => <ComboboxItem key={item.value} value={item}>{t(item.label)}</ComboboxItem>}
|
||||
{(item) => <ComboboxItem key={item.value} value={item}>{item.label}</ComboboxItem>}
|
||||
</ComboboxList>
|
||||
</ComboboxContent>
|
||||
</Combobox>
|
||||
|
||||
@@ -100,7 +100,6 @@ import {
|
||||
weaponTypeIconPath,
|
||||
type OverviewRole,
|
||||
} from "@/lib/overview-image";
|
||||
import { withoutNotesFileName } from "@/lib/guides/export-text";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type Character = {
|
||||
@@ -649,10 +648,10 @@ function SortableBlendLayerRow({
|
||||
onValueChange={(value) => {
|
||||
if (value) onUpdate({ mode: value.value });
|
||||
}}
|
||||
itemToStringLabel={(item) => t(item.label)}
|
||||
itemToStringLabel={(item) => item.label}
|
||||
itemToStringValue={(item) => item.value}
|
||||
filter={(item, query) =>
|
||||
`${t(item.label)} ${item.label} ${item.value}`
|
||||
`${item.label} ${item.value}`
|
||||
.toLocaleLowerCase("en")
|
||||
.includes(query.trim().toLocaleLowerCase("en"))
|
||||
}
|
||||
@@ -663,7 +662,7 @@ function SortableBlendLayerRow({
|
||||
<ComboboxList>
|
||||
{(item) => (
|
||||
<ComboboxItem key={item.value} value={item}>
|
||||
{t(item.label)}
|
||||
{item.label}
|
||||
</ComboboxItem>
|
||||
)}
|
||||
</ComboboxList>
|
||||
@@ -1006,7 +1005,7 @@ export function OverviewImageGenerator({
|
||||
}
|
||||
}
|
||||
|
||||
async function download(includeNotes = true) {
|
||||
async function download() {
|
||||
const node = captureRef.current;
|
||||
if (
|
||||
!node ||
|
||||
@@ -1038,7 +1037,7 @@ export function OverviewImageGenerator({
|
||||
const link = document.createElement("a");
|
||||
link.href = url;
|
||||
const fileName = overviewFileName(character.key, displayRole);
|
||||
link.download = includeNotes ? fileName : withoutNotesFileName(fileName);
|
||||
link.download = fileName;
|
||||
document.body.append(link);
|
||||
link.click();
|
||||
link.remove();
|
||||
@@ -1343,15 +1342,6 @@ export function OverviewImageGenerator({
|
||||
)}
|
||||
{exporting ? e("exporting") : e("downloadPng", { width: 3000, height: 3000 })}
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
className="w-full"
|
||||
disabled={!ready || exporting}
|
||||
onClick={() => void download(false)}
|
||||
>
|
||||
<DownloadIcon data-icon="inline-start" />
|
||||
{e("withoutNote")}
|
||||
</Button>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user