add link buttons to db edit pages
This commit is contained in:
parent
6f17a69e26
commit
0aaf93e573
3 changed files with 54 additions and 12 deletions
|
|
@ -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)}
|
||||
/>
|
||||
<DetailItem
|
||||
label="Wiki (JP)"
|
||||
bind:value={editData.wikiJa}
|
||||
editable={true}
|
||||
type="text"
|
||||
placeholder="https://gbf-wiki.com/..."
|
||||
placeholder="Japanese page name"
|
||||
width="480px"
|
||||
hasLinkButton={true}
|
||||
linkUrl={buildWikiJaUrl(editData.wikiJa)}
|
||||
/>
|
||||
<DetailItem
|
||||
label="Gamewith"
|
||||
bind:value={editData.gamewith}
|
||||
editable={true}
|
||||
type="text"
|
||||
placeholder="https://xn--bck3aza1a2if6kra4ee0hf.gamewith.jp/..."
|
||||
placeholder="Article ID (e.g., 519325)"
|
||||
width="480px"
|
||||
hasLinkButton={true}
|
||||
linkUrl={buildGamewithUrl(editData.gamewith)}
|
||||
/>
|
||||
<DetailItem
|
||||
label="Kamigame"
|
||||
bind:value={editData.kamigame}
|
||||
editable={true}
|
||||
type="text"
|
||||
placeholder="https://kamigame.jp/..."
|
||||
placeholder="Slug (e.g., SSR闇フロレンス)"
|
||||
width="480px"
|
||||
hasLinkButton={true}
|
||||
linkUrl={buildKamigameUrl(editData.kamigame, 'character')}
|
||||
/>
|
||||
</DetailsContainer>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -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)}
|
||||
/>
|
||||
<DetailItem
|
||||
label="Wiki (JP)"
|
||||
bind:value={editData.wikiJa}
|
||||
editable={true}
|
||||
type="text"
|
||||
placeholder="https://gbf-wiki.com/..."
|
||||
placeholder="Japanese page name"
|
||||
width="480px"
|
||||
hasLinkButton={true}
|
||||
linkUrl={buildWikiJaUrl(editData.wikiJa)}
|
||||
/>
|
||||
<DetailItem
|
||||
label="Gamewith"
|
||||
bind:value={editData.gamewith}
|
||||
editable={true}
|
||||
type="text"
|
||||
placeholder="https://xn--bck3aza1a2if6kra4ee0hf.gamewith.jp/..."
|
||||
placeholder="Article ID (e.g., 519325)"
|
||||
width="480px"
|
||||
hasLinkButton={true}
|
||||
linkUrl={buildGamewithUrl(editData.gamewith)}
|
||||
/>
|
||||
<DetailItem
|
||||
label="Kamigame"
|
||||
bind:value={editData.kamigame}
|
||||
editable={true}
|
||||
type="text"
|
||||
placeholder="https://kamigame.jp/..."
|
||||
placeholder="Slug (e.g., SSR/アグニス)"
|
||||
width="480px"
|
||||
hasLinkButton={true}
|
||||
linkUrl={buildKamigameUrl(editData.kamigame, 'summon')}
|
||||
/>
|
||||
</DetailsContainer>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -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)}
|
||||
/>
|
||||
<DetailItem
|
||||
label="Wiki (JP)"
|
||||
bind:value={editData.wikiJa}
|
||||
editable={true}
|
||||
type="text"
|
||||
placeholder="https://gbf-wiki.com/..."
|
||||
placeholder="Japanese page name"
|
||||
width="480px"
|
||||
hasLinkButton={true}
|
||||
linkUrl={buildWikiJaUrl(editData.wikiJa)}
|
||||
/>
|
||||
<DetailItem
|
||||
label="Gamewith"
|
||||
bind:value={editData.gamewith}
|
||||
editable={true}
|
||||
type="text"
|
||||
placeholder="https://xn--bck3aza1a2if6kra4ee0hf.gamewith.jp/..."
|
||||
placeholder="Article ID (e.g., 519325)"
|
||||
width="480px"
|
||||
hasLinkButton={true}
|
||||
linkUrl={buildGamewithUrl(editData.gamewith)}
|
||||
/>
|
||||
<DetailItem
|
||||
label="Kamigame"
|
||||
bind:value={editData.kamigame}
|
||||
editable={true}
|
||||
type="text"
|
||||
placeholder="https://kamigame.jp/..."
|
||||
placeholder="Japanese name (e.g., 神刃エクス・アシャワン)"
|
||||
width="480px"
|
||||
hasLinkButton={true}
|
||||
linkUrl={buildKamigameUrl(editData.kamigame, 'weapon', editData.rarity)}
|
||||
/>
|
||||
</DetailsContainer>
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Reference in a new issue