Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Update TunnlTo Settings Version Number Display on the Settings Page UI #160

Closed
TheCodingCarson opened this issue Feb 26, 2024 · 1 comment

Comments

@TheCodingCarson
Copy link

Hey so this is just an idea to make life a tiny bit easier when updating versions of TunnlTo.

Automaticlly get the Version of TunnlTo for the UI display on the settings page (src\components\containers\Settings.tsx) by adding

import { getVersion } from '@tauri-apps/api/app'
const appVersion = await getVersion();

and changing

<p className="text-xs text-gray-600 pt-2">
  TunnlTo 1.0.6
  <br />
  WireSock {wiresockInstallDetails?.version}
</p>

to

<p className="text-xs text-gray-600 pt-2">
  TunnlTo {appVersion}
  <br />
  WireSock {wiresockInstallDetails?.version}
</p>

only issue I see is you would need to fix the "Top-level await" error it will give you after by adding

build: { target: "es2022" }

to vite.config.ts

but just an idea to make it so whatever the tauri.conf.json file says for the version is what it will show on the settings page UI

@brendanosborne
Copy link
Contributor

Thanks for this. I've implemented something similar in version 1.0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants