From 0aaf93e573ba94332a6924dda653b227c107ebe5 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 15 Dec 2025 18:49:13 -0800 Subject: [PATCH] add link buttons to db edit pages --- .../characters/[granblueId]/edit/+page.svelte | 22 +++++++++++++++---- .../summons/[granblueId]/edit/+page.svelte | 22 +++++++++++++++---- .../weapons/[granblueId]/edit/+page.svelte | 22 +++++++++++++++---- 3 files changed, 54 insertions(+), 12 deletions(-) diff --git a/src/routes/(app)/database/characters/[granblueId]/edit/+page.svelte b/src/routes/(app)/database/characters/[granblueId]/edit/+page.svelte index 2b9ffc17..0c02e05f 100644 --- a/src/routes/(app)/database/characters/[granblueId]/edit/+page.svelte +++ b/src/routes/(app)/database/characters/[granblueId]/edit/+page.svelte @@ -25,6 +25,12 @@ import TagInput from '$lib/components/ui/TagInput.svelte' import { getCharacterImage } from '$lib/utils/images' import { CHARACTER_SERIES_NAMES } from '$lib/types/enums' + import { + buildWikiEnUrl, + buildWikiJaUrl, + buildGamewithUrl, + buildKamigameUrl + } from '$lib/utils/external-links' // Types import type { PageData } from './$types' @@ -330,32 +336,40 @@ bind:value={editData.wikiEn} editable={true} type="text" - placeholder="https://gbf.wiki/..." + placeholder="Page name (e.g., Narmaya)" width="480px" + hasLinkButton={true} + linkUrl={buildWikiEnUrl(editData.wikiEn)} /> diff --git a/src/routes/(app)/database/summons/[granblueId]/edit/+page.svelte b/src/routes/(app)/database/summons/[granblueId]/edit/+page.svelte index 4c3daf61..9a114b6c 100644 --- a/src/routes/(app)/database/summons/[granblueId]/edit/+page.svelte +++ b/src/routes/(app)/database/summons/[granblueId]/edit/+page.svelte @@ -21,6 +21,12 @@ import DetailItem from '$lib/components/ui/DetailItem.svelte' import TagInput from '$lib/components/ui/TagInput.svelte' import { getSummonImage } from '$lib/utils/images' + import { + buildWikiEnUrl, + buildWikiJaUrl, + buildGamewithUrl, + buildKamigameUrl + } from '$lib/utils/external-links' // Types import type { PageData } from './$types' @@ -263,32 +269,40 @@ bind:value={editData.wikiEn} editable={true} type="text" - placeholder="https://gbf.wiki/..." + placeholder="Page name (e.g., Bahamut)" width="480px" + hasLinkButton={true} + linkUrl={buildWikiEnUrl(editData.wikiEn)} /> diff --git a/src/routes/(app)/database/weapons/[granblueId]/edit/+page.svelte b/src/routes/(app)/database/weapons/[granblueId]/edit/+page.svelte index 29d3a85c..2501d27d 100644 --- a/src/routes/(app)/database/weapons/[granblueId]/edit/+page.svelte +++ b/src/routes/(app)/database/weapons/[granblueId]/edit/+page.svelte @@ -21,6 +21,12 @@ import DetailItem from '$lib/components/ui/DetailItem.svelte' import TagInput from '$lib/components/ui/TagInput.svelte' import { getWeaponGridImage } from '$lib/utils/images' + import { + buildWikiEnUrl, + buildWikiJaUrl, + buildGamewithUrl, + buildKamigameUrl + } from '$lib/utils/external-links' // Types import type { PageData } from './$types' @@ -273,32 +279,40 @@ bind:value={editData.wikiEn} editable={true} type="text" - placeholder="https://gbf.wiki/..." + placeholder="Page name (e.g., Cosmic_Sword)" width="480px" + hasLinkButton={true} + linkUrl={buildWikiEnUrl(editData.wikiEn)} />