Expand AITURK Turkish settings and desktop surfaces for beta 5
This commit is contained in:
1 parent
237d1e2060
commit
5e76f58637
108 files changed
+6675
-1034
No files matched your search
@@ -6,6 +6,7 @@ import { Button } from '@/components/ui/button'
|
||||
import { ConfirmDialog } from '@/components/ui/confirm-dialog'
|
||||
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog'
|
||||
import { deleteLearningNode, editLearningNode, getLearningNode } from '@/hermes'
|
||||
import { useI18n } from '@/i18n'
|
||||
import { notifyError } from '@/store/notifications'
|
||||
import { evictStarmapNode, loadStarmapGraph } from '@/store/starmap'
|
||||
|
||||
@@ -33,6 +34,7 @@ interface EditState {
|
||||
|
||||
/** Right-click actions for a star-map node: edit (modal) or delete (confirm). */
|
||||
export function NodeContextMenu({ onClose, onNodeRemoved, target }: NodeContextMenuProps) {
|
||||
const { t } = useI18n()
|
||||
const [editing, setEditing] = useState<EditState | null>(null)
|
||||
const [deleting, setDeleting] = useState<Omit<NodeMenuTarget, 'x' | 'y'> | null>(null)
|
||||
const [loading, setLoading] = useState(false)
|
||||
@@ -125,7 +127,7 @@ export function NodeContextMenu({ onClose, onNodeRemoved, target }: NodeContextM
|
||||
onClick={() => void openEdit()}
|
||||
type="button"
|
||||
>
|
||||
Edit {noun}…
|
||||
{target.kind === 'skill' ? t.surfaces.editSkill : t.surfaces.editMemory}
|
||||
</button>
|
||||
<button
|
||||
className="block w-full cursor-pointer rounded-md px-2 py-1 text-left text-xs text-destructive hover:bg-destructive/10"
|
||||
@@ -135,7 +137,7 @@ export function NodeContextMenu({ onClose, onNodeRemoved, target }: NodeContextM
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
{target.kind === 'skill' ? 'Archive skill' : 'Delete memory'}
|
||||
{target.kind === 'skill' ? t.surfaces.archiveSkill : t.surfaces.deleteMemory}
|
||||
</button>
|
||||
</div>
|
||||
</>
|
||||
@@ -144,7 +146,7 @@ export function NodeContextMenu({ onClose, onNodeRemoved, target }: NodeContextM
|
||||
<Dialog onOpenChange={value => !value && !saving && setEditing(null)} open={Boolean(editing)}>
|
||||
<DialogContent className="max-w-2xl">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Edit {editing?.label}</DialogTitle>
|
||||
<DialogTitle>{t.surfaces.editNode(editing?.label ?? '')}</DialogTitle>
|
||||
</DialogHeader>
|
||||
<div className="h-80">
|
||||
{editing && (
|
||||
@@ -162,10 +164,10 @@ export function NodeContextMenu({ onClose, onNodeRemoved, target }: NodeContextM
|
||||
{error ? <p className="text-xs text-destructive">{error}</p> : null}
|
||||
<DialogFooter>
|
||||
<Button disabled={saving} onClick={() => setEditing(null)} type="button" variant="ghost">
|
||||
Cancel
|
||||
{t.common.cancel}
|
||||
</Button>
|
||||
<Button disabled={saving} onClick={() => void save()}>
|
||||
{saving ? 'Saving…' : 'Save'}
|
||||
{saving ? t.common.saving : t.common.save}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
@@ -186,8 +188,8 @@ export function NodeContextMenu({ onClose, onNodeRemoved, target }: NodeContextM
|
||||
/>
|
||||
) : (
|
||||
<ConfirmDialog
|
||||
confirmLabel="Delete"
|
||||
description="This memory is removed permanently."
|
||||
confirmLabel={t.common.delete}
|
||||
description={t.surfaces.permanentMemory}
|
||||
destructive
|
||||
dismissOnConfirm
|
||||
onClose={() => setDeleting(null)}
|
||||
@@ -211,7 +213,7 @@ export function NodeContextMenu({ onClose, onNodeRemoved, target }: NodeContextM
|
||||
)
|
||||
}}
|
||||
open={Boolean(deleting)}
|
||||
title={`Delete ${deleting?.label ?? ''}?`}
|
||||
title={t.surfaces.deleteNode(deleting?.label ?? '')}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -3,6 +3,7 @@ import { atom, type WritableAtom } from 'nanostores'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
|
||||
import { useThemeEpoch } from '@/hooks/use-theme-epoch'
|
||||
import { useI18n } from '@/i18n'
|
||||
import { createDoubleTapDetector, isSmartZoomWheel } from '@/lib/trackpad-gestures'
|
||||
import type { StarmapGraph } from '@/types/hermes'
|
||||
|
||||
@@ -106,6 +107,7 @@ export function StarMap({
|
||||
onImport?: (graph: StarmapGraph) => void
|
||||
onResetMap?: () => void
|
||||
}) {
|
||||
const { t } = useI18n()
|
||||
const canvasRef = useRef<HTMLCanvasElement | null>(null)
|
||||
const wrapRef = useRef<HTMLDivElement | null>(null)
|
||||
|
||||
@@ -967,12 +969,13 @@ export function StarMap({
|
||||
{/* Legend — bottom-left, one entry per line like a conventional key. */}
|
||||
<div className="pointer-events-none absolute bottom-2 left-2 flex flex-col gap-1 text-[0.62rem] text-muted-foreground">
|
||||
<span className="flex items-center gap-1.5">
|
||||
<span className="inline-block size-2 rounded-full bg-[var(--theme-primary)]/80" /> skill
|
||||
<span className="inline-block size-2 rounded-full bg-[var(--theme-primary)]/80" /> {t.surfaces.skill}
|
||||
</span>
|
||||
<span className="flex items-center gap-1.5">
|
||||
<span className="inline-block size-2 rotate-45" style={{ backgroundColor: memoryColor }} /> memory
|
||||
<span className="inline-block size-2 rotate-45" style={{ backgroundColor: memoryColor }} />{' '}
|
||||
{t.surfaces.memory}
|
||||
</span>
|
||||
<span className="text-[0.58rem] text-muted-foreground/65">core = oldest · outer = newer</span>
|
||||
<span className="text-[0.58rem] text-muted-foreground/65">{t.surfaces.mapAge}</span>
|
||||
<RevealLabel axis={timeAxis} revealStore={revealStore} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { memo, useCallback, useEffect, useMemo, useRef } from 'react'
|
||||
|
||||
import { Codicon } from '@/components/ui/codicon'
|
||||
import { useI18n } from '@/i18n'
|
||||
|
||||
import type { TimeAxis } from './time-axis'
|
||||
|
||||
@@ -109,6 +110,7 @@ export const Timeline = memo(function Timeline({
|
||||
revealStore,
|
||||
ringStops = []
|
||||
}: TimelineProps) {
|
||||
const { t } = useI18n()
|
||||
const trackRef = useRef<HTMLDivElement | null>(null)
|
||||
const draggingRef = useRef(false)
|
||||
const markerRefs = useRef<HTMLDivElement[]>([])
|
||||
@@ -185,7 +187,7 @@ export const Timeline = memo(function Timeline({
|
||||
<style>{'@keyframes starmap-twinkle{0%,100%{opacity:var(--o,1)}50%{opacity:calc(var(--o,1) * 0.35)}}'}</style>
|
||||
|
||||
<button
|
||||
aria-label={playing ? 'Pause' : 'Play timeline'}
|
||||
aria-label={playing ? t.surfaces.pause : t.surfaces.playTimeline}
|
||||
className="flex size-5 shrink-0 items-center justify-center text-foreground/75 transition-colors hover:text-foreground"
|
||||
onClick={onTogglePlay}
|
||||
type="button"
|
||||
@@ -194,7 +196,7 @@ export const Timeline = memo(function Timeline({
|
||||
</button>
|
||||
|
||||
<div
|
||||
aria-label="Timeline scrubber"
|
||||
aria-label={t.surfaces.timeline}
|
||||
aria-valuemax={100}
|
||||
aria-valuemin={0}
|
||||
aria-valuenow={Math.round(revealStore.get() * 100)}
|
||||
|
||||
Reference in new issue
Block a user