Feat: Show insecure warning (#1779)

show insecure warning
This commit is contained in:
Bernd Storath
2025-03-31 10:29:22 +02:00
committed by GitHub
parent 6e0d758e36
commit 589ec1fe9a
7 changed files with 34 additions and 8 deletions

View File

@@ -0,0 +1,22 @@
<template>
<div
v-if="!globalStore.information?.insecure && !https"
class="container mx-auto w-fit rounded-md bg-red-800 p-4 text-white shadow-lg dark:bg-red-100 dark:text-red-600"
>
<p class="text-center">{{ $t('login.insecure') }}</p>
</div>
</template>
<script lang="ts" setup>
const globalStore = useGlobalStore();
const https = ref(false);
onMounted(() => {
if (window.location.protocol === 'https:') {
https.value = true;
} else {
https.value = false;
}
});
</script>