|
2 | 2 | import { accountInfo, logOut, user } from '$lib/account'; |
3 | 3 | import Metric from '$lib/components/Metric.svelte'; |
4 | 4 | import ProfileMenuEntry from '$lib/components/ProfileMenuEntry.svelte'; |
| 5 | + import ServiceWarningDialog from '$lib/components/ServiceWarningDialog.svelte'; |
5 | 6 | import Info from '$lib/components/settings/About.svelte'; |
6 | 7 | import History from '$lib/components/settings/History.svelte'; |
7 | 8 | import Settings from '$lib/components/settings/Settings.svelte'; |
8 | 9 | import { getLocale, t } from '$lib/translations'; |
9 | | - import { safeInsets } from '$lib/ui.svelte'; |
| 10 | + import { enqueueDialog, safeInsets } from '$lib/ui.svelte'; |
10 | 11 | import { App } from '@capacitor/app'; |
11 | 12 | import { Capacitor, type PluginListenerHandle } from '@capacitor/core'; |
12 | 13 | import { IconHeart, IconStar } from '@tabler/icons-svelte'; |
|
41 | 42 |
|
42 | 43 | return () => backListener?.remove(); |
43 | 44 | }); |
44 | | -
|
45 | 45 | </script> |
46 | 46 |
|
| 47 | +{#snippet feedbackWarning(dismiss: () => void)} |
| 48 | + <ServiceWarningDialog url="https://github.com/rt-evil-inc/gira-mais/issues" {dismiss} /> |
| 49 | +{/snippet} |
| 50 | + |
47 | 51 | <div transition:fly={{ duration: 150, x: 100 }} class="absolute w-full h-full inset-0 bg-background z-30 grid" > |
48 | 52 | {#if $user} |
49 | 53 | <div class="flex flex-col justify-between items-center h-full gap-10 col-start-1 col-end-2 row-start-1 row-end-2 p-4 overflow-x-hidden" |
|
73 | 77 | <div class="flex flex-col grow font-semibold px-2 gap-3 w-full"> |
74 | 78 | <ProfileMenuEntry icon={IconHistory} text={$t('history_label')} subtext={$t('history_subtext')} onclick={() => openPage = 'history'} /> |
75 | 79 | <ProfileMenuEntry icon={IconTool} text={$t('settings_label')} subtext={$t('settings_subtext')} onclick={() => openPage = 'settings'} /> |
76 | | - <a href="https://github.com/rt-evil-inc/gira-mais/issues"><ProfileMenuEntry icon={IconMessageReport} text={$t('feedback_label')} subtext={$t('feedback_subtext')} external /></a> |
| 80 | + <ProfileMenuEntry icon={IconMessageReport} text={$t('feedback_label')} subtext={$t('feedback_subtext')} external onclick={() => enqueueDialog(feedbackWarning)} /> |
77 | 81 | <ProfileMenuEntry icon={IconInfoCircle} text={$t('about_label')} subtext={$t('about_subtext')} onclick={() => openPage = 'info'} /> |
78 | 82 | {#if Capacitor.getPlatform() === 'ios'} |
79 | 83 | <a href="https://github.com/rt-evil-inc/gira-mais/"><ProfileMenuEntry icon={IconStar} iconClass="stroke-warning" text={$t('star_label')} subtext={$t('star_subtext')} external /></a> |
|
0 commit comments