Replace the press-to-play demo and the "see how it works" button with an example that keeps playing on the right: hold Right Alt, the capsule appears with live wave bars, elapsed time and the partial transcript, releasing shows the processing bar, and the cleaned sentence is pasted at the cursor of a notes window. It cycles through two samples per language. - Same numbers as apps/desktop recording-tip: 9 bars with cos weights, 100 ms updates, 0.5 smoothing, +/-35% jitter, 2-28 px, per-bar colours, 120 px progress bar min(95, (1 - 1/(1 + 1.5t)) * 100)%. - WCAG 2.2.2: a pause button; stops when off screen or the tab is hidden. Reduced motion shows one still frame. The animation is aria-hidden with a text description for screen readers. Chinese and Japanese transcripts appear three characters at a time. - Add 404.html so unknown paths stop falling back to the landing page, delete the duplicate accept-invite.html (/accept-invite/ is canonical) and link it straight to /#download, and move the legal pages off the retired orange accent (primary button contrast 5.2:1).
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { cpSync, mkdirSync } from 'node:fs'
|
|
import { dirname, join } from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
const siteRoot = dirname(fileURLToPath(import.meta.url))
|
|
const safePublicFiles = [
|
|
'404.html',
|
|
'.well-known/assetlinks.json',
|
|
'accept-invite.css',
|
|
'accept-invite.js',
|
|
'accept-invite/index.html',
|
|
'download.html',
|
|
'favicon.svg',
|
|
'legal.css',
|
|
'privacy/index.html',
|
|
'terms/index.html',
|
|
'delete-account/index.html',
|
|
]
|
|
|
|
export default defineConfig({
|
|
// Installers ship only through the Forgejo feed, never from this site. Only this
|
|
// non-binary allowlist can reach dist, so a stray local `public/releases` copy
|
|
// (git-ignored) can never be deployed.
|
|
publicDir: false,
|
|
plugins: [
|
|
react(),
|
|
{
|
|
name: 'copy-safe-public-files',
|
|
closeBundle() {
|
|
for (const relativePath of safePublicFiles) {
|
|
const destination = join(siteRoot, 'dist', relativePath)
|
|
mkdirSync(dirname(destination), { recursive: true })
|
|
cpSync(join(siteRoot, 'public', relativePath), destination, { errorOnExist: true })
|
|
}
|
|
},
|
|
},
|
|
],
|
|
base: './',
|
|
})
|