From 5080f13fd3603a652b36f0a1d997c98707054954 Mon Sep 17 00:00:00 2001 From: rodrigohpalmeirim Date: Tue, 30 Jun 2026 17:24:59 +0100 Subject: [PATCH 1/3] add service disclaimer warning before feedback and email actions People frequently contact us about GIRA service issues (trips not ending, maintenance, account problems) that we can't help with, since the app is unofficial and not affiliated with EMEL. Show a warning dialog when opening the feedback (GitHub issues) link in the profile menu and the contact email in the about page, redirecting GIRA service questions to EMEL via a tappable gira@emel.pt link. --- src/lib/components/Profile.svelte | 10 ++++++-- .../components/ServiceWarningDialog.svelte | 25 +++++++++++++++++++ src/lib/components/settings/About.svelte | 10 ++++++-- src/lib/translations.ts | 16 ++++++++++++ 4 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 src/lib/components/ServiceWarningDialog.svelte diff --git a/src/lib/components/Profile.svelte b/src/lib/components/Profile.svelte index 40fd24d..56a50d5 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'; @@ -42,8 +43,13 @@ return () => backListener?.remove(); }); + const feedbackUrl = 'https://github.com/rt-evil-inc/gira-mais/issues'; +{#snippet feedbackWarning(dismiss: () => void)} + +{/snippet} +
{#if $user}
openPage = 'history'} /> openPage = 'settings'} /> - + { e.preventDefault(); 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..2db32da 100644 --- a/src/lib/components/settings/About.svelte +++ b/src/lib/components/settings/About.svelte @@ -1,10 +1,12 @@ +{#snippet emailWarning(dismiss: () => void)} + +{/snippet} +
{$t('about_label')}
@@ -46,7 +52,7 @@ - + { e.preventDefault(); enqueueDialog(emailWarning); }}> 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 From 4c2c07c5bf149b4a92b734fbfe80b476ddaf836a Mon Sep 17 00:00:00 2001 From: rodrigohpalmeirim Date: Tue, 30 Jun 2026 17:52:47 +0100 Subject: [PATCH 2/3] drop pointless trigger href, use onclick directly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The trigger anchors preventDefault on click, so their href never navigated — the real navigation is the dialog's Continue link. The feedback entry was also an invalid Discord From 83eeacbe7525aa3752b0ca75cba33017ac029b22 Mon Sep 17 00:00:00 2001 From: rodrigohpalmeirim Date: Tue, 30 Jun 2026 18:01:02 +0100 Subject: [PATCH 3/3] inline feedback and email urls --- src/lib/components/Profile.svelte | 4 +--- src/lib/components/settings/About.svelte | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib/components/Profile.svelte b/src/lib/components/Profile.svelte index 13f594b..93cf233 100644 --- a/src/lib/components/Profile.svelte +++ b/src/lib/components/Profile.svelte @@ -42,12 +42,10 @@ return () => backListener?.remove(); }); - - const feedbackUrl = 'https://github.com/rt-evil-inc/gira-mais/issues'; {#snippet feedbackWarning(dismiss: () => void)} - + {/snippet}
diff --git a/src/lib/components/settings/About.svelte b/src/lib/components/settings/About.svelte index bd905db..ccd06e3 100644 --- a/src/lib/components/settings/About.svelte +++ b/src/lib/components/settings/About.svelte @@ -6,7 +6,6 @@ import ServiceWarningDialog from '$lib/components/ServiceWarningDialog.svelte'; import { t } from '$lib/translations'; import { IconMail, IconWorldWww } from '@tabler/icons-svelte'; - const emailUrl = 'mailto:contact@gira-mais.app'; async function wait(ms:number) { return new Promise(resolve => setTimeout(resolve, ms)); } @@ -37,7 +36,7 @@ {#snippet emailWarning(dismiss: () => void)} - + {/snippet}