feat: input and history pages
Lint / Oxlint (push) Successful in 55s
Lint / TypeScript (push) Successful in 58s
Lint / ESLint (push) Successful in 1m0s
Deploy / Build (push) Successful in 1m13s
Deploy / Deploy to Stapler (push) Successful in 4m27s

This commit is contained in:
2026-06-17 15:44:23 +02:00
parent 0e4cc45439
commit fea4fdba05
13 changed files with 256 additions and 121 deletions
+21 -18
View File
@@ -1,15 +1,11 @@
<script setup lang="ts">
import { ref, onMounted, onBeforeMount } from "vue";
import PageRandom from "@/components/PageRandom.vue";
// import PageInput from "@/components/PageInput.vue";
import PageInput from "@/components/PageInput.vue";
import { DomainFactory } from "@/lib/factory";
function getLang() {
return document.location.hash === "#french" ? "french" : "english";
}
import PageHistory from "./components/PageHistory.vue";
const visible = ref<boolean>(false);
const lang = ref<string>(getLang());
const factory = ref<DomainFactory>(new DomainFactory());
onBeforeMount(() => {
@@ -20,12 +16,6 @@ onMounted(() => {
setTimeout(() => {
visible.value = true;
});
setInterval(() => {
const newLang = getLang();
if (newLang !== lang.value) {
lang.value = newLang;
}
}, 100);
});
</script>
@@ -36,27 +26,40 @@ onMounted(() => {
type="radio"
name="app_tabs"
class="tab"
:aria-label="lang === 'french' ? 'Aléatoire' : 'Random'"
:aria-label="$t('tab.random')"
checked
/>
<div
class="tab-content bg-base-100 border-base-300 shadow-2xl p-6 overflow-hidden"
>
<PageRandom :lang="lang" :factory="factory" />
<PageRandom :factory="factory" />
</div>
<!-- <input
<input
type="radio"
name="app_tabs"
class="tab"
:aria-label="lang === 'french' ? 'Saisie' : 'Input'"
:aria-label="$t('tab.input')"
checked
/>
<div
class="tab-content bg-base-100 border-base-300 shadow-2xl p-6 overflow-hidden"
>
<PageInput :lang="lang" :factory="factory" />
</div> -->
<PageInput :factory="factory" />
</div>
<input
type="radio"
name="app_tabs"
class="tab"
:aria-label="$t('tab.history')"
checked
/>
<div
class="tab-content bg-base-100 border-base-300 shadow-2xl p-6 overflow-x-hidden overflow-y-scroll max-h-96"
>
<PageHistory :factory="factory" />
</div>
</div>
</div>
</template>