Skip to content

Send files directly between devices over the internet - no cloud storage, no size limits.

Improvements in desktop + mobile UI (#45)

Denis Lupookovdc47e613d9cf
diff --git a/README.md b/README.md
index 529602a..10df0d4 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,8 @@
<div align="center">
- <img src="assets/altersend-logo.png" alt="AlterSend" width="380" />
+ <br />
+ <img src="assets/altersend-logo.png" alt="AlterSend" width="340" />
+ <br />
+ <br />
### File transfer without the cloud storage.
diff --git a/apps/desktop/src/renderer/components/Modal/Modal.tsx b/apps/desktop/src/renderer/components/Modal/Modal.tsx
index ca95cec..7f1dcb6 100644
--- a/apps/desktop/src/renderer/components/Modal/Modal.tsx
+++ b/apps/desktop/src/renderer/components/Modal/Modal.tsx
@@ -46,7 +46,7 @@ export function Modal({
}}
>
<div
- className='flex max-w-full flex-col overflow-hidden rounded-[14px] border border-border-primary bg-background shadow-[0_32px_64px_color-mix(in_oklab,var(--as-color-scrim)_50%,transparent)]'
+ className='flex max-w-full flex-col overflow-hidden rounded-[16px] border border-border-primary bg-background shadow-[0_32px_64px_color-mix(in_oklab,var(--as-color-scrim)_50%,transparent)]'
onClick={(e) => e.stopPropagation()}
style={{ width, animation: 'as-scale-in 240ms cubic-bezier(0.16, 1, 0.3, 1)' }}
>
diff --git a/apps/desktop/src/renderer/components/Popover/Popover.tsx b/apps/desktop/src/renderer/components/Popover/Popover.tsx
index 2b2173f..321b138 100644
--- a/apps/desktop/src/renderer/components/Popover/Popover.tsx
+++ b/apps/desktop/src/renderer/components/Popover/Popover.tsx
@@ -49,7 +49,7 @@ export function Popover({ trigger, children, align = 'right', variant = 'menu' }
: {}
return (
- <div ref={triggerRef} onMouseDown={(e) => e.stopPropagation()}>
+ <div ref={triggerRef}>
<div className='cursor-pointer' onClick={handleToggle}>
{trigger}
</div>
diff --git a/apps/desktop/src/renderer/components/Settings/DevicesPanel.tsx b/apps/desktop/src/renderer/components/Settings/DevicesPanel.tsx
deleted file mode 100644
index 84404ff..0000000
--- a/apps/desktop/src/renderer/components/Settings/DevicesPanel.tsx
+++ /dev/null
@@ -1,201 +0,0 @@
-import { useEffect, useRef, useState } from 'react'
-import { createPortal } from 'react-dom'
-import { ActionRow, Button, LinkCard, LinkRow, useTheme } from '@altersend/components'
-import {
- ArrowLeftIcon,
- ClipboardIcon,
- CloseIcon,
- MoreVerticalIcon,
- PlusIcon,
- QrCodeIcon,
- TrashIcon,
- deviceIcon
-} from '@altersend/components/icons'
-import { forgetPeer, usePairingSession } from '@altersend/domain'
-import { useTranslation } from '@altersend/locales'
-import syncDevicesSvg from '../../../../../../assets/sync_devices.svg'
-import { useToast } from '../Toast'
-import { Popover } from '../Popover'
-import { PairingQrModal } from './PairingQrModal'
-import { PairingJoinModal } from './PairingJoinModal'
-
-interface DevicesPanelProps {
- onBack: () => void
- onClose: () => void
-}
-
-export function DevicesPanel({ onBack, onClose }: DevicesPanelProps) {
- const { t } = useTranslation(['settings', 'common'])
- const { theme } = useTheme()
- const c = theme.colors
- const toast = useToast()
-
- const [qrOpen, setQrOpen] = useState(false)
- const [joinOpen, setJoinOpen] = useState(false)
- const [addOpen, setAddOpen] = useState(false)
- const addPanelRef = useRef<HTMLDivElement>(null)
-
- const { peers, pairingTopic, isJoining, isJoinWaiting, join } = usePairingSession({
- hostOpen: qrOpen,
- joinOpen,
- onPaired: () => {
- setQrOpen(false)
- setJoinOpen(false)
- toast.show({ title: t('settings:pairing.devicePaired') })
- },
- onFailed: () => toast.show({ title: t('settings:pairing.pairFailed'), variant: 'error' })
- })
-
- useEffect(() => {
- if (!addOpen) return
- const handler = (e: MouseEvent) => {
- if (addPanelRef.current && !addPanelRef.current.contains(e.target as Node)) {
- setAddOpen(false)
- }
- }
- document.addEventListener('mousedown', handler)
- return () => document.removeEventListener('mousedown', handler)
- }, [addOpen])
-
- return (
- <>
- <div className='flex shrink-0 items-center justify-between border-b border-border-primary px-3 py-3'>
- <Button variant='ghost' size='sm' icon={<ArrowLeftIcon size={13} />} onClick={onBack}>
- {t('settings:pairing.pairedDevices')}
- </Button>
- <Button
- variant='ghost'
- size='sm'
- iconOnly
- aria-label={t('common:actions.close')}
- icon={<CloseIcon size={14} />}
- onClick={onClose}
- />
- </div>
-
- <div className='flex-1 overflow-y-auto'>
- {peers.length === 0 ? (
- <div className='flex h-full flex-col items-center justify-center px-6 py-10 text-center'>
- <img src={syncDevicesSvg} alt='' aria-hidden className='mb-6 w-[230px] opacity-90' />
- <p className='m-0 text-[17px] font-bold text-text-primary'>
- {t('settings:pairing.noPairedDevices')}
- </p>
- <p className='m-0 mt-2 max-w-[260px] text-[13px] leading-relaxed text-text-muted'>
- {t('settings:pairing.noPairedDevicesHint')}
- </p>
- </div>
- ) : (
- <div className='px-5 py-4'>
- <LinkCard>
- {peers.map((peer, index) => {
- const Icon = deviceIcon(peer.deviceType)
- return (
- <LinkRow
- key={peer.remoteDevicePubkey}
- compact
- icon={<Icon size={14} color={c.colorTextPrimary} />}
- label={peer.displayName}
- trailing={
- <Popover
- trigger={
- <Button
- variant='ghost'
- size='sm'
- iconOnly
- aria-label={t('settings:pairing.deviceActions')}
- icon={<MoreVerticalIcon size={14} />}
- />
- }
- >
- {(close) => (
- <ActionRow
- compact
- tone='danger'
- icon={<TrashIcon />}
- title={t('settings:pairing.removeDevice')}
- onClick={() => {
- close()
- forgetPeer(peer.remoteDevicePubkey)
- .then((removed) =>
- toast.show(
- removed
- ? { title: t('settings:pairing.deviceRemoved') }
- : {
- title: t('settings:pairing.removeFailed'),
- variant: 'error'
- }
- )
- )
- .catch(() =>
- toast.show({
- title: t('settings:pairing.removeFailed'),
- variant: 'error'
- })
- )
- }}
- />
- )}
- </Popover>
- }
- isLast={index === peers.length - 1}
- />
- )
- })}
- </LinkCard>
- </div>
- )}
- </div>
-
- <div ref={addPanelRef} className='relative shrink-0 border-t border-border-primary px-5 py-4'>
- {addOpen && (
- <div className='absolute bottom-full left-5 right-5 -mb-2 overflow-hidden rounded-[20px] border border-border-primary bg-surface-primary shadow-lg'>
- <ActionRow
- compact
- icon={<QrCodeIcon />}
- title={t('settings:pairing.showQrCode')}
- subtitle={t('settings:pairing.showQrCodeHint')}
- onClick={() => {
- setAddOpen(false)
- setQrOpen(true)
- }}
- />
- <div className='mx-4 h-px bg-border-primary' />
- <ActionRow
- compact
- icon={<ClipboardIcon />}
- title={t('settings:pairing.enterCode')}
- subtitle={t('settings:pairing.enterCodeHint')}
- onClick={() => {
- setAddOpen(false)
- setJoinOpen(true)
- }}
- />
- </div>
- )}
- <Button
- variant='primary'
- size='sm'
- width='full'
- icon={<PlusIcon size={14} />}
- onClick={() => setAddOpen((v) => !v)}
- >
- {t('settings:pairing.pairNewDevice')}
- </Button>
- </div>
-
- {createPortal(
- <PairingQrModal open={qrOpen} topic={pairingTopic} onClose={() => setQrOpen(false)} />,
- document.body
- )}
- {createPortal(
- <PairingJoinModal
- open={joinOpen}
- isLoading={isJoining || isJoinWaiting}
- onClose={() => setJoinOpen(false)}
- onJoin={join}
- />,
- document.body
- )}
- </>
- )
-}
diff --git a/apps/desktop/src/renderer/components/Settings/FeedbackPanel.tsx b/apps/desktop/src/renderer/components/Settings/FeedbackPanel.tsx
deleted file mode 100644
index 6d1be70..0000000
--- a/apps/desktop/src/renderer/components/Settings/FeedbackPanel.tsx
+++ /dev/null
@@ -1,129 +0,0 @@
-import { useState } from 'react'
-import { Button, FeedbackTypeSelector } from '@altersend/components'
-import type { FeedbackType } from '@altersend/components'
-import { ArrowLeftIcon, CloseIcon } from '@altersend/components/icons'
-import { useTranslation } from '@altersend/locales'
-
-const DISCORD_EMBED_COLOR = 0x5865f2
-
-interface FeedbackPanelProps {
- version: string
- onBack: () => void
- onClose: () => void
-}
-
-export function FeedbackPanel({ version, onBack, onClose }: FeedbackPanelProps) {
- const { t } = useTranslation(['feedback', 'common'])
- const [reportType, setReportType] = useState<FeedbackType>('bug')
- const [reportMessage, setReportMessage] = useState('')
- const [reportState, setReportState] = useState<'idle' | 'sending' | 'sent' | 'error'>('idle')
-
- const sendReport = async () => {
- const url = import.meta.env.VITE_DISCORD_WEBHOOK_URL
-
- if (!url || url.includes('PLACEHOLDER')) return
- setReportState('sending')
-
- try {
- await fetch(url, {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({
- embeds: [
- {
- title: t(`feedback:types.${reportType}`),
- description: reportMessage.trim(),
- color: DISCORD_EMBED_COLOR,
- fields: [
- { name: t('common:labels.version'), value: `v${version}`, inline: true },
- {
- name: t('common:labels.platform'),
- value: t('common:labels.desktop'),
- inline: true
- }
- ],
- timestamp: new Date().toISOString()
- }
- ]
- })
- })
- setReportState('sent')
- } catch {
- setReportState('error')
- }
- }
-
- return (
- <>
- <div className='flex shrink-0 items-center justify-between border-b border-border-primary px-3 py-3'>
- <Button variant='ghost' size='sm' icon={<ArrowLeftIcon size={13} />} onClick={onBack}>
- {t('feedback:title')}
- </Button>
- <button
- type='button'
- onClick={onClose}
- className='inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-[8px] border-none bg-transparent p-0 text-text-primary transition-colors hover:bg-surface-secondary'
- style={{ appearance: 'none' }}
- >
- <CloseIcon size={14} />
- </button>
- </div>
-
- <div className='flex-1 overflow-y-auto p-4'>
- {reportState === 'sent' ? (
- <p className='py-8 text-center text-[14px] text-text-secondary'>
- {t('feedback:states.sent')}
- </p>
- ) : (
- <>
- <div className='mb-3'>
- <FeedbackTypeSelector
- value={reportType}
- onChange={setReportType}
- labels={{
- bug: t('feedback:types.bug'),
- feature: t('feedback:types.feature'),
- general: t('feedback:types.general')
- }}
- disabled={reportState === 'sending'}
- />
- </div>
- <textarea
- className='w-full resize-none rounded-lg border border-border-primary bg-surface-secondary px-3 py-3 font-sans text-[13px] text-text-primary placeholder:text-text-muted focus:border-border-strong focus:outline-none disabled:opacity-50'
- rows={5}
- placeholder={
- reportType === 'bug'
- ? t('feedback:placeholders.desktopBug')
- : reportType === 'feature'
- ? t('feedback:placeholders.desktopFeature')
- : t('feedback:placeholders.general')
- }
- value={reportMessage}
- disabled={reportState === 'sending'}
- onChange={(e) => {
- setReportMessage(e.target.value)
- if (reportState === 'error') setReportState('idle')
- }}
- />
- {reportState === 'error' && (
- <p className='mt-1.5 text-[11px] text-danger'>{t('feedback:states.failed')}</p>
- )}
- <div className='mt-3'>
- <Button
- variant='primary'
- size='sm'
- width='full'
- disabled={!reportMessage.trim() || reportState === 'sending'}
- onClick={() => void sendReport()}
- >
- {reportState === 'sending'
- ? t('feedback:actions.sending')
- : t('feedback:actions.send')}
- </Button>
- </div>
- </>
- )}
- </div>
- </>
- )
-}
diff --git a/apps/desktop/src/renderer/components/Settings/SettingsPanel.tsx b/apps/desktop/src/renderer/components/Settings/SettingsPanel.tsx
deleted file mode 100644
index e7589c2..0000000
--- a/apps/desktop/src/renderer/components/Settings/SettingsPanel.tsx
+++ /dev/null
@@ -1,198 +0,0 @@
-import { useState } from 'react'
-import { ExternalLink, ToggleSwitch, getFontFamilyCssVariables } from '@altersend/components'
-import {
- AlertCircleIcon,
- ArrowUpRightIcon,
- ChevronRightIcon,
- CloseIcon,
- DiscordIcon,
- GithubIcon,
- GlobeIcon,
- SmartphoneIcon
-} from '@altersend/components/icons'
-import {
- LOCALE_OPTIONS,
- Trans,
- changeI18nLanguage,
- getLocaleFontFamily,
- normalizeLocalePreference,
- resolveLocalePreference,
- useTranslation,
- type LocaleOption,
- type LocalePreference
-} from '@altersend/locales'
-import {
- discordUrl,
- githubUrl,
- privacyPolicyUrl,
- termsOfServiceUrl,
- useTransferStore,
- websiteUrl
-} from '@altersend/domain'
-import { bridgeApi } from '../../api/bridgeApi'
-import { Select } from '../Select'
-import { closeSentry, initSentry } from '../../sentry'
-import {
- isCrashReportingEnabled,
- setCrashReportingEnabled
-} from '../../lifecycle/crashReportingStorage'
-import {
- getSavedLocalePreference,
- setSavedLocalePreference
-} from '../../lifecycle/localePreferenceStorage'
-import { getDesktopSystemLocales } from '../../lifecycle/systemLocale'
-
-function getLocaleOptionFontFamily(option: LocaleOption): string | undefined {
- if (!option.resolvedCode) return undefined
- return getFontFamilyCssVariables(getLocaleFontFamily(option.resolvedCode)).fontFamily
-}
-
-interface SettingsPanelProps {
- onNavigate: (panel: 'devices' | 'report') => void
- onClose: () => void
-}
-
-export function SettingsPanel({ onNavigate, onClose }: SettingsPanelProps) {
- const { t } = useTranslation(['settings', 'common'])
- const peers = useTransferStore((s) => s.peers)
- const [crashReporting, setCrashReporting] = useState(isCrashReportingEnabled)
- const [localePreference, setLocalePreference] =
- useState<LocalePreference>(getSavedLocalePreference)
-
- const handleCrashReportingToggle = (next: boolean) => {
- setCrashReporting(next)
- setCrashReportingEnabled(next)
-
- if (next) {
- initSentry()
- } else {
- closeSentry()
- }
-
- bridgeApi.setSentryEnabled(next)
- }
-
- const handleLocaleChange = (value: string) => {
- const preference = normalizeLocalePreference(value)
-
- setLocalePreference(preference)
- setSavedLocalePreference(preference)
-
- changeI18nLanguage(resolveLocalePreference(preference, getDesktopSystemLocales()))
- }
-
- return (
- <>
- <div className='flex shrink-0 items-center justify-between border-b border-border-primary px-5 py-4'>
- <p className='m-0 text-[18px] font-semibold text-text-primary'>{t('settings:title')}</p>
- <button
- type='button'
- aria-label={t('common:actions.close')}
- onClick={onClose}
- className='inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-[8px] border-none bg-transparent p-0 text-text-primary transition-colors hover:bg-surface-secondary'
- style={{ appearance: 'none' }}
- >
- <CloseIcon size={14} />
- </button>
- </div>
-
- <div className='flex-1 overflow-y-auto'>
- <div className='px-5 pb-4 pt-5'>
- <ToggleSwitch
- checked={crashReporting}
- onChange={handleCrashReportingToggle}
- label={t('settings:crashReports.label')}
- description={t('settings:crashReports.description')}
- />
- <div className='mt-4'>
- <label className='mb-2 block text-[13px] font-medium text-text-secondary'>
- {t('common:labels.language')}
- </label>
- <Select
- aria-label={t('common:labels.language')}
- value={localePreference}
- onChange={handleLocaleChange}
- options={LOCALE_OPTIONS.map((option) => ({
- value: option.preference,
- label: option.nativeName
- ? `${option.nativeName} · ${option.label}`
- : t('common:labels.systemDefault'),
- fontFamily: getLocaleOptionFontFamily(option)
- }))}
- />
- </div>
- </div>
-
- <div className='border-t border-border-primary py-1'>
- <button
- type='button'
- onClick={() => onNavigate('devices')}
- className='flex w-full appearance-none items-center gap-3 border-0 bg-transparent px-5 py-3 text-[14px] text-text-secondary transition-colors hover:bg-surface-secondary hover:text-text-primary'
- >
- <SmartphoneIcon size={15} />
- <span className='flex-1 text-left'>{t('settings:pairing.pairedDevices')}</span>
- <span className='text-[12px] text-text-muted'>
- {peers.length === 0
- ? t('settings:rows.noDevices')
- : t('settings:rows.pairedCount', { count: peers.length })}
- </span>
- <ChevronRightIcon size={13} />
- </button>
- <button
- type='button'
- onClick={() => onNavigate('report')}
- className='flex w-full appearance-none items-center gap-3 border-0 bg-transparent px-5 py-3 text-[14px] text-text-secondary transition-colors hover:bg-surface-secondary hover:text-text-primary'
- >
- <AlertCircleIcon size={15} />
- <span className='flex-1 text-left'>{t('settings:rows.feedback')}</span>
- <ChevronRightIcon size={13} />
- </button>
- </div>
-
- <div className='border-t border-border-primary py-1'>
- {[
- { icon: DiscordIcon, key: 'discord' as const, label: t('settings:rows.discord') },
- { icon: GithubIcon, key: 'github' as const, label: 'GitHub' },
- { icon: GlobeIcon, key: 'website' as const, label: t('settings:rows.website') }
- ].map(({ icon: Icon, key, label }) => (
- <button
- key={key}
- type='button'
- onClick={() => {
- if (key === 'discord') void bridgeApi.openExternalUrl(discordUrl)
- if (key === 'github') void bridgeApi.openExternalUrl(githubUrl)
- if (key === 'website') void bridgeApi.openExternalUrl(websiteUrl)
- }}
- className='flex w-full appearance-none items-center gap-3 border-0 bg-transparent px-5 py-3 text-[14px] text-text-secondary transition-colors hover:bg-surface-secondary hover:text-text-primary'
- >
- <Icon size={15} />
- <span className='flex-1 text-left'>{label}</span>
- <ArrowUpRightIcon size={13} />
- </button>
- ))}
- </div>
- </div>
-
- <div className='shrink-0 border-t border-border-primary px-5 py-4'>
- <p className='m-0 text-[12px] font-medium text-text-muted'>
- <Trans
- ns='settings'
- i18nKey='legal.sentence'
- components={{
- terms: (
- <ExternalLink onPress={() => void bridgeApi.openExternalUrl(termsOfServiceUrl)}>
- {null}
- </ExternalLink>
- ),
- privacy: (
- <ExternalLink onPress={() => void bridgeApi.openExternalUrl(privacyPolicyUrl)}>
- {null}
- </ExternalLink>
- )
- }}
- />
- </p>
- </div>
- </>
- )
-}
diff --git a/apps/desktop/src/renderer/components/Settings/index.tsx b/apps/desktop/src/renderer/components/Settings/index.tsx
index d26ce1e..4041db9 100644
--- a/apps/desktop/src/renderer/components/Settings/index.tsx
+++ b/apps/desktop/src/renderer/components/Settings/index.tsx
@@ -1,80 +1,80 @@
-import { useEffect, useState } from 'react'
-import { SettingsIcon } from '@altersend/components/icons'
+import { useEffect, useState, type ComponentType } from 'react'
+import {
+ GlobeIcon,
+ InfoIcon,
+ LaptopIcon,
+ MailIcon,
+ ShieldIcon,
+ type IconProps
+} from '@altersend/components/icons'
import { loadPeers } from '@altersend/domain'
import { useTranslation } from '@altersend/locales'
-import logo from '../../../../../../assets/logo.png'
-import { SettingsPanel } from './SettingsPanel'
-import { DevicesPanel } from './DevicesPanel'
-import { FeedbackPanel } from './FeedbackPanel'
-import { subscribeOpenSettings, type SettingsPanelView } from './settingsControl'
+import { Modal } from '../Modal'
+import { ListItem } from '@altersend/components'
+import { DevicesSection } from './sections/DevicesSection'
+import { LanguageSection } from './sections/LanguageSection'
+import { FeedbackSection } from './sections/FeedbackSection'
+import { SecuritySection } from './sections/SecuritySection'
+import { AboutSection } from './sections/AboutSection'
+import { subscribeOpenSettings, type SettingsSection } from './settingsControl'
export { openSettingsPanel } from './settingsControl'
+const NAV: { id: SettingsSection; icon: ComponentType<IconProps>; labelKey: string }[] = [
+ { id: 'devices', icon: LaptopIcon, labelKey: 'settings:pairing.pairedDevices' },
+ { id: 'language', icon: GlobeIcon, labelKey: 'settings:languageTitle' },
+ { id: 'feedback', icon: MailIcon, labelKey: 'settings:rows.feedback' },
+ { id: 'security', icon: ShieldIcon, labelKey: 'settings:rows.security' },
+ { id: 'about', icon: InfoIcon, labelKey: 'settings:sections.about' }
+]
+
export function Settings({ version }: { version: string }) {
- const { t } = useTranslation(['common'])
+ const { t } = useTranslation(['settings', 'common'])
const [open, setOpen] = useState(false)
- const [panel, setPanel] = useState<SettingsPanelView>('settings')
+ const [section, setSection] = useState<SettingsSection>('devices')
useEffect(() => {
- if (open) {
- loadPeers()
- }
+ if (open) loadPeers()
}, [open])
useEffect(
() =>
subscribeOpenSettings((next) => {
- setPanel(next)
+ setSection(next)
setOpen(true)
}),
[]
)
- const close = () => {
- setOpen(false)
- setPanel('settings')
- }
-
return (
- <footer className='shrink-0 border-t border-border-primary'>
- <div className='mx-auto flex w-full select-none items-center justify-between px-5 py-2 text-[12px] text-text-muted'>
- <div className='flex min-w-0 items-center gap-1.5'>
- <img
- src={logo}
- alt=''
- aria-hidden
- className='h-[20px] w-[20px] shrink-0 object-contain opacity-90'
- />
- <span className='truncate text-text-secondary'>AlterSend</span>
- <span className='ml-1 shrink-0 tabular-nums opacity-70'>v{version}</span>
- </div>
- <button
- aria-label={t('common:labels.settings')}
- title={t('common:labels.settings')}
- type='button'
- className='flex appearance-none items-center justify-center rounded-full border border-border-strong bg-transparent p-1.5 text-text-muted transition-colors hover:border-text-muted hover:text-text-primary cursor-pointer'
- onClick={() => setOpen((v) => !v)}
- >
- <SettingsIcon size={14} />
- </button>
- </div>
-
- <div
- className={`fixed inset-0 z-40 transition-opacity duration-200 ${open ? 'pointer-events-auto opacity-100' : 'pointer-events-none opacity-0'}`}
- onClick={close}
- />
+ <Modal open={open} title={t('settings:title')} width={820} onClose={() => setOpen(false)}>
+ <div className='flex h-[560px] border-t border-border-primary'>
+ <nav className='w-[210px] shrink-0 space-y-1 overflow-y-auto border-r border-border-primary px-2.5 pb-2.5 pt-5'>
+ {NAV.map(({ id, icon: Icon, labelKey }) => (
+ <ListItem
+ key={id}
+ icon={<Icon size={16} />}
+ label={t(labelKey)}
+ active={section === id}
+ onClick={() => setSection(id)}
+ />
+ ))}
+ </nav>
- <div
- className={`fixed inset-y-0 right-0 z-50 flex w-[360px] flex-col overflow-hidden border-l border-border-primary bg-background-subtle shadow-2xl transition-transform duration-200 ease-out ${open ? 'translate-x-0' : 'translate-x-full'}`}
- >
- {panel === 'settings' ? (
- <SettingsPanel onNavigate={setPanel} onClose={close} />
- ) : panel === 'devices' ? (
- <DevicesPanel onBack={() => setPanel('settings')} onClose={close} />
- ) : (
- <FeedbackPanel version={version} onBack={() => setPanel('settings')} onClose={close} />
- )}
+ <div className='flex min-h-0 flex-1 flex-col'>
+ {section === 'devices' ? (
+ <DevicesSection />
+ ) : section === 'language' ? (
+ <LanguageSection />
+ ) : section === 'feedback' ? (
+ <FeedbackSection version={version} />
+ ) : section === 'security' ? (
+ <SecuritySection />
+ ) : (
+ <AboutSection version={version} />
+ )}
+ </div>
</div>
- </footer>
+ </Modal>
)
}
diff --git a/apps/desktop/src/renderer/components/Settings/sections/AboutSection.tsx b/apps/desktop/src/renderer/components/Settings/sections/AboutSection.tsx
new file mode 100644
index 0000000..e6a828e
--- /dev/null
+++ b/apps/desktop/src/renderer/components/Settings/sections/AboutSection.tsx
@@ -0,0 +1,79 @@
+import { ExternalLink, LinkCard, LinkRow, useTheme } from '@altersend/components'
+import { ArrowUpRightIcon, DiscordIcon, GithubIcon, GlobeIcon } from '@altersend/components/icons'
+import { Trans, useTranslation } from '@altersend/locales'
+import {
+ discordUrl,
+ githubUrl,
+ privacyPolicyUrl,
+ termsOfServiceUrl,
+ websiteUrl
+} from '@altersend/domain'
+import logo from '../../../../../../../assets/logo.png'
+import { bridgeApi } from '../../../api/bridgeApi'
+import { SectionShell } from './SectionShell'
+
+export function AboutSection({ version }: { version: string }) {
+ const { t } = useTranslation(['settings', 'common'])
+ const { theme } = useTheme()
+ const c = theme.colors
+
+ const links = [
+ { icon: DiscordIcon, label: t('settings:rows.discord'), url: discordUrl },
+ { icon: GithubIcon, label: 'GitHub', url: githubUrl },
+ { icon: GlobeIcon, label: t('settings:rows.website'), url: websiteUrl }
+ ]
+
+ return (
+ <SectionShell title={t('settings:sections.about')}>
+ <div className='mb-4 flex items-center gap-[14px] rounded-xl border border-border-primary bg-background-subtle px-[18px] py-4'>
+ <div className='h-10 w-10 shrink-0 overflow-hidden rounded-[10px]'>
+ <img src={logo} alt='' aria-hidden className='h-full w-full object-cover' />
+ </div>
+ <div className='min-w-0'>
+ <p className='m-0 text-[15px] font-semibold text-text-primary'>AlterSend</p>
+ <p className='m-0 mt-0.5 text-[12.5px] text-text-muted'>{t('common:app.tagline')}</p>
+ </div>
+ </div>
+
+ <div className='mb-4 flex items-center justify-between gap-3 rounded-xl border border-border-primary bg-background-subtle px-[18px] py-[13px]'>
+ <span className='text-[14px] font-medium text-text-primary'>
+ {t('common:labels.version')}
+ </span>
+ <span className='text-[14px] tabular-nums text-text-muted'>v{version}</span>
+ </div>
+
+ <LinkCard>
+ {links.map(({ icon: Icon, label, url }, index) => (
+ <LinkRow
+ key={label}
+ compact
+ icon={<Icon size={16} color={c.colorTextSecondary} />}
+ label={label}
+ trailing={<ArrowUpRightIcon size={14} color={c.colorTextMuted} />}
+ onPress={() => void bridgeApi.openExternalUrl(url)}
+ isLast={index === links.length - 1}
+ />
+ ))}
+ </LinkCard>
+
+ <p className='m-0 mt-4 text-center text-[12px] text-text-muted'>
+ <Trans
+ ns='settings'
+ i18nKey='legal.sentence'
+ components={{
+ terms: (
+ <ExternalLink onPress={() => void bridgeApi.openExternalUrl(termsOfServiceUrl)}>
+ {null}
+ </ExternalLink>
+ ),
+ privacy: (
+ <ExternalLink onPress={() => void bridgeApi.openExternalUrl(privacyPolicyUrl)}>
+ {null}
+ </ExternalLink>
+ )
+ }}
+ />
+ </p>
+ </SectionShell>
+ )
+}
diff --git a/apps/desktop/src/renderer/components/Settings/sections/DevicesSection.tsx b/apps/desktop/src/renderer/components/Settings/sections/DevicesSection.tsx
new file mode 100644
index 0000000..8ba01c2
--- /dev/null
+++ b/apps/desktop/src/renderer/components/Settings/sections/DevicesSection.tsx
@@ -0,0 +1,160 @@
+import { useState } from 'react'
+import { createPortal } from 'react-dom'
+import { Button, LinkRow, ListItem, useTheme } from '@altersend/components'
+import {
+ ClipboardIcon,
+ MoreVerticalIcon,
+ PlusIcon,
+ QrCodeIcon,
+ TrashIcon,
+ deviceIcon
+} from '@altersend/components/icons'
+import { forgetPeer, usePairingSession } from '@altersend/domain'
+import { useTranslation } from '@altersend/locales'
+import syncDevicesSvg from '../../../../../../../assets/sync_devices.svg'
+import { useToast } from '../../Toast'
+import { Popover } from '../../Popover'
+import { PairingQrModal } from '../PairingQrModal'
+import { PairingJoinModal } from '../PairingJoinModal'
+import { SectionShell } from './SectionShell'
+
+export function DevicesSection() {
+ const { t } = useTranslation(['settings', 'common'])
+ const { theme } = useTheme()
+ const c = theme.colors
+ const toast = useToast()
+
+ const [qrOpen, setQrOpen] = useState(false)
+ const [joinOpen, setJoinOpen] = useState(false)
+
+ const { peers, pairingTopic, isJoining, isJoinWaiting, join } = usePairingSession({
+ hostOpen: qrOpen,
+ joinOpen,
+ onPaired: () => {
+ setQrOpen(false)
+ setJoinOpen(false)
+ toast.show({ title: t('settings:pairing.devicePaired') })
+ },
+ onFailed: () => toast.show({ title: t('settings:pairing.pairFailed'), variant: 'error' })
+ })
+
+ return (
+ <SectionShell
+ title={t('settings:pairing.pairedDevices')}
+ action={
+ <Popover
+ trigger={
+ <Button variant='primary' size='sm' icon={<PlusIcon size={14} />}>
+ {t('settings:pairing.pairNewDevice')}
+ </Button>
+ }
+ >
+ {(close) => (
+ <>
+ <ListItem
+ variant='plain'
+ icon={<QrCodeIcon size={16} />}
+ label={t('settings:pairing.showQrCode')}
+ onClick={() => {
+ close()
+ setQrOpen(true)
+ }}
+ />
+ <ListItem
+ variant='plain'
+ icon={<ClipboardIcon size={16} />}
+ label={t('settings:pairing.enterCode')}
+ onClick={() => {
+ close()
+ setJoinOpen(true)
+ }}
+ />
+ </>
+ )}
+ </Popover>
+ }
+ >
+ {peers.length === 0 ? (
+ <div className='flex h-full flex-col items-center justify-center px-6 py-8 text-center'>
+ <img src={syncDevicesSvg} alt='' aria-hidden className='mb-6 w-[220px] opacity-90' />
+ <p className='m-0 text-[18px] font-bold text-text-primary'>
+ {t('settings:pairing.noPairedDevices')}
+ </p>
+ <p className='m-0 mt-2 max-w-[320px] text-[14px] leading-relaxed text-text-muted'>
+ {t('settings:pairing.noPairedDevicesHint')}
+ </p>
+ </div>
+ ) : (
+ <div className='flex flex-col gap-2.5'>
+ {peers.map((peer) => {
+ const Icon = deviceIcon(peer.deviceType)
+ return (
+ <LinkRow
+ key={peer.remoteDevicePubkey}
+ standalone
+ compact
+ icon={<Icon size={14} color={c.colorTextPrimary} />}
+ label={peer.displayName}
+ trailing={
+ <Popover
+ trigger={
+ <Button
+ variant='ghost'
+ size='sm'
+ iconOnly
+ aria-label={t('settings:pairing.deviceActions')}
+ icon={<MoreVerticalIcon size={14} />}
+ />
+ }
+ >
+ {(close) => (
+ <ListItem
+ tone='danger'
+ icon={<TrashIcon size={16} />}
+ label={t('settings:pairing.removeDevice')}
+ onClick={() => {
+ close()
+ forgetPeer(peer.remoteDevicePubkey)
+ .then((removed) =>
+ toast.show(
+ removed
+ ? { title: t('settings:pairing.deviceRemoved') }
+ : {
+ title: t('settings:pairing.removeFailed'),
+ variant: 'error'
+ }
+ )
+ )
+ .catch(() =>
+ toast.show({
+ title: t('settings:pairing.removeFailed'),
+ variant: 'error'
+ })
+ )
+ }}
+ />
+ )}
+ </Popover>
+ }
+ />
+ )
+ })}
+ </div>
+ )}
+
+ {createPortal(
+ <PairingQrModal open={qrOpen} topic={pairingTopic} onClose={() => setQrOpen(false)} />,
+ document.body
+ )}
+ {createPortal(
+ <PairingJoinModal
+ open={joinOpen}
+ isLoading={isJoining || isJoinWaiting}
+ onClose={() => setJoinOpen(false)}
+ onJoin={join}
+ />,
+ document.body
+ )}
+ </SectionShell>
+ )
+}
diff --git a/apps/desktop/src/renderer/components/Settings/sections/FeedbackSection.tsx b/apps/desktop/src/renderer/components/Settings/sections/FeedbackSection.tsx
new file mode 100644
index 0000000..be305e7
--- /dev/null
+++ b/apps/desktop/src/renderer/components/Settings/sections/FeedbackSection.tsx
@@ -0,0 +1,85 @@
+import { useState } from 'react'
+import { Button, FeedbackTypeSelector } from '@altersend/components'
+import { SendIcon } from '@altersend/components/icons'
+import type { FeedbackType } from '@altersend/components'
+import { submitFeedback } from '@altersend/domain'
+import { useTranslation } from '@altersend/locales'
+import { SectionShell } from './SectionShell'
+
+export function FeedbackSection({ version }: { version: string }) {
+ const { t } = useTranslation(['feedback', 'common'])
+ const [reportType, setReportType] = useState<FeedbackType>('bug')
+ const [reportMessage, setReportMessage] = useState('')
+ const [reportState, setReportState] = useState<'idle' | 'sending' | 'sent' | 'error'>('idle')
+
+ const sendReport = async () => {
+ setReportState('sending')
+ const sent = await submitFeedback({
+ webhookUrl: import.meta.env.VITE_DISCORD_WEBHOOK_URL,
+ title: t(`feedback:types.${reportType}`),
+ message: reportMessage.trim(),
+ version,
+ platform: t('common:labels.desktop'),
+ labels: { version: t('common:labels.version'), platform: t('common:labels.platform') }
+ })
+ setReportState(sent ? 'sent' : 'error')
+ }
+
+ return (
+ <SectionShell title={t('feedback:title')}>
+ {reportState === 'sent' ? (
+ <p className='py-8 text-center text-[14px] text-text-secondary'>
+ {t('feedback:states.sent')}
+ </p>
+ ) : (
+ <>
+ <div className='mb-3'>
+ <FeedbackTypeSelector
+ value={reportType}
+ onChange={setReportType}
+ labels={{
+ bug: t('feedback:types.bug'),
+ feature: t('feedback:types.feature'),
+ general: t('feedback:types.general')
+ }}
+ disabled={reportState === 'sending'}
+ />
+ </div>
+ <textarea
+ className='w-full resize-none rounded-lg border border-border-primary bg-background-subtle px-3 py-3 font-sans text-[13px] text-text-primary placeholder:text-text-muted focus:border-border-strong focus:outline-none disabled:opacity-50'
+ rows={5}
+ placeholder={
+ reportType === 'bug'
+ ? t('feedback:placeholders.desktopBug')
+ : reportType === 'feature'
+ ? t('feedback:placeholders.desktopFeature')
+ : t('feedback:placeholders.general')
+ }
+ value={reportMessage}
+ disabled={reportState === 'sending'}
+ onChange={(e) => {
+ setReportMessage(e.target.value)
+ if (reportState === 'error') setReportState('idle')
+ }}
+ />
+ {reportState === 'error' && (
+ <p className='mt-1.5 text-[11px] text-danger'>{t('feedback:states.failed')}</p>
+ )}
+ <div className='mt-3 flex justify-end'>
+ <Button
+ variant='primary'
+ size='sm'
+ icon={<SendIcon size={14} />}
+ disabled={!reportMessage.trim() || reportState === 'sending'}
+ onClick={() => void sendReport()}
+ >
+ {reportState === 'sending'
+ ? t('feedback:actions.sending')
+ : t('feedback:actions.send')}
+ </Button>
+ </div>
+ </>
+ )}
+ </SectionShell>
+ )
+}
diff --git a/apps/desktop/src/renderer/components/Settings/sections/LanguageSection.tsx b/apps/desktop/src/renderer/components/Settings/sections/LanguageSection.tsx
new file mode 100644
index 0000000..335810e
--- /dev/null
+++ b/apps/desktop/src/renderer/components/Settings/sections/LanguageSection.tsx
@@ -0,0 +1,61 @@
+import { useState } from 'react'
+import { LinkRow, getFontFamilyCssVariables, useTheme } from '@altersend/components'
+import { CheckIcon } from '@altersend/components/icons'
+import {
+ LOCALE_OPTIONS,
+ changeI18nLanguage,
+ getLocaleFontFamily,
+ normalizeLocalePreference,
+ resolveLocalePreference,
+ useTranslation,
+ type LocaleOption,
+ type LocalePreference
+} from '@altersend/locales'
+import {
+ getSavedLocalePreference,
+ setSavedLocalePreference
+} from '../../../lifecycle/localePreferenceStorage'
+import { getDesktopSystemLocales } from '../../../lifecycle/systemLocale'
+import { SectionShell } from './SectionShell'
+
+function getLocaleOptionFontFamily(option: LocaleOption): string | undefined {
+ if (!option.resolvedCode) return undefined
+ return getFontFamilyCssVariables(getLocaleFontFamily(option.resolvedCode)).fontFamily
+}
+
+export function LanguageSection() {
+ const { t } = useTranslation(['settings', 'common'])
+ const { theme } = useTheme()
+ const c = theme.colors
+ const [localePreference, setLocalePreference] =
+ useState<LocalePreference>(getSavedLocalePreference)
+
+ const handleLocaleChange = (value: string) => {
+ const preference = normalizeLocalePreference(value)
+ setLocalePreference(preference)
+ setSavedLocalePreference(preference)
+ changeI18nLanguage(resolveLocalePreference(preference, getDesktopSystemLocales()))
+ }
+
+ return (
+ <SectionShell title={t('settings:languageTitle')}>
+ <div className='flex flex-col gap-2.5'>
+ {LOCALE_OPTIONS.map((option) => {
+ const isSelected = option.preference === localePreference
+ return (
+ <LinkRow
+ key={option.preference}
+ standalone
+ compact
+ label={option.nativeName ?? t('common:labels.systemDefault')}
+ labelFontFamily={getLocaleOptionFontFamily(option)}
+ subtitle={option.nativeName ? option.label : undefined}
+ trailing={isSelected ? <CheckIcon size={16} color={c.colorTextPrimary} /> : null}
+ onPress={() => handleLocaleChange(option.preference)}
+ />
+ )
+ })}
+ </div>
+ </SectionShell>
+ )
+}
diff --git a/apps/desktop/src/renderer/components/Settings/sections/SectionShell.tsx b/apps/desktop/src/renderer/components/Settings/sections/SectionShell.tsx
new file mode 100644
index 0000000..2a8b64b
--- /dev/null
+++ b/apps/desktop/src/renderer/components/Settings/sections/SectionShell.tsx
@@ -0,0 +1,26 @@
+import type { ReactNode } from 'react'
+
+export function SectionShell({
+ title,
+ action,
+ children,
+ footer
+}: {
+ title: string
+ action?: ReactNode
+ children: ReactNode
+ footer?: ReactNode
+}) {
+ return (
+ <div className='flex h-full min-h-0 flex-col'>
+ <div className='flex shrink-0 items-center justify-between gap-3 px-6 pb-3 pt-5'>
+ <h2 className='m-0 text-[16px] font-semibold text-text-primary'>{title}</h2>
+ {action}
+ </div>
+ <div className='min-h-0 flex-1 overflow-y-auto px-6 pb-6'>{children}</div>
+ {footer && (
+ <div className='relative shrink-0 border-t border-border-primary px-6 py-4'>{footer}</div>
+ )}
+ </div>
+ )
+}
diff --git a/apps/desktop/src/renderer/components/Settings/sections/SecuritySection.tsx b/apps/desktop/src/renderer/components/Settings/sections/SecuritySection.tsx
new file mode 100644
index 0000000..fcdd9c4
--- /dev/null
+++ b/apps/desktop/src/renderer/components/Settings/sections/SecuritySection.tsx
@@ -0,0 +1,37 @@
+import { useState } from 'react'
+import { ToggleSwitch } from '@altersend/components'
+import { useTranslation } from '@altersend/locales'
+import { bridgeApi } from '../../../api/bridgeApi'
+import { closeSentry, initSentry } from '../../../sentry'
+import {
+ isCrashReportingEnabled,
+ setCrashReportingEnabled
+} from '../../../lifecycle/crashReportingStorage'
+import { SectionShell } from './SectionShell'
+
+export function SecuritySection() {
+ const { t } = useTranslation(['settings'])
+ const [crashReporting, setCrashReporting] = useState(isCrashReportingEnabled)
+
+ const handleToggle = (next: boolean) => {
+ setCrashReporting(next)
+ setCrashReportingEnabled(next)
+ if (next) {
+ initSentry()
+ } else {
+ closeSentry()
+ }
+ bridgeApi.setSentryEnabled(next)
+ }
+
+ return (
+ <SectionShell title={t('settings:rows.security')}>
+ <ToggleSwitch
+ checked={crashReporting}
+ onChange={handleToggle}
+ label={t('settings:crashReports.label')}
+ description={t('settings:crashReports.description')}
+ />
+ </SectionShell>
+ )
+}
diff --git a/apps/desktop/src/renderer/components/Settings/settingsControl.ts b/apps/desktop/src/renderer/components/Settings/settingsControl.ts
index 915b82e..d9f77e7 100644
--- a/apps/desktop/src/renderer/components/Settings/settingsControl.ts
+++ b/apps/desktop/src/renderer/components/Settings/settingsControl.ts
@@ -1,11 +1,11 @@
-export type SettingsPanelView = 'settings' | 'devices' | 'report'
+export type SettingsSection = 'devices' | 'language' | 'feedback' | 'security' | 'about'
-type Listener = (panel: SettingsPanelView) => void
+type Listener = (section: SettingsSection) => void
const listeners = new Set<Listener>()
-export function openSettingsPanel(panel: SettingsPanelView = 'settings'): void {
- for (const listener of listeners) listener(panel)
+export function openSettingsPanel(section: SettingsSection = 'devices'): void {
+ for (const listener of listeners) listener(section)
}
export function subscribeOpenSettings(listener: Listener): () => void {
diff --git a/apps/desktop/src/renderer/components/Sidebar/Sidebar.tsx b/apps/desktop/src/renderer/components/Sidebar/Sidebar.tsx
new file mode 100644
index 0000000..89e1ee1
--- /dev/null
+++ b/apps/desktop/src/renderer/components/Sidebar/Sidebar.tsx
@@ -0,0 +1,95 @@
+import {
+ DownloadIcon,
+ PanelLeftCloseIcon,
+ PanelLeftOpenIcon,
+ SendIcon,
+ SlidersHorizontalIcon
+} from '@altersend/components/icons'
+import { useTransferStore } from '@altersend/domain'
+import { useTranslation } from '@altersend/locales'
+import logoMark from '../../../../../../assets/altersend-logo.png'
+import { Button, ListItem } from '@altersend/components'
+import { openSettingsPanel } from '../Settings'
+
+export type TransferTab = 'send' | 'receive'
+
+export function Sidebar({
+ collapsed,
+ activeTab,
+ onSelect,
+ onToggleCollapsed
+}: {
+ collapsed: boolean
+ activeTab: TransferTab
+ onSelect: (tab: TransferTab) => void
+ onToggleCollapsed: () => void
+}) {
+ const { t } = useTranslation(['common'])
+ const role = useTransferStore((s) => s.role)
+ const toggleLabel = collapsed
+ ? t('common:labels.expandSidebar')
+ : t('common:labels.collapseSidebar')
+
+ return (
+ <aside
+ className={`flex h-screen shrink-0 flex-col border-r border-border-primary bg-background-deep pb-[30px] transition-[width] duration-200 ease-out ${
+ collapsed ? 'w-[74px]' : 'w-[244px]'
+ }`}
+ >
+ <div className='h-11 shrink-0' style={{ WebkitAppRegion: 'drag' }} />
+
+ <div
+ className={`flex shrink-0 items-center ${
+ collapsed ? 'justify-center px-3' : 'justify-between gap-2.5 px-4'
+ }`}
+ >
+ {!collapsed && (
+ <img src={logoMark} alt='AlterSend' className='h-6 w-auto shrink-0 object-contain' />
+ )}
+ <Button
+ variant='ghost'
+ iconOnly
+ size={collapsed ? 'md' : 'sm'}
+ aria-label={toggleLabel}
+ onClick={onToggleCollapsed}
+ icon={collapsed ? <PanelLeftOpenIcon size={17} /> : <PanelLeftCloseIcon size={17} />}
+ />
+ </div>
+
+ {collapsed && <div className='mx-3 mt-1 border-t border-border-primary' />}
+
+ <nav
+ className={`flex flex-col gap-1 px-3 ${collapsed ? 'items-center pt-3' : 'pt-8'}`}
+ aria-label={t('common:labels.transferMode')}
+ >
+ <ListItem
+ icon={<SendIcon size={18} />}
+ label={t('common:labels.send')}
+ collapsed={collapsed}
+ active={activeTab === 'send'}
+ showDot={role === 'sender'}
+ onClick={() => onSelect('send')}
+ />
+ <ListItem
+ icon={<DownloadIcon size={18} />}
+ label={t('common:labels.receive')}
+ collapsed={collapsed}
+ active={activeTab === 'receive'}
+ showDot={role === 'receiver'}
+ onClick={() => onSelect('receive')}
+ />
+ </nav>
+
+ <div className='flex-1' />
+
+ <div className={`flex flex-col gap-1 px-3 ${collapsed ? 'items-center' : ''}`}>
+ <ListItem
+ icon={<SlidersHorizontalIcon size={18} />}
+ label={t('common:labels.settings')}
+ collapsed={collapsed}
+ onClick={() => openSettingsPanel()}
+ />
+ </div>
+ </aside>
+ )
+}
diff --git a/apps/desktop/src/renderer/components/Sidebar/index.ts b/apps/desktop/src/renderer/components/Sidebar/index.ts
new file mode 100644
index 0000000..9cfa7c8
--- /dev/null
+++ b/apps/desktop/src/renderer/components/Sidebar/index.ts
@@ -0,0 +1,2 @@
+export { Sidebar } from './Sidebar'
+export type { TransferTab } from './Sidebar'
diff --git a/apps/desktop/src/renderer/components/TransferPrimitives/TransferPrimitives.tsx b/apps/desktop/src/renderer/components/TransferPrimitives/TransferPrimitives.tsx
index 86769d3..be96c22 100644
--- a/apps/desktop/src/renderer/components/TransferPrimitives/TransferPrimitives.tsx
+++ b/apps/desktop/src/renderer/components/TransferPrimitives/TransferPrimitives.tsx
@@ -1,4 +1,5 @@
import type { ReactNode } from 'react'
+import { Spinner } from '@altersend/components'
interface TransferCardProps {
title: string
@@ -8,10 +9,19 @@ interface TransferCardProps {
badge?: ReactNode
}
+type TransferTone = 'neutral' | 'success' | 'critical'
+
interface TransferStatusPanelProps {
title: string
description: string
- tone?: 'neutral' | 'success' | 'critical'
+ tone?: TransferTone
+ loading?: boolean
+}
+
+function dotToneClass(tone: TransferTone): string {
+ if (tone === 'success') return 'bg-success'
+ if (tone === 'critical') return 'bg-danger'
+ return 'bg-text-muted'
}
export function TransferCardFrame({
@@ -23,12 +33,12 @@ export function TransferCardFrame({
}: TransferCardProps) {
const hasHeader = !!(title || badge)
return (
- <div className='flex h-full min-h-0 w-full flex-col rounded-[12px] border border-border-primary bg-background-subtle px-6 py-6'>
+ <div className='flex h-full min-h-0 w-full flex-col'>
{hasHeader ? (
<div className='shrink-0'>
{badge ? <div className='mb-4'>{badge}</div> : null}
<div className='max-w-[720px]'>
- <h2 className='m-0 text-[22px] font-bold leading-[1.2] tracking-[-0.015em] text-text-primary'>
+ <h2 className='m-0 text-[23px] font-semibold leading-[1.2] tracking-[-0.02em] text-text-primary'>
{title}
</h2>
{description ? (
@@ -38,9 +48,9 @@ export function TransferCardFrame({
</div>
) : null}
- <div className={`min-h-0 flex-1 overflow-hidden ${hasHeader ? 'mt-5' : ''}`}>{children}</div>
+ <div className={`min-h-0 flex-1 overflow-hidden ${hasHeader ? 'mt-8' : ''}`}>{children}</div>
- {footer ? <div className='mt-3 shrink-0 pt-1'>{footer}</div> : null}
+ {footer ? <div className='mt-6 shrink-0'>{footer}</div> : null}
</div>
)
}
@@ -52,15 +62,19 @@ export function TransferActionGroup({ children }: { children: ReactNode }) {
export function TransferStatusPanel({
description,
title,
- tone = 'neutral'
+ tone = 'neutral',
+ loading = false
}: TransferStatusPanelProps) {
- const dotToneClass =
- tone === 'success' ? 'bg-success' : tone === 'critical' ? 'bg-red-500' : 'bg-text-muted'
-
return (
<div className='w-full rounded-[12px] border border-border-primary bg-background-subtle px-4 py-4'>
<div className='flex items-start gap-3'>
- <div className={`mt-1 h-2 w-2 shrink-0 rounded-full ${dotToneClass}`} />
+ {loading ? (
+ <span className='mt-0.5 shrink-0 text-info'>
+ <Spinner size={15} />
+ </span>
+ ) : (
+ <div className={`mt-1 h-2 w-2 shrink-0 rounded-full ${dotToneClass(tone)}`} />
+ )}
<div className='min-w-0'>
<p className='m-0 text-[14px] font-medium text-text-primary'>{title}</p>
<p className='mt-1 text-[13px] leading-6 text-text-secondary'>{description}</p>
diff --git a/apps/desktop/src/renderer/components/UpdateBanner/UpdateBanner.tsx b/apps/desktop/src/renderer/components/UpdateBanner/UpdateBanner.tsx
index c03766b..f31a01d 100644
--- a/apps/desktop/src/renderer/components/UpdateBanner/UpdateBanner.tsx
+++ b/apps/desktop/src/renderer/components/UpdateBanner/UpdateBanner.tsx
@@ -1,15 +1,15 @@
-import { ArrowUp, X } from 'lucide-react'
import { useState } from 'react'
+import { Button } from '@altersend/components'
import { useTranslation } from '@altersend/locales'
import { bridgeApi } from '../../api/bridgeApi'
+import { Modal } from '../Modal'
+import updateSvg from '../../../../../../assets/update.svg'
export function UpdateBanner({ ready }: { ready: boolean }) {
const { t } = useTranslation(['common'])
const [dismissed, setDismissed] = useState(false)
const [restartFailed, setRestartFailed] = useState(false)
- if (!ready || dismissed) return null
-
const restart = async () => {
setRestartFailed(false)
try {
@@ -21,30 +21,26 @@ export function UpdateBanner({ ready }: { ready: boolean }) {
}
return (
- <div className='pointer-events-none fixed inset-x-0 top-4 z-50 flex justify-center px-4'>
- <div className='pointer-events-auto flex items-center gap-2.5 rounded-full border border-border-primary bg-surface-secondary px-5 py-2.5 shadow-lg min-w-[260px]'>
- <div className='flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-full bg-info/15'>
- <ArrowUp size={12} className='text-info' aria-hidden />
- </div>
- <span className='flex-1 text-[13px] font-semibold text-text-primary'>
- {restartFailed ? t('common:update.restartFailed') : t('common:update.ready')}
- </span>
- <div className='flex items-center gap-2'>
- <button
- onClick={() => void restart()}
- className='appearance-none border-0 bg-transparent p-0 text-[13px] font-semibold text-info cursor-pointer'
- >
- {t('common:update.restart')}
- </button>
- <button
- aria-label={t('common:actions.dismiss')}
- onClick={() => setDismissed(true)}
- className='flex appearance-none border-0 bg-transparent p-0 cursor-pointer text-text-secondary'
- >
- <X size={14} aria-hidden />
- </button>
- </div>
+ <Modal open={ready && !dismissed} width={420} onClose={() => setDismissed(true)}>
+ <div className='flex flex-col items-center px-6 pb-1 pt-6 text-center'>
+ <img src={updateSvg} alt='' aria-hidden className='mb-4 w-[168px]' />
+ <h2 className='m-0 text-[20px] font-bold text-text-primary'>{t('common:update.ready')}</h2>
+ <p className='m-0 mt-2 max-w-[320px] text-[14px] leading-relaxed text-text-muted'>
+ {t('common:update.description')}
+ </p>
+ {restartFailed && (
+ <p className='m-0 mt-3 text-[13px] text-danger'>{t('common:update.restartFailed')}</p>
+ )}
+ </div>
+
+ <div className='flex flex-col gap-2 px-6 pb-6 pt-5'>
+ <Button variant='primary' size='md' width='full' onClick={() => void restart()}>
+ {t('common:update.restart')}
+ </Button>
+ <Button variant='ghost' size='md' width='full' onClick={() => setDismissed(true)}>
+ {t('common:update.notNow')}
+ </Button>
</div>
- </div>
+ </Modal>
)
}
diff --git a/apps/desktop/src/renderer/components/index.ts b/apps/desktop/src/renderer/components/index.ts
index 789e3d0..bcef6f7 100644
--- a/apps/desktop/src/renderer/components/index.ts
+++ b/apps/desktop/src/renderer/components/index.ts
@@ -7,6 +7,7 @@ export * from './QRCode'
export * from './QRModal'
export * from './Select'
export * from './Settings'
+export * from './Sidebar'
export * from './Toast'
export * from './TransferPrimitives'
export * from './UpdateBanner'
diff --git a/apps/desktop/src/renderer/index.css b/apps/desktop/src/renderer/index.css
index 5836ae4..5e07c3e 100644
--- a/apps/desktop/src/renderer/index.css
+++ b/apps/desktop/src/renderer/index.css
@@ -35,6 +35,7 @@
--leading-relaxed: var(--as-line-height-relaxed);
--color-background: var(--as-color-background);
+ --color-background-deep: var(--as-color-background-deep);
--color-background-subtle: var(--as-color-background-subtle);
--color-surface-primary: var(--as-color-surface-primary);
--color-surface-secondary: var(--as-color-surface-secondary);
@@ -46,6 +47,7 @@
--color-text-primary: var(--as-color-text-primary);
--color-text-secondary: var(--as-color-text-secondary);
--color-text-muted: var(--as-color-text-muted);
+ --color-text-faint: var(--as-color-text-faint);
--color-accent: var(--as-color-accent);
--color-accent-hover: var(--as-color-accent-hover);
--color-accent-active: var(--as-color-accent-active);
@@ -158,73 +160,4 @@
}
}
- @keyframes receive-loader-pulse {
- 0%,
- 80%,
- 100% {
- opacity: 0.3;
- transform: scaleY(0.72);
- }
-
- 40% {
- opacity: 1;
- transform: scaleY(1);
- }
- }
-
- @keyframes receive-progress-shift {
- 0% {
- transform: translateX(-32%);
- }
-
- 100% {
- transform: translateX(220%);
- }
- }
-
- .receive-loader {
- display: inline-flex;
- align-items: center;
- gap: 5px;
- height: 18px;
- }
-
- .receive-loader span {
- width: 3px;
- height: 100%;
- border-radius: 999px;
- background: var(--as-color-success);
- transform-origin: center bottom;
- animation: receive-loader-pulse 1s ease-in-out infinite;
- }
-
- .receive-loader span:nth-child(2) {
- animation-delay: 0.12s;
- }
-
- .receive-loader span:nth-child(3) {
- animation-delay: 0.24s;
- }
-
- .receive-progress-shell {
- position: relative;
- overflow: hidden;
- height: 6px;
- border-radius: 999px;
- background: var(--as-color-border-primary);
- }
-
- .receive-progress-bar {
- position: absolute;
- inset: 0 auto 0 0;
- width: 32%;
- border-radius: inherit;
- background: linear-gradient(
- 90deg,
- color-mix(in oklab, var(--as-color-success) 20%, transparent) 0%,
- color-mix(in oklab, var(--as-color-success) 90%, transparent) 50%,
- color-mix(in oklab, var(--as-color-success) 20%, transparent) 100%
- );
- animation: receive-progress-shift 1.6s linear infinite;
- }
}
diff --git a/apps/desktop/src/renderer/lifecycle/sidebarStorage.ts b/apps/desktop/src/renderer/lifecycle/sidebarStorage.ts
new file mode 100644
index 0000000..84f4959
--- /dev/null
+++ b/apps/desktop/src/renderer/lifecycle/sidebarStorage.ts
@@ -0,0 +1,15 @@
+const KEY = 'altersend.sidebar.collapsed'
+
+export function isSidebarCollapsed(): boolean {
+ try {
+ return window.localStorage.getItem(KEY) === '1'
+ } catch {
+ return false
+ }
+}
+
+export function setSidebarCollapsed(collapsed: boolean): void {
+ try {
+ window.localStorage.setItem(KEY, collapsed ? '1' : '0')
+ } catch {}
+}
diff --git a/apps/desktop/src/renderer/pages/ReceivePage/ReceiveConnectedView.tsx b/apps/desktop/src/renderer/pages/ReceivePage/ReceiveConnectedView.tsx
index 13ca3aa..a952d54 100644
--- a/apps/desktop/src/renderer/pages/ReceivePage/ReceiveConnectedView.tsx
+++ b/apps/desktop/src/renderer/pages/ReceivePage/ReceiveConnectedView.tsx
@@ -187,7 +187,7 @@ export function ReceiveConnectedView() {
size='sm'
variant='primary'
>
- Open Link
+ {t('common:actions.openLink')}
</Button>
) : (
<Button
@@ -195,7 +195,7 @@ export function ReceiveConnectedView() {
size='sm'
variant='primary'
>
- Copy Text
+ {t('common:actions.copyText')}
</Button>
)
) : peerCount > 0 && hasIncomingFiles && !allCompleted ? (
diff --git a/apps/desktop/src/renderer/pages/ReceivePage/ReceiveJoinView.tsx b/apps/desktop/src/renderer/pages/ReceivePage/ReceiveJoinView.tsx
index cb765e8..60d681f 100644
--- a/apps/desktop/src/renderer/pages/ReceivePage/ReceiveJoinView.tsx
+++ b/apps/desktop/src/renderer/pages/ReceivePage/ReceiveJoinView.tsx
@@ -1,6 +1,6 @@
import { useState, type ChangeEvent } from 'react'
import { Button, Input, LinkRow, useTheme } from '@altersend/components'
-import { ClipboardIcon, QrCodeIcon } from '@altersend/components/icons'
+import { ClipboardIcon, DownloadIcon, QrCodeIcon } from '@altersend/components/icons'
import {
getDisplayError,
getTransferErrorCode,
@@ -62,57 +62,66 @@ export function ReceiveJoinView() {
}
return (
- <div className='flex w-full flex-col gap-4'>
+ <div className='flex w-full flex-col'>
<LinkRow
disabled={isJoining}
- icon={<QrCodeIcon size={18} color={theme.colors.colorInfo} />}
- iconBackground={theme.colors.colorInfoSubtle}
+ icon={<QrCodeIcon size={18} color={theme.colors.colorTextMuted} />}
+ iconBackground={theme.colors.colorSurfacePrimary}
label={t('receive:actions.scanOrImportQr')}
onPress={() => setMode('scan')}
standalone
subtitle={t('receive:actions.scanOrImportQrHintDesktop')}
+ subtitleTone='faint'
/>
- <div className='py-0.5 text-center text-[12px] text-text-muted'>
- {t('receive:form.orPasteCode')}
+ <div className='my-[22px] flex items-center gap-4'>
+ <div className='h-px flex-1 bg-border-primary' />
+ <span className='whitespace-nowrap text-[12.5px] text-text-faint'>
+ {t('receive:form.orPasteCode')}
+ </span>
+ <div className='h-px flex-1 bg-border-primary' />
</div>
- <div className='flex flex-col gap-3.5'>
- <Input
- autoCapitalize='none'
- autoComplete='off'
- disabled={isJoining}
- error={joinKeyError}
- label={t('receive:form.codeLabel')}
- onChange={(e: ChangeEvent<HTMLInputElement>) => {
- setJoinKey(e.currentTarget.value)
- if (showValidation) setShowValidation(false)
- if (localErrorCode) setLocalErrorCode(null)
- }}
- placeholder={t('receive:form.codePlaceholder')}
- spellCheck={false}
- trailing={
- <Button
- variant='ghost'
- size='sm'
- iconOnly
- aria-label={t('common:actions.paste')}
- disabled={isJoining}
- onClick={() => {
- pasteCode().catch(() => {})
- }}
- icon={<ClipboardIcon size={16} />}
- />
- }
- type='text'
- value={joinKey}
- />
+ <Input
+ aria-label={t('receive:form.codeLabel')}
+ autoCapitalize='none'
+ autoComplete='off'
+ disabled={isJoining}
+ error={joinKeyError}
+ onChange={(e: ChangeEvent<HTMLInputElement>) => {
+ setJoinKey(e.currentTarget.value)
+ if (showValidation) setShowValidation(false)
+ if (localErrorCode) setLocalErrorCode(null)
+ }}
+ placeholder={t('receive:form.codePlaceholder')}
+ spellCheck={false}
+ trailing={
+ <Button
+ variant='ghost'
+ size='sm'
+ iconOnly
+ aria-label={t('common:actions.paste')}
+ disabled={isJoining}
+ onClick={() => {
+ pasteCode().catch(() => {})
+ }}
+ icon={<ClipboardIcon size={16} />}
+ />
+ }
+ type='text'
+ value={joinKey}
+ />
- <div>
- <Button disabled={isJoining} onClick={() => void join()} size='sm' variant='primary'>
- {isJoining ? t('common:actions.connecting') : t('common:actions.connect')}
- </Button>
- </div>
+ <div className='mt-4 flex justify-end'>
+ <Button
+ disabled={isJoining}
+ onClick={() => void join()}
+ size='sm'
+ variant='primary'
+ icon={<DownloadIcon size={16} />}
+ >
+ {isJoining ? t('common:actions.connecting') : t('common:actions.connect')}
+ </Button>
</div>
</div>
)
diff --git a/apps/desktop/src/renderer/pages/ReceivePage/index.tsx b/apps/desktop/src/renderer/pages/ReceivePage/index.tsx
index f3224b6..56a2676 100644
--- a/apps/desktop/src/renderer/pages/ReceivePage/index.tsx
+++ b/apps/desktop/src/renderer/pages/ReceivePage/index.tsx
@@ -60,6 +60,7 @@ export default function ReceivePage() {
if (step === 'connecting') {
return (
<TransferStatusPanel
+ loading
description={t('receive:page.handshake.description')}
title={t('receive:page.handshake.title')}
/>
@@ -92,7 +93,7 @@ export default function ReceivePage() {
return (
<TransferCardFrame
- description={description}
+ description={step === 'join' ? '' : description}
title={title}
badge={connectedBadge}
footer={footer}
diff --git a/apps/desktop/src/renderer/pages/SendPage/PreparingView.tsx b/apps/desktop/src/renderer/pages/SendPage/PreparingView.tsx
index 87b76d9..84baf8a 100644
--- a/apps/desktop/src/renderer/pages/SendPage/PreparingView.tsx
+++ b/apps/desktop/src/renderer/pages/SendPage/PreparingView.tsx
@@ -1,64 +1,25 @@
-import { LinkRow } from '@altersend/components'
+import { Button, WaitingState } from '@altersend/components'
+import { SendIcon } from '@altersend/components/icons'
+import { clearSenderFlow } from '@altersend/domain'
import { useTranslation } from '@altersend/locales'
-import {
- getOverallProgress,
- getProgressState,
- getStatusLabel,
- getStatusTone,
- useTransferStore
-} from '@altersend/domain'
export function PreparingView() {
- const { t } = useTranslation(['send'])
- const uploadItems = useTransferStore((s) => s.uploadItems)
- const { completed, total, percent } = getOverallProgress(uploadItems)
- const allCompleted = completed === total && total > 0
+ const { t } = useTranslation(['send', 'common'])
return (
- <div className='flex flex-col gap-4'>
- <div className='rounded-[10px] border border-border-primary bg-background-subtle px-4 py-4'>
- <div className='flex items-center justify-between gap-4'>
- <p className='m-0 text-[14px] font-medium text-text-primary'>
- {allCompleted ? t('send:status.uploadComplete') : t('send:status.uploadingFiles')}
- </p>
- <span className='tabular-nums text-[14px] font-semibold text-text-primary'>
- {percent}%
- </span>
- </div>
- <div className='mt-2.5 h-1.5 w-full overflow-hidden rounded-full bg-border-primary'>
- <div
- className={`h-full rounded-full transition-all duration-500 ease-out ${allCompleted ? 'bg-success' : 'bg-accent'}`}
- style={{ width: `${percent}%` }}
- />
- </div>
- <p className='m-0 mt-2 text-[12px] text-text-secondary'>
- {t('send:preparing.uploadedCount', { completed, count: total })}
- </p>
+ <div className='flex h-full min-h-0 flex-col'>
+ <div className='flex flex-1 flex-col items-center justify-center'>
+ <WaitingState
+ icon={<SendIcon size={30} />}
+ title={t('send:page.preparing.title')}
+ description={t('send:page.preparing.description')}
+ />
</div>
- <div className='flex max-h-[280px] flex-col gap-1.5 overflow-y-auto'>
- {uploadItems.map((item) => {
- const progress = getProgressState(item)
- return (
- <LinkRow
- key={item.path}
- file
- standalone
- compact
- label={item.name}
- size={item.size}
- status={{
- label: getStatusLabel(t, item),
- tone: getStatusTone(item)
- }}
- progress={
- progress === 'waiting' || progress === 'uploading' || progress === 'completed'
- ? progress
- : undefined
- }
- />
- )
- })}
+ <div className='flex justify-end pt-7'>
+ <Button variant='secondary' size='sm' onClick={clearSenderFlow}>
+ {t('common:actions.cancel')}
+ </Button>
</div>
</div>
)
diff --git a/apps/desktop/src/renderer/pages/SendPage/SelectFilesView.tsx b/apps/desktop/src/renderer/pages/SendPage/SelectFilesView.tsx
index 9b94a6d..2592736 100644
--- a/apps/desktop/src/renderer/pages/SendPage/SelectFilesView.tsx
+++ b/apps/desktop/src/renderer/pages/SendPage/SelectFilesView.tsx
@@ -1,10 +1,11 @@
import { useState } from 'react'
-import { DropZoneLink, ErrorBanner, FileDropZone, LinkRow } from '@altersend/components'
+import { DropZoneLink, ErrorBanner, FileDropZone, LinkRow, useTheme } from '@altersend/components'
import { FolderIcon } from '@altersend/components/icons'
import { useTranslation } from '@altersend/locales'
import {
addSelectedFiles,
type BrowserFileLike,
+ formatFileSize,
groupSelectedFiles,
normalizeSelectedFiles,
removeSelectedFile,
@@ -56,7 +57,9 @@ async function collectDroppedEntries(
}
export function SelectFilesView() {
- const { t } = useTranslation(['send'])
+ const { t } = useTranslation(['send', 'common'])
+ const { theme } = useTheme()
+ const c = theme.colors
const selectedFiles = useTransferStore((s) => s.selectedFiles)
const [isDropZoneDragging, setIsDropZoneDragging] = useState(false)
const [selectionError, setSelectionError] = useState<string | null>(null)
@@ -64,6 +67,27 @@ export function SelectFilesView() {
const hasSelectedFiles = selectedFiles.length > 0
+ const browseDescription = (() => {
+ const raw = t('send:dropzone.browseDescription')
+ const m = raw.match(/^([\s\S]*)<link>([\s\S]*)<\/link>([\s\S]*)$/)
+ if (!m) return raw
+ return (
+ <>
+ {m[1]}
+ <DropZoneLink>{m[2]}</DropZoneLink>
+ {m[3]}
+ </>
+ )
+ })()
+
+ const fileSubtitle = (name: string, size?: number): string => {
+ const dot = name.lastIndexOf('.')
+ const ext = dot > 0 ? name.slice(dot + 1) : ''
+ const sizeStr = typeof size === 'number' ? formatFileSize(size) : ''
+ const type = ext && ext.length <= 5 ? ext.toUpperCase() : ''
+ return [type, sizeStr].filter(Boolean).join(' · ')
+ }
+
const browse = async () => {
const selected = await bridgeApi.pickFiles()
if (!selected) return
@@ -120,22 +144,10 @@ export function SelectFilesView() {
}
return (
- <div className='flex flex-col gap-4'>
- <div>
+ <div className='flex h-full min-h-0 flex-col gap-[34px]'>
+ <div className={hasSelectedFiles ? 'shrink-0' : ''}>
<FileDropZone
- description={
- hasSelectedFiles ? (
- <>
- {t('send:dropzone.orClickTo')}{' '}
- <DropZoneLink>{t('send:dropzone.addMoreLink')}</DropZoneLink>
- </>
- ) : (
- <>
- {t('send:dropzone.orClickTo')}{' '}
- <DropZoneLink>{t('send:dropzone.browseLink')}</DropZoneLink>
- </>
- )
- }
+ description={browseDescription}
hasFiles={hasSelectedFiles}
isDragging={isDropZoneDragging}
onClick={() => void browse()}
@@ -148,42 +160,47 @@ export function SelectFilesView() {
setIsDropZoneDragging(true)
}}
onDrop={onDrop}
- title={hasSelectedFiles ? t('send:actions.addMoreFiles') : t('send:actions.dragAndDrop')}
+ title={t('send:actions.dragAndDrop')}
/>
</div>
{hasSelectedFiles ? (
- <div className='flex flex-col gap-1.5'>
- {groupSelectedFiles(selectedFiles).map((row) =>
- row.kind === 'file' ? (
- <LinkRow
- key={row.file.path}
- file
- standalone
- compact
- label={row.file.name}
- onRemove={() => removeSelectedFile(row.file.path)}
- removeLabel={t('send:files.removeLabel', { name: row.file.name })}
- size={row.file.size}
- />
- ) : (
- <LinkRow
- key={`folder:${row.name}`}
- icon={<FolderIcon size={16} />}
- standalone
- compact
- label={row.name}
- onRemove={() => row.files.forEach((file) => removeSelectedFile(file.path))}
- removeLabel={t('send:files.removeLabel', { name: row.name })}
- size={row.totalSize}
- />
- )
- )}
+ <div className='min-h-0 flex-1 overflow-y-auto'>
+ <div className='flex flex-col gap-2'>
+ {groupSelectedFiles(selectedFiles).map((row) =>
+ row.kind === 'file' ? (
+ <LinkRow
+ key={row.file.path}
+ file
+ standalone
+ compact
+ label={row.file.name}
+ subtitle={fileSubtitle(row.file.name, row.file.size)}
+ subtitleTone='faint'
+ onRemove={() => removeSelectedFile(row.file.path)}
+ removeLabel={t('send:files.removeLabel', { name: row.file.name })}
+ />
+ ) : (
+ <LinkRow
+ key={`folder:${row.name}`}
+ icon={<FolderIcon size={17} color={c.colorTextMuted} />}
+ iconBackground={c.colorSurfacePrimary}
+ standalone
+ compact
+ label={row.name}
+ subtitle={t('common:files.count', { count: row.files.length })}
+ subtitleTone='faint'
+ onRemove={() => row.files.forEach((file) => removeSelectedFile(file.path))}
+ removeLabel={t('send:files.removeLabel', { name: row.name })}
+ />
+ )
+ )}
+ </div>
</div>
) : null}
{ENABLE_TEXT_SHARING && (
- <div className='flex flex-row gap-2 mt-2 items-center'>
+ <div className='flex shrink-0 flex-row gap-2 mt-2 items-center'>
<div className='flex-1'>
<Input
placeholder='Type a message or paste a link...'
diff --git a/apps/desktop/src/renderer/pages/SendPage/ShareView.tsx b/apps/desktop/src/renderer/pages/SendPage/ShareView.tsx
index 113a753..0de5532 100644
--- a/apps/desktop/src/renderer/pages/SendPage/ShareView.tsx
+++ b/apps/desktop/src/renderer/pages/SendPage/ShareView.tsx
@@ -56,18 +56,16 @@ export function ShareView() {
variant='plain'
align='left'
trigger={
- <LinkCard>
- <LinkRow
- compact
- icon={<FolderIcon size={16} color={c.colorTextSecondary} />}
- label={
- singleFolder ? singleFolder.name : t('common:files.count', { count: vm.files.length })
- }
- subtitle={formatFileSize(vm.totalSize)}
- trailing={<ChevronsUpDownIcon size={16} color={c.colorTextMuted} />}
- isLast
- />
- </LinkCard>
+ <LinkRow
+ standalone
+ compact
+ icon={<FolderIcon size={16} color={c.colorTextSecondary} />}
+ label={
+ singleFolder ? singleFolder.name : t('common:files.count', { count: vm.files.length })
+ }
+ subtitle={formatFileSize(vm.totalSize)}
+ trailing={<ChevronsUpDownIcon size={16} color={c.colorTextMuted} />}
+ />
}
>
{() => (
diff --git a/apps/desktop/src/renderer/pages/SendPage/index.tsx b/apps/desktop/src/renderer/pages/SendPage/index.tsx
index 243da17..282b32b 100644
--- a/apps/desktop/src/renderer/pages/SendPage/index.tsx
+++ b/apps/desktop/src/renderer/pages/SendPage/index.tsx
@@ -1,8 +1,10 @@
import { Button } from '@altersend/components'
+import { SendIcon } from '@altersend/components/icons'
import { useTranslation } from '@altersend/locales'
import {
clearSenderFlow,
continueShare,
+ formatFileSize,
getSendPageCopy,
getSendStep,
isShareStep,
@@ -24,10 +26,6 @@ export default function SendPage() {
const hasSelectedFiles = selectedFiles.length > 0
function renderView() {
- if (step === 'preparing') {
- return <PreparingView />
- }
-
if (isShareStep(step)) {
return <ShareView />
}
@@ -54,20 +52,43 @@ export default function SendPage() {
return null
}
+ const totalSize = selectedFiles.reduce((sum, file) => sum + (file.size ?? 0), 0)
+
return (
- <TransferActionGroup>
- <Button onClick={clearSenderFlow} size='sm' variant='ghost'>
- {t('common:actions.clear')}
- </Button>
- <Button onClick={() => void continueShare(selectedFiles)} size='sm' variant='primary'>
- {t('send:actions.sendFiles', { count: selectedFiles.length })}
- </Button>
- </TransferActionGroup>
+ <div className='flex items-center justify-between gap-4'>
+ <div className='flex items-baseline gap-2'>
+ <span className='text-[14.5px] font-semibold text-text-primary'>
+ {t('common:files.count', { count: selectedFiles.length })}
+ </span>
+ <span className='text-[13px] text-text-faint'>{formatFileSize(totalSize)}</span>
+ </div>
+ <TransferActionGroup>
+ <Button onClick={clearSenderFlow} size='sm' variant='ghost'>
+ {t('common:actions.clear')}
+ </Button>
+ <Button
+ onClick={() => void continueShare(selectedFiles)}
+ size='sm'
+ variant='primary'
+ icon={<SendIcon size={14} />}
+ >
+ {t('common:labels.send')}
+ </Button>
+ </TransferActionGroup>
+ </div>
)
}
+ if (step === 'preparing') {
+ return <PreparingView />
+ }
+
return (
- <TransferCardFrame description={copy.description} footer={renderFooter()} title={copy.title}>
+ <TransferCardFrame
+ description={isShareStep(step) ? copy.description : ''}
+ footer={renderFooter()}
+ title={copy.title}
+ >
<div className='h-full overflow-y-auto'>{renderView()}</div>
</TransferCardFrame>
)
diff --git a/apps/desktop/src/renderer/pages/TransferPage/index.tsx b/apps/desktop/src/renderer/pages/TransferPage/index.tsx
index d3ca3eb..a77e42e 100644
--- a/apps/desktop/src/renderer/pages/TransferPage/index.tsx
+++ b/apps/desktop/src/renderer/pages/TransferPage/index.tsx
@@ -1,10 +1,8 @@
-import { Tabs, TabsContent, TabsList, TabsTrigger } from '@altersend/components'
-import { useTranslation } from '@altersend/locales'
-import { Settings } from '../../components'
+import { useState } from 'react'
+import { Settings, Sidebar, type TransferTab } from '../../components'
+import { isSidebarCollapsed, setSidebarCollapsed } from '../../lifecycle/sidebarStorage'
import { ReceivePage, SendPage } from '..'
-type TransferTab = 'send' | 'receive'
-
export default function TransferPage({
version,
activeTab,
@@ -14,40 +12,36 @@ export default function TransferPage({
activeTab: TransferTab
onTabChange: (tab: TransferTab) => void
}) {
- const { t } = useTranslation(['common'])
+ const [collapsed, setCollapsed] = useState(() => isSidebarCollapsed())
- return (
- <main className='flex h-screen w-full flex-col bg-background text-text-primary'>
- <div className='h-8 w-full shrink-0' style={{ WebkitAppRegion: 'drag' }} />
+ const toggleCollapsed = () => {
+ setCollapsed((prev) => {
+ const next = !prev
+ setSidebarCollapsed(next)
+ return next
+ })
+ }
- <section className='flex min-h-0 flex-1 flex-col px-6 pb-6 pt-8 max-[640px]:px-4'>
- <Tabs onValueChange={(v) => onTabChange(v as TransferTab)} value={activeTab}>
- <div className='mx-auto flex h-full w-full max-w-[860px] flex-1 flex-col'>
- <div className='flex items-center gap-4'>
- <TabsList aria-label={t('common:labels.transferMode')}>
- <TabsTrigger value='send'>{t('common:labels.send')}</TabsTrigger>
- <TabsTrigger value='receive'>{t('common:labels.receive')}</TabsTrigger>
- </TabsList>
- </div>
+ return (
+ <div className='flex h-screen w-full bg-background text-text-primary'>
+ <Sidebar
+ collapsed={collapsed}
+ activeTab={activeTab}
+ onSelect={onTabChange}
+ onToggleCollapsed={toggleCollapsed}
+ />
- <section className='flex min-h-0 flex-1 flex-col overflow-hidden pt-4'>
- <div className='mx-auto flex min-h-0 w-full flex-1 flex-col gap-4'>
- <section className='flex min-h-0 flex-1 flex-col gap-4'>
- <TabsContent value='send'>
- <SendPage />
- </TabsContent>
+ <main className='flex min-h-0 min-w-0 flex-1 flex-col'>
+ <div className='h-11 w-full shrink-0' style={{ WebkitAppRegion: 'drag' }} />
- <TabsContent value='receive'>
- <ReceivePage />
- </TabsContent>
- </section>
- </div>
- </section>
+ <section className='flex min-h-0 flex-1 flex-col px-10 pb-[30px] pt-2 max-[820px]:px-6'>
+ <div className='mx-auto flex min-h-0 w-full max-w-[920px] flex-1 flex-col'>
+ {activeTab === 'send' ? <SendPage /> : <ReceivePage />}
</div>
- </Tabs>
- </section>
+ </section>
+ </main>
<Settings version={version} />
- </main>
+ </div>
)
}
diff --git a/apps/mobile/app/(tabs)/receive/index.tsx b/apps/mobile/app/(tabs)/receive/index.tsx
index 89d08a5..5186a45 100644
--- a/apps/mobile/app/(tabs)/receive/index.tsx
+++ b/apps/mobile/app/(tabs)/receive/index.tsx
@@ -100,7 +100,6 @@ export default function ReceiveScreen() {
)
const copy = getReceivePageCopy(t, step, incomingFileOffers.length, totalBytes)
const title = step === 'join' ? t('receive:page.tabTitle') : copy.title
- const description = step === 'join' ? t('receive:page.join.mobileDescription') : copy.description
const footer =
step === 'join' ? undefined : (
@@ -122,7 +121,7 @@ export default function ReceiveScreen() {
if (step === 'join') {
return (
- <Layout title={title} description={description}>
+ <Layout title={title}>
<ReceiveJoinView
joinCode={joinCode}
onJoinCodeChange={handleJoinCodeChange}
@@ -137,7 +136,7 @@ export default function ReceiveScreen() {
if (step === 'connecting') {
return (
- <ReceiveConnectingView title={title} description={description} footer={footer}>
+ <ReceiveConnectingView title={title} description={copy.description} footer={footer}>
{errorPanel}
</ReceiveConnectingView>
)
@@ -147,7 +146,7 @@ export default function ReceiveScreen() {
return (
<ReceiveInterruptedView
title={title}
- description={description}
+ description={copy.description}
footer={footer}
incomingFileOffers={incomingFileOffers}
downloadStates={receiveDownloadStates}
@@ -157,7 +156,7 @@ export default function ReceiveScreen() {
}
return (
- <ReceiveConnectingView title={title} description={description} footer={footer}>
+ <ReceiveConnectingView title={title} description={copy.description} footer={footer}>
{errorPanel}
</ReceiveConnectingView>
)
diff --git a/apps/mobile/app/(tabs)/send/index.tsx b/apps/mobile/app/(tabs)/send/index.tsx
index 5ecf0b7..9c606fc 100644
--- a/apps/mobile/app/(tabs)/send/index.tsx
+++ b/apps/mobile/app/(tabs)/send/index.tsx
@@ -1,6 +1,7 @@
import { useCallback, useEffect, useState } from 'react'
import { View } from 'react-native'
import { Button } from '@altersend/components'
+import { SendIcon } from '@altersend/components/icons'
import { useTranslation } from '@altersend/locales'
import { Layout, PairDeviceSheet } from '@/src/components'
import { consumePairPromptPending } from '@/src/onboarding/pairPromptSignal'
@@ -58,7 +59,6 @@ export default function SendSelectScreen() {
<NavigationController />
<Layout
title={copy.title}
- description={copy.description}
onMenuPress={openMenu}
footer={
hasSelectedFiles ? (
@@ -67,6 +67,7 @@ export default function SendSelectScreen() {
size='lg'
variant='primary'
width='full'
+ icon={<SendIcon size={18} />}
>
{t('send:actions.sendFiles', { count: selectedFiles.length })}
</Button>
diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx
index 4a2ea30..6836c99 100644
--- a/apps/mobile/app/_layout.tsx
+++ b/apps/mobile/app/_layout.tsx
@@ -94,6 +94,7 @@ function ThemedStack() {
<Stack.Screen name='language' options={flowScreenOptions} />
<Stack.Screen name='security' options={flowScreenOptions} />
<Stack.Screen name='devices' options={flowScreenOptions} />
+ <Stack.Screen name='about' options={flowScreenOptions} />
<Stack.Screen name='report' options={flowScreenOptions} />
<Stack.Screen
name='send/preparing'
diff --git a/apps/mobile/app/about.tsx b/apps/mobile/app/about.tsx
new file mode 100644
index 0000000..12f14a0
--- /dev/null
+++ b/apps/mobile/app/about.tsx
@@ -0,0 +1,149 @@
+import { Image, Linking, StyleSheet, View } from 'react-native'
+import Constants from 'expo-constants'
+import { LinkCard, LinkRow, useTheme } from '@altersend/components'
+import {
+ ArrowUpRightIcon,
+ DiscordIcon,
+ FileTextIcon,
+ GlobeIcon,
+ LockIcon,
+ MailIcon
+} from '@altersend/components/icons'
+import {
+ discordUrl,
+ privacyPolicyUrl,
+ supportEmail,
+ termsOfServiceUrl,
+ websiteUrl
+} from '@altersend/domain'
+import { useTranslation } from '@altersend/locales'
+import { Layout } from '@/src/components'
+import { Text } from '@/src/components/ThemedText'
+import brandLogo from '@/assets/images/brand-logo.png'
+
+export default function AboutScreen() {
+ const { t } = useTranslation(['settings', 'common'])
+ const { theme } = useTheme()
+ const c = theme.colors
+ const version = Constants.expoConfig?.version ?? '0.0.0'
+
+ const openUrl = (url: string) => {
+ void Linking.openURL(url).catch(() => {})
+ }
+
+ const resources = [
+ { key: 'website', label: t('settings:rows.website'), Icon: GlobeIcon, url: websiteUrl },
+ {
+ key: 'privacy',
+ label: t('settings:rows.privacyPolicy'),
+ Icon: LockIcon,
+ url: privacyPolicyUrl
+ },
+ { key: 'terms', label: t('settings:rows.terms'), Icon: FileTextIcon, url: termsOfServiceUrl },
+ { key: 'discord', label: t('settings:rows.discord'), Icon: DiscordIcon, url: discordUrl },
+ {
+ key: 'contact',
+ label: t('settings:rows.contact'),
+ Icon: MailIcon,
+ url: `mailto:${supportEmail}`
+ }
+ ]
+
+ return (
+ <Layout title={t('settings:sections.about')} description='' hasNativeHeader>
+ <View style={styles.content}>
+ <View style={styles.brand}>
+ <Image source={brandLogo} style={styles.brandLogo} resizeMode='contain' />
+ <Text style={[styles.brandName, { color: c.colorTextPrimary }]}>AlterSend</Text>
+ <Text style={[styles.brandTagline, { color: c.colorTextMuted }]}>
+ {t('common:app.tagline')}
+ </Text>
+ </View>
+
+ <View
+ style={[
+ styles.card,
+ { backgroundColor: c.colorBackgroundSubtle, borderColor: c.colorBorderPrimary }
+ ]}
+ >
+ <View style={styles.infoRow}>
+ <Text style={[styles.infoLabel, { color: c.colorTextPrimary }]}>
+ {t('common:labels.version')}
+ </Text>
+ <Text style={[styles.infoValue, { color: c.colorTextMuted }]}>v{version}</Text>
+ </View>
+ </View>
+
+ <LinkCard>
+ {resources.map(({ key, label, Icon, url }, index) => (
+ <LinkRow
+ key={key}
+ label={label}
+ icon={<Icon size={16} color={c.colorTextSecondary} />}
+ trailing={<ArrowUpRightIcon size={15} color={c.colorTextMuted} />}
+ onPress={() => openUrl(url)}
+ isLast={index === resources.length - 1}
+ />
+ ))}
+ </LinkCard>
+
+ <Text style={[styles.footer, { color: c.colorTextFaint }]}>
+ © {new Date().getFullYear()} AlterSend
+ </Text>
+ </View>
+ </Layout>
+ )
+}
+
+const styles = StyleSheet.create({
+ content: {
+ gap: 20
+ },
+ brand: {
+ alignItems: 'center',
+ gap: 8,
+ paddingTop: 8,
+ paddingBottom: 4
+ },
+ brandLogo: {
+ width: 60,
+ height: 60,
+ marginBottom: 4
+ },
+ brandName: {
+ fontSize: 20,
+ lineHeight: 26,
+ fontWeight: '700'
+ },
+ brandTagline: {
+ fontSize: 14,
+ lineHeight: 20,
+ textAlign: 'center',
+ maxWidth: 300
+ },
+ card: {
+ borderRadius: 16,
+ borderWidth: 1,
+ overflow: 'hidden',
+ paddingHorizontal: 16
+ },
+ infoRow: {
+ flexDirection: 'row',
+ alignItems: 'center',
+ justifyContent: 'space-between',
+ paddingVertical: 14,
+ gap: 12
+ },
+ infoLabel: {
+ fontSize: 15,
+ fontWeight: '500'
+ },
+ infoValue: {
+ fontSize: 15
+ },
+ footer: {
+ fontSize: 12,
+ textAlign: 'center',
+ paddingTop: 4
+ }
+})
diff --git a/apps/mobile/app/devices.tsx b/apps/mobile/app/devices.tsx
index 3a612a6..79aa9d9 100644
--- a/apps/mobile/app/devices.tsx
+++ b/apps/mobile/app/devices.tsx
@@ -1,5 +1,5 @@
import { StyleSheet, View } from 'react-native'
-import { Button, LinkCard, LinkRow, useTheme } from '@altersend/components'
+import { Button, LinkRow, useTheme } from '@altersend/components'
import { MoreVerticalIcon, PlusIcon, deviceIcon } from '@altersend/components/icons'
import { useTranslation } from '@altersend/locales'
import {
@@ -50,31 +50,29 @@ export default function DevicesScreen() {
</View>
) : (
<View style={styles.content}>
- <LinkCard>
- {flow.peers.map((peer, index) => {
- const Icon = deviceIcon(peer.deviceType)
- return (
- <LinkRow
- key={peer.remoteDevicePubkey}
- icon={<Icon size={16} color={c.colorTextSecondary} />}
- label={peer.displayName}
- trailing={
- <Button
- variant='ghost'
- size='sm'
- iconOnly
- aria-label={t('settings:pairing.deviceActions')}
- icon={<MoreVerticalIcon size={14} />}
- onClick={() =>
- flow.openDeviceActions(peer.remoteDevicePubkey, peer.displayName)
- }
- />
- }
- isLast={index === flow.peers.length - 1}
- />
- )
- })}
- </LinkCard>
+ {flow.peers.map((peer) => {
+ const Icon = deviceIcon(peer.deviceType)
+ return (
+ <LinkRow
+ key={peer.remoteDevicePubkey}
+ standalone
+ icon={<Icon size={16} color={c.colorTextSecondary} />}
+ label={peer.displayName}
+ trailing={
+ <Button
+ variant='ghost'
+ size='sm'
+ iconOnly
+ aria-label={t('settings:pairing.deviceActions')}
+ icon={<MoreVerticalIcon size={14} />}
+ onClick={() =>
+ flow.openDeviceActions(peer.remoteDevicePubkey, peer.displayName)
+ }
+ />
+ }
+ />
+ )
+ })}
</View>
)}
@@ -90,7 +88,7 @@ export default function DevicesScreen() {
const styles = StyleSheet.create({
content: {
flex: 1,
- gap: 16,
+ gap: 10,
paddingBottom: 16
},
emptyState: {
diff --git a/apps/mobile/app/language.tsx b/apps/mobile/app/language.tsx
index f244b41..3943ed5 100644
--- a/apps/mobile/app/language.tsx
+++ b/apps/mobile/app/language.tsx
@@ -59,53 +59,41 @@ export default function LanguageScreen() {
description={t('settings:languageHint')}
hasNativeHeader
>
- <View style={[styles.card, cardStyle]}>
- {LOCALE_OPTIONS.map((option, index) => {
+ <View style={styles.list}>
+ {LOCALE_OPTIONS.map((option) => {
const selected = option.preference === preference
return (
- <View key={option.preference}>
- <Pressable
- accessibilityRole='button'
- accessibilityState={{ selected }}
- onPress={() => void handleSelect(option.preference)}
- style={({ pressed }) => [
- styles.row,
- pressed && { backgroundColor: theme.colors.colorSurfacePrimary }
- ]}
- >
- <View style={styles.rowText}>
- <Text
- style={[
- styles.label,
- {
- color: theme.colors.colorTextPrimary,
- fontFamily: getOptionNativeNameFontFamily(option)
- }
- ]}
- >
- {option.nativeName ?? t('common:labels.systemDefault')}
+ <Pressable
+ key={option.preference}
+ accessibilityRole='button'
+ accessibilityState={{ selected }}
+ onPress={() => void handleSelect(option.preference)}
+ style={({ pressed }) => [
+ styles.rowCard,
+ cardStyle,
+ pressed && { backgroundColor: theme.colors.colorSurfacePrimary }
+ ]}
+ >
+ <View style={styles.rowText}>
+ <Text
+ style={[
+ styles.label,
+ {
+ color: theme.colors.colorTextPrimary,
+ fontFamily: getOptionNativeNameFontFamily(option)
+ }
+ ]}
+ >
+ {option.nativeName ?? t('common:labels.systemDefault')}
+ </Text>
+ {option.nativeName ? (
+ <Text style={[styles.hint, { color: theme.colors.colorTextMuted }]}>
+ {option.label}
</Text>
- {option.nativeName ? (
- <Text
- style={[
- styles.hint,
- {
- color: theme.colors.colorTextMuted
- }
- ]}
- >
- {option.label}
- </Text>
- ) : null}
- </View>
- {selected && <CheckIcon size={18} color={theme.colors.colorTextPrimary} />}
- </Pressable>
- {index < LOCALE_OPTIONS.length - 1 && (
- <View
- style={[styles.divider, { backgroundColor: theme.colors.colorBorderPrimary }]}
- />
- )}
- </View>
+ ) : null}
+ </View>
+ {selected && <CheckIcon size={18} color={theme.colors.colorTextPrimary} />}
+ </Pressable>
)
})}
</View>
@@ -132,18 +120,18 @@ function getOptionNativeNameFontFamily(option: LocaleOption) {
}
const styles = StyleSheet.create({
- card: {
- borderRadius: 16,
- borderWidth: 1,
- overflow: 'hidden'
+ list: {
+ gap: 10
},
- row: {
+ rowCard: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
gap: 12,
paddingHorizontal: 16,
- paddingVertical: 13
+ paddingVertical: 13,
+ borderRadius: 10,
+ borderWidth: 1
},
rowText: {
flex: 1,
@@ -158,9 +146,5 @@ const styles = StyleSheet.create({
fontSize: 12,
includeFontPadding: false,
lineHeight: 16
- },
- divider: {
- height: StyleSheet.hairlineWidth,
- marginLeft: 16
}
})
diff --git a/apps/mobile/app/report.tsx b/apps/mobile/app/report.tsx
index ba81b0c..722e3a5 100644
--- a/apps/mobile/app/report.tsx
+++ b/apps/mobile/app/report.tsx
@@ -4,40 +4,12 @@ import { useState } from 'react'
import { Button, FeedbackTypeSelector, useTheme } from '@altersend/components'
import { SendIcon } from '@altersend/components/icons'
import type { FeedbackType } from '@altersend/components'
+import { submitFeedback } from '@altersend/domain'
import { useTranslation } from '@altersend/locales'
import { Layout } from '@/src/components'
import { Text, TextInput } from '@/src/components/ThemedText'
type State = 'idle' | 'sending' | 'sent' | 'error'
-const DISCORD_EMBED_COLOR = 0x5865f2
-
-async function postToDiscord(
- title: string,
- message: string,
- version: string,
- labels: { version: string; platform: string; mobile: string }
-): Promise<void> {
- const url = process.env.EXPO_PUBLIC_DISCORD_WEBHOOK_URL
- if (!url || url.includes('PLACEHOLDER')) throw new Error('Webhook not configured')
- await fetch(url, {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({
- embeds: [
- {
- title,
- description: message,
- color: DISCORD_EMBED_COLOR,
- fields: [
- { name: labels.version, value: `v${version}`, inline: true },
- { name: labels.platform, value: labels.mobile, inline: true }
- ],
- timestamp: new Date().toISOString()
- }
- ]
- })
- })
-}
export default function ReportScreen() {
const { t } = useTranslation(['feedback', 'common'])
@@ -49,16 +21,15 @@ export default function ReportScreen() {
const send = async () => {
setState('sending')
- try {
- await postToDiscord(t(`feedback:types.${type}`), message.trim(), version, {
- version: t('common:labels.version'),
- platform: t('common:labels.platform'),
- mobile: t('common:labels.mobile')
- })
- setState('sent')
- } catch {
- setState('error')
- }
+ const sent = await submitFeedback({
+ webhookUrl: process.env.EXPO_PUBLIC_DISCORD_WEBHOOK_URL,
+ title: t(`feedback:types.${type}`),
+ message: message.trim(),
+ version,
+ platform: t('common:labels.mobile'),
+ labels: { version: t('common:labels.version'), platform: t('common:labels.platform') }
+ })
+ setState(sent ? 'sent' : 'error')
}
const canSend = message.trim().length > 0 && state === 'idle'
diff --git a/apps/mobile/app/send/preparing.tsx b/apps/mobile/app/send/preparing.tsx
index fa19dab..7443bb4 100644
--- a/apps/mobile/app/send/preparing.tsx
+++ b/apps/mobile/app/send/preparing.tsx
@@ -2,7 +2,7 @@ import { useCallback, useEffect } from 'react'
import { Pressable } from 'react-native'
import { useTheme } from '@altersend/components'
import { ArrowLeftIcon } from '@altersend/components/icons'
-import { getSendPageCopy, getSendStep, isShareStep, useTransferStore } from '@altersend/domain'
+import { getSendStep, isShareStep, useTransferStore } from '@altersend/domain'
import { clearSenderFlow } from '@altersend/domain'
import { useTranslation } from '@altersend/locales'
import { Layout } from '@/src/components'
@@ -15,7 +15,6 @@ export default function SendPreparingScreen() {
const draftPhase = useTransferStore((s) => s.draftPhase)
const connectionState = useTransferStore((s) => s.connectionState)
const step = getSendStep({ draftPhase, isPeerConnected: connectionState === 'peer-connected' })
- const copy = getSendPageCopy(t, step)
const navigation = useNavigation()
const router = useRouter()
@@ -49,7 +48,7 @@ export default function SendPreparingScreen() {
}, [navigation, handleBack, t, theme.colors.colorTextPrimary])
return (
- <Layout title={copy.title} description={copy.description} hasNativeHeader>
+ <Layout title='' description='' hasNativeHeader>
<PreparingView />
</Layout>
)
diff --git a/apps/mobile/app/settings.tsx b/apps/mobile/app/settings.tsx
index 2fe120c..377dd42 100644
--- a/apps/mobile/app/settings.tsx
+++ b/apps/mobile/app/settings.tsx
@@ -1,40 +1,29 @@
-import { Image, Linking, StyleSheet, View } from 'react-native'
-import Constants from 'expo-constants'
import { useCallback, useEffect, useState } from 'react'
+import { StyleSheet, View } from 'react-native'
+import Constants from 'expo-constants'
import { useFocusEffect, useRouter } from 'expo-router'
import { LOCALE_OPTIONS, useTranslation, type LocalePreference } from '@altersend/locales'
-import {
- discordUrl,
- loadPeers,
- privacyPolicyUrl,
- supportEmail,
- termsOfServiceUrl,
- useTransferStore,
- websiteUrl
-} from '@altersend/domain'
-import { LinkCard, LinkRow, useTheme } from '@altersend/components'
+import { loadPeers, useTransferStore } from '@altersend/domain'
+import { LinkRow, useTheme } from '@altersend/components'
import {
AlertCircleIcon,
- DiscordIcon,
- FileTextIcon,
GlobeIcon,
- LockIcon,
- MailIcon,
+ InfoIcon,
ShieldIcon,
SmartphoneIcon
} from '@altersend/components/icons'
import { Layout } from '@/src/components'
-import brandLogo from '@/assets/images/brand-logo.png'
+import { Text } from '@/src/components/ThemedText'
import {
getLocalePreferenceSnapshot,
getSavedLocalePreference,
subscribeLocalePreference
} from '@/src/lifecycle/localePreferenceStorage'
-import { Text } from '@/src/components/ThemedText'
export default function SettingsScreen() {
const { t } = useTranslation(['settings', 'common'])
const { theme } = useTheme()
+ const c = theme.colors
const router = useRouter()
const version = Constants.expoConfig?.version ?? '0.0.0'
const [localePreference, setLocalePreference] = useState<LocalePreference>(
@@ -51,7 +40,6 @@ export default function SettingsScreen() {
useFocusEffect(
useCallback(() => {
let active = true
-
void getSavedLocalePreference()
.then((preference) => {
if (active) setLocalePreference(preference)
@@ -59,130 +47,71 @@ export default function SettingsScreen() {
.catch((error) => {
console.warn('Failed to load locale preference:', error)
})
-
return () => {
active = false
}
}, [])
)
- const openUrl = (url: string) => {
- void Linking.openURL(url).catch(() => {})
- }
+ const languageLabel =
+ LOCALE_OPTIONS.find((option) => option.preference === localePreference)?.nativeName ??
+ t('common:labels.systemDefault')
return (
<Layout title={t('settings:title')} description='' hasNativeHeader>
- <View style={styles.content}>
+ <View style={styles.container}>
<View style={styles.section}>
- <Text style={[styles.sectionTitle, { color: theme.colors.colorTextMuted }]}>
+ <Text style={[styles.sectionTitle, { color: c.colorTextMuted }]}>
{t('settings:sections.general')}
</Text>
- <LinkCard>
+ <View style={styles.list}>
<LinkRow
+ standalone
label={t('settings:pairing.pairedDevices')}
subtitle={
peers.length === 0
? t('settings:rows.noDevices')
: t('settings:rows.pairedCount', { count: peers.length })
}
- icon={<SmartphoneIcon size={16} color={theme.colors.colorTextSecondary} />}
+ icon={<SmartphoneIcon size={16} color={c.colorTextSecondary} />}
onPress={() => router.push('/devices')}
/>
<LinkRow
+ standalone
label={t('common:labels.language')}
- subtitle={
- LOCALE_OPTIONS.find((option) => option.preference === localePreference)
- ?.nativeName ?? t('common:labels.systemDefault')
- }
- icon={<GlobeIcon size={16} color={theme.colors.colorTextSecondary} />}
+ subtitle={languageLabel}
+ icon={<GlobeIcon size={16} color={c.colorTextSecondary} />}
onPress={() => router.push('/language')}
/>
<LinkRow
+ standalone
label={t('settings:rows.security')}
subtitle={t('settings:crashReports.label')}
- icon={<ShieldIcon size={16} color={theme.colors.colorTextSecondary} />}
+ icon={<ShieldIcon size={16} color={c.colorTextSecondary} />}
onPress={() => router.push('/security')}
- isLast
/>
- </LinkCard>
+ </View>
</View>
<View style={styles.section}>
- <Text style={[styles.sectionTitle, { color: theme.colors.colorTextMuted }]}>
+ <Text style={[styles.sectionTitle, { color: c.colorTextMuted }]}>
{t('settings:sections.support')}
</Text>
- <LinkCard>
+ <View style={styles.list}>
<LinkRow
+ standalone
label={t('settings:rows.feedback')}
subtitle={t('settings:rows.feedbackHint')}
- icon={<AlertCircleIcon size={16} color={theme.colors.colorTextSecondary} />}
+ icon={<AlertCircleIcon size={16} color={c.colorTextSecondary} />}
onPress={() => router.push('/report')}
/>
<LinkRow
- label={t('settings:rows.discord')}
- subtitle={t('settings:rows.discordHint')}
- icon={<DiscordIcon size={16} color={theme.colors.colorTextSecondary} />}
- onPress={() => openUrl(discordUrl)}
- />
- <LinkRow
- label={t('settings:rows.contact')}
- subtitle={supportEmail}
- icon={<MailIcon size={16} color={theme.colors.colorTextSecondary} />}
- onPress={() => openUrl(`mailto:${supportEmail}`)}
- isLast
- />
- </LinkCard>
- </View>
-
- <View style={styles.section}>
- <Text style={[styles.sectionTitle, { color: theme.colors.colorTextMuted }]}>
- {t('settings:sections.about')}
- </Text>
- <LinkCard>
- <LinkRow
- label={t('settings:rows.privacyPolicy')}
- subtitle={t('settings:rows.privacyPolicyHint')}
- icon={<LockIcon size={16} color={theme.colors.colorTextSecondary} />}
- onPress={() => openUrl(privacyPolicyUrl)}
- />
- <LinkRow
- label={t('settings:rows.terms')}
- subtitle={t('settings:rows.termsHint')}
- icon={<FileTextIcon size={16} color={theme.colors.colorTextSecondary} />}
- onPress={() => openUrl(termsOfServiceUrl)}
+ standalone
+ label={t('settings:sections.about')}
+ subtitle={`v${version}`}
+ icon={<InfoIcon size={16} color={c.colorTextSecondary} />}
+ onPress={() => router.push('/about')}
/>
- <LinkRow
- label={t('settings:rows.website')}
- subtitle={websiteUrl.replace(/^https?:\/\//, '')}
- icon={<GlobeIcon size={16} color={theme.colors.colorTextSecondary} />}
- onPress={() => openUrl(websiteUrl)}
- isLast
- />
- </LinkCard>
- </View>
-
- <View
- style={[
- styles.brandRow,
- {
- backgroundColor: theme.colors.colorBackgroundSubtle,
- borderColor: theme.colors.colorBorderPrimary
- }
- ]}
- >
- <Image source={brandLogo} style={styles.brandLogo} resizeMode='contain' />
- <View style={styles.brandInfo}>
- <Text style={[styles.brandName, { color: theme.colors.colorTextPrimary }]}>
- AlterSend
- </Text>
- <Text style={[styles.brandTagline, { color: theme.colors.colorTextMuted }]}>
- {t('common:app.tagline')}
- </Text>
- </View>
- <View style={[styles.versionChip, { backgroundColor: theme.colors.colorSurfacePrimary }]}>
- <Text style={[styles.versionText, { color: theme.colors.colorTextMuted }]}>
- v{version}
- </Text>
</View>
</View>
</View>
@@ -191,11 +120,11 @@ export default function SettingsScreen() {
}
const styles = StyleSheet.create({
- content: {
- gap: 16
+ container: {
+ gap: 22
},
section: {
- gap: 6
+ gap: 8
},
sectionTitle: {
fontSize: 11,
@@ -204,39 +133,7 @@ const styles = StyleSheet.create({
letterSpacing: 0.5,
paddingHorizontal: 4
},
- brandRow: {
- flexDirection: 'row',
- alignItems: 'center',
- gap: 12,
- borderRadius: 16,
- borderWidth: 1,
- paddingHorizontal: 16,
- paddingVertical: 13
- },
- brandLogo: {
- width: 34,
- height: 34
- },
- brandInfo: {
- flex: 1,
- gap: 1
- },
- brandName: {
- fontSize: 13,
- fontWeight: '600',
- lineHeight: 18
- },
- brandTagline: {
- fontSize: 12,
- lineHeight: 16
- },
- versionChip: {
- paddingHorizontal: 8,
- paddingVertical: 3,
- borderRadius: 20
- },
- versionText: {
- fontSize: 11,
- fontWeight: '500'
+ list: {
+ gap: 10
}
})
diff --git a/apps/mobile/src/components/AddPairDeviceSheet/index.tsx b/apps/mobile/src/components/AddPairDeviceSheet/index.tsx
index ac0e0f0..12f3ed7 100644
--- a/apps/mobile/src/components/AddPairDeviceSheet/index.tsx
+++ b/apps/mobile/src/components/AddPairDeviceSheet/index.tsx
@@ -1,5 +1,5 @@
import { StyleSheet, View } from 'react-native'
-import { ActionRow, useTheme } from '@altersend/components'
+import { ListItem, useTheme } from '@altersend/components'
import { ClipboardIcon, CodeIcon, QrCodeIcon } from '@altersend/components/icons'
import { useTranslation } from '@altersend/locales'
import { BottomSheet } from '../BottomSheet'
@@ -34,24 +34,30 @@ export function AddPairDeviceSheet({
sheetStyle={styles.sheet}
>
<View style={styles.actionList}>
- <ActionRow
+ <ListItem
icon={<QrCodeIcon size={15} />}
- title={t('settings:pairing.showQrCode')}
- subtitle={t('settings:pairing.showQrCodeHint')}
+ label={t('settings:pairing.showQrCode')}
+ variant='plain'
+ size='large'
+ square
onClick={onShowQrCode}
/>
<View style={[styles.divider, { backgroundColor: c.colorBorderPrimary }]} />
- <ActionRow
+ <ListItem
icon={<CodeIcon size={15} />}
- title={t('settings:pairing.scanQrCode')}
- subtitle={t('settings:pairing.scanQrCodeHint')}
+ label={t('settings:pairing.scanQrCode')}
+ variant='plain'
+ size='large'
+ square
onClick={onScanQrCode}
/>
<View style={[styles.divider, { backgroundColor: c.colorBorderPrimary }]} />
- <ActionRow
+ <ListItem
icon={<ClipboardIcon size={15} />}
- title={t('settings:pairing.enterCode')}
- subtitle={t('settings:pairing.enterCodeHint')}
+ label={t('settings:pairing.enterCode')}
+ variant='plain'
+ size='large'
+ square
onClick={onEnterCode}
/>
</View>
diff --git a/apps/mobile/src/components/DeviceActionsSheet/index.tsx b/apps/mobile/src/components/DeviceActionsSheet/index.tsx
index 7916503..0816ab8 100644
--- a/apps/mobile/src/components/DeviceActionsSheet/index.tsx
+++ b/apps/mobile/src/components/DeviceActionsSheet/index.tsx
@@ -1,9 +1,8 @@
-import { Pressable, StyleSheet, View } from 'react-native'
-import { useTheme } from '@altersend/components'
+import { StyleSheet, View } from 'react-native'
+import { ListItem } from '@altersend/components'
import { TrashIcon } from '@altersend/components/icons'
import { useTranslation } from '@altersend/locales'
import { BottomSheet } from '../BottomSheet'
-import { Text } from '../ThemedText'
interface DeviceActionsSheetProps {
open: boolean
@@ -13,8 +12,6 @@ interface DeviceActionsSheetProps {
export function DeviceActionsSheet({ open, onClose, onRemove }: DeviceActionsSheetProps) {
const { t } = useTranslation(['settings'])
- const { theme } = useTheme()
- const c = theme.colors
return (
<BottomSheet
@@ -24,19 +21,14 @@ export function DeviceActionsSheet({ open, onClose, onRemove }: DeviceActionsShe
sheetStyle={styles.sheet}
>
<View style={styles.actionList}>
- <Pressable
- accessibilityRole='button'
- onPress={onRemove}
- style={({ pressed }) => [
- styles.actionRow,
- pressed && { backgroundColor: c.colorDangerSubtle }
- ]}
- >
- <TrashIcon size={16} color={c.colorDanger} />
- <Text style={[styles.actionText, { color: c.colorDanger }]}>
- {t('settings:pairing.removeDevice')}
- </Text>
- </Pressable>
+ <ListItem
+ tone='danger'
+ size='large'
+ square
+ icon={<TrashIcon size={16} />}
+ label={t('settings:pairing.removeDevice')}
+ onClick={onRemove}
+ />
</View>
</BottomSheet>
)
@@ -44,14 +36,5 @@ export function DeviceActionsSheet({ open, onClose, onRemove }: DeviceActionsShe
const styles = StyleSheet.create({
sheet: { paddingBottom: 32, gap: 12 },
- actionList: { overflow: 'hidden' },
- actionRow: {
- minHeight: 56,
- flexDirection: 'row',
- alignItems: 'center',
- gap: 12,
- paddingHorizontal: 20,
- paddingVertical: 16
- },
- actionText: { fontSize: 15, fontWeight: '600' }
+ actionList: { overflow: 'hidden' }
})
diff --git a/apps/mobile/src/components/UpdateBanner/index.tsx b/apps/mobile/src/components/UpdateBanner/index.tsx
index 47ba015..d4fed3e 100644
--- a/apps/mobile/src/components/UpdateBanner/index.tsx
+++ b/apps/mobile/src/components/UpdateBanner/index.tsx
@@ -1,10 +1,11 @@
-import { useTheme } from '@altersend/components'
+import { useState } from 'react'
+import { Button, useTheme } from '@altersend/components'
import { useTranslation } from '@altersend/locales'
-import { ArrowUp, X } from 'lucide-react-native'
-import { Linking, Platform, Pressable, StyleSheet, View } from 'react-native'
-import { useSafeAreaInsets } from 'react-native-safe-area-context'
+import { Linking, Platform, StyleSheet, View } from 'react-native'
import { useUpdateCheck } from '../../hooks/useUpdateCheck'
+import { BottomSheet } from '../BottomSheet'
import { Text } from '@/src/components/ThemedText'
+import UpdateSvg from '../../../../../assets/update.svg'
const STORE_URL =
Platform.OS === 'ios'
@@ -14,89 +15,72 @@ const STORE_URL =
export function UpdateBanner() {
const { t } = useTranslation(['common'])
const { theme } = useTheme()
- const insets = useSafeAreaInsets()
+ const c = theme.colors
const { needsUpdate, dismiss } = useUpdateCheck()
+ const [dismissed, setDismissed] = useState(false)
- if (!needsUpdate) return null
+ const handleDismiss = () => {
+ setDismissed(true)
+ dismiss()
+ }
+
+ const handleUpdate = () => {
+ handleDismiss()
+ void Linking.openURL(STORE_URL).catch((err) => {
+ console.warn('UpdateBanner: failed to open store URL', err)
+ })
+ }
return (
- <View pointerEvents='box-none' style={[styles.container, { top: insets.top + 16 }]}>
- <View
- style={[
- styles.banner,
- {
- backgroundColor: theme.colors.colorSurfaceSecondary,
- borderColor: theme.colors.colorBorderPrimary,
- shadowColor: theme.colors.colorScrim
- }
- ]}
- >
- <View style={[styles.iconWrap, { backgroundColor: theme.colors.colorInfoSubtle }]}>
- <ArrowUp size={14} color={theme.colors.colorInfo} />
- </View>
+ <BottomSheet open={needsUpdate && !dismissed} onClose={handleDismiss}>
+ <View style={styles.content}>
+ <UpdateSvg width={188} height={163} style={styles.image} />
- <Text style={[styles.label, { color: theme.colors.colorTextPrimary }]} numberOfLines={1}>
+ <Text style={[styles.title, { color: c.colorTextPrimary }]}>
{t('common:update.available')}
</Text>
+ <Text style={[styles.description, { color: c.colorTextMuted }]}>
+ {t('common:update.description')}
+ </Text>
- <Pressable
- onPress={() => {
- dismiss()
- void Linking.openURL(STORE_URL).catch(() => {})
- }}
- hitSlop={8}
- >
- <Text style={[styles.updateBtn, { color: theme.colors.colorInfo }]}>
- {t('common:update.update')}
- </Text>
- </Pressable>
-
- <Pressable
- accessibilityRole='button'
- accessibilityLabel={t('common:actions.dismiss')}
- onPress={dismiss}
- hitSlop={8}
- >
- <X size={16} color={theme.colors.colorTextSecondary} />
- </Pressable>
+ <View style={styles.actions}>
+ <Button onClick={handleUpdate} variant='primary' size='lg' width='full'>
+ {t('common:update.updateNow')}
+ </Button>
+ <Button onClick={handleDismiss} variant='ghost' size='lg' width='full'>
+ {t('common:update.notNow')}
+ </Button>
+ </View>
</View>
- </View>
+ </BottomSheet>
)
}
const styles = StyleSheet.create({
- container: {
- position: 'absolute',
- left: 16,
- right: 16
- },
- banner: {
- flexDirection: 'row',
+ content: {
alignItems: 'center',
- gap: 10,
- paddingVertical: 10,
- paddingHorizontal: 14,
- borderRadius: 999,
- borderWidth: 1,
- shadowOffset: { width: 0, height: 6 },
- shadowOpacity: 0.18,
- shadowRadius: 16,
- elevation: 8
+ paddingHorizontal: 20,
+ gap: 8
},
- iconWrap: {
- width: 22,
- height: 22,
- borderRadius: 11,
- alignItems: 'center',
- justifyContent: 'center'
+ image: {
+ marginBottom: 8
},
- label: {
- flex: 1,
- fontSize: 14,
- fontWeight: '600'
+ title: {
+ fontSize: 19,
+ fontWeight: '700',
+ textAlign: 'center',
+ marginTop: 10
},
- updateBtn: {
+ description: {
fontSize: 14,
- fontWeight: '600'
+ lineHeight: 20,
+ textAlign: 'center',
+ maxWidth: 320,
+ marginBottom: 8
+ },
+ actions: {
+ width: '100%',
+ gap: 8,
+ marginTop: 4
}
})
diff --git a/apps/mobile/src/transfer/receive/views/ReceiveIncomingView.tsx b/apps/mobile/src/transfer/receive/views/ReceiveIncomingView.tsx
index 438f6dd..e6585a0 100644
--- a/apps/mobile/src/transfer/receive/views/ReceiveIncomingView.tsx
+++ b/apps/mobile/src/transfer/receive/views/ReceiveIncomingView.tsx
@@ -39,7 +39,7 @@ export function ReceiveIncomingView() {
size='sm'
variant='primary'
>
- {t('common:actions.openLink', { defaultValue: 'Open Link' })}
+ {t('common:actions.openLink')}
</Button>
) : (
<Button
@@ -47,7 +47,7 @@ export function ReceiveIncomingView() {
size='sm'
variant='primary'
>
- {t('common:actions.copyText', { defaultValue: 'Copy Text' })}
+ {t('common:actions.copyText')}
</Button>
)}
</View>
diff --git a/apps/mobile/src/transfer/receive/views/ReceiveJoinView.tsx b/apps/mobile/src/transfer/receive/views/ReceiveJoinView.tsx
index 7cee48e..6c88858 100644
--- a/apps/mobile/src/transfer/receive/views/ReceiveJoinView.tsx
+++ b/apps/mobile/src/transfer/receive/views/ReceiveJoinView.tsx
@@ -2,7 +2,7 @@ import React from 'react'
import { StyleSheet, View } from 'react-native'
import * as Clipboard from 'expo-clipboard'
import { Button, Input, LinkRow, useTheme } from '@altersend/components'
-import { ClipboardIcon, QrCodeIcon } from '@altersend/components/icons'
+import { ClipboardIcon, DownloadIcon, QrCodeIcon } from '@altersend/components/icons'
import { useTranslation } from '@altersend/locales'
import { Text } from '@/src/components/ThemedText'
@@ -36,22 +36,26 @@ export function ReceiveJoinView({
return (
<View style={styles.container}>
<LinkRow
- icon={<QrCodeIcon size={20} color={theme.colors.colorInfo} />}
- iconBackground={theme.colors.colorInfoSubtle}
+ icon={<QrCodeIcon size={20} color={theme.colors.colorTextMuted} />}
+ iconBackground={theme.colors.colorSurfacePrimary}
label={t('receive:actions.scanOrImportQr')}
onPress={onScanQr}
standalone
subtitle={t('receive:actions.scanOrImportQrHintMobile')}
+ subtitleTone='faint'
/>
<View style={styles.divider}>
- <Text style={[styles.dividerText, { color: theme.colors.colorTextMuted }]}>
+ <View style={[styles.dividerLine, { backgroundColor: theme.colors.colorBorderPrimary }]} />
+ <Text style={[styles.dividerText, { color: theme.colors.colorTextFaint }]}>
{t('receive:form.orPasteCode')}
</Text>
+ <View style={[styles.dividerLine, { backgroundColor: theme.colors.colorBorderPrimary }]} />
</View>
<View style={styles.codeForm}>
<Input
+ aria-label={t('receive:form.codeLabel')}
disabled={isLoading}
error={joinCodeError}
onChange={(e: { target: { value: string } }) => onJoinCodeChange(e.target.value)}
@@ -73,7 +77,14 @@ export function ReceiveJoinView({
value={joinCode}
/>
- <Button disabled={!canConnect} onClick={onConnect} variant='primary' size='lg' width='full'>
+ <Button
+ disabled={!canConnect}
+ onClick={onConnect}
+ variant='primary'
+ size='lg'
+ width='full'
+ icon={<DownloadIcon size={18} />}
+ >
{isLoading ? t('common:actions.connecting') : t('common:actions.connect')}
</Button>
</View>
@@ -89,11 +100,17 @@ const styles = StyleSheet.create({
gap: 10
},
divider: {
+ flexDirection: 'row',
alignItems: 'center',
- paddingVertical: 2
+ gap: 16,
+ paddingVertical: 6
+ },
+ dividerLine: {
+ flex: 1,
+ height: 1
},
dividerText: {
- fontSize: 12
+ fontSize: 12.5
},
footer: {
flexDirection: 'row',
diff --git a/apps/mobile/src/transfer/send/views/PreparingView.tsx b/apps/mobile/src/transfer/send/views/PreparingView.tsx
index 07d894b..96183b7 100644
--- a/apps/mobile/src/transfer/send/views/PreparingView.tsx
+++ b/apps/mobile/src/transfer/send/views/PreparingView.tsx
@@ -1,123 +1,27 @@
-import { View, StyleSheet } from 'react-native'
-import {
- getOverallProgress,
- getProgressState,
- getStatusTone,
- useTransferStore
-} from '@altersend/domain'
-import { LinkRow, useTheme } from '@altersend/components'
+import { StyleSheet, View } from 'react-native'
+import { WaitingState } from '@altersend/components'
+import { SendIcon } from '@altersend/components/icons'
import { useTranslation } from '@altersend/locales'
-import { Text } from '@/src/components/ThemedText'
export function PreparingView() {
const { t } = useTranslation(['send'])
- const uploadItems = useTransferStore((s) => s.uploadItems)
- const { theme } = useTheme()
- const { completed, total, percent } = getOverallProgress(uploadItems)
- const allCompleted = completed === total && total > 0
-
- const surfaceStyle = {
- backgroundColor: theme.colors.colorBackgroundSubtle,
- borderColor: theme.colors.colorBorderPrimary
- }
return (
<View style={styles.container}>
- <View style={[styles.card, surfaceStyle]}>
- <View style={styles.header}>
- <Text style={[styles.title, { color: theme.colors.colorTextPrimary }]}>
- {allCompleted ? t('send:status.uploadComplete') : t('send:status.uploadingFiles')}
- </Text>
- <Text style={[styles.percent, { color: theme.colors.colorTextPrimary }]}>{percent}%</Text>
- </View>
-
- <View style={[styles.progressTrack, { backgroundColor: theme.colors.colorBorderPrimary }]}>
- <View
- style={[
- styles.progressBar,
- {
- width: `${percent}%`,
- backgroundColor: allCompleted ? theme.colors.colorSuccess : theme.colors.colorAccent
- }
- ]}
- />
- </View>
-
- <Text style={[styles.subtitle, { color: theme.colors.colorTextSecondary }]}>
- {t('send:preparing.uploadedCount', { completed, count: total })}
- </Text>
- </View>
-
- <View style={styles.fileList}>
- {uploadItems.map((item) => {
- const progress = getProgressState(item)
- return (
- <LinkRow
- key={item.path}
- file
- standalone
- label={item.name}
- size={item.size}
- status={{
- label:
- item.status === 'completed'
- ? t('send:status.uploaded')
- : item.status === 'uploading'
- ? t('send:status.uploading')
- : t('send:status.waiting'),
- tone: getStatusTone(item)
- }}
- progress={
- progress === 'waiting' || progress === 'uploading' || progress === 'completed'
- ? progress
- : undefined
- }
- />
- )
- })}
- </View>
+ <WaitingState
+ icon={<SendIcon size={30} />}
+ title={t('send:page.preparing.title')}
+ description={t('send:page.preparing.description')}
+ />
</View>
)
}
const styles = StyleSheet.create({
container: {
- gap: 16
- },
- card: {
- padding: 16,
- borderRadius: 12,
- borderWidth: 1
- },
- header: {
- flexDirection: 'row',
- justifyContent: 'space-between',
- alignItems: 'center'
- },
- title: {
- fontSize: 14,
- fontWeight: '600'
- },
- percent: {
- fontSize: 14,
- fontWeight: '700'
- },
- progressTrack: {
- height: 6,
- width: '100%',
- borderRadius: 3,
- marginTop: 10,
- overflow: 'hidden'
- },
- progressBar: {
- height: '100%',
- borderRadius: 3
- },
- subtitle: {
- fontSize: 12,
- marginTop: 8
- },
- fileList: {
- gap: 8
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ paddingBottom: 120
}
})
diff --git a/assets/altersend-logo.png b/assets/altersend-logo.png
index 3a57c11..aa50484 100644
Binary files a/assets/altersend-logo.png and b/assets/altersend-logo.png differ
diff --git a/assets/update.svg b/assets/update.svg
new file mode 100644
index 0000000..db84982
--- /dev/null
+++ b/assets/update.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="774" height="669.5" viewBox="0 0 774 669.5" xmlns:xlink="http://www.w3.org/1999/xlink" role="img" artist="Katerina Limpitsouni" source="https://undraw.co/"><path d="M938.2145,322.3829C936.73266,207.5841,878.16775,115.25,806.13079,115.25c-43.29082,0-81.71777,33.346-105.81477,84.87331l28.33157,71.08654-39.15446-43.81576c-9.876,29.64743-15.48115,63.49569-15.48115,99.44475a324.20917,324.20917,0,0,0,9.98686,80.80891l75.92761-12.24058-67.9507,37.99628c22.13728,60.69069,62.59851,102.1414,109.23586,104.87608l-8.988,244.5184,27.81449.99338-5.94527-245.75716c66.41162-6.32443,119.60967-91.20375,123.8712-197.42794l-45.89372-25.66252Z" transform="translate(-213 -115.25)" fill="#f0f0f0"/><rect x="157.51532" y="354.40187" width="6.60151" height="49.25266" fill="#2d4ca4"/><polygon points="187.815 376.276 182.98 380.779 160.823 356.936 138.658 380.779 133.823 376.276 160.823 347.243 187.815 376.276" fill="#2d4ca4"/><path d="M371.9876,543.6602a52.8121,52.8121,0,1,1,52.8121-52.81209A52.87183,52.87183,0,0,1,371.9876,543.6602Zm0-99.02268a46.21059,46.21059,0,1,0,46.21058,46.21059A46.26275,46.26275,0,0,0,371.9876,444.63752Z" transform="translate(-213 -115.25)" fill="#2d4ca4"/><rect x="212.75248" y="253.9314" width="3.63974" height="27.15545" fill="#e4e4e4"/><polygon points="229.458 265.992 226.793 268.475 214.576 255.328 202.356 268.475 199.69 265.992 214.576 249.984 229.458 265.992" fill="#e4e4e4"/><path d="M426.56422,409.9859a29.118,29.118,0,1,1,29.118-29.118A29.15089,29.15089,0,0,1,426.56422,409.9859Zm0-54.59616A25.47821,25.47821,0,1,0,452.04243,380.868,25.507,25.507,0,0,0,426.56422,355.38974Z" transform="translate(-213 -115.25)" fill="#e4e4e4"/><rect x="99.52274" y="186.73872" width="3.63974" height="27.15545" fill="#e4e4e4"/><polygon points="116.229 198.799 113.563 201.282 101.346 188.136 89.126 201.282 86.46 198.799 101.346 182.792 116.229 198.799" fill="#e4e4e4"/><path d="M313.33448,342.79321a29.118,29.118,0,1,1,29.118-29.118A29.15088,29.15088,0,0,1,313.33448,342.79321Zm0-54.59615a25.47821,25.47821,0,1,0,25.47821,25.4782A25.507,25.507,0,0,0,313.33448,288.19706Z" transform="translate(-213 -115.25)" fill="#e4e4e4"/><path d="M518.7325,635.91942a8.22484,8.22484,0,0,1,.958-12.302,9.56322,9.56322,0,0,1,1.26081-.83521l-6.99347-30.13439,16.26512,5.84042,4.14749,27.72073a8.21849,8.21849,0,0,1-2.21462,10.58849A10.12952,10.12952,0,0,1,518.7325,635.91942Z" transform="translate(-213 -115.25)" fill="#ffb8b8"/><path d="M516.88531,612.40706l-.08727-.29605c-8.79267-29.805-17.88169-60.6154-28.97824-94.16236l-.0728-.21977.2448-.13088c6.18493-3.30762,15.48114-3.08736,21.62358.51183,5.68293,3.33,8.55569,9.77159,7.0024,15.68347l8.09328,38.67327c3.29039,12.64158,6.69574,25.72668,9.95036,38.62892l.09229.36576-.504.0295c-5.92592.34536-12.04821.70254-16.95322.89973Z" transform="translate(-213 -115.25)" fill="#ccc"/><polygon points="229.16 657.57 217.627 657.57 212.138 616.801 229.16 616.801 229.16 657.57" fill="#ffb8b8"/><path d="M445.10175,783.06559H407.9141v-.43107c0-7.31472,6.49345-13.26551,14.47493-13.26551h22.71272Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><polygon points="337.837 648.851 326.848 652.06 308.113 614.743 324.331 610.006 337.837 648.851" fill="#ffb8b8"/><path d="M521.60173,783.39141l-.14262-.41086c-2.42325-6.96953,1.79234-14.4459,9.39693-16.66692l21.64062-6.31955,4.53736,13.05Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><ellipse cx="279.46347" cy="354.21043" rx="23.10522" ry="21.17504" fill="#ffb8b8"/><path d="M502.83713,465.536c.13132-8.54065-3.76885-16.99907-9.79916-21.25171a16.77762,16.77762,0,0,0-19.87954.322c-5.937,4.44645-9.65428,13.02823-9.33974,21.56167C477.12124,466.20257,490.42379,466.23726,502.83713,465.536Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M448.74454,759.69687l-.46255-.04125c-10.03358-.90255-20.40891-1.83457-30.21419-1.9415l-.5333-.00589.07281-.48411c2.32311-15.42,3.30793-31.45044,4.26037-46.9538.9405-15.308,1.91269-31.13682,4.17769-46.17039.95818-4.0257,1.892-8.00342,2.82264-11.96682,7.70037-32.79837,14.97378-63.77816,29.98728-94.44433l.14194-.28963.34381.03789c14.08679,1.56221,27.62283,6.27241,38.11391,13.26256l.20326.13513-.00988.23027a131.25944,131.25944,0,0,0-.10174,14.17269,44.82523,44.82523,0,0,1,7.48241,42.489c4.13084,12.65215,8.40154,25.73075,12.75907,38.63212,10.5818,26.587,21.53153,54.10056,32.75594,81.99045l.1842.45717-.51791.11114c-8.07587,1.73775-16.40668,3.52938-24.62518,4.22482l-.31028.0261-.14745-.25174a587.30717,587.30717,0,0,1-50.88262-112.12662c-2.80473,7.83882-6.84508,14.91443-10.75934,21.76819a157.11556,157.11556,0,0,0-9.86087,19.31354c-1.73239,13.0365-2.192,27.16078-2.63591,40.81947-.42007,12.91442-.81671,25.11236-2.19312,36.582Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M484.57528,444.67592c10.01507-1.97751,21.093-.09617,28.95819,6.09651s11.85919,16.9058,8.62805,26.09364-14.20114,15.65236-24.12,13.27969c2.84131-7.33881-.35623-16.34918-7.302-20.57639C482.50242,464.55626,480.23475,452.58775,484.57528,444.67592Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M496.73471,571.62025l-.36633-.15281c-12.77629-5.34207-25.30408-9.441-37.04181-13.18089l-.35989-.07114-.00092-.95644.23358.07451c.04915-.09935.1045-.21217.16008-.32456.16031-.325.26963-.54642.36264-.69292l-.00252-.00126c.97862-1.82742,1.75651-3.59337,2.50868-5.30123.77628-1.76259,1.5776-3.58243,2.61295-5.50793a15.68833,15.68833,0,0,1-4.02289-17.95719c2.593-5.63211,9.20424-10.01859,16.15083-10.74644,2.54543-6.42185,8.21712-19.91552,8.21712-19.91552s11.92674-.30015,16.72316-.85793l.08062-.00926.07923.016c10.4711,2.10273,19.213,11.1834,21.25846,22.08265,1.72665,9.199-.89525,19.721-7.38227,29.62807A128.7532,128.7532,0,0,1,504.93,561.61682c-2.92186,3.34837-5.68157,6.51067-7.97367,9.69571Z" transform="translate(-213 -115.25)" fill="#ccc"/><path d="M519.3919,459.10521v0Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M519.861,457.22412c-7.01076-.95907-12.51527-7.52688-11.71835-13.982s7.76344-11.72977,14.83079-11.22907,13.06654,6.694,12.77147,13.18459S528.81221,458.44864,519.861,457.22412Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M518.76646,453.03852c-7.01067-.95906-12.51516-7.52688-11.71821-13.98194.54524-4.41578,3.9788-8.27657,8.35539-10.11667-5.65378,1.13408-10.51956,5.64916-11.17757,10.97881-.79695,6.45506,4.70754,13.02288,11.71821,13.98195a14.465,14.465,0,0,0,7.6875-.98538A14.866,14.866,0,0,1,518.76646,453.03852Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M382.77632,566.82181a9.99626,9.99626,0,0,1,12.97554-3.271,9.61149,9.61149,0,0,1,1.27935.81118l28.67233-16.08336-.58936,16.00057-27.13738,12.82a10.15042,10.15042,0,0,1-11.63139,1.61428A8.34216,8.34216,0,0,1,382.77632,566.82181Z" transform="translate(-213 -115.25)" fill="#ffb8b8"/><path d="M406.35053,557.3917l.2755-.17406c27.73394-17.52829,56.40359-35.64765,87.2197-56.41349l.20185-.13613.21621.16792c5.46363,4.24233,8.33439,12.34854,6.67808,18.85539-1.5324,6.02009-7.20243,10.64869-13.80215,11.27624L450.049,550.84631c-11.90943,7.05521-24.23685,14.35751-36.42636,21.46865l-.34555.20162-.19828-.42571c-2.32974-5.0055-4.73707-10.17674-6.57422-14.34943Z" transform="translate(-213 -115.25)" fill="#ccc"/><path d="M986,784.75H214a1,1,0,0,1,0-2H986a1,1,0,0,1,0,2Z" transform="translate(-213 -115.25)" fill="#cacaca"/></svg>
\ No newline at end of file
diff --git a/packages/components/README.md b/packages/components/README.md
index 38f66ac..5df6571 100644
--- a/packages/components/README.md
+++ b/packages/components/README.md
@@ -10,28 +10,28 @@ The desktop renderer is React + Vite, the mobile app is React Native / Expo. Wit
### Components
-| Component | Use |
-| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
-| `Button` | Action button — `size`, `variant` (primary / secondary / ghost / danger / success), `loading`, `iconOnly`, `pill` |
-| `Input` | Form text input with optional label, secure mode, trailing slot |
-| `Badge` | Inline status pill |
-| `Card` | Bordered surface container |
-| `ActionRow` | List-item / menu row (icon + title + optional subtitle); `tone='danger'` for destructive actions |
-| `LinkRow`, `LinkCard` | Tappable rows grouped in a bordered card — settings & device lists |
-| `Tabs`, `TabsList`, `TabsTrigger`, `TabsContent` | Tab pattern with keyboard support |
-| `Disclosure` | Collapsible section with header + body |
-| `ToggleSwitch` | On / off switch |
-| `FileDropZone` | Drag-and-drop / click-to-pick area (web has drag overlay; native is tap-only) |
-| `WaitingRadar` | Pulsing radar indicator (e.g. "waiting for someone to join") |
-| `Spinner` | Inline loading spinner |
-| `PaginationDots` | Step / carousel dots |
-| `PeerListCard` | Connected-peers summary card |
-| `KeepAppOpenHint` | Banner reminding the user to keep the app open during a transfer |
-| `ErrorBanner` | Inline transient error |
-| `ErrorBoundary` | React error boundary class component (renders a `fallback` on caught errors) |
-| `CrashScreen` | Full-screen fallback for a fatal error |
-| `ExternalLink` | Opens a URL in the OS browser |
-| `FeedbackTypeSelector` | Category picker for the feedback form |
+| Component | Use |
+| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `Button` | Action button — `size`, `variant` (primary / secondary / ghost / danger / success), `loading`, `iconOnly`, `pill` |
+| `Input` | Form text input with optional label, secure mode, trailing slot |
+| `Badge` | Inline status pill |
+| `ListItem` | List / nav / menu row (icon + label + optional subtitle); `active`, `collapsed`, `showDot`, `chevron`, `tone='danger'`, `variant='plain'`, `size='large'`, `square` |
+| `LinkRow`, `LinkCard` | Tappable rows grouped in a bordered card — settings & device lists |
+| `Tabs`, `TabsList`, `TabsTrigger`, `TabsContent` | Tab pattern with keyboard support |
+| `Disclosure` | Collapsible section with header + body |
+| `ToggleSwitch` | On / off switch |
+| `FileDropZone` | Drag-and-drop / click-to-pick area (web has drag overlay; native is tap-only) |
+| `WaitingRadar` | Pulsing radar indicator (e.g. "waiting for someone to join") |
+| `WaitingState` | Centered radar + title + subtitle — the shared connecting / preparing hero |
+| `Spinner` | Inline loading spinner |
+| `PaginationDots` | Step / carousel dots |
+| `PeerListCard` | Connected-peers summary card |
+| `KeepAppOpenHint` | Banner reminding the user to keep the app open during a transfer |
+| `ErrorBanner` | Inline transient error |
+| `ErrorBoundary` | React error boundary class component (renders a `fallback` on caught errors) |
+| `CrashScreen` | Full-screen fallback for a fatal error |
+| `ExternalLink` | Opens a URL in the OS browser |
+| `FeedbackTypeSelector` | Category picker for the feedback form |
### Theme
diff --git a/packages/components/src/components/ActionRow/ActionRow.tsx b/packages/components/src/components/ActionRow/ActionRow.tsx
deleted file mode 100644
index b24b7dc..0000000
--- a/packages/components/src/components/ActionRow/ActionRow.tsx
+++ /dev/null
@@ -1,131 +0,0 @@
-import { cloneElement, isValidElement, type ReactElement, type ReactNode } from 'react'
-import { css, html } from 'react-strict-dom'
-import { usePressState } from '../../hooks/usePressState'
-import { useTheme } from '../../theme'
-
-export interface ActionRowProps {
- icon: ReactNode
- title: string
- subtitle?: string
- onClick: () => void
- compact?: boolean
- tone?: 'default' | 'danger'
-}
-
-const styles = css.create({
- row: {
- display: 'flex',
- flexDirection: 'row',
- alignItems: 'flex-start',
- gap: 14,
- paddingTop: 14,
- paddingBottom: 14,
- paddingLeft: 20,
- paddingRight: 20,
- cursor: 'pointer',
- userSelect: 'none',
- borderWidth: 0,
- backgroundColor: 'transparent',
- transitionDuration: '120ms',
- transitionProperty: 'background-color',
- transitionTimingFunction: 'ease'
- },
- rowCompact: {
- gap: 12,
- paddingTop: 12,
- paddingBottom: 12,
- paddingLeft: 16,
- paddingRight: 16
- },
- iconSlot: {
- width: 16,
- height: 20,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- flexShrink: 0
- },
- iconSlotCompact: { width: 14, height: 18 },
- textGroup: {
- display: 'flex',
- flexDirection: 'column',
- gap: 4,
- flex: 1
- },
- textGroupCompact: { gap: 2 },
- title: {
- fontSize: 15,
- lineHeight: 1.33,
- fontWeight: '600'
- },
- titleCompact: { fontSize: 13, lineHeight: 1.38 },
- subtitle: {
- fontSize: 13,
- lineHeight: 1.5
- },
- subtitleCompact: { fontSize: 11 }
-})
-
-export function ActionRow({
- icon,
- title,
- subtitle,
- onClick,
- compact = false,
- tone = 'default'
-}: ActionRowProps) {
- const { theme } = useTheme()
- const c = theme.colors
- const { isHovered, isPressed, pressHandlers } = usePressState()
-
- const isDanger = tone === 'danger'
- const contentColor = isDanger ? c.colorDanger : c.colorTextPrimary
- const iconSize = compact ? 14 : 15
- const iconEl = isValidElement(icon)
- ? cloneElement(icon as ReactElement<{ color?: string; size?: number }>, {
- color: contentColor,
- size: iconSize
- })
- : icon
-
- const resolveBackgroundColor = () => {
- if (isDanger) return isHovered || isPressed ? c.colorDangerSubtle : 'transparent'
- if (isPressed) return c.colorSurfacePrimary
- if (isHovered) return c.colorSurfaceSecondary
- return 'transparent'
- }
- const backgroundColor = resolveBackgroundColor()
-
- return (
- <html.div
- {...pressHandlers}
- role='button'
- tabIndex={0}
- onClick={onClick}
- onKeyDown={(e: { key: string }) => {
- if (e.key === 'Enter' || e.key === ' ') onClick()
- }}
- style={[styles.row, compact && styles.rowCompact, { backgroundColor } as never]}
- >
- <html.div style={[styles.iconSlot, compact && styles.iconSlotCompact]}>{iconEl}</html.div>
- <html.div style={[styles.textGroup, compact && styles.textGroupCompact]}>
- <html.span
- style={[styles.title, compact && styles.titleCompact, { color: contentColor } as never]}
- >
- {title}
- </html.span>
- {subtitle ? (
- <html.span
- style={[
- styles.subtitle,
- compact && styles.subtitleCompact,
- { color: c.colorTextMuted } as never
- ]}
- >
- {subtitle}
- </html.span>
- ) : null}
- </html.div>
- </html.div>
- )
-}
diff --git a/packages/components/src/components/ActionRow/index.ts b/packages/components/src/components/ActionRow/index.ts
deleted file mode 100644
index 9e1438e..0000000
--- a/packages/components/src/components/ActionRow/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export { ActionRow } from './ActionRow'
-export type { ActionRowProps } from './ActionRow'
diff --git a/packages/components/src/components/Button/styles.ts b/packages/components/src/components/Button/styles.ts
index 373e83e..3d81a2a 100644
--- a/packages/components/src/components/Button/styles.ts
+++ b/packages/components/src/components/Button/styles.ts
@@ -30,8 +30,8 @@ export const styles = css.create({
sm: {
paddingTop: tokens.space3,
paddingBottom: tokens.space3,
- paddingLeft: tokens.space5,
- paddingRight: tokens.space5,
+ paddingLeft: 22,
+ paddingRight: 22,
fontSize: tokens.fontSizeMd
},
md: {
@@ -181,7 +181,12 @@ export const styles = css.create({
color: tokens.colorTextMuted,
cursor: 'not-allowed',
boxShadow: 'none',
- opacity: 1
+ opacity: 1,
+ ':hover': {
+ backgroundColor: tokens.colorSurfaceTertiary,
+ borderColor: tokens.colorBorderPrimary,
+ color: tokens.colorTextMuted
+ }
},
disabledGhost: {
backgroundColor: 'transparent',
@@ -189,7 +194,12 @@ export const styles = css.create({
color: tokens.colorTextMuted,
cursor: 'not-allowed',
boxShadow: 'none',
- opacity: 0.5
+ opacity: 0.5,
+ ':hover': {
+ backgroundColor: 'transparent',
+ borderColor: 'transparent',
+ color: tokens.colorTextMuted
+ }
},
textBase: {
fontFamily: tokens.fontFamilySans,
diff --git a/packages/components/src/components/Card/Card.tsx b/packages/components/src/components/Card/Card.tsx
deleted file mode 100644
index adc093f..0000000
--- a/packages/components/src/components/Card/Card.tsx
+++ /dev/null
@@ -1,71 +0,0 @@
-import type { ReactNode } from 'react'
-import { html } from 'react-strict-dom'
-import { styles } from './styles'
-
-type DivElementProps = Parameters<typeof html.div>[0]
-type HeadingElementProps = Parameters<typeof html.h3>[0]
-type ParagraphElementProps = Parameters<typeof html.p>[0]
-
-export interface CardProps extends Omit<DivElementProps, 'style'> {
- children: ReactNode
-}
-
-export interface CardSectionProps extends Omit<DivElementProps, 'style'> {
- children: ReactNode
-}
-
-export interface CardTitleProps extends Omit<HeadingElementProps, 'style'> {
- children: ReactNode
-}
-
-export interface CardDescriptionProps extends Omit<ParagraphElementProps, 'style'> {
- children: ReactNode
-}
-
-export function Card({ children, ...props }: CardProps) {
- return (
- <html.div {...props} style={styles.root}>
- {children}
- </html.div>
- )
-}
-
-export function CardHeader({ children, ...props }: CardSectionProps) {
- return (
- <html.div {...props} style={styles.header}>
- {children}
- </html.div>
- )
-}
-
-export function CardTitle({ children, ...props }: CardTitleProps) {
- return (
- <html.h3 {...props} style={styles.title}>
- {children}
- </html.h3>
- )
-}
-
-export function CardDescription({ children, ...props }: CardDescriptionProps) {
- return (
- <html.p {...props} style={styles.description}>
- {children}
- </html.p>
- )
-}
-
-export function CardContent({ children, ...props }: CardSectionProps) {
- return (
- <html.div {...props} style={styles.content}>
- {children}
- </html.div>
- )
-}
-
-export function CardFooter({ children, ...props }: CardSectionProps) {
- return (
- <html.div {...props} style={styles.footer}>
- {children}
- </html.div>
- )
-}
diff --git a/packages/components/src/components/Card/index.ts b/packages/components/src/components/Card/index.ts
deleted file mode 100644
index 067a7c2..0000000
--- a/packages/components/src/components/Card/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './Card'
diff --git a/packages/components/src/components/Card/styles.ts b/packages/components/src/components/Card/styles.ts
deleted file mode 100644
index 9a45159..0000000
--- a/packages/components/src/components/Card/styles.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { css } from 'react-strict-dom'
-import { tokens } from '../../theme/tokens.css'
-
-export const styles = css.create({
- root: {
- display: 'flex',
- flexDirection: 'column',
- position: 'relative',
- padding: tokens.space6,
- gap: tokens.space5,
- borderWidth: 1,
- borderStyle: 'solid',
- borderColor: tokens.colorBorderPrimary,
- borderRadius: tokens.radiusMd,
- backgroundColor: tokens.colorSurfacePrimary,
- boxShadow: 'none'
- },
- header: {
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'stretch',
- textAlign: 'left',
- gap: tokens.space15
- },
- title: {
- margin: 0,
- color: tokens.colorTextPrimary,
- fontFamily: tokens.fontFamilyDisplay,
- fontSize: tokens.fontSizeXl,
- fontWeight: tokens.fontWeightSemibold,
- letterSpacing: '-0.01em',
- lineHeight: tokens.lineHeightSnug
- },
- description: {
- margin: 0,
- color: tokens.colorTextSecondary,
- fontFamily: tokens.fontFamilySans,
- fontSize: tokens.fontSizeBase,
- fontWeight: tokens.fontWeightRegular,
- lineHeight: tokens.lineHeightRelaxed
- },
- content: {
- display: 'flex',
- flexDirection: 'column'
- },
- footer: {
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'flex-end'
- }
-})
diff --git a/packages/components/src/components/ExternalLink/styles.ts b/packages/components/src/components/ExternalLink/styles.ts
index da8b360..9df8fdc 100644
--- a/packages/components/src/components/ExternalLink/styles.ts
+++ b/packages/components/src/components/ExternalLink/styles.ts
@@ -7,6 +7,7 @@ export const styles = css.create({
fontSize: tokens.fontSizeSm,
fontWeight: tokens.fontWeightMedium,
color: tokens.colorTextSecondary,
+ cursor: 'pointer',
textDecorationLine: 'underline',
textDecorationColor: tokens.colorTextMuted,
textUnderlineOffset: '4px',
diff --git a/packages/components/src/components/FeedbackTypeSelector/FeedbackTypeSelector.tsx b/packages/components/src/components/FeedbackTypeSelector/FeedbackTypeSelector.tsx
index 1b2c460..a736470 100644
--- a/packages/components/src/components/FeedbackTypeSelector/FeedbackTypeSelector.tsx
+++ b/packages/components/src/components/FeedbackTypeSelector/FeedbackTypeSelector.tsx
@@ -17,7 +17,7 @@ const styles = css.create({
display: 'flex',
flexDirection: 'row',
gap: 2,
- backgroundColor: tokens.colorSurfaceSecondary,
+ backgroundColor: tokens.colorBackgroundSubtle,
borderRadius: tokens.radiusMd,
padding: 4
},
@@ -42,7 +42,7 @@ const styles = css.create({
backgroundColor: 'transparent'
},
chipSelected: {
- backgroundColor: tokens.colorSurfaceHover
+ backgroundColor: tokens.colorSurfacePrimary
},
chipDisabled: {
opacity: 0.5,
@@ -60,7 +60,7 @@ const styles = css.create({
width: '100%'
},
labelDefault: {
- color: tokens.colorTextMuted
+ color: tokens.colorTextSecondary
},
labelSelected: {
color: tokens.colorTextPrimary
diff --git a/packages/components/src/components/FileDropZone/styles.ts b/packages/components/src/components/FileDropZone/styles.ts
index c6dd3b9..99c52c0 100644
--- a/packages/components/src/components/FileDropZone/styles.ts
+++ b/packages/components/src/components/FileDropZone/styles.ts
@@ -11,19 +11,19 @@ export const styles = css.create({
justifyContent: 'center',
paddingTop: tokens.space11,
paddingBottom: tokens.space11,
- paddingLeft: tokens.space7,
- paddingRight: tokens.space7,
+ paddingLeft: tokens.space11,
+ paddingRight: tokens.space11,
borderWidth: 1.5,
borderStyle: 'dashed',
borderColor: tokens.colorBorderStrong,
- borderRadius: tokens.radiusLg,
+ borderRadius: tokens.radius2xl,
backgroundColor: tokens.colorBackgroundSubtle,
cursor: 'pointer',
transitionDuration: '180ms',
transitionProperty: 'border-color, background-color, transform, padding',
':hover': {
- borderColor: tokens.colorFocusRing,
- backgroundColor: tokens.colorSurfacePrimary
+ borderColor: tokens.colorHighlight,
+ backgroundColor: tokens.colorSurfaceSecondary
}
},
cardActive: {
@@ -33,7 +33,7 @@ export const styles = css.create({
cardHasFile: {
paddingTop: tokens.space6,
paddingBottom: tokens.space6,
- backgroundColor: tokens.colorSurfacePrimary
+ backgroundColor: 'transparent'
},
cardReadOnly: {
cursor: 'default',
@@ -57,11 +57,11 @@ export const styles = css.create({
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
- width: tokens.space14,
- height: tokens.space14,
- borderRadius: tokens.radiusFull,
- backgroundColor: tokens.colorInfoSubtle,
- color: tokens.colorInfo,
+ width: 50,
+ height: 50,
+ borderRadius: 13,
+ backgroundColor: tokens.colorSurfacePrimary,
+ color: tokens.colorTextMuted,
transitionDuration: '180ms',
transitionProperty: 'background-color, transform, width, height'
},
@@ -83,9 +83,9 @@ export const styles = css.create({
title: {
fontFamily: tokens.fontFamilyDisplay,
fontSize: tokens.fontSizeLg,
- fontWeight: tokens.fontWeightSemibold,
+ fontWeight: tokens.fontWeightMedium,
letterSpacing: '-0.005em',
- color: tokens.colorTextPrimary,
+ color: tokens.colorTextSecondary,
margin: 0,
lineHeight: tokens.lineHeightSnug
},
@@ -96,7 +96,7 @@ export const styles = css.create({
fontFamily: tokens.fontFamilySans,
fontSize: tokens.fontSizeMd,
fontWeight: tokens.fontWeightRegular,
- color: tokens.colorTextMuted,
+ color: tokens.colorTextFaint,
margin: 0,
lineHeight: tokens.lineHeightRelaxed
},
@@ -105,6 +105,7 @@ export const styles = css.create({
},
link: {
color: tokens.colorInfo,
- fontWeight: tokens.fontWeightMedium
+ fontWeight: tokens.fontWeightMedium,
+ textDecorationLine: 'underline'
}
})
diff --git a/packages/components/src/components/LinkRow/LinkRow.tsx b/packages/components/src/components/LinkRow/LinkRow.tsx
index 25f5cd2..d5c59be 100644
--- a/packages/components/src/components/LinkRow/LinkRow.tsx
+++ b/packages/components/src/components/LinkRow/LinkRow.tsx
@@ -1,6 +1,7 @@
import type { ReactNode } from 'react'
import { html } from 'react-strict-dom'
import { ChevronRightIcon, CloseIcon } from '../../icons'
+import { usePressState } from '../../hooks/usePressState'
import { fileTypeColors, useTheme } from '../../theme'
import { FileKindIcon, getFileKind } from './fileKinds'
import { styles } from './styles'
@@ -13,9 +14,10 @@ interface LinkRowBaseProps {
icon?: ReactNode
iconBackground?: string
label: string
+ labelFontFamily?: string
size?: number
subtitle?: string
- subtitleTone?: 'muted' | 'success' | 'danger' | 'info'
+ subtitleTone?: 'muted' | 'faint' | 'success' | 'danger' | 'info'
description?: string
isActive?: boolean
isFirst?: boolean
@@ -48,6 +50,7 @@ export interface LinkCardProps {
const subtitleToneStyle = {
muted: styles.subtitleMuted,
+ faint: styles.subtitleFaint,
success: styles.subtitleSuccess,
danger: styles.subtitleDanger,
info: styles.subtitleInfo
@@ -69,6 +72,7 @@ export function LinkRow({
icon,
iconBackground,
label,
+ labelFontFamily,
size,
subtitle,
subtitleTone = 'muted',
@@ -90,6 +94,8 @@ export function LinkRow({
removeLabel
}: LinkRowProps) {
const { theme } = useTheme()
+ const { isPressed, pressHandlers } = usePressState()
+ const interactive = !!onPress && !disabled
const kind = file ? getFileKind(label) : null
const fileTone = kind ? fileTypeColors[kind] : null
const renderIcon = (): ReactNode => {
@@ -146,6 +152,7 @@ export function LinkRow({
return (
<>
<html.div
+ {...(interactive ? pressHandlers : {})}
aria-disabled={disabled || undefined}
onClick={disabled ? undefined : onPress}
role={onPress && !disabled ? 'button' : undefined}
@@ -156,7 +163,10 @@ export function LinkRow({
bare && styles.rowBare,
bare && isFirst && styles.rowBareFirst,
onPress && !disabled && styles.rowPressable,
- isActive && styles.rowActive
+ isActive && styles.rowActive,
+ interactive &&
+ isPressed &&
+ ({ backgroundColor: theme.colors.colorSurfacePrimary } as never)
]}
tabIndex={onPress && !disabled ? 0 : undefined}
>
@@ -178,7 +188,8 @@ export function LinkRow({
style={[
styles.label,
disabled && styles.labelDisabled,
- compact && styles.labelCompact
+ compact && styles.labelCompact,
+ labelFontFamily ? ({ fontFamily: labelFontFamily } as never) : null
]}
>
{label}
@@ -218,7 +229,14 @@ export function LinkRow({
</html.div>
{trailingContent ? <html.div style={styles.trailing}>{trailingContent}</html.div> : null}
</html.div>
- {!isLast && !bare && !standalone ? <html.div style={styles.divider} /> : null}
+ {!isLast && !bare && !standalone ? (
+ <html.div
+ style={[
+ styles.divider,
+ styles.dividerInset((compact ? 10 : 16) + (iconNode ? 36 + 12 : 0))
+ ]}
+ />
+ ) : null}
</>
)
}
diff --git a/packages/components/src/components/LinkRow/styles.ts b/packages/components/src/components/LinkRow/styles.ts
index 24a0584..9a15ed0 100644
--- a/packages/components/src/components/LinkRow/styles.ts
+++ b/packages/components/src/components/LinkRow/styles.ts
@@ -29,24 +29,23 @@ export const styles = css.create({
}
},
rowCompact: {
- gap: tokens.space25,
- paddingTop: tokens.space2,
- paddingBottom: tokens.space2,
- paddingLeft: tokens.space35,
- paddingRight: tokens.space3,
- borderRadius: tokens.radiusMd
+ gap: tokens.space3,
+ paddingTop: tokens.space25,
+ paddingBottom: tokens.space25,
+ paddingLeft: tokens.space25,
+ paddingRight: tokens.space25
},
rowStandalone: {
borderWidth: 1,
borderStyle: 'solid',
borderColor: tokens.colorBorderPrimary,
- borderRadius: tokens.radiusLg,
+ borderRadius: tokens.radiusMd,
backgroundColor: tokens.colorBackgroundSubtle,
transitionDuration: '160ms',
transitionProperty: 'background-color, border-color',
':hover': {
backgroundColor: tokens.colorSurfacePrimary,
- borderColor: tokens.colorBorderStrong
+ borderColor: tokens.colorBorderPrimary
}
},
rowBare: {
@@ -87,9 +86,9 @@ export const styles = css.create({
backgroundColor: tokens.colorSurfacePrimary
},
iconBoxCompact: {
- width: 30,
- height: 30,
- borderRadius: tokens.radiusXs
+ width: tokens.space9,
+ height: tokens.space9,
+ borderRadius: tokens.radiusMd
},
iconBoxCustom: (backgroundColor: string) => ({
backgroundColor
@@ -126,7 +125,7 @@ export const styles = css.create({
lineHeight: tokens.lineHeightSnug
},
labelCompact: {
- fontSize: tokens.fontSizeMd
+ fontSize: tokens.fontSizeBase
},
labelDisabled: {
color: tokens.colorTextMuted
@@ -141,11 +140,14 @@ export const styles = css.create({
lineHeight: tokens.lineHeightNormal
},
subtitleCompact: {
- fontSize: tokens.fontSizeXs
+ fontSize: tokens.fontSizeSm
},
subtitleMuted: {
color: tokens.colorTextMuted
},
+ subtitleFaint: {
+ color: tokens.colorTextFaint
+ },
subtitleSuccess: {
color: tokens.colorSuccess
},
@@ -204,7 +206,7 @@ export const styles = css.create({
},
progressUploading: {
width: '66.6667%',
- backgroundColor: tokens.colorTextPrimary
+ backgroundColor: tokens.colorInfo
},
progressCompleted: {
width: '100%',
@@ -212,7 +214,7 @@ export const styles = css.create({
},
progressDynamic: (percent: number) => ({
width: `${percent}%`,
- backgroundColor: tokens.colorTextPrimary
+ backgroundColor: tokens.colorInfo
}),
trailing: {
marginLeft: 'auto',
@@ -222,9 +224,11 @@ export const styles = css.create({
},
divider: {
height: 1,
- marginLeft: 64,
backgroundColor: tokens.colorBorderPrimary
},
+ dividerInset: (marginLeft: number) => ({
+ marginLeft
+ }),
removeButton: {
flexShrink: 0,
width: tokens.space8,
@@ -237,19 +241,19 @@ export const styles = css.create({
borderRadius: tokens.radiusSm,
backgroundColor: 'transparent',
padding: 0,
- color: tokens.colorTextMuted,
+ color: tokens.colorTextFaint,
cursor: 'pointer',
transitionDuration: '150ms',
transitionProperty: 'color, background-color',
transitionTimingFunction: 'ease',
':hover': {
- color: tokens.colorTextPrimary,
+ color: tokens.colorTextSecondary,
backgroundColor: tokens.colorSurfacePrimary
}
},
removeButtonCompact: {
- width: 26,
- height: 26,
- borderRadius: tokens.radiusXs
+ width: tokens.space7,
+ height: tokens.space7,
+ borderRadius: tokens.radiusSm
}
})
diff --git a/packages/components/src/components/ListItem/ListItem.tsx b/packages/components/src/components/ListItem/ListItem.tsx
new file mode 100644
index 0000000..79b0863
--- /dev/null
+++ b/packages/components/src/components/ListItem/ListItem.tsx
@@ -0,0 +1,113 @@
+import { cloneElement, isValidElement, type ReactElement, type ReactNode } from 'react'
+import { html } from 'react-strict-dom'
+import { ChevronRightIcon } from '../../icons'
+import { usePressState } from '../../hooks/usePressState'
+import { useTheme } from '../../theme'
+import { styles } from './styles'
+
+export interface ListItemProps {
+ icon: ReactNode
+ label: string
+ onClick: () => void
+ active?: boolean
+ collapsed?: boolean
+ showDot?: boolean
+ chevron?: boolean
+ tone?: 'default' | 'danger'
+ variant?: 'default' | 'plain'
+ size?: 'default' | 'large'
+ square?: boolean
+ subtitle?: string
+}
+
+export function ListItem({
+ icon,
+ label,
+ onClick,
+ active = false,
+ collapsed = false,
+ showDot = false,
+ chevron = false,
+ tone = 'default',
+ variant = 'default',
+ size = 'default',
+ square = false,
+ subtitle
+}: ListItemProps) {
+ const { theme } = useTheme()
+ const c = theme.colors
+ const { isHovered, isPressed, pressHandlers } = usePressState()
+ const hot = isHovered || isPressed
+ const large = size === 'large' && !collapsed
+
+ const contentColor = active
+ ? c.colorTextPrimary
+ : tone === 'danger'
+ ? c.colorDanger
+ : variant === 'plain'
+ ? c.colorTextPrimary
+ : hot
+ ? c.colorTextPrimary
+ : c.colorTextSecondary
+
+ const backgroundColor = active
+ ? c.colorOverlaySelected
+ : tone === 'danger'
+ ? hot
+ ? c.colorDangerSubtle
+ : 'transparent'
+ : hot
+ ? c.colorOverlayHover
+ : 'transparent'
+
+ const iconEl = isValidElement(icon)
+ ? cloneElement(icon as ReactElement<{ color?: string }>, { color: contentColor })
+ : icon
+
+ const iconSlot = (
+ <html.div style={styles.iconSlot}>
+ {iconEl}
+ {showDot ? <html.div style={styles.dot} /> : null}
+ </html.div>
+ )
+
+ return (
+ <html.button
+ {...pressHandlers}
+ type='button'
+ onClick={onClick}
+ aria-label={label}
+ aria-current={active ? 'page' : undefined}
+ style={[
+ styles.base,
+ collapsed ? styles.collapsed : styles.expanded,
+ large && styles.expandedLarge,
+ square && styles.square,
+ { backgroundColor } as never
+ ]}
+ >
+ {collapsed ? (
+ iconSlot
+ ) : (
+ <>
+ <html.div style={[styles.left, large && styles.leftLarge]}>
+ {iconSlot}
+ {subtitle ? (
+ <html.div style={styles.textColumn}>
+ <html.span style={[styles.label, { color: contentColor } as never]}>
+ {label}
+ </html.span>
+ <html.span style={styles.subtitle}>{subtitle}</html.span>
+ </html.div>
+ ) : (
+ <html.span style={[styles.label, { color: contentColor } as never]}>
+ {label}
+ </html.span>
+ )}
+ </html.div>
+ {chevron ? <ChevronRightIcon size={14} color={contentColor} /> : null}
+ </>
+ )}
+ </html.button>
+ )
+}
diff --git a/packages/components/src/components/ListItem/index.ts b/packages/components/src/components/ListItem/index.ts
new file mode 100644
index 0000000..444fdb6
--- /dev/null
+++ b/packages/components/src/components/ListItem/index.ts
@@ -0,0 +1,2 @@
+export { ListItem } from './ListItem'
+export type { ListItemProps } from './ListItem'
diff --git a/packages/components/src/components/ListItem/styles.ts b/packages/components/src/components/ListItem/styles.ts
new file mode 100644
index 0000000..e539b91
--- /dev/null
+++ b/packages/components/src/components/ListItem/styles.ts
@@ -0,0 +1,106 @@
+import { css } from 'react-strict-dom'
+import { tokens } from '../../theme/tokens.css'
+
+export const styles = css.create({
+ base: {
+ display: 'flex',
+ flexDirection: 'row',
+ alignItems: 'center',
+ boxSizing: 'border-box',
+ borderWidth: 0,
+ borderStyle: 'solid',
+ borderRadius: tokens.radiusMd,
+ padding: 0,
+ fontFamily: tokens.fontFamilySans,
+ fontSize: tokens.fontSizeBase,
+ fontWeight: tokens.fontWeightMedium,
+ lineHeight: tokens.lineHeightTight,
+ textAlign: 'left',
+ cursor: 'pointer',
+ userSelect: 'none',
+ outlineStyle: 'none',
+ transitionDuration: '120ms',
+ transitionProperty: 'background-color, color',
+ transitionTimingFunction: 'ease',
+ ':focus-visible': {
+ boxShadow: `0 0 0 2px ${tokens.colorFocusRing}`
+ }
+ },
+ expanded: {
+ width: '100%',
+ justifyContent: 'space-between',
+ gap: tokens.space25,
+ paddingLeft: tokens.space3,
+ paddingRight: tokens.space3,
+ paddingTop: tokens.space25,
+ paddingBottom: tokens.space25
+ },
+ expandedLarge: {
+ minHeight: tokens.space14,
+ gap: tokens.space3,
+ paddingLeft: tokens.space5,
+ paddingRight: tokens.space5,
+ paddingTop: tokens.space4,
+ paddingBottom: tokens.space4,
+ fontSize: tokens.fontSizeLg,
+ fontWeight: tokens.fontWeightSemibold
+ },
+ collapsed: {
+ width: tokens.space10,
+ height: tokens.space10,
+ justifyContent: 'center'
+ },
+ square: {
+ borderRadius: 0
+ },
+ left: {
+ display: 'flex',
+ flexDirection: 'row',
+ alignItems: 'center',
+ minWidth: 0,
+ gap: tokens.space25
+ },
+ leftLarge: {
+ gap: tokens.space3
+ },
+ iconSlot: {
+ position: 'relative',
+ display: 'flex',
+ flexShrink: 0,
+ alignItems: 'center',
+ justifyContent: 'center'
+ },
+ dot: {
+ position: 'absolute',
+ top: -2,
+ right: -4,
+ width: tokens.space2,
+ height: tokens.space2,
+ borderRadius: tokens.radiusFull,
+ backgroundColor: tokens.colorSuccess,
+ boxShadow: `0 0 0 2px ${tokens.colorBackgroundDeep}`
+ },
+ textColumn: {
+ display: 'flex',
+ flexDirection: 'column',
+ minWidth: 0,
+ gap: 2
+ },
+ label: {
+ margin: 0,
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ whiteSpace: 'nowrap',
+ lineHeight: tokens.lineHeightTight
+ },
+ subtitle: {
+ margin: 0,
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ whiteSpace: 'nowrap',
+ fontSize: tokens.fontSizeSm,
+ fontWeight: tokens.fontWeightRegular,
+ lineHeight: tokens.lineHeightTight,
+ color: tokens.colorTextMuted
+ }
+})
diff --git a/packages/components/src/components/WaitingRadar/WaitingRadar.tsx b/packages/components/src/components/WaitingRadar/WaitingRadar.tsx
index f7bf027..25be81b 100644
--- a/packages/components/src/components/WaitingRadar/WaitingRadar.tsx
+++ b/packages/components/src/components/WaitingRadar/WaitingRadar.tsx
@@ -55,7 +55,8 @@ export function WaitingRadar({ icon, color, pulsing, size = 176 }: WaitingRadarP
animationDuration: `${RADAR_DURATION_MS}ms`,
animationDelay: `${(i * RADAR_DURATION_MS) / RADAR_RINGS}ms`,
animationTimingFunction: 'cubic-bezier(0.25, 0, 0, 1)',
- animationIterationCount: 'infinite'
+ animationIterationCount: 'infinite',
+ animationFillMode: 'backwards'
} as never
]}
/>
diff --git a/packages/components/src/components/WaitingState/WaitingState.tsx b/packages/components/src/components/WaitingState/WaitingState.tsx
new file mode 100644
index 0000000..b73c0da
--- /dev/null
+++ b/packages/components/src/components/WaitingState/WaitingState.tsx
@@ -0,0 +1,31 @@
+import { cloneElement, isValidElement, type ReactElement, type ReactNode } from 'react'
+import { html } from 'react-strict-dom'
+import { WaitingRadar } from '../WaitingRadar'
+import { useTheme } from '../../theme'
+import { styles } from './styles'
+
+export interface WaitingStateProps {
+ icon: ReactNode
+ title: string
+ description?: string
+ size?: number
+}
+
+export function WaitingState({ icon, title, description, size = 140 }: WaitingStateProps) {
+ const { theme } = useTheme()
+ const c = theme.colors
+
+ const iconEl = isValidElement(icon)
+ ? cloneElement(icon as ReactElement<{ color?: string }>, { color: c.colorInfo })
+ : icon
+
+ return (
+ <html.div style={styles.wrap}>
+ <WaitingRadar size={size} color={c.colorInfo} pulsing icon={iconEl} />
+ <html.div style={styles.text}>
+ <html.p style={styles.title}>{title}</html.p>
+ {description ? <html.p style={styles.description}>{description}</html.p> : null}
+ </html.div>
+ </html.div>
+ )
+}
diff --git a/packages/components/src/components/WaitingState/index.ts b/packages/components/src/components/WaitingState/index.ts
new file mode 100644
index 0000000..b831003
--- /dev/null
+++ b/packages/components/src/components/WaitingState/index.ts
@@ -0,0 +1,2 @@
+export { WaitingState } from './WaitingState'
+export type { WaitingStateProps } from './WaitingState'
diff --git a/packages/components/src/components/WaitingState/styles.ts b/packages/components/src/components/WaitingState/styles.ts
new file mode 100644
index 0000000..547fb8f
--- /dev/null
+++ b/packages/components/src/components/WaitingState/styles.ts
@@ -0,0 +1,36 @@
+import { css } from 'react-strict-dom'
+import { tokens } from '../../theme/tokens.css'
+
+export const styles = css.create({
+ wrap: {
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+ gap: 28
+ },
+ text: {
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+ gap: 8
+ },
+ title: {
+ margin: 0,
+ fontFamily: tokens.fontFamilyDisplay,
+ fontSize: 20,
+ fontWeight: tokens.fontWeightSemibold,
+ color: tokens.colorTextPrimary,
+ textAlign: 'center',
+ lineHeight: tokens.lineHeightSnug
+ },
+ description: {
+ margin: 0,
+ maxWidth: 300,
+ fontFamily: tokens.fontFamilySans,
+ fontSize: 14,
+ fontWeight: tokens.fontWeightRegular,
+ color: tokens.colorTextMuted,
+ textAlign: 'center',
+ lineHeight: tokens.lineHeightRelaxed
+ }
+})
diff --git a/packages/components/src/components/index.ts b/packages/components/src/components/index.ts
index 416bbdf..89f4c0e 100644
--- a/packages/components/src/components/index.ts
+++ b/packages/components/src/components/index.ts
@@ -1,10 +1,9 @@
-export * from './ActionRow/index'
export * from './Badge/index'
export * from './Button/index'
-export * from './Card/index'
export * from './Input/index'
export * from './Tabs/index'
export * from './FileDropZone/index'
+export * from './ListItem/index'
export * from './Disclosure/index'
export * from './ErrorBoundary/index'
export * from './ErrorBanner/index'
@@ -17,4 +16,5 @@ export * from './ToggleSwitch/index'
export * from './FeedbackTypeSelector/index'
export * from './LinkRow/index'
export * from './WaitingRadar/index'
+export * from './WaitingState/index'
export * from './Spinner/index'
diff --git a/packages/components/src/icons/set.tsx b/packages/components/src/icons/set.tsx
index f6d04c5..095e188 100644
--- a/packages/components/src/icons/set.tsx
+++ b/packages/components/src/icons/set.tsx
@@ -24,6 +24,7 @@ import {
Folder,
Globe,
Image,
+ Info,
Laptop,
Lock,
Mail,
@@ -32,6 +33,9 @@ import {
MoreHorizontal,
MoreVertical,
Music,
+ PanelLeft,
+ PanelLeftClose,
+ PanelLeftOpen,
Pencil,
Plus,
QrCode,
@@ -39,6 +43,7 @@ import {
Settings,
Share2,
Shield,
+ SlidersHorizontal,
Smartphone,
Tablet,
Trash2,
@@ -74,6 +79,7 @@ export const FileTextIcon = adaptLucide(FileText)
export const FolderIcon = adaptLucide(Folder)
export const GlobeIcon = adaptLucide(Globe)
export const ImageIcon = adaptLucide(Image)
+export const InfoIcon = adaptLucide(Info)
export const LaptopIcon = adaptLucide(Laptop)
export const MonitorIcon = adaptLucide(Monitor)
export const TabletIcon = adaptLucide(Tablet)
@@ -83,6 +89,9 @@ export const MenuIcon = adaptLucide(Menu)
export const MoreHorizontalIcon = adaptLucide(MoreHorizontal)
export const MoreVerticalIcon = adaptLucide(MoreVertical)
export const MusicIcon = adaptLucide(Music)
+export const PanelLeftIcon = adaptLucide(PanelLeft)
+export const PanelLeftCloseIcon = adaptLucide(PanelLeftClose)
+export const PanelLeftOpenIcon = adaptLucide(PanelLeftOpen)
export const PencilIcon = adaptLucide(Pencil)
export const PlusIcon = adaptLucide(Plus)
export const QrCodeIcon = adaptLucide(QrCode)
@@ -90,6 +99,7 @@ export const SendIcon = adaptLucide(Send)
export const SettingsIcon = adaptLucide(Settings)
export const ShareIcon = adaptLucide(Share2)
export const ShieldIcon = adaptLucide(Shield)
+export const SlidersHorizontalIcon = adaptLucide(SlidersHorizontal)
export const SmartphoneIcon = adaptLucide(Smartphone)
export const TrashIcon = adaptLucide(Trash2)
export const UploadIcon = adaptLucide(Upload)
diff --git a/packages/components/src/theme/Theme.stories.tsx b/packages/components/src/theme/Theme.stories.tsx
index 15800b8..fe0e1fe 100644
--- a/packages/components/src/theme/Theme.stories.tsx
+++ b/packages/components/src/theme/Theme.stories.tsx
@@ -28,14 +28,16 @@ const styles = css.create({
title: {
margin: 0,
fontSize: 32,
- fontFamily: '"Aptos", "SF Pro Text", "Helvetica Neue", sans-serif',
+ fontFamily:
+ '-apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, system-ui, sans-serif',
fontWeight: '700',
letterSpacing: '-0.03em'
},
description: {
margin: 0,
fontSize: 16,
- fontFamily: '"Aptos", "SF Pro Text", "Helvetica Neue", sans-serif',
+ fontFamily:
+ '-apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, system-ui, sans-serif',
lineHeight: 1.6
},
section: {
@@ -62,7 +64,8 @@ const styles = css.create({
tokenName: {
margin: 0,
fontSize: 14,
- fontFamily: '"Aptos", "SF Pro Text", "Helvetica Neue", sans-serif',
+ fontFamily:
+ '-apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, system-ui, sans-serif',
fontWeight: '600'
},
tokenValue: {
diff --git a/packages/components/src/theme/fileTypeColors.ts b/packages/components/src/theme/fileTypeColors.ts
index c4535c1..1dd6516 100644
--- a/packages/components/src/theme/fileTypeColors.ts
+++ b/packages/components/src/theme/fileTypeColors.ts
@@ -1,14 +1,14 @@
export type FileTypeColor = { fg: string; bg: string }
export const fileTypeColors = {
- image: { fg: '#60a5fa', bg: 'rgba(59, 130, 246, 0.14)' },
- video: { fg: '#fb7185', bg: 'rgba(244, 63, 94, 0.14)' },
- pdf: { fg: '#f87171', bg: 'rgba(239, 68, 68, 0.14)' },
- audio: { fg: '#c084fc', bg: 'rgba(168, 85, 247, 0.14)' },
- archive: { fg: '#facc15', bg: 'rgba(234, 179, 8, 0.14)' },
- app: { fg: '#f3efe8', bg: 'rgba(243, 239, 232, 0.10)' },
- code: { fg: '#5eead4', bg: 'rgba(20, 184, 166, 0.14)' },
- generic: { fg: '#cbd5e1', bg: 'rgba(148, 163, 184, 0.12)' }
+ image: { fg: '#68a0f5', bg: 'rgba(104, 160, 245, 0.18)' },
+ video: { fg: '#ef8096', bg: 'rgba(239, 128, 150, 0.18)' },
+ pdf: { fg: '#ec7d6f', bg: 'rgba(236, 125, 111, 0.18)' },
+ audio: { fg: '#b78ae8', bg: 'rgba(183, 138, 232, 0.18)' },
+ archive: { fg: '#e0b34e', bg: 'rgba(224, 179, 78, 0.18)' },
+ app: { fg: '#c2c8d2', bg: 'rgba(194, 200, 210, 0.14)' },
+ code: { fg: '#5fd3bf', bg: 'rgba(95, 211, 191, 0.18)' },
+ generic: { fg: '#aeb6c4', bg: 'rgba(174, 182, 196, 0.14)' }
} as const satisfies Record<string, FileTypeColor>
export type FileTypeKey = keyof typeof fileTypeColors
diff --git a/packages/components/src/theme/fontFamily.test.ts b/packages/components/src/theme/fontFamily.test.ts
index 247b1a3..eb8fe0f 100644
--- a/packages/components/src/theme/fontFamily.test.ts
+++ b/packages/components/src/theme/fontFamily.test.ts
@@ -15,9 +15,7 @@ import tokenSource from './tokens.json'
describe('font family tokens', () => {
it('uses the native Latin stack for default sans and display UI text', () => {
expect(rawTokens.fontFamily.fontFamilySans).toBe(LATIN_FONT_FAMILY_CSS)
- expect(rawTokens.fontFamily.fontFamilyDisplay).toBe(
- '"SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif'
- )
+ expect(rawTokens.fontFamily.fontFamilyDisplay).toBe(LATIN_FONT_FAMILY_CSS)
expect(rawTokens.fontFamily.fontFamilySans).not.toContain('AlterSend Sans')
expect(rawTokens.fontFamily.fontFamilyDisplay).not.toContain('AlterSend Sans')
})
diff --git a/packages/components/src/theme/fontThemes.css.ts b/packages/components/src/theme/fontThemes.css.ts
index ba7a911..78d54e0 100644
--- a/packages/components/src/theme/fontThemes.css.ts
+++ b/packages/components/src/theme/fontThemes.css.ts
@@ -5,8 +5,10 @@ import type { FontFamilyKey } from './fonts'
type FontThemeStyle = ReturnType<typeof css.createTheme>
const latinFontThemeStyle = css.createTheme(tokens, {
- fontFamilySans: '"SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif',
- fontFamilyDisplay: '"SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif',
+ fontFamilySans:
+ '-apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, system-ui, sans-serif',
+ fontFamilyDisplay:
+ '-apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, system-ui, sans-serif',
fontFamilyMono:
'ui-monospace, "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace'
})
diff --git a/packages/components/src/theme/fonts.ts b/packages/components/src/theme/fonts.ts
index 9e9a788..61e4836 100644
--- a/packages/components/src/theme/fonts.ts
+++ b/packages/components/src/theme/fonts.ts
@@ -13,7 +13,8 @@ export interface BundledFontFamily {
}
export const DEFAULT_FONT_FAMILY_KEY: FontFamilyKey = 'latin'
-export const LATIN_FONT_FAMILY_CSS = '"SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif'
+export const LATIN_FONT_FAMILY_CSS =
+ '-apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, system-ui, sans-serif'
export const MONO_FONT_FAMILY_CSS =
'ui-monospace, "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace'
export const MONO_FONT_FAMILY_NATIVE = {
diff --git a/packages/components/src/theme/tailwind-theme.css b/packages/components/src/theme/tailwind-theme.css
index 9d56e5c..63980b9 100644
--- a/packages/components/src/theme/tailwind-theme.css
+++ b/packages/components/src/theme/tailwind-theme.css
@@ -5,21 +5,23 @@
:root,
[data-theme='dark'] {
--as-color-background: #16181d;
- --as-color-background-subtle: #1b1f25;
- --as-color-surface-primary: #20242b;
- --as-color-surface-secondary: #252b33;
- --as-color-surface-tertiary: #2d343d;
- --as-color-surface-hover: #353d47;
- --as-color-surface-accent: #f3efe8;
- --as-color-border-primary: rgba(255, 255, 255, 0.06);
- --as-color-border-strong: rgba(255, 255, 255, 0.12);
- --as-color-text-primary: #f6f2eb;
- --as-color-text-secondary: #cbc4b8;
- --as-color-text-muted: #8f897e;
- --as-color-accent: #f3efe8;
+ --as-color-background-deep: #0f1116;
+ --as-color-background-subtle: #21262f;
+ --as-color-surface-primary: #2b313c;
+ --as-color-surface-secondary: #323945;
+ --as-color-surface-tertiary: #3a414e;
+ --as-color-surface-hover: #434b58;
+ --as-color-surface-accent: #e7eaf0;
+ --as-color-border-primary: #282d35;
+ --as-color-border-strong: #3d4551;
+ --as-color-text-primary: #e7eaf0;
+ --as-color-text-secondary: #c4ccd9;
+ --as-color-text-muted: #98a1b3;
+ --as-color-text-faint: #5e6678;
+ --as-color-accent: #e8ebf2;
--as-color-accent-hover: #ffffff;
- --as-color-accent-active: #ddd7cf;
- --as-color-on-accent: #141517;
+ --as-color-accent-active: #d5dae3;
+ --as-color-on-accent: #0b0f17;
--as-color-success: #8ab86d;
--as-color-success-subtle: rgba(138, 184, 109, 0.12);
--as-color-warning: #d4a04a;
@@ -28,11 +30,13 @@
--as-color-danger-subtle: rgba(215, 113, 113, 0.12);
--as-color-info: #608aff;
--as-color-info-subtle: rgba(96, 138, 255, 0.12);
- --as-color-accent-subtle: rgba(243, 239, 232, 0.08);
+ --as-color-accent-subtle: rgba(232, 235, 242, 0.08);
--as-color-scrim: #000000;
--as-color-shadow: rgba(0, 0, 0, 0.18);
--as-color-highlight: rgba(255, 255, 255, 0.22);
- --as-color-focus-ring: #d7d1c7;
+ --as-color-overlay-selected: rgba(255, 255, 255, 0.06);
+ --as-color-overlay-hover: rgba(255, 255, 255, 0.04);
+ --as-color-focus-ring: #aab2c2;
--as-space0: 0px;
--as-space05: 2px;
--as-space1: 4px;
@@ -74,13 +78,14 @@
--as-line-height-snug: 1.35;
--as-line-height-normal: 1.4;
--as-line-height-relaxed: 1.5;
- --as-font-family-sans: "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
- --as-font-family-display: "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
+ --as-font-family-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, system-ui, sans-serif;
+ --as-font-family-display: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, system-ui, sans-serif;
--as-font-family-mono: ui-monospace, "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
}
[data-theme='light'] {
--as-color-background: #ece8e1;
+ --as-color-background-deep: #e2dccf;
--as-color-background-subtle: #f3efe8;
--as-color-surface-primary: #faf7f1;
--as-color-surface-secondary: #ffffff;
@@ -92,6 +97,7 @@
--as-color-text-primary: #181a1d;
--as-color-text-secondary: #4f4a42;
--as-color-text-muted: #787168;
+ --as-color-text-faint: #807970;
--as-color-accent: #181a1d;
--as-color-accent-hover: #000000;
--as-color-accent-active: #31353b;
@@ -108,5 +114,7 @@
--as-color-scrim: #000000;
--as-color-shadow: rgba(0, 0, 0, 0.10);
--as-color-highlight: rgba(255, 255, 255, 0.50);
+ --as-color-overlay-selected: rgba(0, 0, 0, 0.06);
+ --as-color-overlay-hover: rgba(0, 0, 0, 0.04);
--as-color-focus-ring: #272a2f;
}
diff --git a/packages/components/src/theme/themes/dark.css.ts b/packages/components/src/theme/themes/dark.css.ts
index fd1ef63..3ba4443 100644
--- a/packages/components/src/theme/themes/dark.css.ts
+++ b/packages/components/src/theme/themes/dark.css.ts
@@ -7,21 +7,23 @@ import { tokens } from '../tokens.css';
export const darkThemeStyle = css.createTheme(tokens, {
colorBackground: '#16181d',
- colorBackgroundSubtle: '#1b1f25',
- colorSurfacePrimary: '#20242b',
- colorSurfaceSecondary: '#252b33',
- colorSurfaceTertiary: '#2d343d',
- colorSurfaceHover: '#353d47',
- colorSurfaceAccent: '#f3efe8',
- colorBorderPrimary: 'rgba(255, 255, 255, 0.06)',
- colorBorderStrong: 'rgba(255, 255, 255, 0.12)',
- colorTextPrimary: '#f6f2eb',
- colorTextSecondary: '#cbc4b8',
- colorTextMuted: '#8f897e',
- colorAccent: '#f3efe8',
+ colorBackgroundDeep: '#0f1116',
+ colorBackgroundSubtle: '#21262f',
+ colorSurfacePrimary: '#2b313c',
+ colorSurfaceSecondary: '#323945',
+ colorSurfaceTertiary: '#3a414e',
+ colorSurfaceHover: '#434b58',
+ colorSurfaceAccent: '#e7eaf0',
+ colorBorderPrimary: '#282d35',
+ colorBorderStrong: '#3d4551',
+ colorTextPrimary: '#e7eaf0',
+ colorTextSecondary: '#c4ccd9',
+ colorTextMuted: '#98a1b3',
+ colorTextFaint: '#5e6678',
+ colorAccent: '#e8ebf2',
colorAccentHover: '#ffffff',
- colorAccentActive: '#ddd7cf',
- colorOnAccent: '#141517',
+ colorAccentActive: '#d5dae3',
+ colorOnAccent: '#0b0f17',
colorSuccess: '#8ab86d',
colorSuccessSubtle: 'rgba(138, 184, 109, 0.12)',
colorWarning: '#d4a04a',
@@ -30,9 +32,11 @@ export const darkThemeStyle = css.createTheme(tokens, {
colorDangerSubtle: 'rgba(215, 113, 113, 0.12)',
colorInfo: '#608aff',
colorInfoSubtle: 'rgba(96, 138, 255, 0.12)',
- colorAccentSubtle: 'rgba(243, 239, 232, 0.08)',
+ colorAccentSubtle: 'rgba(232, 235, 242, 0.08)',
colorScrim: '#000000',
colorShadow: 'rgba(0, 0, 0, 0.18)',
colorHighlight: 'rgba(255, 255, 255, 0.22)',
- colorFocusRing: '#d7d1c7',
+ colorOverlaySelected: 'rgba(255, 255, 255, 0.06)',
+ colorOverlayHover: 'rgba(255, 255, 255, 0.04)',
+ colorFocusRing: '#aab2c2',
});
diff --git a/packages/components/src/theme/themes/dark.ts b/packages/components/src/theme/themes/dark.ts
index 88221fb..3d4dcdb 100644
--- a/packages/components/src/theme/themes/dark.ts
+++ b/packages/components/src/theme/themes/dark.ts
@@ -7,21 +7,23 @@ import type { Theme } from '../types';
export const darkTheme: Theme = {
colors: {
colorBackground: '#16181d',
- colorBackgroundSubtle: '#1b1f25',
- colorSurfacePrimary: '#20242b',
- colorSurfaceSecondary: '#252b33',
- colorSurfaceTertiary: '#2d343d',
- colorSurfaceHover: '#353d47',
- colorSurfaceAccent: '#f3efe8',
- colorBorderPrimary: 'rgba(255, 255, 255, 0.06)',
- colorBorderStrong: 'rgba(255, 255, 255, 0.12)',
- colorTextPrimary: '#f6f2eb',
- colorTextSecondary: '#cbc4b8',
- colorTextMuted: '#8f897e',
- colorAccent: '#f3efe8',
+ colorBackgroundDeep: '#0f1116',
+ colorBackgroundSubtle: '#21262f',
+ colorSurfacePrimary: '#2b313c',
+ colorSurfaceSecondary: '#323945',
+ colorSurfaceTertiary: '#3a414e',
+ colorSurfaceHover: '#434b58',
+ colorSurfaceAccent: '#e7eaf0',
+ colorBorderPrimary: '#282d35',
+ colorBorderStrong: '#3d4551',
+ colorTextPrimary: '#e7eaf0',
+ colorTextSecondary: '#c4ccd9',
+ colorTextMuted: '#98a1b3',
+ colorTextFaint: '#5e6678',
+ colorAccent: '#e8ebf2',
colorAccentHover: '#ffffff',
- colorAccentActive: '#ddd7cf',
- colorOnAccent: '#141517',
+ colorAccentActive: '#d5dae3',
+ colorOnAccent: '#0b0f17',
colorSuccess: '#8ab86d',
colorSuccessSubtle: 'rgba(138, 184, 109, 0.12)',
colorWarning: '#d4a04a',
@@ -30,10 +32,12 @@ export const darkTheme: Theme = {
colorDangerSubtle: 'rgba(215, 113, 113, 0.12)',
colorInfo: '#608aff',
colorInfoSubtle: 'rgba(96, 138, 255, 0.12)',
- colorAccentSubtle: 'rgba(243, 239, 232, 0.08)',
+ colorAccentSubtle: 'rgba(232, 235, 242, 0.08)',
colorScrim: '#000000',
colorShadow: 'rgba(0, 0, 0, 0.18)',
colorHighlight: 'rgba(255, 255, 255, 0.22)',
- colorFocusRing: '#d7d1c7',
+ colorOverlaySelected: 'rgba(255, 255, 255, 0.06)',
+ colorOverlayHover: 'rgba(255, 255, 255, 0.04)',
+ colorFocusRing: '#aab2c2',
},
};
diff --git a/packages/components/src/theme/themes/light.css.ts b/packages/components/src/theme/themes/light.css.ts
index 05770d4..f95b85e 100644
--- a/packages/components/src/theme/themes/light.css.ts
+++ b/packages/components/src/theme/themes/light.css.ts
@@ -7,6 +7,7 @@ import { tokens } from '../tokens.css';
export const lightThemeStyle = css.createTheme(tokens, {
colorBackground: '#ece8e1',
+ colorBackgroundDeep: '#e2dccf',
colorBackgroundSubtle: '#f3efe8',
colorSurfacePrimary: '#faf7f1',
colorSurfaceSecondary: '#ffffff',
@@ -18,6 +19,7 @@ export const lightThemeStyle = css.createTheme(tokens, {
colorTextPrimary: '#181a1d',
colorTextSecondary: '#4f4a42',
colorTextMuted: '#787168',
+ colorTextFaint: '#807970',
colorAccent: '#181a1d',
colorAccentHover: '#000000',
colorAccentActive: '#31353b',
@@ -34,5 +36,7 @@ export const lightThemeStyle = css.createTheme(tokens, {
colorScrim: '#000000',
colorShadow: 'rgba(0, 0, 0, 0.10)',
colorHighlight: 'rgba(255, 255, 255, 0.50)',
+ colorOverlaySelected: 'rgba(0, 0, 0, 0.06)',
+ colorOverlayHover: 'rgba(0, 0, 0, 0.04)',
colorFocusRing: '#272a2f',
});
diff --git a/packages/components/src/theme/themes/light.ts b/packages/components/src/theme/themes/light.ts
index a3693af..7446218 100644
--- a/packages/components/src/theme/themes/light.ts
+++ b/packages/components/src/theme/themes/light.ts
@@ -7,6 +7,7 @@ import type { Theme } from '../types';
export const lightTheme: Theme = {
colors: {
colorBackground: '#ece8e1',
+ colorBackgroundDeep: '#e2dccf',
colorBackgroundSubtle: '#f3efe8',
colorSurfacePrimary: '#faf7f1',
colorSurfaceSecondary: '#ffffff',
@@ -18,6 +19,7 @@ export const lightTheme: Theme = {
colorTextPrimary: '#181a1d',
colorTextSecondary: '#4f4a42',
colorTextMuted: '#787168',
+ colorTextFaint: '#807970',
colorAccent: '#181a1d',
colorAccentHover: '#000000',
colorAccentActive: '#31353b',
@@ -34,6 +36,8 @@ export const lightTheme: Theme = {
colorScrim: '#000000',
colorShadow: 'rgba(0, 0, 0, 0.10)',
colorHighlight: 'rgba(255, 255, 255, 0.50)',
+ colorOverlaySelected: 'rgba(0, 0, 0, 0.06)',
+ colorOverlayHover: 'rgba(0, 0, 0, 0.04)',
colorFocusRing: '#272a2f',
},
};
diff --git a/packages/components/src/theme/tokens.css.native.ts b/packages/components/src/theme/tokens.css.native.ts
index 41fdba1..3d93a79 100644
--- a/packages/components/src/theme/tokens.css.native.ts
+++ b/packages/components/src/theme/tokens.css.native.ts
@@ -37,21 +37,23 @@ const nativeFontFamily =
export const tokens = css.defineVars({
colorBackground: '#16181d',
- colorBackgroundSubtle: '#1b1f25',
- colorSurfacePrimary: '#20242b',
- colorSurfaceSecondary: '#252b33',
- colorSurfaceTertiary: '#2d343d',
- colorSurfaceHover: '#353d47',
- colorSurfaceAccent: '#f3efe8',
- colorBorderPrimary: 'rgba(255, 255, 255, 0.06)',
- colorBorderStrong: 'rgba(255, 255, 255, 0.12)',
- colorTextPrimary: '#f6f2eb',
- colorTextSecondary: '#cbc4b8',
- colorTextMuted: '#8f897e',
- colorAccent: '#f3efe8',
+ colorBackgroundDeep: '#0f1116',
+ colorBackgroundSubtle: '#21262f',
+ colorSurfacePrimary: '#2b313c',
+ colorSurfaceSecondary: '#323945',
+ colorSurfaceTertiary: '#3a414e',
+ colorSurfaceHover: '#434b58',
+ colorSurfaceAccent: '#e7eaf0',
+ colorBorderPrimary: '#282d35',
+ colorBorderStrong: '#3d4551',
+ colorTextPrimary: '#e7eaf0',
+ colorTextSecondary: '#c4ccd9',
+ colorTextMuted: '#98a1b3',
+ colorTextFaint: '#5e6678',
+ colorAccent: '#e8ebf2',
colorAccentHover: '#ffffff',
- colorAccentActive: '#ddd7cf',
- colorOnAccent: '#141517',
+ colorAccentActive: '#d5dae3',
+ colorOnAccent: '#0b0f17',
colorSuccess: '#8ab86d',
colorSuccessSubtle: 'rgba(138, 184, 109, 0.12)',
colorWarning: '#d4a04a',
@@ -60,11 +62,13 @@ export const tokens = css.defineVars({
colorDangerSubtle: 'rgba(215, 113, 113, 0.12)',
colorInfo: '#608aff',
colorInfoSubtle: 'rgba(96, 138, 255, 0.12)',
- colorAccentSubtle: 'rgba(243, 239, 232, 0.08)',
+ colorAccentSubtle: 'rgba(232, 235, 242, 0.08)',
colorScrim: '#000000',
colorShadow: 'rgba(0, 0, 0, 0.18)',
colorHighlight: 'rgba(255, 255, 255, 0.22)',
- colorFocusRing: '#d7d1c7',
+ colorOverlaySelected: 'rgba(255, 255, 255, 0.06)',
+ colorOverlayHover: 'rgba(255, 255, 255, 0.04)',
+ colorFocusRing: '#aab2c2',
space0: '0px',
space05: '2px',
space1: '4px',
diff --git a/packages/components/src/theme/tokens.css.ts b/packages/components/src/theme/tokens.css.ts
index eeeaa07..64cfe4a 100644
--- a/packages/components/src/theme/tokens.css.ts
+++ b/packages/components/src/theme/tokens.css.ts
@@ -6,21 +6,23 @@ import { css } from 'react-strict-dom';
export const tokens = css.defineVars({
colorBackground: '#16181d',
- colorBackgroundSubtle: '#1b1f25',
- colorSurfacePrimary: '#20242b',
- colorSurfaceSecondary: '#252b33',
- colorSurfaceTertiary: '#2d343d',
- colorSurfaceHover: '#353d47',
- colorSurfaceAccent: '#f3efe8',
- colorBorderPrimary: 'rgba(255, 255, 255, 0.06)',
- colorBorderStrong: 'rgba(255, 255, 255, 0.12)',
- colorTextPrimary: '#f6f2eb',
- colorTextSecondary: '#cbc4b8',
- colorTextMuted: '#8f897e',
- colorAccent: '#f3efe8',
+ colorBackgroundDeep: '#0f1116',
+ colorBackgroundSubtle: '#21262f',
+ colorSurfacePrimary: '#2b313c',
+ colorSurfaceSecondary: '#323945',
+ colorSurfaceTertiary: '#3a414e',
+ colorSurfaceHover: '#434b58',
+ colorSurfaceAccent: '#e7eaf0',
+ colorBorderPrimary: '#282d35',
+ colorBorderStrong: '#3d4551',
+ colorTextPrimary: '#e7eaf0',
+ colorTextSecondary: '#c4ccd9',
+ colorTextMuted: '#98a1b3',
+ colorTextFaint: '#5e6678',
+ colorAccent: '#e8ebf2',
colorAccentHover: '#ffffff',
- colorAccentActive: '#ddd7cf',
- colorOnAccent: '#141517',
+ colorAccentActive: '#d5dae3',
+ colorOnAccent: '#0b0f17',
colorSuccess: '#8ab86d',
colorSuccessSubtle: 'rgba(138, 184, 109, 0.12)',
colorWarning: '#d4a04a',
@@ -29,11 +31,13 @@ export const tokens = css.defineVars({
colorDangerSubtle: 'rgba(215, 113, 113, 0.12)',
colorInfo: '#608aff',
colorInfoSubtle: 'rgba(96, 138, 255, 0.12)',
- colorAccentSubtle: 'rgba(243, 239, 232, 0.08)',
+ colorAccentSubtle: 'rgba(232, 235, 242, 0.08)',
colorScrim: '#000000',
colorShadow: 'rgba(0, 0, 0, 0.18)',
colorHighlight: 'rgba(255, 255, 255, 0.22)',
- colorFocusRing: '#d7d1c7',
+ colorOverlaySelected: 'rgba(255, 255, 255, 0.06)',
+ colorOverlayHover: 'rgba(255, 255, 255, 0.04)',
+ colorFocusRing: '#aab2c2',
space0: '0px',
space05: '2px',
space1: '4px',
@@ -75,8 +79,8 @@ export const tokens = css.defineVars({
lineHeightSnug: "1.35",
lineHeightNormal: "1.4",
lineHeightRelaxed: "1.5",
- fontFamilySans: "\"SF Pro Text\", \"SF Pro Display\", \"Helvetica Neue\", sans-serif",
- fontFamilyDisplay: "\"SF Pro Display\", \"SF Pro Text\", \"Helvetica Neue\", sans-serif",
+ fontFamilySans: "-apple-system, BlinkMacSystemFont, \"SF Pro Text\", \"Helvetica Neue\", Helvetica, system-ui, sans-serif",
+ fontFamilyDisplay: "-apple-system, BlinkMacSystemFont, \"SF Pro Text\", \"Helvetica Neue\", Helvetica, system-ui, sans-serif",
fontFamilyMono: "ui-monospace, \"SFMono-Regular\", \"Menlo\", \"Monaco\", \"Consolas\", \"Liberation Mono\", \"Courier New\", monospace",
});
diff --git a/packages/components/src/theme/tokens.json b/packages/components/src/theme/tokens.json
index d1095fc..ad4603e 100644
--- a/packages/components/src/theme/tokens.json
+++ b/packages/components/src/theme/tokens.json
@@ -2,21 +2,23 @@
"colors": {
"dark": {
"colorBackground": "#16181d",
- "colorBackgroundSubtle": "#1b1f25",
- "colorSurfacePrimary": "#20242b",
- "colorSurfaceSecondary": "#252b33",
- "colorSurfaceTertiary": "#2d343d",
- "colorSurfaceHover": "#353d47",
- "colorSurfaceAccent": "#f3efe8",
- "colorBorderPrimary": "rgba(255, 255, 255, 0.06)",
- "colorBorderStrong": "rgba(255, 255, 255, 0.12)",
- "colorTextPrimary": "#f6f2eb",
- "colorTextSecondary": "#cbc4b8",
- "colorTextMuted": "#8f897e",
- "colorAccent": "#f3efe8",
+ "colorBackgroundDeep": "#0f1116",
+ "colorBackgroundSubtle": "#21262f",
+ "colorSurfacePrimary": "#2b313c",
+ "colorSurfaceSecondary": "#323945",
+ "colorSurfaceTertiary": "#3a414e",
+ "colorSurfaceHover": "#434b58",
+ "colorSurfaceAccent": "#e7eaf0",
+ "colorBorderPrimary": "#282d35",
+ "colorBorderStrong": "#3d4551",
+ "colorTextPrimary": "#e7eaf0",
+ "colorTextSecondary": "#c4ccd9",
+ "colorTextMuted": "#98a1b3",
+ "colorTextFaint": "#5e6678",
+ "colorAccent": "#e8ebf2",
"colorAccentHover": "#ffffff",
- "colorAccentActive": "#ddd7cf",
- "colorOnAccent": "#141517",
+ "colorAccentActive": "#d5dae3",
+ "colorOnAccent": "#0b0f17",
"colorSuccess": "#8ab86d",
"colorSuccessSubtle": "rgba(138, 184, 109, 0.12)",
"colorWarning": "#d4a04a",
@@ -25,14 +27,17 @@
"colorDangerSubtle": "rgba(215, 113, 113, 0.12)",
"colorInfo": "#608aff",
"colorInfoSubtle": "rgba(96, 138, 255, 0.12)",
- "colorAccentSubtle": "rgba(243, 239, 232, 0.08)",
+ "colorAccentSubtle": "rgba(232, 235, 242, 0.08)",
"colorScrim": "#000000",
"colorShadow": "rgba(0, 0, 0, 0.18)",
"colorHighlight": "rgba(255, 255, 255, 0.22)",
- "colorFocusRing": "#d7d1c7"
+ "colorOverlaySelected": "rgba(255, 255, 255, 0.06)",
+ "colorOverlayHover": "rgba(255, 255, 255, 0.04)",
+ "colorFocusRing": "#aab2c2"
},
"light": {
"colorBackground": "#ece8e1",
+ "colorBackgroundDeep": "#e2dccf",
"colorBackgroundSubtle": "#f3efe8",
"colorSurfacePrimary": "#faf7f1",
"colorSurfaceSecondary": "#ffffff",
@@ -44,6 +49,7 @@
"colorTextPrimary": "#181a1d",
"colorTextSecondary": "#4f4a42",
"colorTextMuted": "#787168",
+ "colorTextFaint": "#807970",
"colorAccent": "#181a1d",
"colorAccentHover": "#000000",
"colorAccentActive": "#31353b",
@@ -60,6 +66,8 @@
"colorScrim": "#000000",
"colorShadow": "rgba(0, 0, 0, 0.10)",
"colorHighlight": "rgba(255, 255, 255, 0.50)",
+ "colorOverlaySelected": "rgba(0, 0, 0, 0.06)",
+ "colorOverlayHover": "rgba(0, 0, 0, 0.04)",
"colorFocusRing": "#272a2f"
}
},
@@ -115,8 +123,8 @@
"lineHeightRelaxed": "1.5"
},
"fontFamily": {
- "fontFamilySans": "\"SF Pro Text\", \"SF Pro Display\", \"Helvetica Neue\", sans-serif",
- "fontFamilyDisplay": "\"SF Pro Display\", \"SF Pro Text\", \"Helvetica Neue\", sans-serif",
+ "fontFamilySans": "-apple-system, BlinkMacSystemFont, \"SF Pro Text\", \"Helvetica Neue\", Helvetica, system-ui, sans-serif",
+ "fontFamilyDisplay": "-apple-system, BlinkMacSystemFont, \"SF Pro Text\", \"Helvetica Neue\", Helvetica, system-ui, sans-serif",
"fontFamilyMono": "ui-monospace, \"SFMono-Regular\", \"Menlo\", \"Monaco\", \"Consolas\", \"Liberation Mono\", \"Courier New\", monospace"
},
"fontFamilyNative": {
diff --git a/packages/components/src/theme/tokens.raw.ts b/packages/components/src/theme/tokens.raw.ts
index 84c7c08..6b905e7 100644
--- a/packages/components/src/theme/tokens.raw.ts
+++ b/packages/components/src/theme/tokens.raw.ts
@@ -6,21 +6,23 @@ export const rawTokens = {
colors: {
dark: {
colorBackground: "#16181d",
- colorBackgroundSubtle: "#1b1f25",
- colorSurfacePrimary: "#20242b",
- colorSurfaceSecondary: "#252b33",
- colorSurfaceTertiary: "#2d343d",
- colorSurfaceHover: "#353d47",
- colorSurfaceAccent: "#f3efe8",
- colorBorderPrimary: "rgba(255, 255, 255, 0.06)",
- colorBorderStrong: "rgba(255, 255, 255, 0.12)",
- colorTextPrimary: "#f6f2eb",
- colorTextSecondary: "#cbc4b8",
- colorTextMuted: "#8f897e",
- colorAccent: "#f3efe8",
+ colorBackgroundDeep: "#0f1116",
+ colorBackgroundSubtle: "#21262f",
+ colorSurfacePrimary: "#2b313c",
+ colorSurfaceSecondary: "#323945",
+ colorSurfaceTertiary: "#3a414e",
+ colorSurfaceHover: "#434b58",
+ colorSurfaceAccent: "#e7eaf0",
+ colorBorderPrimary: "#282d35",
+ colorBorderStrong: "#3d4551",
+ colorTextPrimary: "#e7eaf0",
+ colorTextSecondary: "#c4ccd9",
+ colorTextMuted: "#98a1b3",
+ colorTextFaint: "#5e6678",
+ colorAccent: "#e8ebf2",
colorAccentHover: "#ffffff",
- colorAccentActive: "#ddd7cf",
- colorOnAccent: "#141517",
+ colorAccentActive: "#d5dae3",
+ colorOnAccent: "#0b0f17",
colorSuccess: "#8ab86d",
colorSuccessSubtle: "rgba(138, 184, 109, 0.12)",
colorWarning: "#d4a04a",
@@ -29,14 +31,17 @@ export const rawTokens = {
colorDangerSubtle: "rgba(215, 113, 113, 0.12)",
colorInfo: "#608aff",
colorInfoSubtle: "rgba(96, 138, 255, 0.12)",
- colorAccentSubtle: "rgba(243, 239, 232, 0.08)",
+ colorAccentSubtle: "rgba(232, 235, 242, 0.08)",
colorScrim: "#000000",
colorShadow: "rgba(0, 0, 0, 0.18)",
colorHighlight: "rgba(255, 255, 255, 0.22)",
- colorFocusRing: "#d7d1c7",
+ colorOverlaySelected: "rgba(255, 255, 255, 0.06)",
+ colorOverlayHover: "rgba(255, 255, 255, 0.04)",
+ colorFocusRing: "#aab2c2",
},
light: {
colorBackground: "#ece8e1",
+ colorBackgroundDeep: "#e2dccf",
colorBackgroundSubtle: "#f3efe8",
colorSurfacePrimary: "#faf7f1",
colorSurfaceSecondary: "#ffffff",
@@ -48,6 +53,7 @@ export const rawTokens = {
colorTextPrimary: "#181a1d",
colorTextSecondary: "#4f4a42",
colorTextMuted: "#787168",
+ colorTextFaint: "#807970",
colorAccent: "#181a1d",
colorAccentHover: "#000000",
colorAccentActive: "#31353b",
@@ -64,6 +70,8 @@ export const rawTokens = {
colorScrim: "#000000",
colorShadow: "rgba(0, 0, 0, 0.10)",
colorHighlight: "rgba(255, 255, 255, 0.50)",
+ colorOverlaySelected: "rgba(0, 0, 0, 0.06)",
+ colorOverlayHover: "rgba(0, 0, 0, 0.04)",
colorFocusRing: "#272a2f",
},
},
@@ -119,8 +127,8 @@ export const rawTokens = {
lineHeightRelaxed: "1.5",
},
fontFamily: {
- fontFamilySans: "\"SF Pro Text\", \"SF Pro Display\", \"Helvetica Neue\", sans-serif",
- fontFamilyDisplay: "\"SF Pro Display\", \"SF Pro Text\", \"Helvetica Neue\", sans-serif",
+ fontFamilySans: "-apple-system, BlinkMacSystemFont, \"SF Pro Text\", \"Helvetica Neue\", Helvetica, system-ui, sans-serif",
+ fontFamilyDisplay: "-apple-system, BlinkMacSystemFont, \"SF Pro Text\", \"Helvetica Neue\", Helvetica, system-ui, sans-serif",
fontFamilyMono: "ui-monospace, \"SFMono-Regular\", \"Menlo\", \"Monaco\", \"Consolas\", \"Liberation Mono\", \"Courier New\", monospace",
},
} as const;
diff --git a/packages/components/src/theme/types.ts b/packages/components/src/theme/types.ts
index 9a71a77..5035c23 100644
--- a/packages/components/src/theme/types.ts
+++ b/packages/components/src/theme/types.ts
@@ -1,5 +1,6 @@
export interface ThemeColors {
colorBackground: string
+ colorBackgroundDeep: string
colorBackgroundSubtle: string
colorSurfacePrimary: string
colorSurfaceSecondary: string
@@ -11,6 +12,7 @@ export interface ThemeColors {
colorTextPrimary: string
colorTextSecondary: string
colorTextMuted: string
+ colorTextFaint: string
colorAccent: string
colorAccentHover: string
colorAccentActive: string
@@ -27,6 +29,8 @@ export interface ThemeColors {
colorScrim: string
colorShadow: string
colorHighlight: string
+ colorOverlaySelected: string
+ colorOverlayHover: string
colorFocusRing: string
}
diff --git a/packages/domain/src/feedback/index.ts b/packages/domain/src/feedback/index.ts
new file mode 100644
index 0000000..3c7d334
--- /dev/null
+++ b/packages/domain/src/feedback/index.ts
@@ -0,0 +1 @@
+export * from './submitFeedback'
diff --git a/packages/domain/src/feedback/submitFeedback.ts b/packages/domain/src/feedback/submitFeedback.ts
new file mode 100644
index 0000000..abcaba0
--- /dev/null
+++ b/packages/domain/src/feedback/submitFeedback.ts
@@ -0,0 +1,45 @@
+const DISCORD_EMBED_COLOR = 0x5865f2
+
+export interface FeedbackReport {
+ webhookUrl: string | undefined
+ title: string
+ message: string
+ version: string
+ platform: string
+ labels: { version: string; platform: string }
+}
+
+export async function submitFeedback({
+ webhookUrl,
+ title,
+ message,
+ version,
+ platform,
+ labels
+}: FeedbackReport): Promise<boolean> {
+ if (!webhookUrl || webhookUrl.includes('PLACEHOLDER')) return false
+
+ try {
+ const response = await fetch(webhookUrl, {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify({
+ embeds: [
+ {
+ title,
+ description: message,
+ color: DISCORD_EMBED_COLOR,
+ fields: [
+ { name: labels.version, value: `v${version}`, inline: true },
+ { name: labels.platform, value: platform, inline: true }
+ ],
+ timestamp: new Date().toISOString()
+ }
+ ]
+ })
+ })
+ return response.ok
+ } catch {
+ return false
+ }
+}
diff --git a/packages/domain/src/index.ts b/packages/domain/src/index.ts
index 8f8ea65..5210976 100644
--- a/packages/domain/src/index.ts
+++ b/packages/domain/src/index.ts
@@ -26,3 +26,4 @@ export * from './flags'
export * from './onboarding'
export * from './useSimulatedLoading'
export * from './pairing'
+export * from './feedback'
diff --git a/packages/locales/src/desktop-select-source.test.ts b/packages/locales/src/desktop-select-source.test.ts
index 17c2ddc..0e1651f 100644
--- a/packages/locales/src/desktop-select-source.test.ts
+++ b/packages/locales/src/desktop-select-source.test.ts
@@ -25,9 +25,9 @@ const desktopIndexCssSource = readFileSync(
new URL('../../../apps/desktop/src/renderer/index.css', import.meta.url),
'utf8'
)
-const settingsPanelSource = readFileSync(
+const languageSectionSource = readFileSync(
new URL(
- '../../../apps/desktop/src/renderer/components/Settings/SettingsPanel.tsx',
+ '../../../apps/desktop/src/renderer/components/Settings/sections/LanguageSection.tsx',
import.meta.url
),
'utf8'
@@ -57,9 +57,9 @@ describe('desktop Select implementation', () => {
expect(selectSource).toContain(
'style={option.fontFamily ? { fontFamily: option.fontFamily } : undefined}'
)
- expect(settingsPanelSource).toContain('getLocaleFontFamily')
- expect(settingsPanelSource).toContain('getFontFamilyCssVariables')
- expect(settingsPanelSource).toContain('fontFamily: getLocaleOptionFontFamily(option)')
+ expect(languageSectionSource).toContain('getLocaleFontFamily')
+ expect(languageSectionSource).toContain('getFontFamilyCssVariables')
+ expect(languageSectionSource).toContain('labelFontFamily={getLocaleOptionFontFamily(option)}')
})
it('keeps the desktop build script portable across Windows and Unix shells', () => {
diff --git a/packages/locales/src/locales/de-DE/common.json b/packages/locales/src/locales/de-DE/common.json
index 8f4c359..61c2e2f 100644
--- a/packages/locales/src/locales/de-DE/common.json
+++ b/packages/locales/src/locales/de-DE/common.json
@@ -25,10 +25,14 @@
"update": "Aktualisieren",
"downloadAll": "Alles herunterladen",
"skip": "Überspringen",
- "paste": "Einfügen"
+ "paste": "Einfügen",
+ "openLink": "Link öffnen",
+ "copyText": "Text kopieren"
},
"labels": {
"settings": "Einstellungen",
+ "collapseSidebar": "Seitenleiste einklappen",
+ "expandSidebar": "Seitenleiste ausklappen",
"language": "Sprache",
"systemDefault": "Systemstandard",
"camera": "Kamera",
@@ -56,7 +60,10 @@
"available": "Update verfügbar",
"restart": "Neu starten",
"update": "Aktualisieren",
- "restartFailed": "Neustart fehlgeschlagen – bitte beenden und erneut öffnen"
+ "restartFailed": "Neustart fehlgeschlagen – bitte beenden und erneut öffnen",
+ "description": "Eine neue Version mit den neuesten Fehlerbehebungen und Verbesserungen ist verfügbar.",
+ "updateNow": "Jetzt aktualisieren",
+ "notNow": "Später"
},
"status": {
"connected": "Verbunden"
diff --git a/packages/locales/src/locales/de-DE/send.json b/packages/locales/src/locales/de-DE/send.json
index 26d3a32..db32960 100644
--- a/packages/locales/src/locales/de-DE/send.json
+++ b/packages/locales/src/locales/de-DE/send.json
@@ -5,7 +5,7 @@
"description": "Wählen Sie eine oder mehrere Dateien aus und generieren Sie einen Einmalcode für eine direkte verschlüsselte Übertragung."
},
"preparing": {
- "title": "Transfer vorbereiten",
+ "title": "Verbindung wird hergestellt",
"description": "Vorbereiten der ausgewählten Dateien, bevor der Freigabecode angezeigt wird."
},
"waitingForReceiver": {
@@ -22,7 +22,7 @@
"sendFiles_other": "{{count}} Dateien senden",
"addFiles": "Dateien hinzufügen",
"addMoreFiles": "Fügen Sie weitere Dateien hinzu",
- "dragAndDrop": "Ziehen und ablegen",
+ "dragAndDrop": "Dateien zum Hinzufügen ablegen",
"clear": "Klar",
"endSession": "Sitzung beenden",
"pickFilesTitle": "Dateien hinzufügen",
@@ -32,8 +32,6 @@
"status": {
"waitingForPeer": "Warten auf Empfänger",
"peerConnected": "Empfänger verbunden",
- "uploadComplete": "Hochladen abgeschlossen",
- "uploadingFiles": "Hochladen von Dateien",
"uploaded": "Hochgeladen",
"uploading": "Hochladen…",
"waiting": "Warten",
@@ -89,16 +87,13 @@
"deviceOffline": "Gerät offline – erneut versuchen"
},
"dropzone": {
- "addMoreDescription": "oder klicken, um <link>weitere hinzuzufügen</link>",
- "browseDescription": "oder klicken zum <link>Durchsuchen</link>",
- "tapAddMoreDescription": "Tippen, um <link>weitere hinzuzufügen</link>",
- "tapBrowseDescription": "Tippen zum <link>Durchsuchen</link>",
- "orClickTo": "oder klicken zum",
+ "browseDescription": "oder <link>durchsuchen</link> Sie Ihren Computer",
"tapTo": "Tippen zum",
- "addMoreLink": "weitere hinzufügen",
+ "addMoreLink": "Hinzufügen",
"browseLink": "Durchsuchen"
},
"files": {
+ "addedFiles": "Hinzugefügte Dateien",
"removeLabel": "Entfernen Sie {{name}}"
}
}
diff --git a/packages/locales/src/locales/de-DE/settings.json b/packages/locales/src/locales/de-DE/settings.json
index 5eccd54..7d4a1ee 100644
--- a/packages/locales/src/locales/de-DE/settings.json
+++ b/packages/locales/src/locales/de-DE/settings.json
@@ -37,9 +37,7 @@
"noPairedDevices": "Noch keine gekoppelten Geräte",
"noPairedDevicesHint": "Koppeln Sie ein Gerät, um ohne Code zu senden.",
"showQrCode": "QR-Code anzeigen",
- "showQrCodeHint": "Zeigt einen Code auf diesem Bildschirm zum Scannen durch ein anderes Gerät an",
"scanQrCode": "QR-Code scannen",
- "scanQrCodeHint": "Scannen Sie mit Ihrer Kamera einen Kopplungscode auf einem anderen Gerät",
"enterCode": "Code eingeben",
"enterCodeHint": "Geben Sie einen von einem anderen Gerät geteilten Einladungscode ein oder fügen Sie ihn ein",
"codeLabel": "Kopplungscode",
diff --git a/packages/locales/src/locales/en-GB/common.json b/packages/locales/src/locales/en-GB/common.json
index 4bda1aa..9b1aeb6 100644
--- a/packages/locales/src/locales/en-GB/common.json
+++ b/packages/locales/src/locales/en-GB/common.json
@@ -25,10 +25,14 @@
"update": "Update",
"downloadAll": "Download all",
"skip": "Skip",
- "paste": "Paste"
+ "paste": "Paste",
+ "openLink": "Open Link",
+ "copyText": "Copy Text"
},
"labels": {
"settings": "Settings",
+ "collapseSidebar": "Collapse sidebar",
+ "expandSidebar": "Expand sidebar",
"language": "Language",
"systemDefault": "System default",
"camera": "Camera",
@@ -56,7 +60,10 @@
"available": "Update available",
"restart": "Restart",
"update": "Update",
- "restartFailed": "Restart failed — please quit and reopen"
+ "restartFailed": "Restart failed — please quit and reopen",
+ "description": "A new version is available with the latest fixes and improvements.",
+ "updateNow": "Update now",
+ "notNow": "Not now"
},
"status": {
"connected": "Connected"
diff --git a/packages/locales/src/locales/en-GB/send.json b/packages/locales/src/locales/en-GB/send.json
index 241408f..d04906e 100644
--- a/packages/locales/src/locales/en-GB/send.json
+++ b/packages/locales/src/locales/en-GB/send.json
@@ -5,7 +5,7 @@
"description": "Choose one or more files and generate a one-time code for a direct encrypted transfer."
},
"preparing": {
- "title": "Preparing transfer",
+ "title": "Setting up connection",
"description": "Preparing the selected files before the share code is revealed."
},
"waitingForReceiver": {
@@ -22,7 +22,7 @@
"sendFiles_other": "Send {{count}} files",
"addFiles": "Add files",
"addMoreFiles": "Add more files",
- "dragAndDrop": "Drag and drop",
+ "dragAndDrop": "Drop files to add them",
"clear": "Clear",
"endSession": "End session",
"pickFilesTitle": "Add files",
@@ -32,8 +32,6 @@
"status": {
"waitingForPeer": "Waiting for peer",
"peerConnected": "Peer connected",
- "uploadComplete": "Upload complete",
- "uploadingFiles": "Uploading files",
"uploaded": "Uploaded",
"uploading": "Uploading…",
"waiting": "Waiting",
@@ -89,16 +87,13 @@
"deviceOffline": "Device offline — try again"
},
"dropzone": {
- "addMoreDescription": "or click to <link>add more</link>",
- "browseDescription": "or click to <link>browse</link>",
- "tapAddMoreDescription": "Tap to <link>add more</link>",
- "tapBrowseDescription": "Tap to <link>browse</link>",
- "orClickTo": "or click to",
+ "browseDescription": "or <link>browse</link> your computer",
"tapTo": "Tap to",
"addMoreLink": "add more",
"browseLink": "browse"
},
"files": {
+ "addedFiles": "Added files",
"removeLabel": "Remove {{name}}"
}
}
diff --git a/packages/locales/src/locales/en-GB/settings.json b/packages/locales/src/locales/en-GB/settings.json
index 62c5a26..c1c7661 100644
--- a/packages/locales/src/locales/en-GB/settings.json
+++ b/packages/locales/src/locales/en-GB/settings.json
@@ -37,9 +37,7 @@
"noPairedDevices": "No paired devices yet",
"noPairedDevicesHint": "Pair a device to send without a code.",
"showQrCode": "Show QR Code",
- "showQrCodeHint": "Display a code on this screen for another device to scan",
"scanQrCode": "Scan QR Code",
- "scanQrCodeHint": "Use your camera to scan a pairing code on another device",
"enterCode": "Enter Code",
"enterCodeHint": "Type or paste an invite code shared from another device",
"codeLabel": "Pairing Code",
diff --git a/packages/locales/src/locales/en-US/common.json b/packages/locales/src/locales/en-US/common.json
index 4bda1aa..9b1aeb6 100644
--- a/packages/locales/src/locales/en-US/common.json
+++ b/packages/locales/src/locales/en-US/common.json
@@ -25,10 +25,14 @@
"update": "Update",
"downloadAll": "Download all",
"skip": "Skip",
- "paste": "Paste"
+ "paste": "Paste",
+ "openLink": "Open Link",
+ "copyText": "Copy Text"
},
"labels": {
"settings": "Settings",
+ "collapseSidebar": "Collapse sidebar",
+ "expandSidebar": "Expand sidebar",
"language": "Language",
"systemDefault": "System default",
"camera": "Camera",
@@ -56,7 +60,10 @@
"available": "Update available",
"restart": "Restart",
"update": "Update",
- "restartFailed": "Restart failed — please quit and reopen"
+ "restartFailed": "Restart failed — please quit and reopen",
+ "description": "A new version is available with the latest fixes and improvements.",
+ "updateNow": "Update now",
+ "notNow": "Not now"
},
"status": {
"connected": "Connected"
diff --git a/packages/locales/src/locales/en-US/send.json b/packages/locales/src/locales/en-US/send.json
index 241408f..d04906e 100644
--- a/packages/locales/src/locales/en-US/send.json
+++ b/packages/locales/src/locales/en-US/send.json
@@ -5,7 +5,7 @@
"description": "Choose one or more files and generate a one-time code for a direct encrypted transfer."
},
"preparing": {
- "title": "Preparing transfer",
+ "title": "Setting up connection",
"description": "Preparing the selected files before the share code is revealed."
},
"waitingForReceiver": {
@@ -22,7 +22,7 @@
"sendFiles_other": "Send {{count}} files",
"addFiles": "Add files",
"addMoreFiles": "Add more files",
- "dragAndDrop": "Drag and drop",
+ "dragAndDrop": "Drop files to add them",
"clear": "Clear",
"endSession": "End session",
"pickFilesTitle": "Add files",
@@ -32,8 +32,6 @@
"status": {
"waitingForPeer": "Waiting for peer",
"peerConnected": "Peer connected",
- "uploadComplete": "Upload complete",
- "uploadingFiles": "Uploading files",
"uploaded": "Uploaded",
"uploading": "Uploading…",
"waiting": "Waiting",
@@ -89,16 +87,13 @@
"deviceOffline": "Device offline — try again"
},
"dropzone": {
- "addMoreDescription": "or click to <link>add more</link>",
- "browseDescription": "or click to <link>browse</link>",
- "tapAddMoreDescription": "Tap to <link>add more</link>",
- "tapBrowseDescription": "Tap to <link>browse</link>",
- "orClickTo": "or click to",
+ "browseDescription": "or <link>browse</link> your computer",
"tapTo": "Tap to",
"addMoreLink": "add more",
"browseLink": "browse"
},
"files": {
+ "addedFiles": "Added files",
"removeLabel": "Remove {{name}}"
}
}
diff --git a/packages/locales/src/locales/en-US/settings.json b/packages/locales/src/locales/en-US/settings.json
index 62c5a26..c1c7661 100644
--- a/packages/locales/src/locales/en-US/settings.json
+++ b/packages/locales/src/locales/en-US/settings.json
@@ -37,9 +37,7 @@
"noPairedDevices": "No paired devices yet",
"noPairedDevicesHint": "Pair a device to send without a code.",
"showQrCode": "Show QR Code",
- "showQrCodeHint": "Display a code on this screen for another device to scan",
"scanQrCode": "Scan QR Code",
- "scanQrCodeHint": "Use your camera to scan a pairing code on another device",
"enterCode": "Enter Code",
"enterCodeHint": "Type or paste an invite code shared from another device",
"codeLabel": "Pairing Code",
diff --git a/packages/locales/src/locales/es-419/common.json b/packages/locales/src/locales/es-419/common.json
index 4c80f40..65c8978 100644
--- a/packages/locales/src/locales/es-419/common.json
+++ b/packages/locales/src/locales/es-419/common.json
@@ -25,10 +25,14 @@
"update": "Actualizar",
"downloadAll": "Descargar todo",
"skip": "Omitir",
- "paste": "Pegar"
+ "paste": "Pegar",
+ "openLink": "Abrir enlace",
+ "copyText": "Copiar texto"
},
"labels": {
"settings": "Configuración",
+ "collapseSidebar": "Contraer barra lateral",
+ "expandSidebar": "Expandir barra lateral",
"language": "Idioma",
"systemDefault": "Predeterminado del sistema",
"camera": "Cámara",
@@ -56,7 +60,10 @@
"available": "Actualización disponible",
"restart": "Reiniciar",
"update": "Actualizar",
- "restartFailed": "Error al reiniciar: salga y vuelva a abrir"
+ "restartFailed": "Error al reiniciar: salga y vuelva a abrir",
+ "description": "Hay una nueva versión disponible con las últimas correcciones y mejoras.",
+ "updateNow": "Actualizar ahora",
+ "notNow": "Ahora no"
},
"status": {
"connected": "Conectado"
diff --git a/packages/locales/src/locales/es-419/send.json b/packages/locales/src/locales/es-419/send.json
index 0afe853..859bb4b 100644
--- a/packages/locales/src/locales/es-419/send.json
+++ b/packages/locales/src/locales/es-419/send.json
@@ -5,7 +5,7 @@
"description": "Elija uno o más archivos y genere un código único para una transferencia cifrada directa."
},
"preparing": {
- "title": "Preparando la transferencia",
+ "title": "Estableciendo conexión",
"description": "Preparar los archivos seleccionados antes de que se revele el código compartido."
},
"waitingForReceiver": {
@@ -22,7 +22,7 @@
"sendFiles_other": "Enviar {{count}} archivos",
"addFiles": "Agregar archivos",
"addMoreFiles": "Agregar más archivos",
- "dragAndDrop": "Arrastrar y soltar",
+ "dragAndDrop": "Suelta archivos para agregarlos",
"clear": "Borrar",
"endSession": "Finalizar sesión",
"pickFilesTitle": "Agregar archivos",
@@ -32,8 +32,6 @@
"status": {
"waitingForPeer": "Esperando al destinatario",
"peerConnected": "Destinatario conectado",
- "uploadComplete": "Subida completa",
- "uploadingFiles": "Subiendo archivos",
"uploaded": "subido",
"uploading": "Subiendo…",
"waiting": "esperando",
@@ -89,16 +87,13 @@
"deviceOffline": "Dispositivo sin conexión: inténtalo de nuevo"
},
"dropzone": {
- "addMoreDescription": "o haz clic para <link>agregar más</link>",
- "browseDescription": "o haz clic para <link>buscar</link>",
- "tapAddMoreDescription": "Toca para <link>agregar más</link>",
- "tapBrowseDescription": "Toca para <link>buscar</link>",
- "orClickTo": "o haz clic para",
+ "browseDescription": "o <link>explora</link> tu computadora",
"tapTo": "Toca para",
"addMoreLink": "agregar más",
"browseLink": "buscar"
},
"files": {
+ "addedFiles": "Archivos agregados",
"removeLabel": "Eliminar {{name}}"
}
}
diff --git a/packages/locales/src/locales/es-419/settings.json b/packages/locales/src/locales/es-419/settings.json
index 02ed7d8..acd9e9d 100644
--- a/packages/locales/src/locales/es-419/settings.json
+++ b/packages/locales/src/locales/es-419/settings.json
@@ -37,9 +37,7 @@
"noPairedDevices": "Aún no hay dispositivos emparejados",
"noPairedDevicesHint": "Empareja un dispositivo para enviar sin código.",
"showQrCode": "Mostrar código QR",
- "showQrCodeHint": "Muestra un código en esta pantalla para que otro dispositivo lo escanee",
"scanQrCode": "Escanear código QR",
- "scanQrCodeHint": "Usa tu cámara para escanear un código de emparejamiento en otro dispositivo",
"enterCode": "Introducir código",
"enterCodeHint": "Escribe o pega un código de invitación compartido desde otro dispositivo",
"codeLabel": "Código de emparejamiento",
diff --git a/packages/locales/src/locales/es-ES/common.json b/packages/locales/src/locales/es-ES/common.json
index 7da49bd..c48aaba 100644
--- a/packages/locales/src/locales/es-ES/common.json
+++ b/packages/locales/src/locales/es-ES/common.json
@@ -25,10 +25,14 @@
"update": "Actualizar",
"downloadAll": "Descargar todo",
"skip": "Omitir",
- "paste": "Pegar"
+ "paste": "Pegar",
+ "openLink": "Abrir enlace",
+ "copyText": "Copiar texto"
},
"labels": {
"settings": "Ajustes",
+ "collapseSidebar": "Contraer barra lateral",
+ "expandSidebar": "Expandir barra lateral",
"language": "Idioma",
"systemDefault": "Predeterminado del sistema",
"camera": "Cámara",
@@ -56,7 +60,10 @@
"available": "Actualización disponible",
"restart": "Reiniciar",
"update": "Actualizar",
- "restartFailed": "Error al reiniciar: salga y vuelva a abrir"
+ "restartFailed": "Error al reiniciar: salga y vuelva a abrir",
+ "description": "Hay una nueva versión disponible con las últimas correcciones y mejoras.",
+ "updateNow": "Actualizar ahora",
+ "notNow": "Ahora no"
},
"status": {
"connected": "Conectado"
diff --git a/packages/locales/src/locales/es-ES/send.json b/packages/locales/src/locales/es-ES/send.json
index 5945ffe..a723bd0 100644
--- a/packages/locales/src/locales/es-ES/send.json
+++ b/packages/locales/src/locales/es-ES/send.json
@@ -5,7 +5,7 @@
"description": "Elija uno o más archivos y genere un código único para una transferencia cifrada directa."
},
"preparing": {
- "title": "Preparando la transferencia",
+ "title": "Estableciendo conexión",
"description": "Preparar los archivos seleccionados antes de que se revele el código compartido."
},
"waitingForReceiver": {
@@ -22,7 +22,7 @@
"sendFiles_other": "Enviar {{count}} archivos",
"addFiles": "Agregar archivos",
"addMoreFiles": "Agregar más archivos",
- "dragAndDrop": "Arrastrar y soltar",
+ "dragAndDrop": "Suelta archivos para añadirlos",
"clear": "Borrar",
"endSession": "Finalizar sesión",
"pickFilesTitle": "Agregar archivos",
@@ -32,8 +32,6 @@
"status": {
"waitingForPeer": "Esperando al destinatario",
"peerConnected": "Destinatario conectado",
- "uploadComplete": "Subida completa",
- "uploadingFiles": "Subiendo archivos",
"uploaded": "subido",
"uploading": "Subiendo…",
"waiting": "esperando",
@@ -89,16 +87,13 @@
"deviceOffline": "Dispositivo sin conexión: inténtalo de nuevo"
},
"dropzone": {
- "addMoreDescription": "o haz clic para <link>añadir más</link>",
- "browseDescription": "o haz clic para <link>buscar</link>",
- "tapAddMoreDescription": "Toca para <link>añadir más</link>",
- "tapBrowseDescription": "Toca para <link>buscar</link>",
- "orClickTo": "o haz clic para",
+ "browseDescription": "o <link>explora</link> tu ordenador",
"tapTo": "Toca para",
"addMoreLink": "añadir más",
"browseLink": "buscar"
},
"files": {
+ "addedFiles": "Archivos añadidos",
"removeLabel": "Eliminar {{name}}"
}
}
diff --git a/packages/locales/src/locales/es-ES/settings.json b/packages/locales/src/locales/es-ES/settings.json
index 52af4c4..46a3695 100644
--- a/packages/locales/src/locales/es-ES/settings.json
+++ b/packages/locales/src/locales/es-ES/settings.json
@@ -37,9 +37,7 @@
"noPairedDevices": "Aún no hay dispositivos emparejados",
"noPairedDevicesHint": "Empareja un dispositivo para enviar sin código.",
"showQrCode": "Mostrar código QR",
- "showQrCodeHint": "Muestra un código en esta pantalla para que otro dispositivo lo escanee",
"scanQrCode": "Escanear código QR",
- "scanQrCodeHint": "Usa tu cámara para escanear un código de emparejamiento en otro dispositivo",
"enterCode": "Introducir código",
"enterCodeHint": "Escribe o pega un código de invitación compartido desde otro dispositivo",
"codeLabel": "Código de emparejamiento",
diff --git a/packages/locales/src/locales/fr-FR/common.json b/packages/locales/src/locales/fr-FR/common.json
index 2042e7b..de03846 100644
--- a/packages/locales/src/locales/fr-FR/common.json
+++ b/packages/locales/src/locales/fr-FR/common.json
@@ -25,10 +25,14 @@
"update": "Mettre à jour",
"downloadAll": "Téléchargez tout",
"skip": "Ignorer",
- "paste": "Coller"
+ "paste": "Coller",
+ "openLink": "Ouvrir le lien",
+ "copyText": "Copier le texte"
},
"labels": {
"settings": "Paramètres",
+ "collapseSidebar": "Réduire la barre latérale",
+ "expandSidebar": "Développer la barre latérale",
"language": "Langue",
"systemDefault": "Valeur système",
"camera": "Caméra",
@@ -56,7 +60,10 @@
"available": "Mise à jour disponible",
"restart": "Redémarrer",
"update": "Mettre à jour",
- "restartFailed": "Échec du redémarrage: veuillez quitter et rouvrir"
+ "restartFailed": "Échec du redémarrage: veuillez quitter et rouvrir",
+ "description": "Une nouvelle version est disponible avec les derniers correctifs et améliorations.",
+ "updateNow": "Mettre à jour",
+ "notNow": "Plus tard"
},
"status": {
"connected": "Connecté"
diff --git a/packages/locales/src/locales/fr-FR/send.json b/packages/locales/src/locales/fr-FR/send.json
index 67aa13f..2c15ecf 100644
--- a/packages/locales/src/locales/fr-FR/send.json
+++ b/packages/locales/src/locales/fr-FR/send.json
@@ -5,7 +5,7 @@
"description": "Choisissez un ou plusieurs fichiers et générez un code à usage unique pour un transfert crypté direct."
},
"preparing": {
- "title": "Préparation du transfert",
+ "title": "Établissement de la connexion",
"description": "Préparation des fichiers sélectionnés avant la révélation du code de partage."
},
"waitingForReceiver": {
@@ -22,7 +22,7 @@
"sendFiles_other": "Envoyer {{count}} fichiers",
"addFiles": "Ajouter des fichiers",
"addMoreFiles": "Ajouter plus de fichiers",
- "dragAndDrop": "Glisser et déposer",
+ "dragAndDrop": "Déposez des fichiers à ajouter",
"clear": "Effacer",
"endSession": "Fin de séance",
"pickFilesTitle": "Ajouter des fichiers",
@@ -32,8 +32,6 @@
"status": {
"waitingForPeer": "En attente du destinataire",
"peerConnected": "Destinataire connecté",
- "uploadComplete": "Téléchargement terminé",
- "uploadingFiles": "Téléchargement de fichiers",
"uploaded": "Téléchargé",
"uploading": "Téléchargement…",
"waiting": "En attente",
@@ -89,16 +87,13 @@
"deviceOffline": "Appareil hors ligne — réessayez"
},
"dropzone": {
- "addMoreDescription": "ou cliquez pour <link>en ajouter</link>",
- "browseDescription": "ou cliquez pour <link>parcourir</link>",
- "tapAddMoreDescription": "Touchez pour <link>en ajouter</link>",
- "tapBrowseDescription": "Touchez pour <link>parcourir</link>",
- "orClickTo": "ou cliquez pour",
+ "browseDescription": "ou <link>parcourez</link> votre ordinateur",
"tapTo": "Touchez pour",
"addMoreLink": "en ajouter",
"browseLink": "parcourir"
},
"files": {
+ "addedFiles": "Fichiers ajoutés",
"removeLabel": "Supprimer {{name}}"
}
}
diff --git a/packages/locales/src/locales/fr-FR/settings.json b/packages/locales/src/locales/fr-FR/settings.json
index 3d37c6f..4fda75e 100644
--- a/packages/locales/src/locales/fr-FR/settings.json
+++ b/packages/locales/src/locales/fr-FR/settings.json
@@ -37,9 +37,7 @@
"noPairedDevices": "Aucun appareil associé pour l’instant",
"noPairedDevicesHint": "Associez un appareil pour envoyer sans code.",
"showQrCode": "Afficher le code QR",
- "showQrCodeHint": "Affiche un code sur cet écran pour qu’un autre appareil le scanne",
"scanQrCode": "Scanner le code QR",
- "scanQrCodeHint": "Utilisez votre caméra pour scanner un code d’association sur un autre appareil",
"enterCode": "Saisir le code",
"enterCodeHint": "Saisissez ou collez un code d’invitation partagé depuis un autre appareil",
"codeLabel": "Code d’association",
diff --git a/packages/locales/src/locales/it-IT/common.json b/packages/locales/src/locales/it-IT/common.json
index a336b5e..10a7c7f 100644
--- a/packages/locales/src/locales/it-IT/common.json
+++ b/packages/locales/src/locales/it-IT/common.json
@@ -25,10 +25,14 @@
"update": "Aggiorna",
"downloadAll": "Scarica tutto",
"skip": "Salta",
- "paste": "Incolla"
+ "paste": "Incolla",
+ "openLink": "Apri link",
+ "copyText": "Copia testo"
},
"labels": {
"settings": "Impostazioni",
+ "collapseSidebar": "Comprimi barra laterale",
+ "expandSidebar": "Espandi barra laterale",
"language": "Lingua",
"systemDefault": "Predefinito di sistema",
"camera": "Fotocamera",
@@ -56,7 +60,10 @@
"available": "Aggiornamento disponibile",
"restart": "Riavvia",
"update": "Aggiorna",
- "restartFailed": "Riavvio non riuscito: esci e riapri"
+ "restartFailed": "Riavvio non riuscito: esci e riapri",
+ "description": "È disponibile una nuova versione con le ultime correzioni e i miglioramenti più recenti.",
+ "updateNow": "Aggiorna ora",
+ "notNow": "Non ora"
},
"status": {
"connected": "Connesso"
diff --git a/packages/locales/src/locales/it-IT/send.json b/packages/locales/src/locales/it-IT/send.json
index 0fcb54e..4e4da33 100644
--- a/packages/locales/src/locales/it-IT/send.json
+++ b/packages/locales/src/locales/it-IT/send.json
@@ -5,7 +5,7 @@
"description": "Scegli uno o più file e genera un codice monouso per un trasferimento crittografato diretto."
},
"preparing": {
- "title": "Preparazione del trasferimento",
+ "title": "Connessione in corso",
"description": "Preparazione dei file selezionati prima che venga rivelato il codice di condivisione."
},
"waitingForReceiver": {
@@ -22,7 +22,7 @@
"sendFiles_other": "Invia {{count}} file",
"addFiles": "Aggiungi file",
"addMoreFiles": "Aggiungi più file",
- "dragAndDrop": "Trascina e rilascia",
+ "dragAndDrop": "Trascina i file per aggiungerli",
"clear": "Chiaro",
"endSession": "Fine sessione",
"pickFilesTitle": "Aggiungi file",
@@ -32,8 +32,6 @@
"status": {
"waitingForPeer": "In attesa del destinatario",
"peerConnected": "Destinatario connesso",
- "uploadComplete": "Caricamento completato",
- "uploadingFiles": "Caricamento file",
"uploaded": "Caricato",
"uploading": "Caricamento…",
"waiting": "In attesa",
@@ -89,16 +87,13 @@
"deviceOffline": "Dispositivo offline — riprova"
},
"dropzone": {
- "addMoreDescription": "oppure fai clic per <link>aggiungerne altri</link>",
- "browseDescription": "oppure fai clic per <link>sfogliare</link>",
- "tapAddMoreDescription": "Tocca per <link>aggiungerne altri</link>",
- "tapBrowseDescription": "Tocca per <link>sfogliare</link>",
- "orClickTo": "oppure fai clic per",
+ "browseDescription": "o <link>sfoglia</link> il tuo computer",
"tapTo": "Tocca per",
"addMoreLink": "aggiungerne altri",
"browseLink": "sfogliare"
},
"files": {
+ "addedFiles": "File aggiunti",
"removeLabel": "Rimuovi {{name}}"
}
}
diff --git a/packages/locales/src/locales/it-IT/settings.json b/packages/locales/src/locales/it-IT/settings.json
index 6c0381c..dfee0a0 100644
--- a/packages/locales/src/locales/it-IT/settings.json
+++ b/packages/locales/src/locales/it-IT/settings.json
@@ -37,9 +37,7 @@
"noPairedDevices": "Ancora nessun dispositivo accoppiato",
"noPairedDevicesHint": "Accoppia un dispositivo per inviare senza codice.",
"showQrCode": "Mostra codice QR",
- "showQrCodeHint": "Mostra un codice su questo schermo da scansionare con un altro dispositivo",
"scanQrCode": "Scansiona codice QR",
- "scanQrCodeHint": "Usa la fotocamera per scansionare un codice di accoppiamento su un altro dispositivo",
"enterCode": "Inserisci codice",
"enterCodeHint": "Digita o incolla un codice di invito condiviso da un altro dispositivo",
"codeLabel": "Codice di accoppiamento",
diff --git a/packages/locales/src/locales/ja-JP/common.json b/packages/locales/src/locales/ja-JP/common.json
index 526b091..0badaf8 100644
--- a/packages/locales/src/locales/ja-JP/common.json
+++ b/packages/locales/src/locales/ja-JP/common.json
@@ -25,10 +25,14 @@
"update": "更新",
"downloadAll": "すべてダウンロード",
"skip": "スキップ",
- "paste": "貼り付け"
+ "paste": "貼り付け",
+ "openLink": "リンクを開く",
+ "copyText": "テキストをコピー"
},
"labels": {
"settings": "設定",
+ "collapseSidebar": "サイドバーを折りたたむ",
+ "expandSidebar": "サイドバーを展開する",
"language": "言語",
"systemDefault": "システム設定",
"camera": "カメラ",
@@ -56,7 +60,10 @@
"available": "更新があります",
"restart": "再起動",
"update": "更新",
- "restartFailed": "再起動に失敗しました — 終了して開き直してください"
+ "restartFailed": "再起動に失敗しました — 終了して開き直してください",
+ "description": "最新の修正と改善を含む新しいバージョンが利用可能です。",
+ "updateNow": "今すぐ更新",
+ "notNow": "後で"
},
"status": {
"connected": "接続済み"
diff --git a/packages/locales/src/locales/ja-JP/send.json b/packages/locales/src/locales/ja-JP/send.json
index 79d4fbb..26ff492 100644
--- a/packages/locales/src/locales/ja-JP/send.json
+++ b/packages/locales/src/locales/ja-JP/send.json
@@ -5,7 +5,7 @@
"description": "1つ以上のファイルを選び、直接暗号化転送用のワンタイムコードを生成します。"
},
"preparing": {
- "title": "転送を準備中",
+ "title": "接続を設定しています",
"description": "共有コードを表示する前に、選択したファイルを準備しています。"
},
"waitingForReceiver": {
@@ -22,7 +22,7 @@
"sendFiles_other": "{{count}} 個のファイルを送信",
"addFiles": "ファイルを追加",
"addMoreFiles": "さらに追加",
- "dragAndDrop": "ドラッグ&ドロップ",
+ "dragAndDrop": "ファイルをドロップして追加",
"clear": "クリア",
"endSession": "セッション終了",
"pickFilesTitle": "ファイルを追加",
@@ -32,8 +32,6 @@
"status": {
"waitingForPeer": "受信者を待機中",
"peerConnected": "受信者が接続済み",
- "uploadComplete": "アップロード完了",
- "uploadingFiles": "ファイルをアップロード中",
"uploaded": "アップロード済み",
"uploading": "アップロード中…",
"waiting": "待機中",
@@ -89,16 +87,13 @@
"deviceOffline": "デバイスはオフラインです — もう一度お試しください"
},
"dropzone": {
- "addMoreDescription": "またはクリックして<link>さらに追加</link>",
- "browseDescription": "またはクリックして<link>参照</link>",
- "tapAddMoreDescription": "タップして<link>さらに追加</link>",
- "tapBrowseDescription": "タップして<link>参照</link>",
- "orClickTo": "またはクリックして",
+ "browseDescription": "または<link>コンピュータを参照</link>",
"tapTo": "タップして",
"addMoreLink": "さらに追加",
"browseLink": "参照"
},
"files": {
+ "addedFiles": "追加したファイル",
"removeLabel": "{{name}} を削除"
}
}
diff --git a/packages/locales/src/locales/ja-JP/settings.json b/packages/locales/src/locales/ja-JP/settings.json
index 92c638e..a58c479 100644
--- a/packages/locales/src/locales/ja-JP/settings.json
+++ b/packages/locales/src/locales/ja-JP/settings.json
@@ -37,9 +37,7 @@
"noPairedDevices": "ペアリング済みのデバイスはまだありません",
"noPairedDevicesHint": "デバイスをペアリングすると、コードなしで送信できます。",
"showQrCode": "QRコードを表示",
- "showQrCodeHint": "この画面にコードを表示し、別のデバイスでスキャンします",
"scanQrCode": "QRコードをスキャン",
- "scanQrCodeHint": "カメラで別のデバイスのペアリングコードをスキャンします",
"enterCode": "コードを入力",
"enterCodeHint": "別のデバイスから共有された招待コードを入力または貼り付けます",
"codeLabel": "ペアリングコード",
diff --git a/packages/locales/src/locales/ko-KR/common.json b/packages/locales/src/locales/ko-KR/common.json
index f60099c..db992ea 100644
--- a/packages/locales/src/locales/ko-KR/common.json
+++ b/packages/locales/src/locales/ko-KR/common.json
@@ -25,10 +25,14 @@
"update": "업데이트",
"downloadAll": "모두 다운로드",
"skip": "건너뛰기",
- "paste": "붙여넣기"
+ "paste": "붙여넣기",
+ "openLink": "링크 열기",
+ "copyText": "텍스트 복사"
},
"labels": {
"settings": "설정",
+ "collapseSidebar": "사이드바 접기",
+ "expandSidebar": "사이드바 펼치기",
"language": "언어",
"systemDefault": "시스템 기본값",
"camera": "카메라",
@@ -56,7 +60,10 @@
"available": "업데이트 가능",
"restart": "다시 시작",
"update": "업데이트",
- "restartFailed": "다시 시작하지 못했습니다. 종료하고 다시 시작해 주세요."
+ "restartFailed": "다시 시작하지 못했습니다. 종료하고 다시 시작해 주세요.",
+ "description": "최신 수정 사항과 개선 사항이 포함된 새 버전이 있습니다.",
+ "updateNow": "지금 업데이트",
+ "notNow": "나중에"
},
"status": {
"connected": "연결됨"
diff --git a/packages/locales/src/locales/ko-KR/send.json b/packages/locales/src/locales/ko-KR/send.json
index 3531134..107f420 100644
--- a/packages/locales/src/locales/ko-KR/send.json
+++ b/packages/locales/src/locales/ko-KR/send.json
@@ -5,7 +5,7 @@
"description": "하나 이상의 파일을 선택하고 직접 암호화된 전송을 위한 일회성 코드를 생성하세요."
},
"preparing": {
- "title": "전송 준비 중",
+ "title": "연결을 설정하는 중",
"description": "공유 코드가 공개되기 전에 선택한 파일을 준비 중입니다."
},
"waitingForReceiver": {
@@ -22,7 +22,7 @@
"sendFiles_other": "{{count}}개 파일 보내기",
"addFiles": "파일 추가",
"addMoreFiles": "더 많은 파일 추가",
- "dragAndDrop": "드래그 앤 드롭",
+ "dragAndDrop": "파일을 끌어다 놓아 추가",
"clear": "지우기",
"endSession": "세션 종료",
"pickFilesTitle": "파일 추가",
@@ -32,8 +32,6 @@
"status": {
"waitingForPeer": "수신자를 기다리는 중",
"peerConnected": "수신자 연결됨",
- "uploadComplete": "업로드 완료",
- "uploadingFiles": "파일 업로드",
"uploaded": "업로드됨",
"uploading": "업로드 중…",
"waiting": "대기 중",
@@ -89,16 +87,13 @@
"deviceOffline": "기기 오프라인 — 다시 시도하세요"
},
"dropzone": {
- "addMoreDescription": "또는 클릭하여 <link>더 추가</link>",
- "browseDescription": "또는 클릭하여 <link>찾아보기</link>",
- "tapAddMoreDescription": "탭하여 <link>더 추가</link>",
- "tapBrowseDescription": "탭하여 <link>찾아보기</link>",
- "orClickTo": "또는 클릭하여",
+ "browseDescription": "또는 <link>컴퓨터에서 찾아보기</link>",
"tapTo": "탭하여",
"addMoreLink": "더 추가",
"browseLink": "찾아보기"
},
"files": {
+ "addedFiles": "추가된 파일",
"removeLabel": "{{name}} 삭제"
}
}
diff --git a/packages/locales/src/locales/ko-KR/settings.json b/packages/locales/src/locales/ko-KR/settings.json
index 64479a2..840fe00 100644
--- a/packages/locales/src/locales/ko-KR/settings.json
+++ b/packages/locales/src/locales/ko-KR/settings.json
@@ -37,9 +37,7 @@
"noPairedDevices": "아직 페어링된 기기가 없습니다",
"noPairedDevicesHint": "기기를 페어링하면 코드 없이 보낼 수 있습니다.",
"showQrCode": "QR 코드 표시",
- "showQrCodeHint": "다른 기기가 스캔할 수 있도록 이 화면에 코드를 표시합니다",
"scanQrCode": "QR 코드 스캔",
- "scanQrCodeHint": "카메라로 다른 기기의 페어링 코드를 스캔하세요",
"enterCode": "코드 입력",
"enterCodeHint": "다른 기기에서 공유한 초대 코드를 입력하거나 붙여넣으세요",
"codeLabel": "페어링 코드",
diff --git a/packages/locales/src/locales/pt-BR/common.json b/packages/locales/src/locales/pt-BR/common.json
index 247f60e..fab2822 100644
--- a/packages/locales/src/locales/pt-BR/common.json
+++ b/packages/locales/src/locales/pt-BR/common.json
@@ -25,10 +25,14 @@
"update": "Atualizar",
"downloadAll": "Baixar tudo",
"skip": "Pular",
- "paste": "Colar"
+ "paste": "Colar",
+ "openLink": "Abrir link",
+ "copyText": "Copiar texto"
},
"labels": {
"settings": "Configurações",
+ "collapseSidebar": "Recolher barra lateral",
+ "expandSidebar": "Expandir barra lateral",
"language": "Idioma",
"systemDefault": "Padrão do sistema",
"camera": "Câmera",
@@ -56,7 +60,10 @@
"available": "Atualização disponível",
"restart": "Reiniciar",
"update": "Atualizar",
- "restartFailed": "Falha na reinicialização – saia e reabra"
+ "restartFailed": "Falha na reinicialização – saia e reabra",
+ "description": "Uma nova versão está disponível com as últimas correções e melhorias.",
+ "updateNow": "Atualizar agora",
+ "notNow": "Agora não"
},
"status": {
"connected": "Conectado"
diff --git a/packages/locales/src/locales/pt-BR/send.json b/packages/locales/src/locales/pt-BR/send.json
index 7f01b69..f0887df 100644
--- a/packages/locales/src/locales/pt-BR/send.json
+++ b/packages/locales/src/locales/pt-BR/send.json
@@ -5,7 +5,7 @@
"description": "Escolha um ou mais arquivos e gere um código único para uma transferência criptografada direta."
},
"preparing": {
- "title": "Preparando transferência",
+ "title": "Estabelecendo conexão",
"description": "Preparando os arquivos selecionados antes que o código de compartilhamento seja revelado."
},
"waitingForReceiver": {
@@ -22,7 +22,7 @@
"sendFiles_other": "Enviar {{count}} arquivos",
"addFiles": "Adicionar arquivos",
"addMoreFiles": "Adicionar mais arquivos",
- "dragAndDrop": "Arraste e solte",
+ "dragAndDrop": "Solte arquivos para adicioná-los",
"clear": "Limpar",
"endSession": "Encerrar sessão",
"pickFilesTitle": "Adicionar arquivos",
@@ -32,8 +32,6 @@
"status": {
"waitingForPeer": "Aguardando destinatário",
"peerConnected": "Destinatário conectado",
- "uploadComplete": "Envio concluído",
- "uploadingFiles": "Enviando arquivos",
"uploaded": "Enviado",
"uploading": "Enviando…",
"waiting": "Aguardando",
@@ -89,16 +87,13 @@
"deviceOffline": "Dispositivo off-line — tente novamente"
},
"dropzone": {
- "addMoreDescription": "ou clique para <link>adicionar mais</link>",
- "browseDescription": "ou clique para <link>procurar</link>",
- "tapAddMoreDescription": "Toque para <link>adicionar mais</link>",
- "tapBrowseDescription": "Toque para <link>procurar</link>",
- "orClickTo": "ou clique para",
+ "browseDescription": "ou <link>navegue</link> no seu computador",
"tapTo": "Toque para",
"addMoreLink": "adicionar mais",
"browseLink": "procurar"
},
"files": {
+ "addedFiles": "Arquivos adicionados",
"removeLabel": "Remover {{name}}"
}
}
diff --git a/packages/locales/src/locales/pt-BR/settings.json b/packages/locales/src/locales/pt-BR/settings.json
index 14fbe2f..d0b1df5 100644
--- a/packages/locales/src/locales/pt-BR/settings.json
+++ b/packages/locales/src/locales/pt-BR/settings.json
@@ -37,9 +37,7 @@
"noPairedDevices": "Ainda não há dispositivos emparelhados",
"noPairedDevicesHint": "Emparelhe um dispositivo para enviar sem código.",
"showQrCode": "Mostrar código QR",
- "showQrCodeHint": "Mostra um código nesta tela para outro dispositivo escanear",
"scanQrCode": "Escanear código QR",
- "scanQrCodeHint": "Use a câmera para escanear um código de emparelhamento em outro dispositivo",
"enterCode": "Inserir código",
"enterCodeHint": "Digite ou cole um código de convite compartilhado de outro dispositivo",
"codeLabel": "Código de emparelhamento",
diff --git a/packages/locales/src/locales/zh-CN/common.json b/packages/locales/src/locales/zh-CN/common.json
index a981a08..3bf0e7e 100644
--- a/packages/locales/src/locales/zh-CN/common.json
+++ b/packages/locales/src/locales/zh-CN/common.json
@@ -25,10 +25,14 @@
"update": "更新",
"downloadAll": "下载全部",
"skip": "跳过",
- "paste": "粘贴"
+ "paste": "粘贴",
+ "openLink": "打开链接",
+ "copyText": "复制文本"
},
"labels": {
"settings": "设置",
+ "collapseSidebar": "收起侧边栏",
+ "expandSidebar": "展开侧边栏",
"language": "语言",
"systemDefault": "系统默认",
"camera": "摄像头",
@@ -56,7 +60,10 @@
"available": "可用更新",
"restart": "重启",
"update": "更新",
- "restartFailed": "重新启动失败 - 请退出并重新启动"
+ "restartFailed": "重新启动失败 - 请退出并重新启动",
+ "description": "新版本现已推出,包含最新的修复和改进。",
+ "updateNow": "立即更新",
+ "notNow": "以后再说"
},
"status": {
"connected": "已连接"
diff --git a/packages/locales/src/locales/zh-CN/send.json b/packages/locales/src/locales/zh-CN/send.json
index 9634c87..d5dc602 100644
--- a/packages/locales/src/locales/zh-CN/send.json
+++ b/packages/locales/src/locales/zh-CN/send.json
@@ -5,7 +5,7 @@
"description": "选择一个或多个文件并生成一次性代码以进行直接加密传输。"
},
"preparing": {
- "title": "准备转移",
+ "title": "正在建立连接",
"description": "在共享代码公开之前准备好选定的文件。"
},
"waitingForReceiver": {
@@ -22,7 +22,7 @@
"sendFiles_other": "发送 {{count}} 个文件",
"addFiles": "添加文件",
"addMoreFiles": "添加更多文件",
- "dragAndDrop": "拖放",
+ "dragAndDrop": "拖放文件以添加",
"clear": "清除",
"endSession": "结束会话",
"pickFilesTitle": "添加文件",
@@ -32,8 +32,6 @@
"status": {
"waitingForPeer": "等待接收方",
"peerConnected": "接收方已连接",
- "uploadComplete": "上传完成",
- "uploadingFiles": "上传文件",
"uploaded": "已上传",
"uploading": "正在上传...",
"waiting": "等待",
@@ -89,16 +87,13 @@
"deviceOffline": "设备离线 — 请重试"
},
"dropzone": {
- "addMoreDescription": "或点击<link>继续添加</link>",
- "browseDescription": "或点击<link>浏览</link>",
- "tapAddMoreDescription": "点按<link>继续添加</link>",
- "tapBrowseDescription": "点按<link>浏览</link>",
- "orClickTo": "或点击",
+ "browseDescription": "或<link>浏览</link>你的电脑",
"tapTo": "点按",
"addMoreLink": "继续添加",
"browseLink": "浏览"
},
"files": {
+ "addedFiles": "已添加的文件",
"removeLabel": "删除{{name}}"
}
}
diff --git a/packages/locales/src/locales/zh-CN/settings.json b/packages/locales/src/locales/zh-CN/settings.json
index e70a27d..83bc5f0 100644
--- a/packages/locales/src/locales/zh-CN/settings.json
+++ b/packages/locales/src/locales/zh-CN/settings.json
@@ -37,9 +37,7 @@
"noPairedDevices": "暂无已配对设备",
"noPairedDevicesHint": "配对设备即可无需代码发送。",
"showQrCode": "显示二维码",
- "showQrCodeHint": "在此屏幕显示代码,供其他设备扫描",
"scanQrCode": "扫描二维码",
- "scanQrCodeHint": "使用相机扫描其他设备上的配对码",
"enterCode": "输入代码",
"enterCodeHint": "输入或粘贴从其他设备共享的邀请码",
"codeLabel": "配对码",
diff --git a/packages/locales/src/locales/zh-TW/common.json b/packages/locales/src/locales/zh-TW/common.json
index 044a927..405e79b 100644
--- a/packages/locales/src/locales/zh-TW/common.json
+++ b/packages/locales/src/locales/zh-TW/common.json
@@ -25,10 +25,14 @@
"update": "更新",
"downloadAll": "下載全部",
"skip": "略過",
- "paste": "貼上"
+ "paste": "貼上",
+ "openLink": "開啟連結",
+ "copyText": "複製文字"
},
"labels": {
"settings": "設定",
+ "collapseSidebar": "收合側邊欄",
+ "expandSidebar": "展開側邊欄",
"language": "語言",
"systemDefault": "系統預設",
"camera": "相機",
@@ -56,7 +60,10 @@
"available": "可用更新",
"restart": "重新啟動",
"update": "更新",
- "restartFailed": "重新啟動失敗 - 請退出並重新啟動"
+ "restartFailed": "重新啟動失敗 - 請退出並重新啟動",
+ "description": "新版本現已推出,包含最新的修正與改進。",
+ "updateNow": "立即更新",
+ "notNow": "稍後再說"
},
"status": {
"connected": "已連線"
diff --git a/packages/locales/src/locales/zh-TW/send.json b/packages/locales/src/locales/zh-TW/send.json
index 52426fb..619e746 100644
--- a/packages/locales/src/locales/zh-TW/send.json
+++ b/packages/locales/src/locales/zh-TW/send.json
@@ -5,7 +5,7 @@
"description": "選擇一個或多個檔案並產生一次性代碼以進行直接加密傳輸。"
},
"preparing": {
- "title": "準備轉移",
+ "title": "正在建立連線",
"description": "在共享代碼公開之前準備好選定的文件。"
},
"waitingForReceiver": {
@@ -22,7 +22,7 @@
"sendFiles_other": "傳送 {{count}} 個檔案",
"addFiles": "新增文件",
"addMoreFiles": "新增更多文件",
- "dragAndDrop": "拖放",
+ "dragAndDrop": "拖放檔案以新增",
"clear": "清除",
"endSession": "結束會話",
"pickFilesTitle": "新增文件",
@@ -32,8 +32,6 @@
"status": {
"waitingForPeer": "等待接收方",
"peerConnected": "接收方已連線",
- "uploadComplete": "上傳完成",
- "uploadingFiles": "上傳文件",
"uploaded": "已上傳",
"uploading": "正在上傳...",
"waiting": "等待",
@@ -89,16 +87,13 @@
"deviceOffline": "裝置離線 — 請重試"
},
"dropzone": {
- "addMoreDescription": "或點擊<link>繼續新增</link>",
- "browseDescription": "或點擊<link>瀏覽</link>",
- "tapAddMoreDescription": "點一下<link>繼續新增</link>",
- "tapBrowseDescription": "點一下<link>瀏覽</link>",
- "orClickTo": "或點擊",
+ "browseDescription": "或<link>瀏覽</link>你的電腦",
"tapTo": "點一下",
"addMoreLink": "繼續新增",
"browseLink": "瀏覽"
},
"files": {
+ "addedFiles": "已新增的檔案",
"removeLabel": "删除{{name}}"
}
}
diff --git a/packages/locales/src/locales/zh-TW/settings.json b/packages/locales/src/locales/zh-TW/settings.json
index bcdec03..e60338d 100644
--- a/packages/locales/src/locales/zh-TW/settings.json
+++ b/packages/locales/src/locales/zh-TW/settings.json
@@ -37,9 +37,7 @@
"noPairedDevices": "尚無已配對裝置",
"noPairedDevicesHint": "配對裝置即可免代碼傳送。",
"showQrCode": "顯示 QR 碼",
- "showQrCodeHint": "在此螢幕顯示代碼,供其他裝置掃描",
"scanQrCode": "掃描 QR 碼",
- "scanQrCodeHint": "使用相機掃描其他裝置上的配對碼",
"enterCode": "輸入代碼",
"enterCodeHint": "輸入或貼上從其他裝置共享的邀請碼",
"codeLabel": "配對碼",
diff --git a/packages/locales/src/mobile-font-coverage.test.ts b/packages/locales/src/mobile-font-coverage.test.ts
index a2e90ff..baa1955 100644
--- a/packages/locales/src/mobile-font-coverage.test.ts
+++ b/packages/locales/src/mobile-font-coverage.test.ts
@@ -55,7 +55,7 @@ describe('mobile font coverage', () => {
})
it('keeps shared row text metrics explicit for CJK fonts', () => {
- const settingsSource = readFileSync(join(mobileRoot.pathname, 'app/settings.tsx'), 'utf8')
+ const aboutSource = readFileSync(join(mobileRoot.pathname, 'app/about.tsx'), 'utf8')
const linkRowSource = readFileSync(
join(repoRoot.pathname, 'packages/components/src/components/LinkRow/styles.ts'),
'utf8'
@@ -67,8 +67,8 @@ describe('mobile font coverage', () => {
expect(linkRowSource).toMatch(
/subtitle:\s*\{[^}]*fontSize:\s*tokens\.fontSizeSm,[^}]*lineHeight:\s*tokens\.lineHeightNormal/s
)
- expect(settingsSource).toMatch(/brandName:\s*\{[^}]*fontSize:\s*13,[^}]*lineHeight:\s*18/s)
- expect(settingsSource).toMatch(/brandTagline:\s*\{[^}]*fontSize:\s*12,[^}]*lineHeight:\s*16/s)
+ expect(aboutSource).toMatch(/brandName:\s*\{[^}]*fontSize:\s*20,[^}]*lineHeight:\s*26/s)
+ expect(aboutSource).toMatch(/brandTagline:\s*\{[^}]*fontSize:\s*14,[^}]*lineHeight:\s*20/s)
})
it('returns from the language screen before changing the active i18n language', () => {
diff --git a/packages/locales/src/source-copy.test.ts b/packages/locales/src/source-copy.test.ts
index cb67197..4a9f57f 100644
--- a/packages/locales/src/source-copy.test.ts
+++ b/packages/locales/src/source-copy.test.ts
@@ -25,7 +25,7 @@ const hardcodedCopyChecks = [
snippets: ['Transfer issue']
},
{
- file: 'apps/desktop/src/renderer/components/Settings/SettingsPanel.tsx',
+ file: 'apps/desktop/src/renderer/components/Settings/sections/AboutSection.tsx',
snippets: ["{' and '}", "{'.'}"]
},
{