diff --git a/src/lib/components/Profile.svelte b/src/lib/components/Profile.svelte index 40fd24d..93cf233 100644 --- a/src/lib/components/Profile.svelte +++ b/src/lib/components/Profile.svelte @@ -2,11 +2,12 @@ import { accountInfo, logOut, user } from '$lib/account'; import Metric from '$lib/components/Metric.svelte'; import ProfileMenuEntry from '$lib/components/ProfileMenuEntry.svelte'; + import ServiceWarningDialog from '$lib/components/ServiceWarningDialog.svelte'; import Info from '$lib/components/settings/About.svelte'; import History from '$lib/components/settings/History.svelte'; import Settings from '$lib/components/settings/Settings.svelte'; import { getLocale, t } from '$lib/translations'; - import { safeInsets } from '$lib/ui.svelte'; + import { enqueueDialog, safeInsets } from '$lib/ui.svelte'; import { App } from '@capacitor/app'; import { Capacitor, type PluginListenerHandle } from '@capacitor/core'; import { IconHeart, IconStar } from '@tabler/icons-svelte'; @@ -41,9 +42,12 @@ return () => backListener?.remove(); }); - +{#snippet feedbackWarning(dismiss: () => void)} + +{/snippet} +
{#if $user}
openPage = 'history'} /> openPage = 'settings'} /> - + enqueueDialog(feedbackWarning)} /> openPage = 'info'} /> {#if Capacitor.getPlatform() === 'ios'} diff --git a/src/lib/components/ServiceWarningDialog.svelte b/src/lib/components/ServiceWarningDialog.svelte new file mode 100644 index 0000000..bd84d5c --- /dev/null +++ b/src/lib/components/ServiceWarningDialog.svelte @@ -0,0 +1,25 @@ + + +
+
+

+ + {$t('service_warning_title')} +

+ +
+
{@html $t('service_warning_message', { email: emelEmailLink })}
+
+ + {$t('service_warning_continue')} +
+
\ No newline at end of file diff --git a/src/lib/components/settings/About.svelte b/src/lib/components/settings/About.svelte index 6127f6d..ccd06e3 100644 --- a/src/lib/components/settings/About.svelte +++ b/src/lib/components/settings/About.svelte @@ -1,8 +1,9 @@ +{#snippet emailWarning(dismiss: () => void)} + +{/snippet} +
{$t('about_label')}
@@ -46,9 +51,9 @@ - + Discord diff --git a/src/lib/translations.ts b/src/lib/translations.ts index b72f02d..af7efbd 100644 --- a/src/lib/translations.ts +++ b/src/lib/translations.ts @@ -489,6 +489,22 @@ const translations = { en: 'Invalid bike ID. It should be a 4-digit number.', pt: 'ID de bicicleta inválido. Deve ser um número de 4 dígitos.', }, + cancel_button: { + en: 'Cancel', + pt: 'Cancelar', + }, + service_warning_title: { + en: 'Before you continue', + pt: 'Antes de continuar', + }, + service_warning_message: { + en: 'Gira+ is an unofficial app and is not affiliated with EMEL. We can\'t help with problems related to the GIRA service itself, such as trips that won\'t end, charges, account issues, or bike/dock maintenance.\nFor those, please contact EMEL via {{email}}.\n\nOnly continue if your message is about this app.', + pt: 'A Gira+ é uma aplicação não oficial e não está afiliada à EMEL. Não podemos ajudar com problemas relacionados com o serviço GIRA em si, como viagens que não terminam, cobranças, problemas de conta ou manutenção de bicicletas ou docas.\nPara esses casos, contacte a EMEL via {{email}}.\n\nContinue apenas se a sua mensagem for sobre esta aplicação.', + }, + service_warning_continue: { + en: 'Continue anyway', + pt: 'Continuar mesmo assim', + }, } as const; export type Translations = typeof translations; \ No newline at end of file