2026-01-04 22:50:34 +05:00
|
|
|
<script lang="ts">
|
|
|
|
|
import { onMount } from "svelte"
|
2026-01-04 09:00:51 +05:00
|
|
|
import { invoke } from "@tauri-apps/api/core"
|
2026-01-07 05:04:04 +05:00
|
|
|
import { appInfo, currentLanguage, translations, translate } from "@/stores"
|
|
|
|
|
|
|
|
|
|
$: t = (key: string) => translate($translations, key)
|
2023-06-11 19:18:58 +05:00
|
|
|
|
2026-01-04 22:50:34 +05:00
|
|
|
let authorName = ""
|
|
|
|
|
let tgLink = ""
|
|
|
|
|
let repoLink = ""
|
2026-01-07 05:04:04 +05:00
|
|
|
let boostyLink = ""
|
|
|
|
|
let patreonLink = ""
|
2023-06-11 19:18:58 +05:00
|
|
|
|
2026-01-04 22:50:34 +05:00
|
|
|
const currentYear = new Date().getFullYear()
|
2023-06-11 19:18:58 +05:00
|
|
|
|
2026-01-04 22:50:34 +05:00
|
|
|
appInfo.subscribe(info => {
|
|
|
|
|
tgLink = info.tgOfficialLink
|
|
|
|
|
repoLink = info.repositoryLink
|
2026-01-07 05:04:04 +05:00
|
|
|
boostyLink = info.boostySupportLink
|
|
|
|
|
patreonLink = info.patreonSupportLink
|
2026-01-04 22:50:34 +05:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onMount(async () => {
|
|
|
|
|
try {
|
|
|
|
|
authorName = await invoke<string>("get_author_name")
|
|
|
|
|
} catch (err) {
|
|
|
|
|
console.error("failed to get author name:", err)
|
|
|
|
|
}
|
|
|
|
|
})
|
2023-06-11 19:18:58 +05:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<footer id="footer">
|
2026-01-07 05:04:04 +05:00
|
|
|
<p>© {currentYear}. {t('footer-author')}: <b>{authorName}</b></p>
|
2026-01-04 22:50:34 +05:00
|
|
|
<p class="links">
|
2026-01-07 05:04:04 +05:00
|
|
|
{#if $currentLanguage === "ru" || $currentLanguage === "ua"}
|
|
|
|
|
<a href={tgLink} target="_blank" class="telegram-link">
|
|
|
|
|
<img src="/media/icons/telegram.webp" alt="Telegram" width="18px" />
|
|
|
|
|
<span>{t('footer-telegram')}</span>
|
2026-01-04 22:50:34 +05:00
|
|
|
</a>
|
2026-01-07 05:04:04 +05:00
|
|
|
|
|
|
|
|
{/if}
|
2026-01-04 22:50:34 +05:00
|
|
|
<a href={repoLink} target="_blank">
|
|
|
|
|
<img src="/media/icons/github-logo.png" alt="GitHub" width="18px" />
|
2026-01-07 05:04:04 +05:00
|
|
|
<span>{t('footer-github')}</span>
|
2026-01-04 22:50:34 +05:00
|
|
|
</a>
|
2026-01-07 05:04:04 +05:00
|
|
|
</p>
|
|
|
|
|
<p class="links last">
|
|
|
|
|
{#if $currentLanguage === "ru"}
|
2026-01-07 23:29:46 +05:00
|
|
|
{t('footer-support')} <a href={boostyLink} target="_blank" class="telegram-link">
|
2026-01-07 05:04:04 +05:00
|
|
|
<img src="/media/icons/boosty.webp" alt="Boosty" width="18px" />
|
|
|
|
|
<span>Boosty</span>
|
|
|
|
|
</a>.
|
|
|
|
|
{/if}
|
|
|
|
|
{#if $currentLanguage === "ua" || $currentLanguage === "en"}
|
2026-01-07 23:29:46 +05:00
|
|
|
{t('footer-support')} <a href={patreonLink} target="_blank" class="telegram-link">
|
2026-01-07 05:04:04 +05:00
|
|
|
<img src="/media/icons/patreon.png" alt="Patreon" width="18px" />
|
|
|
|
|
<span>Patreon</span>
|
|
|
|
|
</a>.
|
|
|
|
|
{/if}
|
2026-01-04 22:50:34 +05:00
|
|
|
</p>
|
2023-06-11 19:18:58 +05:00
|
|
|
</footer>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
#footer {
|
|
|
|
|
text-align: center;
|
2026-01-07 05:04:04 +05:00
|
|
|
color: #6c6e71;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
font-weight: normal;
|
2023-06-11 19:18:58 +05:00
|
|
|
line-height: 1.7em;
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
|
|
|
|
|
p {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
2026-01-04 22:50:34 +05:00
|
|
|
|
|
|
|
|
&.links {
|
|
|
|
|
margin-top: 5px;
|
|
|
|
|
margin-bottom: 15px;
|
2026-01-07 05:04:04 +05:00
|
|
|
|
|
|
|
|
&.last {
|
|
|
|
|
margin-top: -5px;
|
|
|
|
|
}
|
2026-01-04 22:50:34 +05:00
|
|
|
}
|
2023-06-11 19:18:58 +05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a {
|
2026-01-07 05:04:04 +05:00
|
|
|
color: #555759!important;
|
2023-06-11 19:18:58 +05:00
|
|
|
text-decoration: none;
|
2026-01-07 05:04:04 +05:00
|
|
|
transition: 0.3s;
|
|
|
|
|
|
|
|
|
|
& > span {
|
|
|
|
|
color: #185876;
|
|
|
|
|
border-bottom: 1px solid #185876;
|
|
|
|
|
transition: 0.3s;
|
|
|
|
|
}
|
2023-06-11 19:18:58 +05:00
|
|
|
|
|
|
|
|
img {
|
2026-01-04 22:50:34 +05:00
|
|
|
opacity: 0.5;
|
|
|
|
|
transition: opacity 0.5s;
|
2026-01-07 05:04:04 +05:00
|
|
|
margin-top: -3px;
|
2023-06-11 19:18:58 +05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
2026-01-07 05:04:04 +05:00
|
|
|
color: #777a7d!important;
|
|
|
|
|
|
|
|
|
|
& > span {
|
|
|
|
|
color: #2A9CD0;
|
|
|
|
|
}
|
2023-06-11 19:18:58 +05:00
|
|
|
|
|
|
|
|
img {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-07 05:04:04 +05:00
|
|
|
&.telegram-link {
|
|
|
|
|
color: #185876;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
color: #2A9CD0;
|
|
|
|
|
// background: url(/media/images/bg/bg24.gif);
|
|
|
|
|
// background-repeat: no-repeat;
|
|
|
|
|
// background-size: contain;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-11 19:18:58 +05:00
|
|
|
&.special-link {
|
|
|
|
|
color: #941d92;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
color: #FF07FC;
|
|
|
|
|
background: url(/media/images/bg/bg24.gif);
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-size: contain;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-01-04 22:50:34 +05:00
|
|
|
</style>
|