diff --git a/src/app/components/Header/Insecure.vue b/src/app/components/Header/Insecure.vue new file mode 100644 index 00000000..8b61209b --- /dev/null +++ b/src/app/components/Header/Insecure.vue @@ -0,0 +1,22 @@ + + + {{ $t('login.insecure') }} + + + + diff --git a/src/app/components/Header/Update.vue b/src/app/components/Header/Update.vue index a23bb89a..a00d83a8 100644 --- a/src/app/components/Header/Update.vue +++ b/src/app/components/Header/Update.vue @@ -1,21 +1,21 @@ {{ $t('update.updateAvailable') }} - {{ globalStore.release.latestRelease.changelog }} + {{ globalStore.information.latestRelease.changelog }} diff --git a/src/app/components/Ui/Footer.vue b/src/app/components/Ui/Footer.vue index 78aef5a3..e8d13262 100644 --- a/src/app/components/Ui/Footer.vue +++ b/src/app/components/Ui/Footer.vue @@ -7,7 +7,7 @@ href="https://github.com/wg-easy/wg-easy" >WireGuard Easy - ({{ globalStore.release?.currentRelease }}) © 2021-2025 by + ({{ globalStore.information?.currentRelease }}) © 2021-2025 by + { - const { data: release } = useFetch('/api/release', { + const { data: information } = useFetch('/api/information', { method: 'get', }); @@ -21,7 +21,7 @@ export const useGlobalStore = defineStore('Global', () => { return { sortClient, - release, + information, uiShowCharts, toggleCharts, uiChartType, diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index d390d3db..6dd09415 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -65,7 +65,8 @@ "login": { "signIn": "Sign In", "rememberMe": "Remember me", - "rememberMeDesc": "Stay logged after closing the browser" + "rememberMeDesc": "Stay logged after closing the browser", + "insecure": "You can't log in with an insecure connection. Use HTTPS." }, "error": { "clear": "Clear", diff --git a/src/server/api/release.get.ts b/src/server/api/information.get.ts similarity index 85% rename from src/server/api/release.get.ts rename to src/server/api/information.get.ts index 8a6fa12f..5a212fd0 100644 --- a/src/server/api/release.get.ts +++ b/src/server/api/information.get.ts @@ -3,9 +3,11 @@ import { gt } from 'semver'; export default defineEventHandler(async () => { const latestRelease = await cachedFetchLatestRelease(); const updateAvailable = gt(latestRelease.version, RELEASE); + const insecure = WG_ENV.INSECURE; return { currentRelease: RELEASE, latestRelease: latestRelease, updateAvailable, + insecure, }; });
{{ $t('login.insecure') }}
{{ $t('update.updateAvailable') }}
{{ globalStore.release.latestRelease.changelog }}
{{ globalStore.information.latestRelease.changelog }}