chore(gui): rebrand — strip TG/Boosty/Patreon/feedback-bot, keep CC BY-NC-SA attribution
The previous feature/gui-rebrand-polish work only updated the appInfo store
keys; Footer.svelte, settings, and the commands page were still rendering
upstream's Telegram channel, Boosty/Patreon support links, feedback bot,
and the original author byline. This finishes the job.
Rust side (applies after `cargo build` — currently a no-op until MSVC Build
Tools are reinstalled):
- Cargo.toml: authors = ["Bossiara13"], repository = J.A.R.V.I.S-rust fork.
Original attribution stays in LICENSE.txt per CC BY-NC-SA 4.0; the UI
no longer renders an author byline.
- config.rs: dropped TG_OFFICIAL_LINK / FEEDBACK_LINK / SUPPORT_BOOSTY_LINK
/ SUPPORT_PATREON_LINK. Added UPSTREAM_REPOSITORY_LINK (Priler/jarvis for
the licence attribution), ISSUES_LINK (this fork's GH issues), and
PYTHON_FORK_LINK.
- tauri_commands/etc.rs: dropped get_tg_official_link/get_boosty_link/
get_patreon_link/get_feedback_link. Added get_upstream_link, get_issues_link,
get_python_fork_link. Tidied up the Option<&str> -> String boilerplate
with unwrap_or.
- main.rs: invoke_handler updated to match.
Frontend side (visible only after Rust rebuild — Tauri bundles the dist into
the exe):
- stores.ts: appInfo shape reduced to repositoryLink / upstreamLink /
issuesLink / pythonForkLink / logFilePath. loadAppInfo() uses fetchOr()
with hardcoded fallbacks so the UI still populates correctly when run
against an un-rebuilt binary; fetchRepoOr() additionally overrides
CARGO_PKG_REPOSITORY if it still resolves to upstream's Priler/jarvis.
- Footer.svelte: rewritten — © year + "J.A.R.V.I.S." + repo link + issues
link + small "fork of Priler/jarvis · CC BY-NC-SA 4.0" attribution line.
No author byline (it's in LICENSE.txt).
- routes/settings/index.svelte: feedback link now points to GitHub Issues.
- routes/commands/index.svelte: TG-channel reference replaced with a link
to the Python fork (where the command builder lives) plus a pointer to
resources/commands/ in this repo. Bruh GIF removed.
- locales/{ru,en,ua}.ftl: removed footer-author / footer-telegram /
footer-support, added footer-issues / footer-fork-of, rewrote
commands-wip-* strings, retargeted settings-beta-bot to "GitHub Issues".
Bundle identifier (com.priler.jarvis) kept intact to avoid moving the app
data directory.
This commit is contained in:
parent
85a004e263
commit
24457ad6c9
11 changed files with 130 additions and 195 deletions
|
|
@ -1,62 +1,39 @@
|
|||
<script lang="ts">
|
||||
import { onMount } from "svelte"
|
||||
import { invoke } from "@tauri-apps/api/core"
|
||||
import { appInfo, currentLanguage, translations, translate } from "@/stores"
|
||||
import { appInfo, translations, translate } from "@/stores"
|
||||
|
||||
$: t = (key: string) => translate($translations, key)
|
||||
|
||||
let authorName = ""
|
||||
let tgLink = ""
|
||||
let repoLink = ""
|
||||
let boostyLink = ""
|
||||
let patreonLink = ""
|
||||
let upstreamLink = ""
|
||||
let issuesLink = ""
|
||||
|
||||
const currentYear = new Date().getFullYear()
|
||||
|
||||
appInfo.subscribe(info => {
|
||||
tgLink = info.tgOfficialLink
|
||||
repoLink = info.repositoryLink
|
||||
boostyLink = info.boostySupportLink
|
||||
patreonLink = info.patreonSupportLink
|
||||
})
|
||||
|
||||
onMount(async () => {
|
||||
try {
|
||||
authorName = await invoke<string>("get_author_name")
|
||||
} catch (err) {
|
||||
console.error("failed to get author name:", err)
|
||||
}
|
||||
upstreamLink = info.upstreamLink
|
||||
issuesLink = info.issuesLink
|
||||
})
|
||||
</script>
|
||||
|
||||
<footer id="footer">
|
||||
<p>© {currentYear}. {t('footer-author')}: <b>{authorName}</b></p>
|
||||
<p>© {currentYear} J.A.R.V.I.S.</p>
|
||||
<p class="links">
|
||||
{#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>
|
||||
</a>
|
||||
|
||||
{/if}
|
||||
<a href={repoLink} target="_blank">
|
||||
<a href={repoLink} target="_blank" rel="noopener noreferrer">
|
||||
<img src="/media/icons/github-logo.png" alt="GitHub" width="18px" />
|
||||
<span>{t('footer-github')}</span>
|
||||
</a>
|
||||
·
|
||||
<a href={issuesLink} target="_blank" rel="noopener noreferrer">
|
||||
<span>{t('footer-issues')}</span>
|
||||
</a>
|
||||
</p>
|
||||
<p class="links last">
|
||||
{#if $currentLanguage === "ru"}
|
||||
{t('footer-support')} <a href={boostyLink} target="_blank" class="telegram-link">
|
||||
<img src="/media/icons/boosty.webp" alt="Boosty" width="18px" />
|
||||
<span>Boosty</span>
|
||||
</a>.
|
||||
{/if}
|
||||
{#if $currentLanguage === "ua" || $currentLanguage === "en"}
|
||||
{t('footer-support')} <a href={patreonLink} target="_blank" class="telegram-link">
|
||||
<img src="/media/icons/patreon.png" alt="Patreon" width="18px" />
|
||||
<span>Patreon</span>
|
||||
</a>.
|
||||
{/if}
|
||||
<small>
|
||||
{t('footer-fork-of')}
|
||||
<a href={upstreamLink} target="_blank" rel="noopener noreferrer">Priler/jarvis</a>
|
||||
· CC BY-NC-SA 4.0
|
||||
</small>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
|
|
@ -79,15 +56,17 @@
|
|||
|
||||
&.last {
|
||||
margin-top: -5px;
|
||||
color: #8a8d90;
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: #555759!important;
|
||||
color: #555759 !important;
|
||||
text-decoration: none;
|
||||
transition: 0.3s;
|
||||
|
||||
|
||||
& > span {
|
||||
color: #185876;
|
||||
border-bottom: 1px solid #185876;
|
||||
|
|
@ -101,7 +80,7 @@
|
|||
}
|
||||
|
||||
&:hover {
|
||||
color: #777a7d!important;
|
||||
color: #777a7d !important;
|
||||
|
||||
& > span {
|
||||
color: #2A9CD0;
|
||||
|
|
@ -111,30 +90,6 @@
|
|||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&.telegram-link {
|
||||
color: #185876;
|
||||
display: inline-block;
|
||||
|
||||
&:hover {
|
||||
color: #2A9CD0;
|
||||
// background: url(/media/images/bg/bg24.gif);
|
||||
// background-repeat: no-repeat;
|
||||
// background-size: contain;
|
||||
}
|
||||
}
|
||||
|
||||
&.special-link {
|
||||
color: #941d92;
|
||||
display: inline-block;
|
||||
|
||||
&:hover {
|
||||
color: #FF07FC;
|
||||
background: url(/media/images/bg/bg24.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -8,9 +8,11 @@
|
|||
|
||||
$: t = (key: string) => translate($translations, key)
|
||||
|
||||
let tgLink = ""
|
||||
let pythonForkLink = ""
|
||||
let repoLink = ""
|
||||
appInfo.subscribe(info => {
|
||||
tgLink = info.tgOfficialLink
|
||||
pythonForkLink = info.pythonForkLink
|
||||
repoLink = info.repositoryLink
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
@ -23,19 +25,11 @@
|
|||
withCloseButton={false}
|
||||
>
|
||||
{t('commands-wip-desc')}<br />
|
||||
{t('commands-wip-follow')} <a href={tgLink} target="_blank">{t('commands-wip-channel')}</a>!
|
||||
{t('commands-wip-builder')}
|
||||
<a href={pythonForkLink} target="_blank" rel="noopener noreferrer">{t('commands-wip-builder-link')}</a>.
|
||||
{t('commands-wip-or-fork')}
|
||||
<a href={repoLink} target="_blank" rel="noopener noreferrer">{t('commands-wip-fork-link')}</a>.
|
||||
</Notification>
|
||||
|
||||
<div class="placeholder-image">
|
||||
<img src="/media/images/tenor.gif" alt="bruh" width="320px" />
|
||||
</div>
|
||||
|
||||
<HDivider />
|
||||
<Footer />
|
||||
|
||||
<style>
|
||||
.placeholder-image {
|
||||
text-align: center;
|
||||
margin-top: 25px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -90,10 +90,10 @@
|
|||
voiceVal = value
|
||||
})
|
||||
|
||||
let feedbackLink = ""
|
||||
let issuesLink = ""
|
||||
let logFilePath = ""
|
||||
appInfo.subscribe(info => {
|
||||
feedbackLink = info.feedbackLink
|
||||
issuesLink = info.issuesLink
|
||||
logFilePath = info.logFilePath
|
||||
})
|
||||
|
||||
|
|
@ -230,7 +230,7 @@
|
|||
withCloseButton={false}
|
||||
>
|
||||
{t('settings-beta-desc')}<br />
|
||||
{t('settings-beta-feedback')} <a href={feedbackLink} target="_blank">{t('settings-beta-bot')}</a>.
|
||||
{t('settings-beta-feedback')} <a href={issuesLink} target="_blank" rel="noopener noreferrer">{t('settings-beta-bot')}</a>.
|
||||
<Space h="sm" />
|
||||
<Button
|
||||
color="gray"
|
||||
|
|
|
|||
|
|
@ -39,12 +39,21 @@ export const jarvisCpuUsage = writable(0)
|
|||
export const assistantVoice = writable("")
|
||||
|
||||
// ### APP INFO
|
||||
// Hardcoded fallbacks so the UI keeps working when the Rust side has not
|
||||
// been rebuilt yet (the new get_upstream_link / get_issues_link / get_python_fork_link
|
||||
// Tauri commands only exist after the next cargo build).
|
||||
const BRANDING_FALLBACK = {
|
||||
repositoryLink: "https://github.com/DmitryBykov-ISPO/J.A.R.V.I.S-rust",
|
||||
upstreamLink: "https://github.com/Priler/jarvis",
|
||||
issuesLink: "https://github.com/DmitryBykov-ISPO/J.A.R.V.I.S-rust/issues",
|
||||
pythonForkLink: "https://github.com/DmitryBykov-ISPO/J.A.R.V.I.S-py",
|
||||
}
|
||||
|
||||
export const appInfo = writable({
|
||||
tgOfficialLink: "",
|
||||
feedbackLink: "",
|
||||
repositoryLink: "",
|
||||
boostySupportLink: "",
|
||||
patreonSupportLink: "",
|
||||
repositoryLink: BRANDING_FALLBACK.repositoryLink,
|
||||
upstreamLink: BRANDING_FALLBACK.upstreamLink,
|
||||
issuesLink: BRANDING_FALLBACK.issuesLink,
|
||||
pythonForkLink: BRANDING_FALLBACK.pythonForkLink,
|
||||
logFilePath: ""
|
||||
})
|
||||
|
||||
|
|
@ -59,27 +68,38 @@ export async function loadVoiceSetting() {
|
|||
}
|
||||
|
||||
export async function loadAppInfo() {
|
||||
try {
|
||||
const [tg, feedback, repo, boosty, patreon, logPath] = await Promise.all([
|
||||
invoke<string>("get_tg_official_link"),
|
||||
invoke<string>("get_feedback_link"),
|
||||
invoke<string>("get_repository_link"),
|
||||
invoke<string>("get_boosty_link"),
|
||||
invoke<string>("get_patreon_link"),
|
||||
invoke<string>("get_log_file_path")
|
||||
])
|
||||
|
||||
appInfo.set({
|
||||
tgOfficialLink: tg,
|
||||
feedbackLink: feedback,
|
||||
repositoryLink: repo,
|
||||
boostySupportLink: boosty,
|
||||
patreonSupportLink: patreon,
|
||||
logFilePath: logPath
|
||||
})
|
||||
} catch (err) {
|
||||
console.error("failed to load app info:", err)
|
||||
const fetchOr = async (name: string, fallback: string): Promise<string> => {
|
||||
try {
|
||||
const v = await invoke<string>(name)
|
||||
return v && v !== "error" ? v : fallback
|
||||
} catch {
|
||||
return fallback
|
||||
}
|
||||
}
|
||||
|
||||
// The old binary's get_repository_link returns Priler's upstream — override
|
||||
// so we never display the upstream repo as if it were the current fork.
|
||||
const fetchRepoOr = async (fallback: string): Promise<string> => {
|
||||
const v = await fetchOr("get_repository_link", fallback)
|
||||
if (/priler\/jarvis/i.test(v)) return fallback
|
||||
return v
|
||||
}
|
||||
|
||||
const [repo, upstream, issues, pythonFork, logPath] = await Promise.all([
|
||||
fetchRepoOr(BRANDING_FALLBACK.repositoryLink),
|
||||
fetchOr("get_upstream_link", BRANDING_FALLBACK.upstreamLink),
|
||||
fetchOr("get_issues_link", BRANDING_FALLBACK.issuesLink),
|
||||
fetchOr("get_python_fork_link", BRANDING_FALLBACK.pythonForkLink),
|
||||
fetchOr("get_log_file_path", "")
|
||||
])
|
||||
|
||||
appInfo.set({
|
||||
repositoryLink: repo,
|
||||
upstreamLink: upstream,
|
||||
issuesLink: issues,
|
||||
pythonForkLink: pythonFork,
|
||||
logFilePath: logPath
|
||||
})
|
||||
}
|
||||
|
||||
export async function updateJarvisStats() {
|
||||
|
|
@ -98,7 +118,7 @@ let statsInterval: ReturnType<typeof setInterval> | null = null
|
|||
|
||||
export function startStatsPolling(intervalMs = 5000) {
|
||||
if (statsInterval) return // already running
|
||||
|
||||
|
||||
updateJarvisStats()
|
||||
statsInterval = setInterval(updateJarvisStats, intervalMs)
|
||||
}
|
||||
|
|
@ -108,4 +128,4 @@ export function stopStatsPolling() {
|
|||
clearInterval(statsInterval)
|
||||
statsInterval = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue