feat: unify QuickInputBar across all apps with locale + deferSearch

- Add `locale` prop to all 6 apps using QuickInputBar
  (todo, contacts, zitare, citycorners, questions, calendar)
- Enable `deferSearch` on apps with create flow
  (contacts, zitare, questions) to match todo behavior
- Pass locale through Calendar's UnifiedBar wrapper
- Questions: default to 'en' locale (English-first app)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-23 21:06:58 +01:00
parent 534b55b566
commit 436e92c560
6 changed files with 15 additions and 0 deletions

View file

@ -32,6 +32,8 @@
isMobile?: boolean; isMobile?: boolean;
/** Hide the entire bar (e.g. immersive mode) */ /** Hide the entire bar (e.g. immersive mode) */
hidden?: boolean; hidden?: boolean;
/** Locale for syntax highlighting (e.g., 'de', 'en') */
locale?: string;
} }
let { let {
@ -53,6 +55,7 @@
showCalendarLayers = false, showCalendarLayers = false,
isMobile = false, isMobile = false,
hidden = false, hidden = false,
locale = 'de',
}: Props = $props(); }: Props = $props();
const flyConfig = { duration: 250, easing: quintOut, y: 40 }; const flyConfig = { duration: 250, easing: quintOut, y: 40 };
@ -141,6 +144,7 @@
{searchingText} {searchingText}
{createText} {createText}
{appIcon} {appIcon}
{locale}
bottomOffset="0px" bottomOffset="0px"
hasFabRight={showCalendarLayers} hasFabRight={showCalendarLayers}
{defaultOptions} {defaultOptions}

View file

@ -473,6 +473,7 @@
searchingText="Suche..." searchingText="Suche..."
createText="Erstellen" createText="Erstellen"
appIcon="calendar" appIcon="calendar"
locale={$locale || 'de'}
defaultOptions={calendarOptions} defaultOptions={calendarOptions}
selectedDefaultId={selectedDefaultCalendarId} selectedDefaultId={selectedDefaultCalendarId}
defaultOptionLabel="Standard-Kalender" defaultOptionLabel="Standard-Kalender"

View file

@ -149,6 +149,7 @@
placeholder={$_('search.placeholder')} placeholder={$_('search.placeholder')}
emptyText={$_('search.noResults')} emptyText={$_('search.noResults')}
searchingText={$_('search.searching')} searchingText={$_('search.searching')}
locale={$locale || 'de'}
appIcon="mappin" appIcon="mappin"
bottomOffset={inputBarBottomOffset} bottomOffset={inputBarBottomOffset}
hasFabRight={true} hasFabRight={true}

View file

@ -347,9 +347,12 @@
placeholder="Neuer Kontakt oder suchen..." placeholder="Neuer Kontakt oder suchen..."
emptyText="Keine Kontakte gefunden" emptyText="Keine Kontakte gefunden"
searchingText="Suche..." searchingText="Suche..."
searchText="Suchen"
onCreate={handleCreate} onCreate={handleCreate}
onParseCreate={handleParseCreate} onParseCreate={handleParseCreate}
createText="Erstellen" createText="Erstellen"
deferSearch={true}
locale={$locale || 'de'}
appIcon="contacts" appIcon="contacts"
bottomOffset={inputBarBottomOffset} bottomOffset={inputBarBottomOffset}
hasFabRight={showContactsToolbar} hasFabRight={showContactsToolbar}

View file

@ -3,6 +3,7 @@
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import { page } from '$app/stores'; import { page } from '$app/stores';
import { browser } from '$app/environment'; import { browser } from '$app/environment';
import { locale } from 'svelte-i18n';
import { authStore, collectionsStore, questionsStore } from '$lib/stores'; import { authStore, collectionsStore, questionsStore } from '$lib/stores';
import { apiClient } from '$lib/api/client'; import { apiClient } from '$lib/api/client';
import { questionsApi } from '$lib/api/questions'; import { questionsApi } from '$lib/api/questions';
@ -212,9 +213,12 @@
placeholder="New question or search..." placeholder="New question or search..."
emptyText="No questions found" emptyText="No questions found"
searchingText="Searching..." searchingText="Searching..."
searchText="Search"
onCreate={handleCreate} onCreate={handleCreate}
onParseCreate={handleParseCreate} onParseCreate={handleParseCreate}
createText="Create" createText="Create"
deferSearch={true}
locale={$locale || 'en'}
appIcon="help-circle" appIcon="help-circle"
bottomOffset={isMobile ? '70px' : '70px'} bottomOffset={isMobile ? '70px' : '70px'}
/> />

View file

@ -273,6 +273,8 @@
emptyText={$_('search.noResults')} emptyText={$_('search.noResults')}
searchingText={$_('search.searching')} searchingText={$_('search.searching')}
createText={$_('search.create')} createText={$_('search.create')}
deferSearch={true}
locale={$locale || 'de'}
appIcon="quote" appIcon="quote"
bottomOffset={inputBarBottomOffset} bottomOffset={inputBarBottomOffset}
hasFabRight={true} hasFabRight={true}