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 TagInput from '$lib/components/ui/TagInput.svelte'
|
||||||
import { getCharacterImage } from '$lib/utils/images'
|
import { getCharacterImage } from '$lib/utils/images'
|
||||||
import { CHARACTER_SERIES_NAMES } from '$lib/types/enums'
|
import { CHARACTER_SERIES_NAMES } from '$lib/types/enums'
|
||||||
|
import {
|
||||||
|
buildWikiEnUrl,
|
||||||
|
buildWikiJaUrl,
|
||||||
|
buildGamewithUrl,
|
||||||
|
buildKamigameUrl
|
||||||
|
} from '$lib/utils/external-links'
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import type { PageData } from './$types'
|
import type { PageData } from './$types'
|
||||||
|
|
@ -330,32 +336,40 @@
|
||||||
bind:value={editData.wikiEn}
|
bind:value={editData.wikiEn}
|
||||||
editable={true}
|
editable={true}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="https://gbf.wiki/..."
|
placeholder="Page name (e.g., Narmaya)"
|
||||||
width="480px"
|
width="480px"
|
||||||
|
hasLinkButton={true}
|
||||||
|
linkUrl={buildWikiEnUrl(editData.wikiEn)}
|
||||||
/>
|
/>
|
||||||
<DetailItem
|
<DetailItem
|
||||||
label="Wiki (JP)"
|
label="Wiki (JP)"
|
||||||
bind:value={editData.wikiJa}
|
bind:value={editData.wikiJa}
|
||||||
editable={true}
|
editable={true}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="https://gbf-wiki.com/..."
|
placeholder="Japanese page name"
|
||||||
width="480px"
|
width="480px"
|
||||||
|
hasLinkButton={true}
|
||||||
|
linkUrl={buildWikiJaUrl(editData.wikiJa)}
|
||||||
/>
|
/>
|
||||||
<DetailItem
|
<DetailItem
|
||||||
label="Gamewith"
|
label="Gamewith"
|
||||||
bind:value={editData.gamewith}
|
bind:value={editData.gamewith}
|
||||||
editable={true}
|
editable={true}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="https://xn--bck3aza1a2if6kra4ee0hf.gamewith.jp/..."
|
placeholder="Article ID (e.g., 519325)"
|
||||||
width="480px"
|
width="480px"
|
||||||
|
hasLinkButton={true}
|
||||||
|
linkUrl={buildGamewithUrl(editData.gamewith)}
|
||||||
/>
|
/>
|
||||||
<DetailItem
|
<DetailItem
|
||||||
label="Kamigame"
|
label="Kamigame"
|
||||||
bind:value={editData.kamigame}
|
bind:value={editData.kamigame}
|
||||||
editable={true}
|
editable={true}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="https://kamigame.jp/..."
|
placeholder="Slug (e.g., SSR闇フロレンス)"
|
||||||
width="480px"
|
width="480px"
|
||||||
|
hasLinkButton={true}
|
||||||
|
linkUrl={buildKamigameUrl(editData.kamigame, 'character')}
|
||||||
/>
|
/>
|
||||||
</DetailsContainer>
|
</DetailsContainer>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,12 @@
|
||||||
import DetailItem from '$lib/components/ui/DetailItem.svelte'
|
import DetailItem from '$lib/components/ui/DetailItem.svelte'
|
||||||
import TagInput from '$lib/components/ui/TagInput.svelte'
|
import TagInput from '$lib/components/ui/TagInput.svelte'
|
||||||
import { getSummonImage } from '$lib/utils/images'
|
import { getSummonImage } from '$lib/utils/images'
|
||||||
|
import {
|
||||||
|
buildWikiEnUrl,
|
||||||
|
buildWikiJaUrl,
|
||||||
|
buildGamewithUrl,
|
||||||
|
buildKamigameUrl
|
||||||
|
} from '$lib/utils/external-links'
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import type { PageData } from './$types'
|
import type { PageData } from './$types'
|
||||||
|
|
@ -263,32 +269,40 @@
|
||||||
bind:value={editData.wikiEn}
|
bind:value={editData.wikiEn}
|
||||||
editable={true}
|
editable={true}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="https://gbf.wiki/..."
|
placeholder="Page name (e.g., Bahamut)"
|
||||||
width="480px"
|
width="480px"
|
||||||
|
hasLinkButton={true}
|
||||||
|
linkUrl={buildWikiEnUrl(editData.wikiEn)}
|
||||||
/>
|
/>
|
||||||
<DetailItem
|
<DetailItem
|
||||||
label="Wiki (JP)"
|
label="Wiki (JP)"
|
||||||
bind:value={editData.wikiJa}
|
bind:value={editData.wikiJa}
|
||||||
editable={true}
|
editable={true}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="https://gbf-wiki.com/..."
|
placeholder="Japanese page name"
|
||||||
width="480px"
|
width="480px"
|
||||||
|
hasLinkButton={true}
|
||||||
|
linkUrl={buildWikiJaUrl(editData.wikiJa)}
|
||||||
/>
|
/>
|
||||||
<DetailItem
|
<DetailItem
|
||||||
label="Gamewith"
|
label="Gamewith"
|
||||||
bind:value={editData.gamewith}
|
bind:value={editData.gamewith}
|
||||||
editable={true}
|
editable={true}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="https://xn--bck3aza1a2if6kra4ee0hf.gamewith.jp/..."
|
placeholder="Article ID (e.g., 519325)"
|
||||||
width="480px"
|
width="480px"
|
||||||
|
hasLinkButton={true}
|
||||||
|
linkUrl={buildGamewithUrl(editData.gamewith)}
|
||||||
/>
|
/>
|
||||||
<DetailItem
|
<DetailItem
|
||||||
label="Kamigame"
|
label="Kamigame"
|
||||||
bind:value={editData.kamigame}
|
bind:value={editData.kamigame}
|
||||||
editable={true}
|
editable={true}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="https://kamigame.jp/..."
|
placeholder="Slug (e.g., SSR/アグニス)"
|
||||||
width="480px"
|
width="480px"
|
||||||
|
hasLinkButton={true}
|
||||||
|
linkUrl={buildKamigameUrl(editData.kamigame, 'summon')}
|
||||||
/>
|
/>
|
||||||
</DetailsContainer>
|
</DetailsContainer>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,12 @@
|
||||||
import DetailItem from '$lib/components/ui/DetailItem.svelte'
|
import DetailItem from '$lib/components/ui/DetailItem.svelte'
|
||||||
import TagInput from '$lib/components/ui/TagInput.svelte'
|
import TagInput from '$lib/components/ui/TagInput.svelte'
|
||||||
import { getWeaponGridImage } from '$lib/utils/images'
|
import { getWeaponGridImage } from '$lib/utils/images'
|
||||||
|
import {
|
||||||
|
buildWikiEnUrl,
|
||||||
|
buildWikiJaUrl,
|
||||||
|
buildGamewithUrl,
|
||||||
|
buildKamigameUrl
|
||||||
|
} from '$lib/utils/external-links'
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import type { PageData } from './$types'
|
import type { PageData } from './$types'
|
||||||
|
|
@ -273,32 +279,40 @@
|
||||||
bind:value={editData.wikiEn}
|
bind:value={editData.wikiEn}
|
||||||
editable={true}
|
editable={true}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="https://gbf.wiki/..."
|
placeholder="Page name (e.g., Cosmic_Sword)"
|
||||||
width="480px"
|
width="480px"
|
||||||
|
hasLinkButton={true}
|
||||||
|
linkUrl={buildWikiEnUrl(editData.wikiEn)}
|
||||||
/>
|
/>
|
||||||
<DetailItem
|
<DetailItem
|
||||||
label="Wiki (JP)"
|
label="Wiki (JP)"
|
||||||
bind:value={editData.wikiJa}
|
bind:value={editData.wikiJa}
|
||||||
editable={true}
|
editable={true}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="https://gbf-wiki.com/..."
|
placeholder="Japanese page name"
|
||||||
width="480px"
|
width="480px"
|
||||||
|
hasLinkButton={true}
|
||||||
|
linkUrl={buildWikiJaUrl(editData.wikiJa)}
|
||||||
/>
|
/>
|
||||||
<DetailItem
|
<DetailItem
|
||||||
label="Gamewith"
|
label="Gamewith"
|
||||||
bind:value={editData.gamewith}
|
bind:value={editData.gamewith}
|
||||||
editable={true}
|
editable={true}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="https://xn--bck3aza1a2if6kra4ee0hf.gamewith.jp/..."
|
placeholder="Article ID (e.g., 519325)"
|
||||||
width="480px"
|
width="480px"
|
||||||
|
hasLinkButton={true}
|
||||||
|
linkUrl={buildGamewithUrl(editData.gamewith)}
|
||||||
/>
|
/>
|
||||||
<DetailItem
|
<DetailItem
|
||||||
label="Kamigame"
|
label="Kamigame"
|
||||||
bind:value={editData.kamigame}
|
bind:value={editData.kamigame}
|
||||||
editable={true}
|
editable={true}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="https://kamigame.jp/..."
|
placeholder="Japanese name (e.g., 神刃エクス・アシャワン)"
|
||||||
width="480px"
|
width="480px"
|
||||||
|
hasLinkButton={true}
|
||||||
|
linkUrl={buildKamigameUrl(editData.kamigame, 'weapon', editData.rarity)}
|
||||||
/>
|
/>
|
||||||
</DetailsContainer>
|
</DetailsContainer>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue