2026-03-25 08:38:47 +01:00
|
|
|
<template>
|
|
|
|
|
<Transition name="fade">
|
|
|
|
|
<div v-if="modelValue" class="overlay" @click="$emit('update:modelValue', false)" />
|
|
|
|
|
</Transition>
|
|
|
|
|
|
|
|
|
|
<Transition name="slide-up">
|
|
|
|
|
<div v-if="modelValue" class="sheet" role="dialog" aria-label="Informazioni app">
|
|
|
|
|
|
|
|
|
|
<div class="sheet-handle" />
|
|
|
|
|
|
2026-03-25 08:43:20 +01:00
|
|
|
<div class="sheet-top">
|
|
|
|
|
<div class="app-identity">
|
2026-03-25 09:47:31 +01:00
|
|
|
<img class="app-icon" :src="appIcon" alt="BitePlan" />
|
2026-03-25 08:43:20 +01:00
|
|
|
<div>
|
|
|
|
|
<div class="app-name">BitePlan</div>
|
|
|
|
|
<div class="app-version">Versione {{ version }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<button class="btn-x" @click="$emit('update:modelValue', false)" aria-label="Chiudi">
|
|
|
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round">
|
|
|
|
|
<line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>
|
|
|
|
|
</svg>
|
|
|
|
|
</button>
|
2026-03-25 08:38:47 +01:00
|
|
|
</div>
|
|
|
|
|
|
2026-03-25 08:43:20 +01:00
|
|
|
<div class="info-list">
|
|
|
|
|
<div class="info-row">
|
|
|
|
|
<span class="info-label">Autore</span>
|
|
|
|
|
<span class="info-value">Davide Grilli</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-row">
|
|
|
|
|
<span class="info-label">Licenza</span>
|
|
|
|
|
<span class="info-value">EUPL v1.2</span>
|
|
|
|
|
</div>
|
2026-03-27 14:32:36 +01:00
|
|
|
<button class="info-row info-row--btn" @click="$emit('open-docs')" aria-label="Apri guida">
|
|
|
|
|
<span class="info-label">Guida</span>
|
|
|
|
|
<span class="info-link">
|
2026-03-25 08:43:20 +01:00
|
|
|
Apri
|
2026-03-27 14:32:36 +01:00
|
|
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
|
|
|
<polyline points="9 18 15 12 9 6"/>
|
2026-03-25 08:43:20 +01:00
|
|
|
</svg>
|
2026-03-27 14:32:36 +01:00
|
|
|
</span>
|
|
|
|
|
</button>
|
2026-03-25 08:38:47 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</Transition>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import pkg from '../../package.json'
|
2026-03-25 09:47:31 +01:00
|
|
|
import appIcon from '../../assets/icon-only.png'
|
2026-03-25 08:38:47 +01:00
|
|
|
defineProps({ modelValue: Boolean })
|
2026-03-27 14:32:36 +01:00
|
|
|
defineEmits(['update:modelValue', 'open-docs'])
|
2026-03-25 08:38:47 +01:00
|
|
|
const version = pkg.version
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.overlay {
|
|
|
|
|
position: fixed;
|
|
|
|
|
inset: 0;
|
|
|
|
|
background: rgba(0, 0, 0, 0.4);
|
|
|
|
|
z-index: 200;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.sheet {
|
|
|
|
|
position: fixed;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
width: 100%;
|
|
|
|
|
max-width: 480px;
|
|
|
|
|
background: var(--color-surface);
|
|
|
|
|
border-radius: var(--radius) var(--radius) 0 0;
|
2026-03-25 08:43:20 +01:00
|
|
|
padding: 12px 20px 48px;
|
2026-03-25 08:38:47 +01:00
|
|
|
z-index: 201;
|
|
|
|
|
box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.sheet-handle {
|
|
|
|
|
width: 36px;
|
|
|
|
|
height: 4px;
|
|
|
|
|
background: var(--color-border);
|
|
|
|
|
border-radius: var(--radius-full);
|
2026-03-25 08:43:20 +01:00
|
|
|
margin: 0 auto 24px;
|
2026-03-25 08:38:47 +01:00
|
|
|
}
|
|
|
|
|
|
2026-03-25 08:43:20 +01:00
|
|
|
/* header: icona app + nome/versione + X */
|
|
|
|
|
.sheet-top {
|
2026-03-25 08:38:47 +01:00
|
|
|
display: flex;
|
2026-03-25 08:43:20 +01:00
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
margin-bottom: 24px;
|
2026-03-25 08:38:47 +01:00
|
|
|
}
|
|
|
|
|
|
2026-03-25 08:43:20 +01:00
|
|
|
.app-identity {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 14px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-icon {
|
|
|
|
|
width: 48px;
|
|
|
|
|
height: 48px;
|
|
|
|
|
border-radius: 12px;
|
2026-03-25 09:47:31 +01:00
|
|
|
object-fit: cover;
|
2026-03-25 08:43:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-name {
|
|
|
|
|
font-size: 1rem;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
color: var(--color-text);
|
2026-03-25 08:38:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-version {
|
|
|
|
|
font-size: 0.8rem;
|
|
|
|
|
color: var(--color-muted);
|
2026-03-25 08:43:20 +01:00
|
|
|
margin-top: 1px;
|
2026-03-25 08:38:47 +01:00
|
|
|
}
|
|
|
|
|
|
2026-03-25 08:43:20 +01:00
|
|
|
.btn-x {
|
|
|
|
|
background: var(--color-bg);
|
2026-03-25 08:38:47 +01:00
|
|
|
color: var(--color-muted);
|
2026-03-25 08:43:20 +01:00
|
|
|
min-height: 36px;
|
|
|
|
|
min-width: 36px;
|
|
|
|
|
padding: 0;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
border: 1px solid var(--color-border);
|
2026-03-25 08:38:47 +01:00
|
|
|
}
|
|
|
|
|
|
2026-03-25 08:43:20 +01:00
|
|
|
/* lista righe info */
|
|
|
|
|
.info-list {
|
|
|
|
|
border: 1px solid var(--color-border);
|
|
|
|
|
border-radius: var(--radius);
|
|
|
|
|
overflow: hidden;
|
2026-03-25 08:38:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.info-row {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
2026-03-25 08:43:20 +01:00
|
|
|
padding: 14px 16px;
|
|
|
|
|
background: var(--color-surface);
|
2026-03-25 08:38:47 +01:00
|
|
|
border-bottom: 1px solid var(--color-border);
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-25 08:43:20 +01:00
|
|
|
.info-row:last-child { border-bottom: none; }
|
2026-03-25 08:38:47 +01:00
|
|
|
|
2026-03-27 14:32:36 +01:00
|
|
|
/* riga cliccabile: reset button, mantiene layout identico alle righe statiche */
|
|
|
|
|
.info-row--btn {
|
|
|
|
|
width: 100%;
|
|
|
|
|
min-height: unset;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
background: var(--color-surface);
|
|
|
|
|
text-align: left;
|
|
|
|
|
}
|
|
|
|
|
.info-row--btn:active { background: var(--color-bg); opacity: 1; }
|
|
|
|
|
|
2026-03-25 08:38:47 +01:00
|
|
|
.info-label {
|
2026-03-25 08:43:20 +01:00
|
|
|
font-size: 0.9rem;
|
|
|
|
|
color: var(--color-text);
|
2026-03-25 08:38:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.info-value {
|
2026-03-25 08:43:20 +01:00
|
|
|
font-size: 0.9rem;
|
|
|
|
|
color: var(--color-muted);
|
2026-03-25 08:38:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.info-link {
|
2026-03-25 08:43:20 +01:00
|
|
|
font-size: 0.9rem;
|
2026-03-25 08:38:47 +01:00
|
|
|
font-weight: 600;
|
|
|
|
|
color: var(--color-primary);
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* transizioni */
|
|
|
|
|
.fade-enter-active, .fade-leave-active { transition: opacity 200ms ease; }
|
|
|
|
|
.fade-enter-from, .fade-leave-to { opacity: 0; }
|
|
|
|
|
|
|
|
|
|
.slide-up-enter-active, .slide-up-leave-active { transition: transform 250ms ease; }
|
|
|
|
|
.slide-up-enter-from, .slide-up-leave-to { transform: translateX(-50%) translateY(100%); }
|
|
|
|
|
</style>
|