mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 03:26:47 +08:00
61c0d01da3
Added a recording popup UI for the audio recording feature in the desktop app, improving the user experience when capturing audio from applications. ### What changed? - Created a new popup window system for displaying recording controls - Added a dedicated recording UI with start/stop controls and status indicators - Moved audio encoding logic from the main app to a dedicated module - Implemented smooth animations for popup appearance/disappearance - Updated the recording workflow to show visual feedback during recording process - Added internationalization support for recording-related text - Modified the recording status flow to include new states: new, recording, stopped, ready fix AF-2340
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import { ThemeProvider } from '@affine/core/components/theme-provider';
|
|
import { configureDesktopApiModule } from '@affine/core/modules/desktop-api';
|
|
import { configureI18nModule, I18nProvider } from '@affine/core/modules/i18n';
|
|
import {
|
|
configureElectronStateStorageImpls,
|
|
configureStorageModule,
|
|
} from '@affine/core/modules/storage';
|
|
import { configureEssentialThemeModule } from '@affine/core/modules/theme';
|
|
import { appInfo } from '@affine/electron-api';
|
|
import { Framework, FrameworkRoot } from '@toeverything/infra';
|
|
|
|
import * as styles from './app.css';
|
|
import { Recording } from './recording';
|
|
|
|
const framework = new Framework();
|
|
configureI18nModule(framework);
|
|
configureEssentialThemeModule(framework);
|
|
configureStorageModule(framework);
|
|
configureElectronStateStorageImpls(framework);
|
|
configureDesktopApiModule(framework);
|
|
const frameworkProvider = framework.provider();
|
|
|
|
const mode = appInfo?.windowName as 'notification' | 'recording';
|
|
|
|
export function App() {
|
|
return (
|
|
<FrameworkRoot framework={frameworkProvider}>
|
|
<ThemeProvider>
|
|
<I18nProvider>
|
|
<div className={styles.root}>
|
|
{mode === 'recording' && <Recording />}
|
|
</div>
|
|
</I18nProvider>
|
|
</ThemeProvider>
|
|
</FrameworkRoot>
|
|
);
|
|
}
|