Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@

<ToastNotifications />

<AnalyticsFooter />

<footer
id="footer"
class="halloween-theme footer text-white mt-4 py-4"
Expand Down
39 changes: 39 additions & 0 deletions components/AnalyticsFooter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<template>
<footer
v-if="!hasAcknowledged"
class="fixed bottom-0 left-0 right-0 z-50 bg-gray-900 border-t border-gray-700 text-gray-100"
>
<div class="max-w-7xl mx-auto flex flex-col gap-3 px-5 py-4 sm:flex-row sm:items-center sm:justify-between">
<p class="text-sm">
{{ $t('analytics.footer.message') }}
{{ $t('analytics.footer.detailsPrefix') }}
<a
href="https://meshtastic.org/docs/legal/privacy/"
target="_blank"
rel="noopener noreferrer"
class="underline text-blue-400 hover:text-blue-300"
>
{{ $t('analytics.footer.privacyLink') }}
</a>
{{ $t('analytics.footer.detailsSuffix') }}
</p>
<button
type="button"
class="inline-flex items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-offset-2 focus:ring-offset-gray-900"
@click="acknowledge"
>
{{ $t('analytics.footer.button') }}
</button>
</div>
</footer>
</template>

<script setup lang="ts">
import { useLocalStorage } from '@vueuse/core';

const hasAcknowledged = useLocalStorage('analytics-acknowledged', false);

const acknowledge = () => {
hasAcknowledged.value = true;
};
</script>
9 changes: 9 additions & 0 deletions i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,14 @@
"error_connection": "Failed to connect to device or the device may already be in DFU mode. Please disconnect and reconnect the device, then try again. If the problem persists, reload the page.",
"error_unresponsive_title": "Device Unresponsive",
"error_unresponsive": "The device is not responding. Please ensure it is properly connected and not in DFU mode. If the problem persists, reload the page."
},
"analytics": {
"footer": {
"message": "We collect anonymous crash and usage data across this app. This helps us improve Meshtastic. No personally identifiable data is collected.",
"detailsPrefix": "See our",
"detailsSuffix": "for more details.",
"privacyLink": "Privacy Policy",
"button": "OK"
}
}
}
Loading