<script lang="ts">
|
import { Call } from '@wailsio/runtime'
|
import { t } from '../../lib/i18n'
|
import AppIcon from '../shared/AppIcon.svelte'
|
|
let version = $state('2.1.12')
|
const currentYear = new Date().getFullYear().toString()
|
|
async function loadVersion() {
|
try {
|
const v: any = await Call.ByName('voicesnap/services.AppService.GetVersion')
|
if (v) version = v
|
} catch {}
|
}
|
loadVersion()
|
|
function openSupport() {
|
Call.ByName('voicesnap/services.AppService.OpenURL', t('about.supportUrl'))
|
}
|
</script>
|
|
<div class="about">
|
<div class="center-content">
|
<AppIcon size={80} elevated />
|
<h2 class="app-name">{t('app.name')}</h2>
|
<p class="app-secondary-name">{t('app.secondaryName')}</p>
|
<p class="app-version">v{version}</p>
|
<p class="app-tagline">{t('about.tagline')}</p>
|
<p class="app-slogan">{t('about.slogan')}</p>
|
|
<div class="legal">
|
<p>{t('about.legalText')}</p>
|
<p>{t('about.legalDetails')}</p>
|
<button type="button" class="support-link" onclick={openSupport}>
|
{t('about.supportUrl')}
|
</button>
|
</div>
|
|
<button type="button" class="support-btn" onclick={openSupport}>
|
{t('about.openSupport')}
|
</button>
|
</div>
|
|
<div class="bottom">
|
<div class="divider"></div>
|
<p class="copyright">{t('about.copyright', { year: currentYear })}</p>
|
</div>
|
</div>
|
|
<style>
|
.about {
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
justify-content: center;
|
min-height: calc(100vh - 40px);
|
background: var(--color-bg-grouped-secondary);
|
border-radius: var(--radius-md);
|
position: relative;
|
}
|
|
.center-content {
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
width: min(420px, 100%);
|
margin-top: -20px;
|
}
|
|
.app-name {
|
font-size: 22px;
|
font-weight: 700;
|
margin-top: 16px;
|
}
|
|
.app-secondary-name {
|
font-size: var(--font-size-sm);
|
color: var(--color-secondary-label);
|
margin-top: 3px;
|
}
|
|
.app-version {
|
font-size: var(--font-size-sm);
|
color: var(--color-secondary-label);
|
margin-top: 8px;
|
}
|
|
.app-tagline {
|
margin-top: 18px;
|
font-size: var(--font-size-base);
|
font-weight: 600;
|
color: var(--color-label);
|
}
|
|
.app-slogan {
|
margin-top: 4px;
|
font-size: var(--font-size-sm);
|
color: var(--color-tertiary-label);
|
}
|
|
.legal {
|
width: 100%;
|
margin-top: 28px;
|
color: var(--color-secondary-label);
|
font-size: var(--font-size-sm);
|
line-height: 1.65;
|
text-align: center;
|
}
|
|
.support-link {
|
display: inline;
|
padding: 0;
|
border: none;
|
background: transparent;
|
color: var(--color-blue);
|
font: inherit;
|
cursor: pointer;
|
word-break: break-all;
|
}
|
|
.support-btn {
|
margin-top: 20px;
|
padding: 8px 22px;
|
background: transparent;
|
border: 1.5px solid var(--color-separator);
|
border-radius: var(--radius-md);
|
font-size: var(--font-size-sm);
|
font-weight: 500;
|
color: var(--color-label);
|
cursor: pointer;
|
transition: all var(--transition-fast);
|
}
|
|
.support-btn:hover {
|
border-color: var(--color-blue);
|
color: var(--color-blue);
|
}
|
|
.bottom {
|
position: absolute;
|
bottom: 20px;
|
left: 30px;
|
right: 30px;
|
text-align: center;
|
}
|
|
.divider {
|
height: 1px;
|
background: var(--color-separator);
|
margin-bottom: 12px;
|
}
|
|
.copyright {
|
font-size: var(--font-size-xs);
|
color: var(--color-tertiary-label);
|
}
|
</style>
|