feat: assemble

This commit is contained in:
Julien Calixte
2025-08-09 11:53:43 +02:00
parent 355d0f9c6d
commit 4d5fc5abb3
2 changed files with 49 additions and 31 deletions

View File

@@ -16,14 +16,13 @@ const rawTools = computed(() =>
</script> </script>
<template> <template>
<aside class="board-game-tools prose"> <div class="board-game-tools prose">
<h2>Toolbox</h2>
<div class="overflow-x-auto" v-if="isSeitonActivated"> <div class="overflow-x-auto" v-if="isSeitonActivated">
<table class="table table-zebra"> <table class="table table-zebra">
<thead> <thead>
<tr> <tr>
<th>Tool</th> <th>Tool</th>
<th>Alias</th> <th>Reference</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -37,7 +36,7 @@ const rawTools = computed(() =>
<div v-else> <div v-else>
{{ rawTools }} {{ rawTools }}
</div> </div>
</aside> </div>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@@ -47,17 +47,23 @@ const submit = () => {
</script> </script>
<template> <template>
<header>
<button
class="btn"
v-if="!boardGameStore.currentBoardGame"
@click="boardGameStore.initGame"
>
start
</button>
</header>
<div class="board-game-workshop"> <div class="board-game-workshop">
<BoardGameToolbox class="aside" /> <aside class="prose">
<h2>Toolbox</h2>
<BoardGameToolbox />
</aside>
<div class="main prose"> <div class="main prose">
<h2 class="title">Workshop</h2> <h2 class="title">Workshop</h2>
<button
class="btn"
v-if="!boardGameStore.currentBoardGame"
@click="boardGameStore.initGame"
>
start
</button>
<div v-if="boardGameStore.currentBoardGame"> <div v-if="boardGameStore.currentBoardGame">
<form @submit.prevent="submit"> <form @submit.prevent="submit">
@@ -137,25 +143,25 @@ const submit = () => {
</div> </div>
</div> </div>
</div> </div>
<aside
class="performance prose"
v-if="duration !== null || boardGameStore.meta.perfs.length > 0"
>
<h2>Performance</h2>
<p class="duration numeric">{{ duration }}</p>
<template v-if="boardGameStore.meta.perfs.length > 0">
<h3>Last performances</h3>
<ul>
<li v-for="perf in boardGameStore.meta.perfs">
{{ toDuration(new Date(perf[0]), new Date(perf[1])) }}
</li>
</ul>
</template>
</aside>
</div> </div>
<aside
class="performance"
v-if="duration !== null || boardGameStore.meta.perfs.length > 0"
>
<h2>Performance</h2>
<p>{{ duration }}</p>
<template v-if="boardGameStore.meta.perfs.length > 0">
<h3>Last performances</h3>
<ul>
<li v-for="perf in boardGameStore.meta.perfs">
{{ toDuration(new Date(perf[0]), new Date(perf[1])) }}
</li>
</ul>
</template>
</aside>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
@@ -169,7 +175,8 @@ const submit = () => {
font-style: normal; font-style: normal;
font-size: 14px; font-size: 14px;
display: flex; display: flex;
gap: 4rem; gap: 1rem;
padding: 1rem;
input { input {
font-family: 'Google Sans Code', monospace; font-family: 'Google Sans Code', monospace;
@@ -179,6 +186,10 @@ const submit = () => {
} }
} }
h2 {
text-align: center;
}
form { form {
text-align: center; text-align: center;
} }
@@ -199,4 +210,12 @@ aside,
flex-direction: column; flex-direction: column;
gap: 1rem; gap: 1rem;
} }
.card {
margin: 1rem;
}
.duration {
text-align: right;
}
</style> </style>