Merge branch 'can-go-straight-to-sub-page'
This commit is contained in:
commit
e223d64864
@ -11,3 +11,5 @@ node_modules
|
|||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
package-lock.json
|
package-lock.json
|
||||||
yarn.lock
|
yarn.lock
|
||||||
|
Taskfile.yaml
|
||||||
|
.eslintignore
|
||||||
|
@ -5,7 +5,7 @@ version: '3'
|
|||||||
vars:
|
vars:
|
||||||
GREETING: Hello, World!
|
GREETING: Hello, World!
|
||||||
FILES:
|
FILES:
|
||||||
sh: git diff-ls --diff-filter=d main | perl -pe's/\n/ /'
|
sh: git diff-ls --diff-filter=d main
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
build: vite build
|
build: vite build
|
||||||
@ -18,8 +18,8 @@ tasks:
|
|||||||
silent: true
|
silent: true
|
||||||
lint:fix:
|
lint:fix:
|
||||||
cmds:
|
cmds:
|
||||||
- npx prettier --write {{.CLI_ARGS | default .FILES }}
|
- npx prettier --write {{.CLI_ARGS | default .FILES | catLines }}
|
||||||
# - npx eslint --fix --quiet {{.CLI_ARGS | default .FILES }}
|
- npx eslint --fix --quiet {{.CLI_ARGS | default .FILES | without '.eslintignore' | catLines }}
|
||||||
integrate:
|
integrate:
|
||||||
cmds:
|
cmds:
|
||||||
- git is-clean
|
- git is-clean
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
const api = genApi();
|
const api = genApi();
|
||||||
|
|
||||||
setContext('api', api);
|
setContext('api', api);
|
||||||
|
console.log('api set, sucka');
|
||||||
|
|
||||||
const routes = {
|
const routes = {
|
||||||
// Exact path
|
// Exact path
|
||||||
|
@ -86,10 +86,10 @@
|
|||||||
<i>arrow_backward</i>
|
<i>arrow_backward</i>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
{#if $activeCampaign.battles.length > battle.id}
|
{#if battles?.length > battle?.id}
|
||||||
<a
|
<a
|
||||||
href={`#/campaign/${$activeCampaign._id}/battle/${
|
href={`#/campaign/${$activeCampaign?._id}/battle/${
|
||||||
battle.id + 1
|
battle?.id + 1
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<button class="circle transparent">
|
<button class="circle transparent">
|
||||||
@ -103,7 +103,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getContext } from 'svelte';
|
import { getContext } from 'svelte';
|
||||||
import Stars from '@ernane/svelte-star-rating';
|
|
||||||
|
|
||||||
export let params;
|
export let params;
|
||||||
|
|
||||||
@ -113,7 +112,7 @@
|
|||||||
|
|
||||||
event?.setActiveCampaign(params.campaignId);
|
event?.setActiveCampaign(params.campaignId);
|
||||||
|
|
||||||
$: battles = $activeCampaign?.battles;
|
$: battles = $activeCampaign?.battles ?? [];
|
||||||
$: battle = battles && battles[params.battleId - 1];
|
$: battle = battles && battles[params.battleId - 1];
|
||||||
$: scenario = battle?.scenario;
|
$: scenario = battle?.scenario;
|
||||||
$: status = battle?.status;
|
$: status = battle?.status;
|
||||||
@ -122,10 +121,8 @@
|
|||||||
$: character = battle?.character;
|
$: character = battle?.character;
|
||||||
$: city = battle?.city;
|
$: city = battle?.city;
|
||||||
|
|
||||||
$: console.log(battle);
|
|
||||||
|
|
||||||
let chapter = 1 + parseInt(params.battleId / 2);
|
let chapter = 1 + parseInt(params.battleId / 2);
|
||||||
let chapterBattle =
|
$: chapterBattle =
|
||||||
params.battleId >= 7
|
params.battleId >= 7
|
||||||
? params.battleId - 6
|
? params.battleId - 6
|
||||||
: 1 + ((params.battleId - 1) % 2);
|
: 1 + ((params.battleId - 1) % 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user