update snapshots

This commit is contained in:
Yanick Champoux 2023-04-28 14:16:32 -04:00
parent d2dc9e31ca
commit 27b4d86cee
14 changed files with 27 additions and 196 deletions

View File

@ -266,6 +266,33 @@
],
"virtual": false,
"markdownFile": null
},
{
"id": "src-routes-export-print-printship-weapons-index-story-svelte",
"title": "Weapons",
"group": null,
"layout": {
"type": "single",
"iframe": true
},
"icon": null,
"iconColor": null,
"docsOnly": false,
"variants": [
{
"id": "_default",
"title": "default"
}
],
"relativePath": "src/routes/export/print/PrintShip/Weapons/index.story.svelte",
"supportPluginId": "svelte3",
"treePath": [
"Export",
"PrintShip",
"Weapons"
],
"virtual": false,
"markdownFile": null
}
],
"markdownFiles": []

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -1,92 +0,0 @@
{#if showChangelog}
<Card>
<h2 slot="header">Changelog for the Docks</h2>
<div class="changelog">
<Changelog />
</div>
</Card>
{:else}
<Card>
<div slot="header" class="header">
<h2>Welcome to the docks</h2>
<div class="version">
<div>version {import.meta.env.PACKAGE_VERSION}</div>
<a on:click={() => (showChangelog = true)}>changelog</a>
</div>
</div>
<p>
This app is a ship builder for the game
<a href="https://shop.groundzerogames.co.uk/rules.html">Full Thrust</a>
.
</p>
<p>
The contruction rules are following the
<a href="http://members.ozemail.com.au/~laranzu/fullthrust/rules/">
Cross Dimensions rules
</a>
as closely as possible.
</p>
<p>
The app is mostly developed for Firefox. I also check as much as I can
that I don't mess things too badly on Chrome. For the other browsers...
caveat emptor.
</p>
<p>
Written by
<a href="https://twitter.com/yenzie">Yanick Champoux</a>
. Code available on
<a href="https://github.com/aotds/aotds-shipyard">Github</a>.
</p>
</Card>
{/if}
<script>
import { Modal, Card } from "svelte-chota";
import Changelog from "./Changelog.svelte";
let showChangelog = false;
</script>
<style>
h2 {
font-size: var(--font-scale-14);
font-family: Faktos;
margin-bottom: 0px;
}
.header {
margin-bottom: 1em;
display: flex;
align-items: center;
}
p {
margin-left: 2em;
}
.version {
flex: 1;
text-align: right;
}
.changelog :global(h1),
:global(h1 + p) {
display: none;
}
.changelog :global(h2) {
font-size: var(--font-scale-12);
font-family: Faktos;
}
.changelog :global(h3) {
font-size: var(--font-scale-12);
font-family: Faktos;
}
.version a {
display: inline-block;
}
</style>

View File

@ -1,94 +0,0 @@
<header>
<h1>The Docks</h1>
<h2>
a <a href="https://shop.groundzerogames.co.uk/rules.html">Full Thrust</a> ship
builder
</h2>
<a on:click|preventDefault={() => (showAbout = true)}>about the app</a>
</header>
<div class="menu">
<Tabs bind:active={activeTab}>
<Tab tabid="editor">editor</Tab>
<Tab tabid="json">json view</Tab>
<Tab tabid="print">print view</Tab>
</Tabs>
<div class="actions">
<a on:click|preventDefault={resetShip}>reset ship</a>
</div>
</div>
<Modal bind:open={showAbout}>
<About />
</Modal>
<script>
import { getContext, createEventDispatcher } from "svelte";
import { Modal, Card, Nav, Tab, Tabs } from "svelte-chota";
import About from "./About.svelte";
let showAbout = false;
let activeTab = "editor";
const ship = getContext("ship");
const dispatch = createEventDispatcher();
$: dispatch("changeTab", activeTab);
const resetShip = () => {
if (!window.confirm("you really want to reset the ship?")) return;
ship.dispatch.resetShip();
};
</script>
<style>
header {
display: flex;
align-items: baseline;
width: var(--main-width);
margin-left: auto;
margin-right: auto;
margin-bottom: 1em;
}
h1,
h2 {
text-align: left;
font-family: Faktos;
padding: 0px;
margin: 0px;
}
h1 {
font-size: var(--font-scale-15);
}
h2 {
flex: 1;
padding-left: 1em;
font-size: var(--font-scale-13);
}
header > a {
margin: 0px 2em;
font-size: var(--font-scale-10);
}
div :global(nav) {
margin-left: 2em;
margin-bottom: 2em;
}
div :global(nav span) {
font-weight: bold;
font-family: var(--main-font-family);
font-size: var(--font-scale-12);
margin-right: 1em;
padding-bottom: 0.125em !important;
}
.menu {
display: flex;
align-items: baseline;
}
.menu .actions {
flex: 1;
text-align: right;
}
</style>

View File

@ -1,10 +0,0 @@
import { test, expect } from "vitest";
import { render } from "@testing-library/svelte";
import App from "./Header.svelte";
test("reset ship link is present", () => {
const { queryByText } = render(App);
expect(queryByText("reset ship")).toBeTruthy();
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB