feat: refresh xdrop positioning

This commit is contained in:
xixu-me committed 2026-03-22 15:48:18 +08:00
1 parent 2f3a5daafc
commit d5f6e392a5
18 files changed
+127 -123

No files matched your search

+10 -7
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Xdrop is an open source encrypted file transfer app for browsers and agent-driven terminal workflows, keeping plaintext file names, contents, and keys off the server."
content="Xdrop is an open source end-to-end encrypted file transfer app for humans and agents, keeping plaintext file names, contents, and keys off the server."
/>
<meta
name="robots"
@@ -20,26 +20,29 @@
<meta property="og:type" content="website" />
<meta
property="og:title"
content="Open Source Encrypted File Transfer for Browsers and Agents | Xdrop"
content="Open Source End-to-End Encrypted File Transfer for Humans and Agents | Xdrop"
/>
<meta
property="og:description"
content="Xdrop is an open source encrypted file transfer app for browsers and agent-driven terminal workflows, keeping plaintext file names, contents, and keys off the server."
content="Xdrop is an open source end-to-end encrypted file transfer app for humans and agents, keeping plaintext file names, contents, and keys off the server."
/>
<meta property="og:image" content="/brand-lockup-horizontal.png" />
<meta property="og:image:alt" content="Xdrop horizontal brand lockup" />
<meta
property="og:image:alt"
content="Open source end-to-end encrypted file transfer for humans and agents. Plaintext file names, contents, and keys stay off the server."
/>
<meta name="twitter:card" content="summary_large_image" />
<meta
name="twitter:title"
content="Open Source Encrypted File Transfer for Browsers and Agents | Xdrop"
content="Open Source End-to-End Encrypted File Transfer for Humans and Agents | Xdrop"
/>
<meta
name="twitter:description"
content="Xdrop is an open source encrypted file transfer app for browsers and agent-driven terminal workflows, keeping plaintext file names, contents, and keys off the server."
content="Xdrop is an open source end-to-end encrypted file transfer app for humans and agents, keeping plaintext file names, contents, and keys off the server."
/>
<meta name="twitter:image" content="/brand-lockup-horizontal.png" />
<meta name="theme-color" content="#12140f" />
<title>Open Source Encrypted File Transfer for Browsers and Agents | Xdrop</title>
<title>Open Source End-to-End Encrypted File Transfer for Humans and Agents | Xdrop</title>
</head>
<body>
<div id="root"></div>
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "Xdrop",
"short_name": "Xdrop",
"description": "Xdrop is an open source encrypted file transfer app for browsers and agent-driven terminal workflows, keeping plaintext file names, contents, and keys off the server.",
"description": "Xdrop is an open source end-to-end encrypted file transfer app for humans and agents, keeping plaintext file names, contents, and keys off the server.",
"theme_color": "#12140f",
"background_color": "#f7f2e8",
"display": "standalone",
+1 -1
View File
@@ -1,4 +1,4 @@
const CACHE_NAME = 'xdrop-static-v4'
const CACHE_NAME = 'xdrop-static-v5'
const STATIC_ASSETS = [
'/manifest.webmanifest',
'/brand-symbol.svg',
+4 -3
View File
@@ -10,7 +10,8 @@ const siteUrl = process.env.VITE_SITE_URL?.trim().replace(/\/+$/u, '') || ''
const SITE_NAME = 'Xdrop'
const DEFAULT_OG_IMAGE_PATH = '/brand-lockup-horizontal.png'
const DEFAULT_LOGO_PATH = '/brand-symbol-512.png'
const DEFAULT_OG_IMAGE_ALT = 'Xdrop horizontal brand lockup'
const DEFAULT_OG_IMAGE_ALT =
'Open source end-to-end encrypted file transfer for humans and agents. Plaintext file names, contents, and keys stay off the server.'
const DEFAULT_OG_TYPE = 'website'
const REPOSITORY_URL = 'https://github.com/xixu-me/xdrop'
const DEFAULT_ROBOTS =
@@ -18,9 +19,9 @@ const DEFAULT_ROBOTS =
const PRIVATE_ROBOTS = 'noindex, nofollow, noarchive, nosnippet'
const STRUCTURED_DATA_ID = 'xdrop-structured-data-static'
const HOME_TITLE = 'Open Source Encrypted File Transfer for Browsers and Agents | Xdrop'
const HOME_TITLE = 'Open Source End-to-End Encrypted File Transfer for Humans and Agents | Xdrop'
const HOME_DESCRIPTION =
'Xdrop is an open source encrypted file transfer app for browsers and agent-driven terminal workflows, keeping plaintext file names, contents, and keys off the server.'
'Xdrop is an open source end-to-end encrypted file transfer app for humans and agents, keeping plaintext file names, contents, and keys off the server.'
const HISTORY_PAGE_TITLE = 'Manage Transfers on This Device | Xdrop'
const HISTORY_PAGE_DESCRIPTION =
'Manage encrypted transfers stored in this browser on this device. There is no account or cross-device history.'
+1
View File
@@ -21,6 +21,7 @@ describe('Shell', () => {
expect(screen.getByRole('link', { name: 'Xdrop' })).toHaveAttribute('href', '/')
expect(screen.getByRole('link', { name: 'Send' })).toHaveAttribute('href', '/')
expect(screen.getByRole('link', { name: 'Transfers' })).toHaveAttribute('href', '/transfers')
expect(screen.getByText('End-to-end encrypted file transfer')).toBeInTheDocument()
expect(screen.getByText('Transfers content')).toBeInTheDocument()
expect(screen.getByRole('link', { name: 'View the license' }).closest('p')).toHaveTextContent(
`Developed by ${AUTHOR_NAME} and released under the GNU Affero General Public License v3.0 only.`,
+1 -1
View File
@@ -20,7 +20,7 @@ export function Shell() {
/>
<span className="brand-copy">
<span className="brand-mark">Xdrop</span>
<span className="brand-note">Encrypted file transfer</span>
<span className="brand-note">End-to-end encrypted file transfer</span>
</span>
</NavLink>
<nav className="nav">
+1 -1
View File
@@ -27,7 +27,7 @@ describe('HomePage', () => {
expect(usePageMetadataMock).toHaveBeenCalledWith(
expect.objectContaining({
title: 'Open Source Encrypted File Transfer for Browsers and Agents | Xdrop',
title: 'Open Source End-to-End Encrypted File Transfer for Humans and Agents | Xdrop',
structuredData: expect.arrayContaining([
expect.objectContaining({
'@type': 'Organization',
@@ -160,16 +160,20 @@ describe('UploadStudio', () => {
draftState.sources = []
})
it('shows browser-first positioning with agent workflow support copy', async () => {
it('shows messaging-aligned positioning for humans and agents', async () => {
renderStudio()
expect(await screen.findByText('Encrypted file transfer.')).toBeInTheDocument()
expect(await screen.findByText('End-to-end encrypted file transfer.')).toBeInTheDocument()
expect(
screen.getByText(
/agent-driven terminal workflows, keeping plaintext file names, contents, and keys off the server\./,
/end-to-end encrypted file transfer app for humans and agents, keeping plaintext file names, contents, and keys off the server\./,
),
).toBeInTheDocument()
expect(
screen.getByText(
/Humans can use Xdrop in the browser for direct sharing, and agents can use Xdrop/i,
),
).toBeInTheDocument()
expect(screen.getByText(/Use Xdrop in the browser for normal sharing, or/i)).toBeInTheDocument()
expect(screen.getByRole('link', { name: 'through an agent' })).toHaveAttribute(
'href',
'https://github.com/xixu-me/xdrop?tab=readme-ov-file#use-via-agents',
@@ -244,10 +244,10 @@ export function UploadStudio() {
<div className="upload-hero-shell">
<div className="page-hero-copy upload-hero-copy">
<p className="eyebrow">End-to-end encryption</p>
<h1 className="page-hero-title">Encrypted file transfer.</h1>
<h1 className="page-hero-title">End-to-end encrypted file transfer.</h1>
<p className="lead">{PROJECT_ONE_LINER}</p>
<p className="muted">
Use Xdrop in the browser for normal sharing, or{' '}
Humans can use Xdrop in the browser for direct sharing, and agents can use Xdrop{' '}
<a
className="inline-link"
href="https://github.com/xixu-me/xdrop?tab=readme-ov-file#use-via-agents"
@@ -256,8 +256,7 @@ export function UploadStudio() {
>
through an agent
</a>{' '}
when you need to move files out of a cloud server, remote container, or automated
terminal workflow.
in cloud servers, remote containers, and automated terminal workflows.
</p>
</div>
</div>
+6 -6
View File
@@ -4,13 +4,12 @@
export const SITE_NAME = 'Xdrop'
export const PROJECT_ONE_LINER =
'Xdrop is an open source encrypted file transfer app for browsers and agent-driven terminal workflows, keeping plaintext file names, contents, and keys off the server.'
export const SHORT_POSITIONING_SUMMARY =
'Browser-first encrypted file transfer, with agent-ready terminal workflows.'
'Xdrop is an open source end-to-end encrypted file transfer app for humans and agents, keeping plaintext file names, contents, and keys off the server.'
export const SHORT_POSITIONING_SUMMARY = 'End-to-end encrypted file transfer for humans and agents.'
export const TERMINAL_SUPPORT_BLURB =
'Use Xdrop in the browser for normal sharing, or through an agent when you need to move files out of a cloud server, remote container, or automated terminal workflow.'
'Agents can use Xdrop to upload files, return end-to-end encrypted share links, and use Xdrop links for local decryption.'
export const DEFAULT_SEO_TITLE =
'Open Source Encrypted File Transfer for Browsers and Agents | Xdrop'
'Open Source End-to-End Encrypted File Transfer for Humans and Agents | Xdrop'
export const DEFAULT_SEO_DESCRIPTION = PROJECT_ONE_LINER
export const HISTORY_PAGE_TITLE = 'Manage Transfers on This Device | Xdrop'
export const HISTORY_PAGE_DESCRIPTION =
@@ -25,7 +24,8 @@ export const NOT_FOUND_PAGE_TITLE = 'Page Not Found | Xdrop'
export const NOT_FOUND_PAGE_DESCRIPTION =
'The address does not map to a page in Xdrop. If this came from a shared transfer, ask the sender to resend the complete share details.'
export const DEFAULT_OG_IMAGE_PATH = '/brand-lockup-horizontal.png'
export const DEFAULT_OG_IMAGE_ALT = 'Xdrop horizontal brand lockup'
export const DEFAULT_OG_IMAGE_ALT =
'Open source end-to-end encrypted file transfer for humans and agents. Plaintext file names, contents, and keys stay off the server.'
export const DEFAULT_LOGO_PATH = '/brand-symbol-512.png'
export const REPOSITORY_URL = 'https://github.com/xixu-me/xdrop'
export const AUTHOR_NAME = 'Xi Xu'
@@ -27,7 +27,7 @@ describe('usePageMetadata', () => {
render(
<MemoryRouter initialEntries={['/']}>
<MetadataProbe
title="Open Source Encrypted File Transfer for Browsers and Agents | Xdrop"
title="Open Source End-to-End Encrypted File Transfer for Humans and Agents | Xdrop"
description="SEO test description"
structuredData={{
'@context': 'https://schema.org',
@@ -39,12 +39,12 @@ describe('usePageMetadata', () => {
)
expect(document.title).toBe(
'Open Source Encrypted File Transfer for Browsers and Agents | Xdrop',
'Open Source End-to-End Encrypted File Transfer for Humans and Agents | Xdrop',
)
expect(readMetaByName('description')).toBe('SEO test description')
expect(readMetaByName('robots')).toContain('index, follow')
expect(readMetaByProperty('og:title')).toBe(
'Open Source Encrypted File Transfer for Browsers and Agents | Xdrop',
'Open Source End-to-End Encrypted File Transfer for Humans and Agents | Xdrop',
)
expect(readMetaByProperty('og:url')).toBe(new URL('/', window.location.origin).toString())
expect(readCanonical()).toBe(new URL('/', window.location.origin).toString())
@@ -91,7 +91,7 @@ describe('usePageMetadata', () => {
expect(document.head.querySelectorAll('meta[name="description"]')).toHaveLength(1)
expect(document.head.querySelectorAll('link[rel="canonical"]')).toHaveLength(1)
expect(readMetaByName('description')).toContain(
'Xdrop is an open source encrypted file transfer app for browsers and agent-driven terminal workflows',
'Xdrop is an open source end-to-end encrypted file transfer app for humans and agents',
)
expect(readMetaByName('robots')).toContain('index, follow')
expect(readMetaByProperty('og:type')).toBe('website')
+2 -2
View File
@@ -26,8 +26,8 @@ export default defineConfig({
environment: 'jsdom',
setupFiles: './src/test/setup.ts',
globals: true,
// Coverage runs can stall with forked workers on Windows, so prefer threads there.
pool: process.platform === 'win32' ? 'threads' : 'forks',
// Threads worker startup is flaky on Windows in Vitest 4, and forks also match CI.
pool: 'forks',
coverage: {
provider: 'v8',
reporter: ['text', 'lcov'],