Expand AITURK Turkish settings and desktop surfaces for beta 5

This commit is contained in:
yilsem committed 2026-09-06 05:03:32 +03:00
1 parent 237d1e2060
commit 5e76f58637
108 files changed
+6675 -1034

No files matched your search

@@ -2,6 +2,7 @@ import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { ErrorBoundary } from '@/components/error-boundary'
import { I18nProvider } from '@/i18n'
import { ThemeProvider } from '@/themes/context'
import { PetOverlayApp } from './pet-overlay-app'
@@ -9,7 +10,7 @@ import { PetOverlayApp } from './pet-overlay-app'
/**
* Boot the pet-overlay window. Loaded by the same bundle as the main app but
* via `?win=overlay`, so it shares CSS/atoms while mounting a minimal, transparent
* surface (no app shell, no gateway, no I18n — the bubble strings are inline).
* surface. Its language and live state are mirrored from the main window.
*
* The index.html boot script paints an OPAQUE themed background to avoid a flash
* in normal windows; the overlay must be see-through, so we force every host
@@ -30,7 +31,9 @@ export function mountPetOverlay(): void {
<StrictMode>
<ErrorBoundary label="pet-overlay">
<ThemeProvider>
<PetOverlayApp />
<I18nProvider configClient={null}>
<PetOverlayApp />
</I18nProvider>
</ThemeProvider>
</ErrorBoundary>
</StrictMode>
@@ -5,6 +5,7 @@ import { PetHeartField, playVibeHearts } from '@/components/chat/vibe-hearts'
import { PetBubble } from '@/components/pet/pet-bubble'
import { PetSprite } from '@/components/pet/pet-sprite'
import { type PetZoomAnchor, usePetZoomGesture } from '@/components/pet/use-pet-zoom-gesture'
import { normalizeLocale, useI18n } from '@/i18n'
import { Mail } from '@/lib/icons'
import { $petActivity, $petInfo, setPetInfo } from '@/store/pet'
import { overlayWindowSize } from '@/store/pet-overlay'
@@ -61,6 +62,7 @@ interface DragState {
}
export function PetOverlayApp() {
const { t, setLocale } = useI18n()
const info = useStore($petInfo)
const [composerOpen, setComposerOpen] = useState(false)
const [draft, setDraft] = useState('')
@@ -90,6 +92,7 @@ export function PetOverlayApp() {
// eslint-disable-next-line no-restricted-syntax -- legitimate non-atom ref write (see eslint rule comment)
useEffect(() => {
const off = window.hermesDesktop?.petOverlay?.onState(payload => {
void setLocale(normalizeLocale(payload.locale))
setPetInfo(payload.info)
$petActivity.set(payload.activity ?? {})
setBusy(Boolean(payload.busy))
@@ -115,7 +118,7 @@ export function PetOverlayApp() {
window.hermesDesktop?.petOverlay?.control({ type: 'ready' })
return off
}, [])
}, [setLocale])
// Click-through: make only the *solid* sprite pixels (plus the bubble / mail
// button / open composer) interactive — clicks on the transparent rectangle
@@ -397,7 +400,7 @@ export function PetOverlayApp() {
setComposerOpen(false)
}
}}
placeholder="Message…"
placeholder={t.surfaces.pet.message}
ref={inputRef}
style={{
background: 'var(--ui-bg-elevated)',
@@ -447,7 +450,7 @@ export function PetOverlayApp() {
stopPropagation keeps a click from starting a window drag. */}
{unread && (
<button
aria-label="Open in Hermes"
aria-label={t.surfaces.pet.openApp}
onClick={openApp}
onPointerDown={e => e.stopPropagation()}
onPointerUp={e => e.stopPropagation()}
@@ -468,7 +471,7 @@ export function PetOverlayApp() {
top: 0,
width: 24
}}
title="Open in Hermes"
title={t.surfaces.pet.openApp}
type="button"
>
<Mail style={{ height: 13, width: 13 }} />